Team Virgo v3 / Orion_newPCB_test_LV

Dependencies:   mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo

Fork of Orion_newPCB_test by Team Virgo v3

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pidBearing.h Source File

pidBearing.h

00001 #ifndef pidBearing_H
00002 #define pidBearing_H
00003 
00004 #include "generalFunctions.h"
00005 #include "mbed.h"
00006 #include "orion_pinmapping.h"
00007 #include "config.h"
00008 #include "math.h"
00009 
00010 class pidBearing
00011 {
00012 public:
00013     //motorDriver(PinName mPlus, PinName mMinus, int freq_khz);
00014     //void setPWM(float val);
00015     
00016     pidBearing();
00017     void setSpeedChange(float* wl, float* wr, float* speedChange, float* Error, 
00018                                 float target[2], 
00019                                 float local[2],
00020                                 float yaw, 
00021                                 float* robotFrame, 
00022                                 float xx, float yy, 
00023                                 float* k3,
00024                                 float lGain);                                
00025     void pidBearing::findRobotFrameDistance(float target[2], float local[2], float* robotFrame); 
00026 
00027 private:
00028     float kp, kd, ki;
00029     float imuToAchieve, offset, angleToRotate, prevaError, bearingToWaypoint, sumError, max_in, minDist;
00030 };
00031 
00032 
00033 #endif