#include using namespace std; //由于在鞋子里,判断蹲,并不完美,需要在SDK进行补充 //后期考虑将蹲放置SDK上判断 class online_motion { public: int online_detect_down(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag, int* right_acc, int* left_acc); int online_detect_jump(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag, int* right_acc, int* left_acc); int online_detect_touch_floor(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag ); void push_press_queue(deque& press_queue ,int press, int queue_size); int check_press_queue_up(deque& press_queue, int thresh_hold); int min_window_val(deque& press_deque, int mid_window_size); int back_press_up_trend(deque& left_press_deque, deque& right_press_deque); private: deque right_back_mag_queue; deque left_back_mag_queue; deque left_press_filter_window; deque right_press_filter_window; deque right_front_mag_queue; deque left_front_mag_queue; deque right_front_mag_canve_queue; deque left_front_mag_canve_queue; deque left_front_acc; deque right_front_acc; int last_back_down = 0; int last_front_down = 0; int last_little_front_down = 0; int left_top_back_press = 0; int right_top_back_press = 0; int top_back_press_valid_time = 0; deque left_front_press_queue_touch_floor; deque left_back_press_queue_touch_floor; deque right_front_press_queue_touch_floor; deque right_back_press_queue_touch_floor; deque right_front_jump_mag_queue; deque left_front_jump_mag_queue; deque right_acc_z_queue; deque left_acc_z_queue; };