#include "PublicSDKMotion.h" #include #define PRESS_WINDOW_SIZE 10 //struct same_position_press //{ // int32_t left_mag; // int32_t right_mag; //}; class Aerobics : public PublicSDKMotion { public: Aerobics(); void setResult(deque& step_data_vector, int LEFT_OR_RIGHT); void ResetDenyDownTime(int time_stamp); bool isValidDown(int time_stamp); //float calVar(deque& front_mag_deq); 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); private: const float high_thresh = 0.1f; const float plane_thresh = 0.2f; deque left_shoes_data_vector; deque right_shoes_data_vector; deque left_step_data_vector; deque right_step_data_vector; int last_down; int last_jump; 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; int deny_down_time; deque left_acc_deque; deque right_acc_deque; int wait_down = 0; //deque front_mag_deq; //deque back_mag_deq; };