自己位置推定機能を追加
Dependencies: SBDBT arrc_mbed BNO055
Diff: AUTOmatics.hpp
- Revision:
- 8:f2407caf81ba
- Parent:
- 7:a0b9b6e71e41
diff -r a0b9b6e71e41 -r f2407caf81ba AUTOmatics.hpp --- a/AUTOmatics.hpp Wed Feb 23 03:03:36 2022 +0000 +++ b/AUTOmatics.hpp Sat Mar 05 01:00:42 2022 +0000 @@ -2,5 +2,27 @@ #define AUTOMATICS_H #include "mbed.h" +#define MAXSPEED 500 + class automatics{ - automatics( \ No newline at end of file + public: + void getTarget(double,double,double); + void getCurrent(double,double,double); + double get_xPWM(),get_yPWM(),get_tPWM(); + private: + double targetX,targetY,targetT; + double currentX,currentY,currentT; + double diffX,diffY,diffT; + double xCp,yCp,tCp; + double xP,yP,tP; + double xPWM,yPWM,tPWM; + + void Calc_diff(); + void Calc_Cp(); + void Calc_PWM(); + void Calc_Pval(); +}; + +#endif + + \ No newline at end of file