Templated linear kalman filter.
More...
#include <kalman.hpp>
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:
-
n | Size of state vector |
p | Size of input vector |
m | Size of measure vector |
T | Type 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:
-
x | State vector (initial value) |
P | State covariance (initial value) |
Q | Process noise covariance |
H | Measurement matrix |
R | Measurement noise |
B | Input 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>
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:
-
z | Measurement vector |
H | Measurement matrix |
R | Measurement noise |
- Template Parameters:
-
mm | Size 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:
- /home/travis/build/lis-epfl/MAVRIC_Library/util/kalman.hpp