My Project
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KalmanEkf Class Referenceabstract

Extended Kalman Filter (EKF) implementation. More...

#include <Kalman.h>

Inheritance diagram for KalmanEkf:
Kalman KalmanCore

Public Member Functions

 KalmanEkf (int _n)
 
- Public Member Functions inherited from Kalman
 Kalman (int _n)
 Constructor. More...
 
 ~Kalman ()
 Destructor.
 
cv::Mat & predict (unsigned long tick)
 Predict the Kalman state vector for the given time step This calls updateF for updating the transition matrix based on the real time step. More...
 
cv::Mat & predict_update (KalmanSensor *sensor, unsigned long tick)
 Predict the Kalman state vector for the given time step and update the state using the Kalman gain. More...
 
double seconds_since_update (unsigned long tick)
 Helper method.

 
- Public Member Functions inherited from KalmanCore
 KalmanCore (const KalmanCore &s)
 Copy constructor.
 
 KalmanCore (int _n)
 Constructor. More...
 
 ~KalmanCore ()
 Destructor.
 
int get_n ()
 Accessor for n.
 
virtual cv::Mat & predict ()
 Predict the Kalman state vector for the given time step . x_pred = F * x.
 
cv::Mat & predict_update (KalmanSensorCore *sensor)
 Predict the Kalman state vector and update the state using the constant Kalman gain. x = x_pred + K* ( z - H*x_pred)
 

Protected Member Functions

virtual void f (const cv::Mat &_x, cv::Mat &_x_pred, double dt)=0
 
virtual void update_F (unsigned long tick)
 
virtual void predict_x (unsigned long tick)
 
- Protected Member Functions inherited from Kalman
void predict_P ()
 

Protected Attributes

cv::Mat delta
 
cv::Mat x_plus
 
cv::Mat x_minus
 
cv::Mat x_tmp1
 
cv::Mat x_tmp2
 
- Protected Attributes inherited from Kalman
int prev_tick
 
- Protected Attributes inherited from KalmanCore
int n
 
cv::Mat F_trans
 

Additional Inherited Members

- Public Attributes inherited from Kalman
cv::Mat P
 The error covariance matrix describing the accuracy of the state estimate.
 
cv::Mat Q
 The covariance matrix for the process noise.
 
cv::Mat P_pred
 The predicted error covariance matrix.
 
- Public Attributes inherited from KalmanCore
cv::Mat x
 The Kalman state vector (n*1)
 
cv::Mat F
 The matrix (n*n) containing the transition model for the internal state.

 
cv::Mat x_pred
 Predicted state, TODO: should be protected?!
 

Detailed Description

Extended Kalman Filter (EKF) implementation.

Please override the pure virtual f() with the desired unlinear function. By default the upate_F calculates the Jacobian numerically, if you want other approach override also the update_F()

Definition at line 274 of file Kalman.h.

Member Function Documentation

◆ update_F()

virtual void update_F ( unsigned long  tick)
protectedvirtual

If your transition matrix F is based on time you need to override this method.

Reimplemented from Kalman.


The documentation for this class was generated from the following file: