PublicSDKMotion.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef PUBLIC_SDK_MOTION
  2. #define PUBLIC_SDK_MOTION
  3. #define LEFT_FOOT 1
  4. #define RIGHT_FOOT 2
  5. #include<iostream>
  6. #include<vector>
  7. #include<deque>
  8. #include "pub.h"
  9. #include "MotionCount.h"
  10. using namespace std;
  11. struct shoes_data_cell {
  12. //鞋子传上来的时间戳
  13. int time_stamp;
  14. //鞋子当前的位置
  15. float pos_x;
  16. float pos_y;
  17. float pos_z;
  18. //鞋子的姿态
  19. float heading;
  20. float pitch;
  21. float roll;
  22. int zupt;
  23. int rssi;
  24. };
  25. class PublicSDKMotion : public MotionCount {
  26. public:
  27. virtual 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);
  28. 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,
  29. int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
  30. int jump, int down, int rssi);
  31. virtual void getResult(int* dec);
  32. virtual float getGamePos(int left_or_right, int index);
  33. };
  34. #endif