1 | // %pacpus:license{
|
---|
2 | // This file is part of the PACPUS framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %pacpus:license}
|
---|
5 | /// @file
|
---|
6 | /// @author Firstname Surname <firstname.surname@utc.fr>
|
---|
7 | /// @date Month, Year
|
---|
8 | /// @version $Id: bayes_filtering.hpp 76 2013-01-10 17:05:10Z kurdejma $
|
---|
9 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
10 | /// @brief Brief description.
|
---|
11 | ///
|
---|
12 | /// Detailed description.
|
---|
13 |
|
---|
14 | #ifndef __BAYES_FILTERING__
|
---|
15 | #define __BAYES_FILTERING__
|
---|
16 |
|
---|
17 | #include "filter_exception.hpp"
|
---|
18 |
|
---|
19 | namespace filter {
|
---|
20 |
|
---|
21 | /*!
|
---|
22 | * \enum Filters
|
---|
23 | * \brief Enumeration of bayes filters
|
---|
24 | */
|
---|
25 | enum Filters { KF, EKF, UKF, GSF, PF };
|
---|
26 |
|
---|
27 |
|
---|
28 | /*!
|
---|
29 | * \class BayesDynamicEquation
|
---|
30 | * \brief This class describes a basic dynamic equation in bayes filtering scheme \n
|
---|
31 | * Class S describe the filter state \n
|
---|
32 | * Class I describe middle variable stored in the filter state \n
|
---|
33 | * ( for exmaple in particle scheme, the state vector (S) is a set of particle (I) ) \n
|
---|
34 | */
|
---|
35 | template <class S, class I> class BayesDynamicEquation{
|
---|
36 | public :
|
---|
37 |
|
---|
38 | /*!
|
---|
39 | * \brief virtual method where the a priori state vector must be computed
|
---|
40 | * \param in : the state vector at time k-1
|
---|
41 | * \param out : the state vector at time k
|
---|
42 | */
|
---|
43 | virtual void Predict(S *in,S *out)=0;
|
---|
44 |
|
---|
45 | /*!
|
---|
46 | * \brief virtual method where parameters of the dynamic equation must be evaluated
|
---|
47 | * \param s : the middle variable at time k-1
|
---|
48 | */
|
---|
49 | virtual void EvaluateParameters(I *s)=0;
|
---|
50 |
|
---|
51 |
|
---|
52 | /*!
|
---|
53 | * \brief Destructor
|
---|
54 | */
|
---|
55 | virtual ~BayesDynamicEquation(){}
|
---|
56 |
|
---|
57 | };
|
---|
58 |
|
---|
59 |
|
---|
60 | /*!
|
---|
61 | * \class BayesMeasureEquation
|
---|
62 | * \brief This class describes a basic measure equation in bayes filtering scheme \n
|
---|
63 | * Class S describe the filter state \n
|
---|
64 | * Class I describe middle variable stored in the filter state \n
|
---|
65 | * ( for exmaple in particle scheme, the state vector (S) is a set of particle (I) ) \n
|
---|
66 | */
|
---|
67 | template <class S, class I> class BayesMeasureEquation{
|
---|
68 | public :
|
---|
69 |
|
---|
70 | /*!
|
---|
71 | * \brief virtual method where parameters of the measure equation must be evaluated
|
---|
72 | * \param s : the meedle variable at time k
|
---|
73 | */
|
---|
74 | virtual void EvaluateParameters(I *s)=0;
|
---|
75 |
|
---|
76 | /*!
|
---|
77 | * \brief virtual method where the a posteriori state vector must be computed
|
---|
78 | * \param in : the a priori state vector at time k
|
---|
79 | * \param out : the a posteriori state vector at time k
|
---|
80 | */
|
---|
81 | virtual void Update(S *in,S *out)=0;
|
---|
82 |
|
---|
83 | /*!
|
---|
84 | * \brief Destructor
|
---|
85 | */
|
---|
86 | virtual ~BayesMeasureEquation(){}
|
---|
87 |
|
---|
88 | };
|
---|
89 |
|
---|
90 | } // namespace filter
|
---|
91 |
|
---|
92 | #endif // __BAYES_FILTERING__
|
---|