FootStep.h 975 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #pragma once
  2. #ifndef _FootStep_H
  3. #define _FootStep_H
  4. #include <iostream>
  5. #include <vector>
  6. using namespace std;
  7. #define LEAVE_TIME_STYPE 1
  8. #define CATCH_TIME_STYPE 2
  9. struct FLOOR_TIME_STYPE {
  10. int time_type;
  11. int time;
  12. };
  13. class FootStep
  14. {
  15. public:
  16. FootStep();
  17. //void stepCal(int timeStamp, int pos[3], int zupt);
  18. void stepCal(int timeStamp, int pos[3], int zupt, int girl_shoes);
  19. int getStepFreq();
  20. int getStepStatus();
  21. int getStepCount();
  22. private:
  23. int stepStatus;//脚步状态 0 1 2
  24. int stepFreq; //脚步步频 分钟为单位
  25. int stepTag; //计算步数所用
  26. int zuptCount;
  27. int localTime;
  28. int last_time_stamp;
  29. int leaveFloorTime;
  30. int leaveFloorTime1;
  31. int leaveFloorTime2;
  32. int leaveTimeStatus;
  33. int catchFloorTime;
  34. int lastZupt;
  35. int stepCount;
  36. int last_pos[3];
  37. vector<FLOOR_TIME_STYPE> time_vector;
  38. float mean_vel;
  39. float mean_window_vel;
  40. float step_vel_buff[3];
  41. float vel_sqrt_sum;
  42. int vel_sqrt_num;
  43. float vel_sqrt_buff[3];
  44. };
  45. #endif