Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::algorithms::KalmanFilter< STATES, INPUTS > Class Template Reference

#include <kalman_filter.hpp>

Public Member Functions

 KalmanFilter (const float(&A)[STATES *STATES], const float(&C)[INPUTS *STATES], const float(&Q)[STATES *STATES], const float(&R)[INPUTS *INPUTS], const float(&P0)[STATES *STATES])
 
void init (const float(&initialX)[STATES *1])
 
void performUpdate (const CMSISMat< INPUTS, 1 > &y)
 
const std::array< float, STATES > & getStateVectorAsMatrix () const
 
std::array< float, INPUTS *INPUTS > & getMeasurementCovariance ()
 

Detailed Description

template<uint16_t STATES, uint16_t INPUTS>
class tap::algorithms::KalmanFilter< STATES, INPUTS >

Implementation of a multi-variable linear kalman filter that utilizes arm's CMSIS matrix operations.

Note
Below, let $Y_{i - 1}$ be the set of all previous measurements, ${y_1, y_2, ..., y_i$.

Constructor & Destructor Documentation

◆ KalmanFilter()

template<uint16_t STATES, uint16_t INPUTS>
tap::algorithms::KalmanFilter< STATES, INPUTS >::KalmanFilter ( const float(&)  A[STATES *STATES],
const float(&)  C[INPUTS *STATES],
const float(&)  Q[STATES *STATES],
const float(&)  R[INPUTS *INPUTS],
const float(&)  P0[STATES *STATES] 
)
inline
Parameters
[in]AState transition matrix (also called F).
[in]CObservation matrix (also called H).
[in]QProcess noise covariance.
[in]RMeasurement error covariance.
[in]P0Initial prediction error covariance estimate.

Member Function Documentation

◆ getMeasurementCovariance()

template<uint16_t STATES, uint16_t INPUTS>
std::array< float, INPUTS *INPUTS > & tap::algorithms::KalmanFilter< STATES, INPUTS >::getMeasurementCovariance ( )
inline
Returns
Modifiable pointer to measurement covariance array so the covariance can be modified at runtime if need be.

◆ getStateVectorAsMatrix()

template<uint16_t STATES, uint16_t INPUTS>
const std::array< float, STATES > & tap::algorithms::KalmanFilter< STATES, INPUTS >::getStateVectorAsMatrix ( ) const
inline

◆ init()

template<uint16_t STATES, uint16_t INPUTS>
void tap::algorithms::KalmanFilter< STATES, INPUTS >::init ( const float(&)  initialX[STATES *1])
inline

◆ performUpdate()

template<uint16_t STATES, uint16_t INPUTS>
void tap::algorithms::KalmanFilter< STATES, INPUTS >::performUpdate ( const CMSISMat< INPUTS, 1 > &  y)
inline

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