00001 #include "LocalizationUtil.h" 00002 #include <vector> 00003 00004 #ifndef LOCALIZATIONPARTICLE_H_ 00005 #define LOCALIZATIONPARTICLE_H_ 00006 00007 class LocalizationParticle 00008 { 00009 public: 00010 struct State 00011 { 00012 Point2D<float> mPoint; 00013 float mAngle; //theta in degrees 00014 float mWeight; // weight[k] 00015 }; 00016 00017 LocalizationParticle(); 00018 LocalizationParticle(State p_mState); 00019 LocalizationParticle(const LocalizationParticle &p); 00020 00021 void updatePosition(float m, float a); 00022 void updatePosition(Point2D<float> p, float a); 00023 void Print(); 00024 void drift_position(float stdDev, float vel, float dt, ParamData pd); 00025 void drift_angle(float stdDev, float vel, float dt, ParamData pd); 00026 static float getTime(float p, ParamData pd); 00027 static float getVelocity(float p, ParamData pd); 00028 static float getDistance(float p, float dt, ParamData pd); 00029 static float getStdDev(float p); 00030 static float getChangeInRotation(float p, float dt, ParamData pd); 00031 static vector<LocalizationParticle> stepParticles(vector<LocalizationParticle> p, float dt, int i_pX, int i_pY, int i_angle, ParamData pd); 00032 static float normalizeAngle(float a); 00033 00034 State mState; 00035 }; 00036 00037 #endif /* LOCALIZATIONPARTICLE_H_ */