Legend:
- Unmodified
- Added
- Removed
-
bdm/estim/libKF.cpp
r37 r51 130 130 vec y = dt.get ( 0,dimy-1 ); 131 131 132 //TODO get rid of Q in qr()!133 // mat Q; 132 pfxu->dfdx_cond ( *_mu,u,A,false ); //update A by a derivative of fx 133 phxu->dfdx_cond ( *_mu,u,C,false ); //update A by a derivative of fx 134 134 135 135 //R and Q are already set in set_parameters() … … 147 147 fy._cached ( true ); 148 148 *_yp = phxu->eval ( *_mu,u ); 149 149 150 *_mu = pfxu->eval ( *_mu ,u ) + ( _K ) * ( _iRy->_Ch() ).T() * ( y-*_yp ); 150 151 /* _K = (_P->to_mat())*C.transpose() * ( _iRy->to_mat() ); 152 *_mu = pfxu->eval ( *_mu ,u ) + ( _K )* ( y-*_yp );*/ 153 151 154 /* cout << "P:" <<_P->to_mat() <<endl; 152 155 cout << "Ry:" <<_Ry->to_mat() <<endl; -
bdm/estim/libKF.h
r37 r51 124 124 //!access function 125 125 epdf& _epdf() {return est;} 126 //!access function 127 mat& __K() {return _K;} 128 //!access function 129 vec _dP() {return _P->getD();} 126 130 }; 127 131 … … 167 171 */ 168 172 template<class sq_T> 169 class EKF : public Kalman< ldmat> {173 class EKF : public Kalman<fsqmat> { 170 174 //! Internal Model f(x,u) 171 175 diffbifn* pfxu;