MAV'RIC
Public Member Functions | Protected Attributes
Kalman< n, p, m, T > Class Template Reference

Templated linear kalman filter. More...

#include <kalman.hpp>

Collaboration diagram for Kalman< n, p, m, T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Kalman (void)
 Default constructor.
 Kalman (Mat< n, 1 > x, Mat< n, n > P, Mat< n, n > F, Mat< n, n > Q, Mat< m, n > H, Mat< m, m > R, Mat< n, p > B=Mat< n, p >())
 Constructor.
const Mat< n, 1 > & x (void) const
 Get current state.
const Mat< n, n > & P (void) const
 Get current state covariance.
void predict (void)
 Predict next state without input.
void predict (Mat< p, 1, T > u)
 Get current state with input.
void update (Mat< m, 1, T > z)
 Update.
template<uint32_t mm>
void update (Mat< mm, 1, T > z, Mat< mm, n, T > H, Mat< mm, mm, T > R)
 Update using different measurement matrix and noise.

Protected Attributes

Mat< n, 1 > x_
 State.
Mat< n, n > P_
 State covariance.
Mat< n, n > F_
 Process.
Mat< n, n > Q_
 Process noise.
Mat< m, n > H_
 Measurement.
Mat< m, m > R_
 Measurement noise.
Mat< n, p > B_
 Input.
Mat< m, m > S_
 Innovation covariance.
const Mat< n, n > I_
 Identity matrix.
Mat< n, m > K_
 Kalman gain.
Mat< m, 1 > y_
 Innovation.

Detailed Description

template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
class Kalman< n, p, m, T >

Templated linear kalman filter.

Template Parameters:
nSize of state vector
pSize of input vector
mSize of measure vector
TType of data (default: float)

Constructor & Destructor Documentation

template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
Kalman< n, p, m, T >::Kalman ( Mat< n, 1 >  x,
Mat< n, n >  P,
Mat< n, n >  F,
Mat< n, n >  Q,
Mat< m, n >  H,
Mat< m, m >  R,
Mat< n, p >  B = Mat<n,p>() 
) [inline]

Constructor.

Parameters:
xState vector (initial value)
PState covariance (initial value)
QProcess noise covariance
HMeasurement matrix
RMeasurement noise
BInput matrix (default null)

Member Function Documentation

template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
const Mat<n,n>& Kalman< n, p, m, T >::P ( void  ) const [inline]

Get current state covariance.

Returns:
Reference to state covariance (const)
template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
void Kalman< n, p, m, T >::update ( Mat< m, 1, T >  z) [inline]

Update.

Parameters:
zMeasurement vector

Here is the caller graph for this function:

template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
template<uint32_t mm>
void Kalman< n, p, m, T >::update ( Mat< mm, 1, T >  z,
Mat< mm, n, T >  H,
Mat< mm, mm, T >  R 
) [inline]

Update using different measurement matrix and noise.

The measurement vector can be of any size

Parameters:
zMeasurement vector
HMeasurement matrix
RMeasurement noise
Template Parameters:
mmSize of measurement vector
template<uint32_t n, uint32_t p, uint32_t m, typename T = float>
const Mat<n,1>& Kalman< n, p, m, T >::x ( void  ) const [inline]

Get current state.

Returns:
Reference to state (const)

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines