Package trclib.dataprocessor
Class TrcKalmanFilter
java.lang.Object
trclib.dataprocessor.TrcFilter
trclib.dataprocessor.TrcKalmanFilter
This class implements the Kalman filter. It is useful for filtering noise from the sensor data.
-
Field Summary
Fields inherited from class trclib.dataprocessor.TrcFilter
instanceName, tracer
-
Constructor Summary
ConstructorsConstructorDescriptionTrcKalmanFilter
(String instanceName) Constructor: Create an instance of the object.TrcKalmanFilter
(String instanceName, double kQ, double kR) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptiondouble
filterData
(double data) This method returns the filtered data.void
reset()
This method resets the filter.
-
Constructor Details
-
TrcKalmanFilter
Constructor: Create an instance of the object.- Parameters:
instanceName
- specifies the instance name.kQ
- specifies the KQ constant.kR
- specifies the KR constant.
-
TrcKalmanFilter
Constructor: Create an instance of the object.- Parameters:
instanceName
- specifies the instance name.
-
-
Method Details
-
reset
public void reset()This method resets the filter. -
filterData
public double filterData(double data) This method returns the filtered data.- Specified by:
filterData
in classTrcFilter
- Parameters:
data
- specifies the data value to be filtered.- Returns:
- filtered data.
-