1 | /*! |
---|
2 | \file |
---|
3 | \brief Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions |
---|
4 | \author Vaclav Smidl. |
---|
5 | |
---|
6 | ----------------------------------- |
---|
7 | BDM++ - C++ library for Bayesian Decision Making under Uncertainty |
---|
8 | |
---|
9 | Using IT++ for numerical operations |
---|
10 | ----------------------------------- |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef EKF_TEMP_H |
---|
14 | #define EKF_TEMP_H |
---|
15 | |
---|
16 | #include "libKF.h" |
---|
17 | |
---|
18 | namespace bdm{ |
---|
19 | |
---|
20 | //!Extended Kalman filter with unknown \c Q and \c R |
---|
21 | class EKFful_unQR : public EKFfull , public BMcond { |
---|
22 | public: |
---|
23 | //! Default constructor |
---|
24 | EKFful_unQR ( RV rx, RV ry,RV ru,RV rQR ) :EKFfull ( rx,ry,ru ),BMcond ( rQR ) {}; |
---|
25 | void condition ( const vec &QR0 ) { |
---|
26 | Q=diag(QR0(0,dimx-1)); |
---|
27 | R=diag(QR0(dimx,dimx+dimy-1)); |
---|
28 | }; |
---|
29 | }; |
---|
30 | |
---|
31 | //!Extended Kalman filter in Choleski form with unknown \c Q |
---|
32 | class EKFCh_unQ : public EKFCh , public BMcond { |
---|
33 | public: |
---|
34 | //! Default constructor |
---|
35 | EKFCh_unQ ( RV rx, RV ry,RV ru,RV rQ ) :EKFCh ( rx,ry,ru ),BMcond ( rQ ) {}; |
---|
36 | void condition ( const vec &Q0 ) { |
---|
37 | Q.setD ( Q0,0 ); |
---|
38 | //from EKF |
---|
39 | preA.set_submatrix ( dimy+dimx,dimy,Q._Ch() ); |
---|
40 | }; |
---|
41 | }; |
---|
42 | |
---|
43 | //!Extended Kalman filter with unknown parameters in \c IM |
---|
44 | class EKFCh_cond : public EKFCh , public BMcond { |
---|
45 | public: |
---|
46 | //! Default constructor |
---|
47 | EKFCh_cond ( RV rx, RV ry,RV ru,RV rC ) :EKFCh ( rx,ry,ru ),BMcond ( rC ) {}; |
---|
48 | void condition ( const vec &val ) { |
---|
49 | pfxu->condition ( val ); |
---|
50 | }; |
---|
51 | }; |
---|
52 | |
---|
53 | } |
---|
54 | #endif //EKF_TEMP_H |
---|