#pragma once #ifndef __dance_foot_h__ #define __dance_foot_h__ #include "pub.h" class DanceFoot { public: DanceFoot(int LEFT_OR_RIGHT); DanceFoot() {};//添加一个缺省构造函数 int setPosOffset(float Pos[3]); int setPosGlobal(float Pos[3]); int setAttitude(float att[3]); int setFootZupt(int zupt); int setFootRssi(int rssi); int setMaxRssi(int rssi); int setMinRssi(int rssi); int isMoveRssi(int rssi, int zupt); int calGlobalPos(float pos[3], int rssi, int zupt); int posBoundary(float pos[3]); int isGlobalZero(float pos[3], float pos_offset[3], int rssi); int getDirection(float pos[3], float pos_offset[3], int rssi); int getDirectionCorner(float pos[3], float pos_offset[3]); int getDirectionLine(float pos[3], float pos_offset[3]); int getGameDiretion(float pos[3]); void printPosData(vector data); int isMove(vector data); void setLastPos(float* lastPos); void setLastZupt(int lastZupt); void setDanceTraj(float* traj); float calSlope(vector data); float getGamePos(int index); private: float gamePos[3]; float last_pos[2]; int last_zupt; float danceTraj[2]; float rotate_err; float rotateCor[4]; float last_pos_g[2] = { 0, 0 }; float pos[2] = { 0, 0 }; vector data; int left_or_right; int foot_rssi; int foot_zupt; int rssi_zupt; int max_rssi; int min_rssi; float attitude[3]; float globalPos[3]; float offsetPos[3]; }; #endif