diff --git a/kalman/kf.cpp b/kalman/kf.cpp index 9d722cc..a3b787b 100644 --- a/kalman/kf.cpp +++ b/kalman/kf.cpp @@ -127,5 +127,6 @@ colvec* KF::GetCurrentEstimatedOutput() return &z_m_; } - - +colvec KF::PredictState() const { + return A_ * x_m_; +} diff --git a/kalman/kf.h b/kalman/kf.h index 7cee4ca..4097106 100644 --- a/kalman/kf.h +++ b/kalman/kf.h @@ -117,7 +117,13 @@ class KF { * @return Current estimated output $\hat{z}_k$ */ colvec* GetCurrentEstimatedOutput(); - + + /** + * predicts the next state of the system + * @return The predicted state vector + */ + colvec PredictState() const; + private: mat A_; ///< System matrix @@ -141,6 +147,7 @@ class KF { mat P_m_; ///< State covariance after measurement update colvec z_m_; ///< Estimated output + }; #endif