Class TrcIIRFilter

java.lang.Object
trclib.dataprocessor.TrcFilter
trclib.dataprocessor.TrcIIRFilter

public class TrcIIRFilter extends TrcFilter
This class implements the Infinite Impulse Response filter. It is useful for filtering noise from the sensor data.
  • Field Details

    • DEF_WEIGHT

      private static final double DEF_WEIGHT
      See Also:
    • weight

      private final double weight
    • filteredData

      private double filteredData
  • Constructor Details

    • TrcIIRFilter

      public TrcIIRFilter(String instanceName, double weight)
      Constructor: Create an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
      weight - specifies the weight of the current data point.
    • TrcIIRFilter

      public TrcIIRFilter(String instanceName)
      Constructor: Create an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
  • Method Details

    • reset

      public void reset()
      This method resets the filter.
      Specified by:
      reset in class TrcFilter
    • filterData

      public double filterData(double data)
      This method returns the filtered data.
      Specified by:
      filterData in class TrcFilter
      Parameters:
      data - specifies the data value to be filtered.
      Returns:
      filtered data.