Changeset 271 for bdm/estim/libKF.cpp
- Timestamp:
- 02/16/09 10:03:13 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/estim/libKF.cpp
r270 r271 6 6 using std::endl; 7 7 8 KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat R0, mat Q0, mat P0, vec mu0 ) {8 KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat Q0, mat R0, mat P0, vec mu0 ) { 9 9 dimx = A0.rows(); 10 10 dimu = B0.cols(); … … 15 15 it_assert_debug ( C0.cols() ==dimx, "KalmanFull: C is not square" ); 16 16 it_assert_debug ( ( D0.rows() ==dimy ) || ( D0.cols() ==dimu ), "KalmanFull: D is not compatible" ); 17 it_assert_debug ( ( Q0.cols() ==dimx ) || ( Q0.rows() ==dimx ), "KalmanFull: Q is not compatible" ); 17 18 it_assert_debug ( ( R0.cols() ==dimy ) || ( R0.rows() ==dimy ), "KalmanFull: R is not compatible" ); 18 it_assert_debug ( ( Q0.cols() ==dimx ) || ( Q0.rows() ==dimx ), "KalmanFull: Q is not compatible" );19 19 20 20 A = A0; … … 116 116 117 117 118 void KalmanCh::set_parameters ( const mat &A0,const mat &B0,const mat &C0,const mat &D0,const chmat & R0,const chmat &Q0 ) {119 120 ( ( Kalman<chmat>* ) this )->set_parameters ( A0,B0,C0,D0, R0,Q0 );118 void KalmanCh::set_parameters ( const mat &A0,const mat &B0,const mat &C0,const mat &D0,const chmat &Q0,const chmat &R0 ) { 119 120 ( ( Kalman<chmat>* ) this )->set_parameters ( A0,B0,C0,D0,Q0,R0 ); 121 121 // Cholesky special! 122 preA.clear(); 122 preA=zeros(dimy+dimx+dimx,dimy+dimx); 123 // preA.clear(); 123 124 preA.set_submatrix ( 0,0,R._Ch() ); 124 125 preA.set_submatrix ( dimy+dimx,dimy,Q._Ch() );