|
Fawkes API
Fawkes Development Version
|
One-dimensional Kalman filter implementation for single-precision floats. More...
#include <>>
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. | |
One-dimensional Kalman filter implementation for single-precision floats.
Definition at line 25 of file kalman_1d.h.
| fawkes::KalmanFilter1D::KalmanFilter1D | ( | float | noise_x = 1.0, |
| float | noise_z = 1.0, |
||
| float | mu = 0.0, |
||
| float | sig = 1.0 |
||
| ) |
Constructor.
| 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 | ( | ) |
Destructor.
Definition at line 48 of file kalman_1d.cpp.
| void fawkes::KalmanFilter1D::filter | ( | float | observe | ) |
Filters an observation.
The internal mean and deviation are updated.
| observe | The observation. |
Definition at line 56 of file kalman_1d.cpp.
| 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.
| observe | The observation. |
| mu | The mean (out parameter). |
| sig | The deviation (out parameter) |
Definition at line 71 of file kalman_1d.cpp.
| float fawkes::KalmanFilter1D::predict | ( | ) | const |
Predicts the next position based on the past observations.
Equivalent to predict(0.0), i.e. velocity 0.0.
Definition at line 82 of file kalman_1d.cpp.
Referenced by predict().
| float fawkes::KalmanFilter1D::predict | ( | float | vel | ) | const |
Predicts the next position based on the past observations.
Equivalent to predict(vel, 1, 0.0).
| vel | The velocity of the object, 0.0 by default. |
Definition at line 94 of file kalman_1d.cpp.
References predict().
| float fawkes::KalmanFilter1D::predict | ( | float | vel, |
| int | steps, | ||
| float | noise_z | ||
| ) | const |
Predicts the next position based on the past observations.
| vel | The velocity of the object. |
| steps | The steps to look into the future. |
| noise_z | Sensor noise. |
Definition at line 107 of file kalman_1d.cpp.
References predict().
| float fawkes::KalmanFilter1D::predict | ( | float | mu, |
| float | vel, | ||
| int | steps, | ||
| float | noise_z | ||
| ) | const |
Predicts the next position based on the past observations.
| 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. |
Definition at line 120 of file kalman_1d.cpp.