2014 sift / Mbed 2 deprecated TVDctrller2017_brdRev1_PandA

Dependencies:   mbed

Fork of TVDctrller2017_brdRev1_ver6 by 2014 sift

Global.h

Committer:
sift
Date:
2017-10-24
Revision:
38:11753ee9734f
Parent:
34:594ddb4008b2
Child:
39:c05074379713

File content as of revision 38:11753ee9734f:

#ifndef GLOBAL_H
#define GLOBAL_H

//制御周期
const int CONTROL_CYCLE_MS  = 10;
const float CONTROL_CYCLE_S     = 0.01;

const float LSB_MOTORSPEED      = 0.01;     //[(m/s) / 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同時踏み
};

enum Select {
    RIGHT=0,
    LEFT
};

#define M_PI            3.1415f //[-]

#define ratioLPF        0.67f  //各センサLPF:CutOff:20Hz

#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;     //[-]

#endif