TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
KalmanFilter< NX, NZ > Class Template Reference

A lightweight, fixed-size Kalman Filter for embedded state estimation. More...

#include <KalmanFilter.h>

Collaboration diagram for KalmanFilter< NX, NZ >:
Collaboration graph
[legend]

Public Member Functions

void predict ()
 
void update (const Matrix< NZ, 1 > &z)
 

Public Attributes

Matrix< NX, 1 > x
 
Matrix< NX, NX > P
 
Matrix< NX, NX > Fmat
 
Matrix< NX, NX > Q
 
Matrix< NZ, NX > H
 
Matrix< NZ, NZ > R
 
Matrix< NX, NX > I = Matrix<NX, NX>::identity()
 

Detailed Description

template<size_t NX, size_t NZ>
class tinyrobotics::KalmanFilter< NX, NZ >

A lightweight, fixed-size Kalman Filter for embedded state estimation.

This template class implements a discrete-time, linear Kalman Filter for real-time state estimation in embedded and robotics applications. It is designed for efficiency and simplicity, using static, fixed-size matrices and minimal dynamic memory. The filter estimates the internal state of a process given noisy measurements and a mathematical model of the system dynamics.

Features

Mathematical Model

The Kalman Filter models the system as:

x_k = F * x_{k-1} + w (state transition) z_k = H * x_k + v (measurement)

where:

Usage Example

kf.Fmat = ...; // set state transition
kf.H = ...; // set measurement model
kf.Q = ...; // set process noise
kf.R = ...; // set measurement noise
kf.x = ...; // set initial state
kf.P = ...; // set initial covariance
kf.predict();
kf.update(z);
A lightweight, fixed-size Kalman Filter for embedded state estimation.
Definition: KalmanFilter.h:167

Template Parameters

Template Parameters
NXNumber of state variables (state vector dimension)
NZNumber of measurement variables (measurement vector dimension)

Members

Methods

Applications


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