Visual Servoing Platform version 3.5.0
vpLinearKalmanFilterInstantiation.h
1/****************************************************************************
2 *
3 * ViSP, open source Visual Servoing Platform software.
4 * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5 *
6 * This software is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 * See the file LICENSE.txt at the root directory of this source
11 * distribution for additional information about the GNU GPL.
12 *
13 * For using ViSP with software that can not be combined with the GNU
14 * GPL, please contact Inria about acquiring a ViSP Professional
15 * Edition License.
16 *
17 * See http://visp.inria.fr for more information.
18 *
19 * This software was developed at:
20 * Inria Rennes - Bretagne Atlantique
21 * Campus Universitaire de Beaulieu
22 * 35042 Rennes Cedex
23 * France
24 *
25 * If you have questions regarding the use of this file, please contact
26 * Inria at visp@inria.fr
27 *
28 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30 *
31 * Description:
32 * Kalman filtering.
33 *
34 * Authors:
35 * Eric Marchand
36 * Fabien Spindler
37 *
38 *****************************************************************************/
39
40#ifndef vpLinearKalmanFilterInstantiation_h
41#define vpLinearKalmanFilterInstantiation_h
42
43#include <visp3/core/vpKalmanFilter.h>
44
45#include <math.h>
46
59{
60public:
64 typedef enum {
81 unknown
82 } vpStateModel;
83
91
97 inline vpStateModel getStateModel() { return model; }
98 void filter(vpColVector &z);
99
102 inline void setStateModel(vpStateModel model);
103
104 void initFilter(unsigned int nsignal, vpColVector &sigma_state, vpColVector &sigma_measure, double rho, double dt);
106
109 void initStateConstVel_MeasurePos(unsigned int nsignal, vpColVector &sigma_state, vpColVector &sigma_measure,
110 double dt);
111 void initStateConstVelWithColoredNoise_MeasureVel(unsigned int nsignal, vpColVector &sigma_state,
112 vpColVector &sigma_measure, double rho);
114
117 void initStateConstAccWithColoredNoise_MeasureVel(unsigned int nsignal, vpColVector &sigma_state,
118 vpColVector &sigma_measure, double rho, double dt);
120
121protected:
123};
124
148{
149 this->model = mdl;
150 switch (model) {
153 size_state = 2;
154 size_measure = 1;
155 break;
157 size_state = 3;
158 size_measure = 1;
159 break;
160 case unknown:
161 size_state = 0;
162 size_measure = 0;
163 break;
164 }
165}
166
167#endif
Implementation of column vector and the associated operations.
Definition: vpColVector.h:131
This class provides a generic Kalman filtering algorithm along with some specific state model (consta...
unsigned int size_state
Size of the state vector .
unsigned int size_measure
Size of the measure vector .
This class provides an implementation of some specific linear Kalman filters.