Aerobics.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "PublicSDKMotion.h"
  2. #define PRESS_WINDOW_SIZE 10
  3. class Aerobics : public PublicSDKMotion
  4. {
  5. public:
  6. Aerobics();
  7. 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);
  8. void calGlobalPos(deque<shoes_data_cell>& shoes_data_vector, deque<shoes_data_cell>& step_data_vector,
  9. float* global_pos, int LEFT_OR_RIGHT);
  10. void setResult(deque<shoes_data_cell>& step_data_vector, int LEFT_OR_RIGHT);
  11. 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,
  12. int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
  13. int jump, int down, int rssi);
  14. virtual void getResult(int* dec);
  15. virtual float getGamePos(int left_or_right, int index);
  16. private:
  17. const float high_thresh = 0.1f;
  18. const float plane_thresh = 0.2f;
  19. deque<shoes_data_cell> left_shoes_data_vector;
  20. deque<shoes_data_cell> right_shoes_data_vector;
  21. float left_global_pos[3];
  22. float right_global_pos[3];
  23. deque<shoes_data_cell> left_step_data_vector;
  24. deque<shoes_data_cell> right_step_data_vector;
  25. int last_down;
  26. int last_jump;
  27. int result[4];
  28. int stretch_left_status;
  29. int stretch_right_status;
  30. int stretch_front_left_status;
  31. int stretch_front_right_status;
  32. int lift_left_status;
  33. int lift_right_status;
  34. int left_wait_time;
  35. int right_wait_time;
  36. int special_down;
  37. int last_special_down;
  38. };