DanceFoot.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #ifndef __dance_foot_h__
  2. #define __dance_foot_h__
  3. #include "pub.h"
  4. class DanceFoot
  5. {
  6. public:
  7. DanceFoot(int LEFT_OR_RIGHT);
  8. DanceFoot() {};//Ìí¼ÓÒ»¸öȱʡ¹¹Ô캯Êý
  9. int setPosOffset(float Pos[3]);
  10. int setPosGlobal(float Pos[3]);
  11. int setAttitude(float att[3]);
  12. int setFootZupt(int zupt);
  13. int setFootRssi(int rssi);
  14. int setMaxRssi(int rssi);
  15. int setMinRssi(int rssi);
  16. int isMoveRssi(int rssi, int zupt);
  17. int calGlobalPos(float pos[3], int rssi, int zupt, int press);
  18. int posBoundary(float pos[3]);
  19. int isGlobalZero(float pos[3], float pos_offset[3], int rssi);
  20. int getDirection(float pos[3], float pos_offset[3], int rssi);
  21. int getDirectionCorner(float pos[3], float pos_offset[3]);
  22. int getDirectionLine(float pos[3], float pos_offset[3]);
  23. int getGameDiretion(float pos[3]);
  24. void printPosData(vector<posData> data);
  25. int isMove(vector<posData> data);
  26. void setLastPos(float* lastPos);
  27. void setLastZupt(int lastZupt);
  28. void setDanceTraj(float* traj);
  29. float calSlope(vector<posData> data);
  30. float getGamePos(int index);
  31. float calCor(vector<posData> data);
  32. int rssiFeature(vector<posData> data);
  33. int calGlobalPos(float pos_g[3], int rssi, int zupt, int press, int* acc);
  34. int getAccStatus(int zupt, int* acc, int* max_acc, int* min_acc);
  35. private:
  36. float gamePos[3];
  37. float last_pos[2];
  38. int last_zupt;
  39. float danceTraj[2];
  40. float rotate_err;
  41. float rotateCor[4];
  42. float last_pos_g[2] = { 0, 0 };
  43. float pos[2] = { 0, 0 };
  44. vector<posData> data;
  45. int left_or_right;
  46. int foot_rssi;
  47. int foot_zupt;
  48. int rssi_zupt;
  49. int max_rssi;
  50. int min_rssi;
  51. float attitude[3];
  52. float globalPos[3];
  53. float offsetPos[3];
  54. int pos_index;
  55. int zupt_count;
  56. int acc_status;
  57. int acc_max[3];
  58. int acc_min[3];
  59. };
  60. #endif