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
Global.h
- Committer:
- sift
- Date:
- 2017-12-02
- Revision:
- 44:d433bb5f77c0
- Parent:
- 43:5da6b1574227
- Child:
- 45:8e5d35beb957
File content as of revision 44:d433bb5f77c0:
#ifndef GLOBAL_H #define GLOBAL_H //制御周期 const float CONTROL_CYCLE_S = 0.01f; const int CONTROL_CYCLE_MS = (int)(CONTROL_CYCLE_S * 1000.0f); const int CONTROL_CYCLE_US = (int)(CONTROL_CYCLE_S * 1000000.0f); 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.01f; //[(m/s) / bit] const float LSB_RPS = 0.0004f; //[rps / bit] //エラーカウンタ型 struct errCounter_t { int apsUnderVolt; //aps電圧不足 int apsExceedVolt; //aps電圧超過 int apsErrorTolerance; //aps偏差超過 int apsStick; //aps固着 int brakeUnderVolt; //brake電圧不足 int brakeExceedVolt; //brake電圧超過 int brakeFuzzyVolt; //brake曖昧な電圧(ONでもOFFでもない) int brakeOverRide; //accel-brake同時踏み }; typedef enum { FR_WHEEL = 0, FL_WHEEL, RR_MOTOR, RL_MOTOR, SELECT_T_NUM }select_t; const float M_PI =3.1415f; //[-] const double ratioLPF =0.67; //各センサLPF:CutOff:20Hz const float ratioLPF_RPS =0.27f; //各センサLPF:CutOff:5Hz #define myAbs(x) (((x)>0)?(x):(-(x))) const float GEAR_RATIO =13.0f; //[-] const float TIRE_DIAMETER =0.533f; //[m] const float WHEEL_BASE =1.760f; //[m] 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