ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
vpLinearKalmanFilterInstantiation.h
1
/****************************************************************************
2
*
3
* $Id: vpLinearKalmanFilterInstantiation.h 4056 2013-01-05 13:04:42Z fspindle $
4
*
5
* This file is part of the ViSP software.
6
* Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7
*
8
* This software is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* ("GPL") version 2 as published by the Free Software Foundation.
11
* See the file LICENSE.txt at the root directory of this source
12
* distribution for additional information about the GNU GPL.
13
*
14
* For using ViSP with software that can not be combined with the GNU
15
* GPL, please contact INRIA about acquiring a ViSP Professional
16
* Edition License.
17
*
18
* See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19
*
20
* This software was developed at:
21
* INRIA Rennes - Bretagne Atlantique
22
* Campus Universitaire de Beaulieu
23
* 35042 Rennes Cedex
24
* France
25
* http://www.irisa.fr/lagadic
26
*
27
* If you have questions regarding the use of this file, please contact
28
* INRIA at visp@inria.fr
29
*
30
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32
*
33
*
34
* Description:
35
* Kalman filtering.
36
*
37
* Authors:
38
* Eric Marchand
39
* Fabien Spindler
40
*
41
*****************************************************************************/
42
43
#ifndef vpLinearKalmanFilterInstantiation_h
44
#define vpLinearKalmanFilterInstantiation_h
45
46
#include <visp/vpKalmanFilter.h>
47
48
#include <math.h>
49
59
class
VISP_EXPORT
vpLinearKalmanFilterInstantiation
:
public
vpKalmanFilter
60
{
61
public
:
65
typedef
enum
{
70
stateConstVel_MeasurePos
,
75
stateConstVelWithColoredNoise_MeasureVel
,
80
stateConstAccWithColoredNoise_MeasureVel
,
82
unknown
83
} vpStateModel;
84
91
vpLinearKalmanFilterInstantiation
() :
vpKalmanFilter
()
92
{
93
setStateModel(unknown);
94
};
95
99
inline
vpStateModel
getStateModel
() {
100
return
model;
101
}
102
void
filter(
vpColVector
&z);
103
106
inline
void
setStateModel(vpStateModel model);
107
108
void
initFilter(
unsigned
int
nsignal,
vpColVector
&sigma_state,
109
vpColVector
&sigma_measure,
double
rho,
double
dt);
111
114
void
initStateConstVel_MeasurePos(
unsigned
int
nsignal,
115
vpColVector
&sigma_state,
116
vpColVector
&sigma_measure,
117
double
dt);
118
void
initStateConstVelWithColoredNoise_MeasureVel(
unsigned
int
nsignal,
119
vpColVector
&sigma_state,
120
vpColVector
&sigma_measure,
121
double
rho);
123
126
void
initStateConstAccWithColoredNoise_MeasureVel(
unsigned
int
nsignal,
127
vpColVector
&sigma_state,
128
vpColVector
&sigma_measure,
129
double
rho,
130
double
dt);
132
133
protected
:
134
vpStateModel
model
;
135
136
} ;
137
158
void
vpLinearKalmanFilterInstantiation::setStateModel
(
vpStateModel
model) {
159
this->model =
model
;
160
switch
(model) {
161
case
stateConstVel_MeasurePos
:
162
case
stateConstVelWithColoredNoise_MeasureVel
:
163
size_state
= 2;
164
size_measure
= 1;
165
break
;
166
case
stateConstAccWithColoredNoise_MeasureVel
:
167
size_state
= 3;
168
size_measure
= 1;
169
break
;
170
case
unknown
:
171
size_state
= 0;
172
size_measure
= 0;
173
break
;
174
}
175
}
176
177
178
#endif
src
math
kalman
vpLinearKalmanFilterInstantiation.h
Generated on Fri Apr 26 2013 19:54:34 for ViSP by
1.8.1.2