RunGame.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #include "PublicSDKMotion.h"
  2. class RunGame : public PublicSDKMotion {
  3. public:
  4. RunGame();
  5. void setData(deque<shoes_data_cell>& shoes_data_vector, int time_stamp, float pos_x, float pos_y, float pos_z, float heading, float pitch, float roll, int zupt, int rssi);
  6. void setStepHeading(float& cur_heading, float heading);
  7. void calGlobalPos(deque<shoes_data_cell>& shoes_data_vector, deque<shoes_data_cell>& step_data_vector,
  8. float* global_pos, int LEFT_OR_RIGHT);
  9. virtual void Process(int time_stamp, int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_front_press, int right_back_press,
  10. int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
  11. int jump, int down, int rssi);
  12. int rssiFeature(deque<shoes_data_cell>& shoes_data_vector);
  13. int getResultJump(int jump);
  14. int getResultDown(int down);
  15. virtual void getResult(int* dec);
  16. virtual float getGamePos(int left_or_right, int index);
  17. void setPolarAccUnzupt(int* max_acc, int* min_acc, int* acc, int zupt);
  18. bool unzuptValid(int* max_acc, int* min_acc);
  19. private:
  20. deque<shoes_data_cell> left_shoes_data_vector;
  21. deque<shoes_data_cell> right_shoes_data_vector;
  22. float left_step_heading;
  23. float right_step_heading;
  24. float left_global_pos[3];
  25. float right_global_pos[3];
  26. deque<shoes_data_cell> left_step_data_vector;
  27. deque<shoes_data_cell> right_step_data_vector;
  28. float left_step_pos[3];
  29. float right_step_pos[3];
  30. int jump_count;
  31. int down_count;
  32. int last_down;
  33. int last_jump;
  34. int down_wait_after_jump;
  35. int result[4];
  36. float left_heading;
  37. float right_heading;
  38. int left_zupt_count;
  39. int right_zupt_count;
  40. int last_left_zupt;
  41. int last_right_zupt;
  42. int max_acc_unzupt_left[3];
  43. int min_acc_unzupt_left[3];
  44. int max_acc_unzupt_right[3];
  45. int min_acc_unzupt_right[3];
  46. };