) i.e. the filter equations are:
[x_(k+1) dx_(k+1)] = [1 1; 0 1] [x_k dx_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 and the rate of change dx_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 | |
KalmanLinearEstimator (float x_0=0, float dx_0=0) | |
Pass in your estimate of the initial value. | |
void | init (float x_0, float dx_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 | getRateOfChange () const |
w2img::KalmanLinearEstimator::KalmanLinearEstimator | ( | float | x_0 = 0 , |
|
float | dx_0 = 0 | |||
) |
Pass in your estimate of the initial value.
With time, the filter will place less weight on this initial condition and more on the actual observation.
float w2img::KalmanLinearEstimator::getRateOfChange | ( | ) | const [inline] |
float w2img::KalmanLinearEstimator::getValue | ( | ) | const [inline] |
get the model value.
void w2img::KalmanLinearEstimator::init | ( | float | x_0, | |
float | dx_0 = 0 | |||
) |
void w2img::KalmanLinearEstimator::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::KalmanLinearEstimator::updated | ( | ) | const [inline] |
Has this Kalman estimator been updated?