1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include "PublicSDKMotion.h"
- #define PRESS_WINDOW_SIZE 10
- class Aerobics : public PublicSDKMotion
- {
- public:
- Aerobics();
- 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);
- void calGlobalPos(deque<shoes_data_cell>& shoes_data_vector, deque<shoes_data_cell>& step_data_vector,
- float* global_pos, int LEFT_OR_RIGHT);
- void setResult(deque<shoes_data_cell>& step_data_vector, int LEFT_OR_RIGHT);
- 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,
- int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
- int jump, int down, int rssi);
- virtual void getResult(int* dec);
- virtual float getGamePos(int left_or_right, int index);
- private:
- const float high_thresh = 0.1f;
- const float plane_thresh = 0.2f;
-
- deque<shoes_data_cell> left_shoes_data_vector;
- deque<shoes_data_cell> right_shoes_data_vector;
- float left_global_pos[3];
- float right_global_pos[3];
- deque<shoes_data_cell> left_step_data_vector;
- deque<shoes_data_cell> right_step_data_vector;
- int last_down;
- int last_jump;
- int result[4];
- int stretch_left_status;
- int stretch_right_status;
- int stretch_front_left_status;
- int stretch_front_right_status;
- int lift_left_status;
- int lift_right_status;
- int left_wait_time;
- int right_wait_time;
- int special_down;
- int last_special_down;
- };
|