Implement new controller
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
01_DriveTrain/pidBearing.h
- Committer:
- ahmed_lv
- Date:
- 2018-03-15
- Revision:
- 26:32eaf3c3ac2e
- Child:
- 27:2db168d9fb18
File content as of revision 26:32eaf3c3ac2e:
#ifndef pidBearing_H #define pidBearing_H #include "generalFunctions.h" #include "mbed.h" #include "orion_pinmapping.h" #include "config.h" #include "math.h" class pidBearing { public: //motorDriver(PinName mPlus, PinName mMinus, int freq_khz); //void setPWM(float val); pidBearing(); void setSpeedChange(float* wl, float* wr, float* speedChange, float* aError, float x2, float y2, float x1, float y1, float yaw, float distanceToTravel, float xx, float yy, float* k3); private: float kp, kd, ki; float imuToAchieve, offset, angleToRotate, prevaError, bearingToWaypoint, sumError, max_in, minDist; }; #endif