Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::KalmanFilter1D Class Reference

One-dimensional Kalman filter implementation for single-precision floats. More...

#include <>>

List of all members.

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.

Author:
Bahram Maleki-Fard

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_xTransition noise, by default 1.0.
noise_zSensor noise, by default 1.0.
muInitial mu, by default 0.0.
sigStandard 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.


Member Function Documentation

void fawkes::KalmanFilter1D::filter ( float  observe)

Filters an observation.

The internal mean and deviation are updated.

Parameters:
observeThe 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.

Parameters:
observeThe observation.
muThe mean (out parameter).
sigThe 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.

Returns:
predicted value

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).

Parameters:
velThe 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 ( float  vel,
int  steps,
float  noise_z 
) const

Predicts the next position based on the past observations.

Parameters:
velThe velocity of the object.
stepsThe steps to look into the future.
noise_zSensor noise.
Returns:
predicted value

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.

Parameters:
muExplicitely
velThe velocity of the object, 0.0 by default.
stepsThe steps to look into the future, 1 by default.
noise_zSensor noise.
Returns:
predicted value

Definition at line 120 of file kalman_1d.cpp.


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