Kongfu.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "PublicSDKMotion.h"
  2. #include "pub.h"
  3. class Kongfu : public PublicSDKMotion
  4. {
  5. public:
  6. Kongfu();
  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. 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,
  9. int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
  10. int jump, int down, int rssi);
  11. virtual void getResult(int* dec);
  12. virtual float getGamePos(int left_or_right, int index);
  13. void setPolarAccUnzupt(int* max_acc, int* min_acc, int* acc, int zupt);
  14. bool unzuptValid(int* max_acc, int* min_acc);
  15. private:
  16. deque<shoes_data_cell> left_shoes_data_vector;
  17. deque<shoes_data_cell> right_shoes_data_vector;
  18. vector<float> left_acc_x_buff;
  19. vector<float> right_acc_x_buff;
  20. int left_kick;
  21. int last_left_kick;
  22. int left_kick_wait;
  23. int right_kick;
  24. int last_right_kick;
  25. int right_kick_wait;
  26. int CANCLE_FLOOR_CMD_LEFT;
  27. int CANCLE_FLOOR_CMD_RIGHT;
  28. int resultMatrix[4];
  29. int last_left_zupt;
  30. int last_right_zupt;
  31. int last_jump;
  32. int last_down;
  33. int CANCLE_DOWN;
  34. int CANCLE_JUMP;
  35. int valid_down_wait_time;
  36. int valid_jump_wait_time;
  37. float left_global_pos[3];
  38. float right_global_pos[3];
  39. int max_acc_unzupt_left[3];
  40. int min_acc_unzupt_left[3];
  41. int max_acc_unzupt_right[3];
  42. int min_acc_unzupt_right[3];
  43. const int WAIT_TIME = 10;
  44. };