Fawkes API
Fawkes Development Version
kalman_1d.h
1
/***************************************************************************
2
* kalman_1d.h - Kalman filter (one dimensional)
3
*
4
* Created: Mon Nov 10 2008
5
* Copyright 2008 Bahram Maleki-Fard
6
*
7
****************************************************************************/
8
9
/* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version. A runtime exception applies to
13
* this software (see LICENSE.GPL_WRE file mentioned below for details).
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21
*/
22
23
#ifndef UTILS_KALMAN_KALMAN_1D_H__
24
#define UTILS_KALMAN_KALMAN_1D_H__
25
26
namespace
fawkes
{
27
28
class
KalmanFilter1D
29
{
30
public
:
31
KalmanFilter1D
(
float
noise_x = 1.0,
float
noise_z = 1.0,
float
mu = 0.0,
float
sig = 1.0);
32
~KalmanFilter1D
();
33
34
void
filter
(
float
observe);
35
void
filter
(
float
observe,
float
&mu,
float
&sig);
36
float
predict
()
const
;
37
float
predict
(
float
vel)
const
;
38
float
predict
(
float
vel,
int
steps,
float
noise_z)
const
;
39
float
predict
(
float
mu,
float
vel,
int
steps,
float
noise_z)
const
;
40
41
private
:
42
float
noise_x_;
/**< transition noise */
43
float
noise_z_;
/**< "sigma_z", sensor noise */
44
float
mu_;
/**< mean "mu" */
45
float
sig_;
/**< "sigma_0". sigma ~ standard deviation */
46
};
47
}
// end namespace fawkes
48
49
#endif
fawkes::KalmanFilter1D::predict
float predict() const
Predicts the next position based on the past observations.
Definition:
kalman_1d.cpp:88
fawkes
fawkes::KalmanFilter1D::KalmanFilter1D
KalmanFilter1D(float noise_x=1.0, float noise_z=1.0, float mu=0.0, float sig=1.0)
Constructor.
Definition:
kalman_1d.cpp:46
fawkes::KalmanFilter1D::filter
void filter(float observe)
Filters an observation.
Definition:
kalman_1d.cpp:63
fawkes::KalmanFilter1D::~KalmanFilter1D
~KalmanFilter1D()
Destructor.
Definition:
kalman_1d.cpp:55
src
libs
utils
kalman
kalman_1d.h
Generated by
1.8.17