#include <SimpleManeuveringFilter.h>
Public Member Functions | |
SimpleManeuveringFilter (int measurementDimension=1) | |
SimpleManeuveringFilter constructor specifiying the number of measurements we would like to filter with this filter. | |
void | setManeuveringTime (double tau=30) |
Sets the maneuvering time of the filter. | |
void | setProcessStdDev (double s=1) |
Sets the standard deviation of the process noise. | |
void | setMeasurementStdDev (double s=1) |
Sets the standard deviation of the measurement noise. | |
double | getManeuveringTime () const |
Returns the maneuvering time in number of calls to run(). | |
double | getProcessStdDev () const |
Returns the standard deviation of the process noise. | |
double | getMeasurementStdDev () const |
Returns the standard deviation of the measurement noise. | |
void | init (const double state0[]) |
Initializes this filter with the parameters (process and measurement noises, maneuvering time) and the initial state state0. | |
void | run (const double measurement[]) |
Runs the filter with the given measurement. | |
void | getState (double state[]) const |
Gets the current state as modeled by this filter. | |
void | setState (const double state[]) |
Sets the state without initializing this filter with new parameters. |
It provides a set of easy to use functions for parameter setup, and sets up the matrices for a reasonable simple filter.
For each measurement, the Kalman filter keeps two state values: an approximation of the "real" noise-less measurement, and its rate of change (speed). All measurements are assumed uncorrolated, independent, but each have the same process noise, measurement noise, and maneuvering time.
To use this class, construct an instance with the number of measurements you want to use it for, set the various parameters (maneuvering time, process noise stddev, measurement noise stddev), call init() with an initial estimate of the state, and then call run() whenever you have new measurements (or not). After every run(), the currently estimated state can be queried with getState().
|
Returns the maneuvering time in number of calls to run().
|
|
Returns the standard deviation of the measurement noise.
|
|
Returns the standard deviation of the process noise.
|
|
Gets the current state as modeled by this filter.
|
|
Initializes this filter with the parameters (process and measurement noises, maneuvering time) and the initial state state0.
|
|
Runs the filter with the given measurement. If measurement == NULL, runs the filter without measurement (no correction).
|
|
Sets the maneuvering time of the filter. The maneuvering time consists of a constant indicating how many calls to run() it takes in average for a state to stop changing after starting to change. The change is assumed to take place at a constant rate (constant speed, no acceleration).
|
|
Sets the standard deviation of the measurement noise.
|
|
Sets the standard deviation of the process noise. Indicates the change in the rate of change (acceleration) that usually happens in the process, but that is not modeled by this filter.
|
|
Sets the state without initializing this filter with new parameters.
|