1 | #ifndef __BAYES_FILTERING__
|
---|
2 | #define __BAYES_FILTERING__
|
---|
3 |
|
---|
4 | #include "filter_exception.hpp"
|
---|
5 |
|
---|
6 | namespace filter {
|
---|
7 |
|
---|
8 | /*!
|
---|
9 | * \enum Filters
|
---|
10 | * \brief Enumeration of bayes filters
|
---|
11 | */
|
---|
12 | enum Filters { KF, EKF, UKF, GSF, PF };
|
---|
13 |
|
---|
14 |
|
---|
15 | /*!
|
---|
16 | * \class BayesDynamicEquation
|
---|
17 | * \brief This class describes a basic dynamic equation in bayes filtering scheme \n
|
---|
18 | * Class S describe the filter state \n
|
---|
19 | * Class I describe middle variable stored in the filter state \n
|
---|
20 | * ( for exmaple in particle scheme, the state vector (S) is a set of particle (I) ) \n
|
---|
21 | */
|
---|
22 | template <class S, class I> class BayesDynamicEquation{
|
---|
23 | public :
|
---|
24 |
|
---|
25 | /*!
|
---|
26 | * \brief virtual method where the a priori state vector must be computed
|
---|
27 | * \param in : the state vector at time k-1
|
---|
28 | * \param out : the state vector at time k
|
---|
29 | */
|
---|
30 | virtual void Predict(S *in,S *out)=0;
|
---|
31 |
|
---|
32 | /*!
|
---|
33 | * \brief virtual method where parameters of the dynamic equation must be evaluated
|
---|
34 | * \param s : the middle variable at time k-1
|
---|
35 | */
|
---|
36 | virtual void EvaluateParameters(I *s)=0;
|
---|
37 |
|
---|
38 |
|
---|
39 | /*!
|
---|
40 | * \brief Destructor
|
---|
41 | */
|
---|
42 | virtual ~BayesDynamicEquation(){}
|
---|
43 |
|
---|
44 | };
|
---|
45 |
|
---|
46 |
|
---|
47 | /*!
|
---|
48 | * \class BayesMeasureEquation
|
---|
49 | * \brief This class describes a basic measure equation in bayes filtering scheme \n
|
---|
50 | * Class S describe the filter state \n
|
---|
51 | * Class I describe middle variable stored in the filter state \n
|
---|
52 | * ( for exmaple in particle scheme, the state vector (S) is a set of particle (I) ) \n
|
---|
53 | */
|
---|
54 | template <class S, class I> class BayesMeasureEquation{
|
---|
55 | public :
|
---|
56 |
|
---|
57 | /*!
|
---|
58 | * \brief virtual method where parameters of the measure equation must be evaluated
|
---|
59 | * \param s : the meedle variable at time k
|
---|
60 | */
|
---|
61 | virtual void EvaluateParameters(I *s)=0;
|
---|
62 |
|
---|
63 | /*!
|
---|
64 | * \brief virtual method where the a posteriori state vector must be computed
|
---|
65 | * \param in : the a priori state vector at time k
|
---|
66 | * \param out : the a posteriori state vector at time k
|
---|
67 | */
|
---|
68 | virtual void Update(S *in,S *out)=0;
|
---|
69 |
|
---|
70 | /*!
|
---|
71 | * \brief Destructor
|
---|
72 | */
|
---|
73 | virtual ~BayesMeasureEquation(){}
|
---|
74 |
|
---|
75 | };
|
---|
76 |
|
---|
77 | };
|
---|
78 |
|
---|
79 | #endif
|
---|