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 SummaryFieldsModifier and TypeFieldDescriptionprivate static final doubleprivate static final doubleprivate booleanprivate final doubleprivate final doubleprivate doubleprivate doubleFields inherited from class trclib.dataprocessor.TrcFilterinstanceName, tracer
- 
Constructor SummaryConstructorsConstructorDescriptionTrcKalmanFilter(String instanceName) Constructor: Create an instance of the object.TrcKalmanFilter(String instanceName, double kQ, double kR) Constructor: Create an instance of the object.
- 
Method SummaryModifier and TypeMethodDescriptiondoublefilterData(double data) This method returns the filtered data.voidreset()This method resets the filter.
- 
Field Details- 
DEF_KQprivate static final double DEF_KQ- See Also:
 
- 
DEF_KRprivate static final double DEF_KR- See Also:
 
- 
kQprivate final double kQ
- 
kRprivate final double kR
- 
prevPprivate double prevP
- 
prevXEstprivate double prevXEst
- 
initializedprivate boolean initialized
 
- 
- 
Constructor Details- 
TrcKalmanFilterConstructor: Create an instance of the object.- Parameters:
- instanceName- specifies the instance name.
- kQ- specifies the KQ constant.
- kR- specifies the KR constant.
 
- 
TrcKalmanFilterConstructor: Create an instance of the object.- Parameters:
- instanceName- specifies the instance name.
 
 
- 
- 
Method Details- 
resetpublic void reset()This method resets the filter.
- 
filterDatapublic double filterData(double data) This method returns the filtered data.- Specified by:
- filterDatain class- TrcFilter
- Parameters:
- data- specifies the data value to be filtered.
- Returns:
- filtered data.
 
 
-