Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TVDctrller2017_brdRev1_ver6 by
Diff: Global.h
- Revision:
- 43:5da6b1574227
- Parent:
- 40:8e33c60c6590
- Child:
- 44:d433bb5f77c0
diff -r 3ab09d0e3071 -r 5da6b1574227 Global.h --- a/Global.h Sat Oct 28 06:44:09 2017 +0000 +++ b/Global.h Thu Nov 02 01:56:46 2017 +0000 @@ -6,7 +6,8 @@ const int CONTROL_CYCLE_MS = (int)(CONTROL_CYCLE_S * 1000.0f); const int CONTROL_CYCLE_US = (int)(CONTROL_CYCLE_S * 1000000.0f); -const int TIRE_MEAS_CYCLE_US = 10000; +const float RPS_MEAS_CYCLE_S = 0.01f; +const int RPS_MEAS_CYCLE_US = (int)(RPS_MEAS_CYCLE_S * 1000000); const float LSB_MOTORSPEED = 0.01; //[(m/s) / bit] @@ -22,14 +23,14 @@ int brakeOverRide; //accel-brake同時踏み }; -enum Select { - RIGHT=0, - LEFT -}; +typedef enum { + FR_WHEEL = 0, FL_WHEEL, RR_MOTOR, RL_MOTOR, SELECT_T_NUM +}select_t; const float M_PI =3.1415f; //[-] -#define ratioLPF 0.67f //各センサLPF:CutOff:20Hz +const float ratioLPF =0.67f; //各センサLPF:CutOff:20Hz +const float ratioLPF_RPS =0.27f; //各センサLPF:CutOff:5Hz #define myAbs(x) (((x)>0)?(x):(-(x))) @@ -39,5 +40,6 @@ const float TREAD =1.3f; //[m] const float A =0.005f; //[s^2/m^2] const float STEER_RATIO =0.32f; //[-] +const float ALPHA =5.0f; //[-]増幅率α #endif \ No newline at end of file