1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #include <deque>
- 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<int>& press_queue ,int press, int queue_size);
- int check_press_queue_up(deque<int>& press_queue, int thresh_hold);
- int min_window_val(deque<int>& press_deque, int mid_window_size);
- int back_press_up_trend(deque<int>& left_press_deque, deque<int>& right_press_deque);
- private:
- deque<int> right_back_mag_queue;
- deque<int> left_back_mag_queue;
- deque<int> left_press_filter_window;
- deque<int> right_press_filter_window;
- deque<int> right_front_mag_queue;
- deque<int> left_front_mag_queue;
- deque<int> right_front_mag_canve_queue;
- deque<int> left_front_mag_canve_queue;
- deque<int> left_front_acc;
- deque<int> 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<int> left_front_press_queue_touch_floor;
- deque<int> left_back_press_queue_touch_floor;
- deque<int> right_front_press_queue_touch_floor;
- deque<int> right_back_press_queue_touch_floor;
- deque<int> right_front_jump_mag_queue;
- deque<int> left_front_jump_mag_queue;
- deque<int> right_acc_z_queue;
- deque<int> left_acc_z_queue;
- };
|