Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added a method to predict the next state of the system #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kalman/kf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,6 @@ colvec* KF::GetCurrentEstimatedOutput()
return &z_m_;
}



colvec KF::PredictState() const {
return A_ * x_m_;
}
9 changes: 8 additions & 1 deletion kalman/kf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -141,6 +147,7 @@ class KF {
mat P_m_; ///< State covariance after measurement update

colvec z_m_; ///< Estimated output

};

#endif