i.e. the filter equations are:
x_(k+1) = x_k + w_k z_k = x_k + v_kz_k is the observation of the "true" or "model" x_k. Update the filter with z_k's. At any time, you can get the model estimate x_k based on all the previous observations.
The error covariances (E(w_k^2) and E(v_k^2)) are estimated directly from the data.
Public Member Functions | |
KalmanEstimator (float x_0=0, float p_0=0) | |
Pass in your estimate of the initial value and its error covariance. | |
void | init (float x_0, float p_0=0) |
bool | updated () const |
Has this Kalman estimator been updated? | |
void | update (float z_k, int MAX_HISTORY=-1) |
update the filter with an observation. | |
float | getValue () const |
get the model value. | |
float | getModelCovariance () const |
float | getObservationCovariance () const |
w2img::KalmanEstimator::KalmanEstimator | ( | float | x_0 = 0 , |
|
float | p_0 = 0 | |||
) |
Pass in your estimate of the initial value and its error covariance.
With time, the filter will place less weight on this initial condition and more on the actual observation.
float w2img::KalmanEstimator::getModelCovariance | ( | ) | const [inline] |
float w2img::KalmanEstimator::getObservationCovariance | ( | ) | const [inline] |
float w2img::KalmanEstimator::getValue | ( | ) | const [inline] |
get the model value.
void w2img::KalmanEstimator::init | ( | float | x_0, | |
float | p_0 = 0 | |||
) |
void w2img::KalmanEstimator::update | ( | float | z_k, | |
int | MAX_HISTORY = -1 | |||
) |
update the filter with an observation.
Specify the weight to be given to earlier time steps in computing error covariances. By default, every one of the previous values will be used; specify this if you have reason to believe that the error model is going to be changing.
bool w2img::KalmanEstimator::updated | ( | ) | const [inline] |
Has this Kalman estimator been updated?