123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef _FootStep_H
- #define _FootStep_H
- #include <iostream>
- #include <cstring>
- #include <vector>
- using namespace std;
- #define LEAVE_TIME_STYPE 1
- #define CATCH_TIME_STYPE 2
- struct FLOOR_TIME_STYPE {
- int time_type;
- int time;
- };
- class FootStep
- {
- public:
- FootStep();
- //void stepCal(int timeStamp, int pos[3], int zupt);
- void stepCal(int timeStamp, int pos[3], int zupt, int girl_shoes);
- int getStepFreq();
- int getStepStatus();
- int getStepCount();
- private:
- int stepStatus;//脚步状态 0 1 2
- int stepFreq; //脚步步频 分钟为单位
- int stepTag; //计算步数所用
- int zuptCount;
-
- int localTime;
- int last_time_stamp;
- int leaveFloorTime;
- int leaveFloorTime1;
- int leaveFloorTime2;
- int leaveTimeStatus;
- int catchFloorTime;
- int lastZupt;
- int stepCount;
- int last_pos[3];
- vector<FLOOR_TIME_STYPE> time_vector;
- float mean_vel;
- float mean_window_vel;
- float step_vel_buff[3];
- float vel_sqrt_sum;
- int vel_sqrt_num;
- float vel_sqrt_buff[3];
- };
- #endif
|