Changeset 477 for library/bdm/estim/ekf_template.h
- Timestamp:
- 08/05/09 14:40:03 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/ekf_template.h
r384 r477 16 16 #include "kalman.h" 17 17 18 namespace bdm {18 namespace bdm { 19 19 20 20 //!Extended Kalman filter with unknown \c Q and \c R … … 22 22 public: 23 23 void condition ( const vec &QR0 ) { 24 Q =diag(QR0(0,dimx-1));25 R =diag(QR0(dimx,dimx+dimy-1));24 Q = diag ( QR0 ( 0, dimx - 1 ) ); 25 R = diag ( QR0 ( dimx, dimx + dimy - 1 ) ); 26 26 }; 27 27 }; … … 31 31 public: 32 32 void condition ( const vec &Q0 ) { 33 Q.setD ( Q0, 0 );33 Q.setD ( Q0, 0 ); 34 34 //from EKF 35 preA.set_submatrix ( dimy +dimx,dimy,Q._Ch() );35 preA.set_submatrix ( dimy + dimx, dimy, Q._Ch() ); 36 36 }; 37 37 }; … … 39 39 //!Extended Kalman filter in Choleski form with unknown \c Q 40 40 class EKFCh_chQ : public EKFCh { 41 42 43 Q.setCh ( chQ0);41 public: 42 void condition ( const vec &chQ0 ) { 43 Q.setCh ( chQ0 ); 44 44 //from EKF 45 preA.set_submatrix ( dimy+dimx,dimy,Q._Ch() );46 45 preA.set_submatrix ( dimy + dimx, dimy, Q._Ch() ); 46 }; 47 47 }; 48 48 49 49 //!Extended Kalman filter with unknown parameters in \c IM 50 50 class EKFCh_cond : public EKFCh { 51 52 53 54 51 public: 52 void condition ( const vec &val ) { 53 pfxu->condition ( val ); 54 }; 55 55 }; 56 56