FootStep.h 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef _FootStep_H
  2. #define _FootStep_H
  3. #include <iostream>
  4. #include <cstring>
  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