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 Team Virgo v3

Revision:
11:49344285c82a
Child:
19:7345688260b2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/05_TrajectoryTracking/purePursuit.h	Sun Apr 24 23:54:50 2016 +0000
@@ -0,0 +1,38 @@
+#ifndef purePursuit_H
+#define purePursuit_H
+
+#include "mbed.h"
+#include "generalFunctions.h"
+#include "config.h"
+
+class purePursuit
+{
+public:
+
+    purePursuit();
+    
+    void GenVW(float* purePursuit_velocity, float* purePursuit_omega,
+               float target_waypoint[2], float target_velocity, 
+               float current_position[2], float current_heading);
+               
+    float robotFrame_targetDistance;   
+    float purePursuit_headingE;
+    float purePursuit_ld;
+    float purePursuit_r;        
+
+private:
+    static float const ld_min = 100.0; //min purepursuit lookahead distance
+    static float const ld_max = 1000.0; //max purepursuit lookahead distance
+    static float const trackingLimit = 150.0; //purepursuit will track only until the target distance is greater than this limit
+    
+    static float const drive_minV = driveTrain_minV;
+    static float const drive_maxV = driveTrain_maxV;
+    
+    static float const purePursuit_omega_limit = DEG_TO_RAD(90);
+    
+    float robotFrame_targetPos[2];
+    
+};
+
+
+#endif
\ No newline at end of file