ViSP  2.6.2
vpLinearKalmanFilterInstantiation.h
1 /****************************************************************************
2  *
3  * $Id: vpLinearKalmanFilterInstantiation.h 3530 2012-01-03 10:52:12Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2012 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 
60 {
61  public:
65  typedef enum {
82  unknown
83  } vpStateModel;
84 
92  {
93  setStateModel(unknown);
94  };
95 
100  return model;
101  }
102  void filter(vpColVector &z);
103 
126  inline void setStateModel(vpStateModel model) {
127  this->model = model;
128  switch(model) {
129  case stateConstVel_MeasurePos:
130  case stateConstVelWithColoredNoise_MeasureVel:
131  size_state = 2;
132  size_measure = 1;
133  break;
134  case stateConstAccWithColoredNoise_MeasureVel:
135  size_state = 3;
136  size_measure = 1;
137  break;
138  case unknown:
139  size_state = 0;
140  size_measure = 0;
141  break;
142  }
143  }
144  void initFilter(unsigned int nsignal, vpColVector &sigma_state,
145  vpColVector &sigma_measure, double rho, double dt);
147 
150  void initStateConstVel_MeasurePos(unsigned int nsignal,
151  vpColVector &sigma_state,
152  vpColVector &sigma_measure,
153  double dt);
154  void initStateConstVelWithColoredNoise_MeasureVel(unsigned int nsignal,
155  vpColVector &sigma_state,
156  vpColVector &sigma_measure,
157  double rho);
159 
162  void initStateConstAccWithColoredNoise_MeasureVel(unsigned int nsignal,
163  vpColVector &sigma_state,
164  vpColVector &sigma_measure,
165  double rho,
166  double dt);
168 
169  protected:
171 
172 } ;
173 
174 
175 
176 #endif
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
This class provides a generic Kalman filtering algorithm along with some specific state model (consta...