publicMotion.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #pragma once
  2. #ifndef _PUBLIC_MOTION_H
  3. #define _PUBLIC_MOTION_H
  4. #include <iostream>
  5. class publicMotion {
  6. public:
  7. publicMotion();
  8. void setMagData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
  9. void meanFiltData(int time_count, int mag_data, int* mag_data_window, int* mean_mag_data);
  10. void setSpecialPoint(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
  11. int getDownData(int left_front_data, int right_front_data, int left_mag_data, int right_mag_data);
  12. void setSpecialPoint_part(int mag_data, int* mean_data, int *max_val, int *down_point, int *up_time);
  13. private:
  14. int left_front_mag_window[5];
  15. int right_front_mag_window[5];
  16. int left_back_mag_window[5];
  17. int right_back_mag_window[5];
  18. int left_front_mag_mean_window[15];
  19. int right_front_mag_mean_window[15];
  20. int left_back_mag_mean_window[15];
  21. int right_back_mag_mean_window[15];
  22. int motion_time;
  23. int left_back_mag_point_val;
  24. int right_back_mag_point_val;
  25. int left_front_mag_point_val;
  26. int right_front_mag_point_val;
  27. int left_back_mag_up_max;
  28. int right_back_mag_up_max;
  29. int left_front_mag_up_max;
  30. int right_front_mag_up_max;
  31. int left_front_up_time;
  32. int right_front_up_time;
  33. int left_back_up_time;
  34. int right_back_up_time;
  35. };
  36. #endif