Jafar
|
00001 # ifndef CONST_VELOCITY_KF_H 00002 # define CONST_VELOCITY_KF_H 00003 00004 #include <iostream> 00005 00006 namespace jafar { 00007 namespace filter { 00008 00010 00014 class ConstantVelocityKalmanFilter{ 00015 public: 00016 ConstantVelocityKalmanFilter(); 00017 00021 void initKF(double initPos, double initVar); 00022 00029 void updateKF(double y, double sigmaY, double sigmaV); 00030 00034 void getPred(double& pos, double& c11, double& c12, double& c22){ 00035 pos = x1Pred; 00036 c11 = cov11Pred; 00037 c12 = cov12Pred; 00038 c22 = cov22Pred; 00039 } 00040 00044 double getPosPred(){return x1Pred;} 00048 double getPosVar(){return cov11;} 00049 00053 void setPosPeriod(double min, double max){ 00054 minPeriod = min; 00055 maxPeriod = max; 00056 periodicFlag = 1; 00057 } 00058 00059 private: 00060 double x1; 00061 double x2; 00062 00063 double cov11; 00064 double cov12; 00065 double cov22; 00066 00067 double x1Pred; 00068 double x2Pred; 00069 00070 double cov11Pred; 00071 double cov12Pred; 00072 double cov22Pred; 00073 00074 double minPeriod; 00075 double maxPeriod; 00076 bool periodicFlag; 00077 }; 00078 } // namespace lines 00079 } // namespace jafar 00080 # endif
Generated on Wed Oct 15 2014 00:37:19 for Jafar by doxygen 1.7.6.1 |