#include "PublicSDKMotion.h" class RunGame : public PublicSDKMotion { public: RunGame(); void setData(deque& 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 setStepHeading(float& cur_heading, float heading); void calGlobalPos(deque& shoes_data_vector, deque& step_data_vector, float* global_pos, 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); int rssiFeature(deque& shoes_data_vector); int getResultJump(int jump); int getResultDown(int down); virtual void getResult(int* dec); virtual float getGamePos(int left_or_right, int index); void setPolarAccUnzupt(int* max_acc, int* min_acc, int* acc, int zupt); bool unzuptValid(int* max_acc, int* min_acc); private: deque left_shoes_data_vector; deque right_shoes_data_vector; float left_step_heading; float right_step_heading; float left_global_pos[3]; float right_global_pos[3]; deque left_step_data_vector; deque right_step_data_vector; float left_step_pos[3]; float right_step_pos[3]; int jump_count; int down_count; int last_down; int last_jump; int down_wait_after_jump; int result[4]; float left_heading; float right_heading; int left_zupt_count; int right_zupt_count; int last_left_zupt; int last_right_zupt; int max_acc_unzupt_left[3]; int min_acc_unzupt_left[3]; int max_acc_unzupt_right[3]; int min_acc_unzupt_right[3]; };