Just some restructuring to make the mechanical engineering student Milo angry

This commit is contained in:
dario
2024-08-06 11:46:17 +02:00
parent 71c29bfc58
commit 04f6ad2b1d
2 changed files with 15 additions and 9 deletions

View File

@@ -29,15 +29,6 @@ struct KalmanState
*/
class KalmanFilter
{
private:
matrix F_; ///< The state transition matrix.
matrix B_; ///< The control input matrix.
matrix H_; ///< The observation matrix.
matrix Q_; ///< The process noise covariance matrix.
matrix R_; ///< The measurement noise covariance matrix.
uint8_t n_; ///< The dimension of the state vector.
matrix identity_; ///< The identity matrix with size of the state vector.
public:
/**
* @brief Constructs a KalmanFilter object.
@@ -62,6 +53,12 @@ public:
*/
KalmanState predict(KalmanState state, matrix u);
/**
* @brief Predicts the next state of the Kalman filter, based on the current state.
*
* @param state The current state and uncertainty convariance matrix.
* @return The predicted state of the Kalman filter.
*/
KalmanState predict(KalmanState state);
/**
@@ -81,6 +78,14 @@ public:
* @return The corrected state of the Kalman filter.
*/
KalmanState correct(KalmanState state, matrix z, matrix H, matrix R);
private:
matrix F_; ///< The state transition matrix.
matrix B_; ///< The control input matrix.
matrix H_; ///< The observation matrix.
matrix Q_; ///< The process noise covariance matrix.
matrix R_; ///< The measurement noise covariance matrix.
uint8_t n_; ///< The dimension of the state vector.
matrix identity_; ///< The identity matrix with size of the state vector.
};
} // namespace math