fawkes::KalmanFilter1D Class Reference
One-dimensional Kalman filter implementation for single-precision floats. More...
#include <utils/kalman/kalman_1d.h>
Public Member Functions | |
| KalmanFilter1D (float noise_x=1.0, float noise_z=1.0, float mu=0.0, float sig=1.0) | |
| Constructor. | |
| ~KalmanFilter1D () | |
| Destructor. | |
| void | filter (float observe) |
| Filters an observation. | |
| void | filter (float observe, float &mu, float &sig) |
| Filters an observation. | |
| float | predict () const |
| Predicts the next position based on the past observations. | |
| float | predict (float vel) const |
| Predicts the next position based on the past observations. | |
| float | predict (float vel, int steps, float noise_z) const |
| Predicts the next position based on the past observations. | |
| float | predict (float mu, float vel, int steps, float noise_z) const |
| Predicts the next position based on the past observations. | |
Detailed Description
One-dimensional Kalman filter implementation for single-precision floats.
Definition at line 25 of file kalman_1d.h.
Constructor & Destructor Documentation
| fawkes::KalmanFilter1D::KalmanFilter1D | ( | float | noise_x = 1.0, |
|
| float | noise_z = 1.0, |
|||
| float | mu = 0.0, |
|||
| float | sig = 1.0 | |||
| ) |
Constructor.
- Parameters:
-
noise_x Transition noise, by default 1.0. noise_z Sensor noise, by default 1.0. mu Initial mu, by default 0.0. sig Standard deviation, by default 1.0.
Definition at line 39 of file kalman_1d.cpp.
| fawkes::KalmanFilter1D::~KalmanFilter1D | ( | ) |
Member Function Documentation
| void fawkes::KalmanFilter1D::filter | ( | float | observe, | |
| float & | mu, | |||
| float & | sig | |||
| ) |
Filters an observation.
The resulting mu and sig are not only stored internally, but also in the given parameters mean and deviation.
- Parameters:
-
observe The observation. mu The mean (out parameter). sig The deviation (out parameter)
Definition at line 71 of file kalman_1d.cpp.
| void fawkes::KalmanFilter1D::filter | ( | float | observe | ) |
Filters an observation.
The internal mean and deviation are updated.
- Parameters:
-
observe The observation.
Definition at line 56 of file kalman_1d.cpp.
| float fawkes::KalmanFilter1D::predict | ( | float | mu, | |
| float | vel, | |||
| int | steps, | |||
| float | noise_z | |||
| ) | const |
Predicts the next position based on the past observations.
- Parameters:
-
mu Explicitely vel The velocity of the object, 0.0 by default. steps The steps to look into the future, 1 by default. noise_z Sensor noise.
- Returns:
- predicted value
Definition at line 120 of file kalman_1d.cpp.
| float fawkes::KalmanFilter1D::predict | ( | float | vel, | |
| int | steps, | |||
| float | noise_z | |||
| ) | const |
Predicts the next position based on the past observations.
- Parameters:
-
vel The velocity of the object. steps The steps to look into the future. noise_z Sensor noise.
- Returns:
- predicted value
Definition at line 107 of file kalman_1d.cpp.
References predict().
| float fawkes::KalmanFilter1D::predict | ( | float | vel | ) | const |
Predicts the next position based on the past observations.
Equivalent to predict(vel, 1, 0.0).
- Parameters:
-
vel The velocity of the object, 0.0 by default.
- Returns:
- predicted value
Definition at line 94 of file kalman_1d.cpp.
References predict().
| float fawkes::KalmanFilter1D::predict | ( | ) | const |
Predicts the next position based on the past observations.
Equivalent to predict(0.0), i.e. velocity 0.0.
- Returns:
- predicted value
Definition at line 82 of file kalman_1d.cpp.
Referenced by predict().
The documentation for this class was generated from the following files:
- src/libs/utils/kalman/kalman_1d.h
- src/libs/utils/kalman/kalman_1d.cpp

