1 #include "ExtendedKalman.hh"
6 ExtendedKalman::ExtendedKalman()
16 if (systemStateDim_ == 0) {
17 BIASERR(
"Either state- or measurement-dimension is zero!!!");
23 StateTransition(posterioState_, control, priorState_);
26 covariance_ = A_ * covariance_ * AT_ + W_ * Q_ * WT_;
33 measurementDim_ = measurement.
size();
36 if ((systemStateDim_ == 0)||(measurementDim_ == 0)) {
37 BIASERR(
"Either state- or measurement-dimension is zero!!!");
51 invTmp = H_ * covariance_ * HT_ + V_ * R_ * VT_;
52 invTmp = svd_.Invert(invTmp);
54 K_ = covariance_ * HT_ * invTmp;
61 MeasurementFunction(priorState_, measurePred);
63 lastKalmanUpdate_ = K_ * (measurement - measurePred);
64 posterioState_ = priorState_ + lastKalmanUpdate_;
69 covariance_ = (Identity_ - K_ * H_) * covariance_;
void SetIdentity()
Converts matrix to identity matrix.