|
Revision 477, 1.3 kB
(checked in by mido, 16 years ago)
|
|
panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 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_TEMPLATE_H |
|---|
| 14 | #define EKF_TEMPLATE_H |
|---|
| 15 | |
|---|
| 16 | #include "kalman.h" |
|---|
| 17 | |
|---|
| 18 | namespace bdm { |
|---|
| 19 | |
|---|
| 20 | //!Extended Kalman filter with unknown \c Q and \c R |
|---|
| 21 | class EKFful_unQR : public EKFfull { |
|---|
| 22 | public: |
|---|
| 23 | void condition ( const vec &QR0 ) { |
|---|
| 24 | Q = diag ( QR0 ( 0, dimx - 1 ) ); |
|---|
| 25 | R = diag ( QR0 ( dimx, dimx + dimy - 1 ) ); |
|---|
| 26 | }; |
|---|
| 27 | }; |
|---|
| 28 | |
|---|
| 29 | //!Extended Kalman filter in Choleski form with unknown diagonal \c Q |
|---|
| 30 | class EKFCh_dQ : public EKFCh { |
|---|
| 31 | public: |
|---|
| 32 | void condition ( const vec &Q0 ) { |
|---|
| 33 | Q.setD ( Q0, 0 ); |
|---|
| 34 | //from EKF |
|---|
| 35 | preA.set_submatrix ( dimy + dimx, dimy, Q._Ch() ); |
|---|
| 36 | }; |
|---|
| 37 | }; |
|---|
| 38 | |
|---|
| 39 | //!Extended Kalman filter in Choleski form with unknown \c Q |
|---|
| 40 | class EKFCh_chQ : public EKFCh { |
|---|
| 41 | public: |
|---|
| 42 | void condition ( const vec &chQ0 ) { |
|---|
| 43 | Q.setCh ( chQ0 ); |
|---|
| 44 | //from EKF |
|---|
| 45 | preA.set_submatrix ( dimy + dimx, dimy, Q._Ch() ); |
|---|
| 46 | }; |
|---|
| 47 | }; |
|---|
| 48 | |
|---|
| 49 | //!Extended Kalman filter with unknown parameters in \c IM |
|---|
| 50 | class EKFCh_cond : public EKFCh { |
|---|
| 51 | public: |
|---|
| 52 | void condition ( const vec &val ) { |
|---|
| 53 | pfxu->condition ( val ); |
|---|
| 54 | }; |
|---|
| 55 | }; |
|---|
| 56 | |
|---|
| 57 | } |
|---|
| 58 | #endif //EKF_TEMP_H |
|---|