48 init(initial, covInit);
60 initial(0) = initial0;
61 initial(1) = initial1;
63 covInit(0, 0) = covInit00;
64 covInit(1, 1) = covInit11;
66 init(initial, covInit);
71 _x(0) +=
_x(1) * dt + dt * dt / 2 * acc;
80 G(0, 0) = dt * dt / 2;
116 KH(0, 0) = kalmanGain(0);
117 KH(1, 0) = kalmanGain(1);
matrix::Vector< float, 2 > _x
void predict(float dt, float acc, float acc_unc)
Predict the state with an external acceleration estimate.
void init(matrix::Vector< float, 2 > &initial, matrix::Matrix< float, 2, 2 > &covInit)
Initialize filter state.
KalmanFilter()
Default constructor, state not initialized.
bool update(float meas, float measUnc)
Update the state estimate with a measurement.
Matrix< Type, N, M > transpose() const
void getInnovations(float &innov, float &innovCov)
Get measurement innovation and covariance of last update call.
matrix::Matrix< float, 2, 2 > _covariance
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
void getState(matrix::Vector< float, 2 > &state)
Get the current filter state.
void getCovariance(matrix::Matrix< float, 2, 2 > &covariance)
Get state covariance.