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:
2:761e3c932ce0
diff -r eef20f4c7c34 -r 761e3c932ce0 05_TrajectoryTracking/purePursuit.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/05_TrajectoryTracking/purePursuit.h	Mon Jan 18 06:00:43 2016 +0000
@@ -0,0 +1,36 @@
+#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);
+    
+private:
+    static float const ld_min = 60.0; //min purepursuit lookahead distance
+    static float const ld_max = 600.0; //max purepursuit lookahead distance
+    static float const trackingLimit = 60.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(120);
+    
+    float robotFrame_targetPos[2];
+    float robotFrame_targetDistance;
+    float purePursuit_ld;
+    float purePursuit_r;
+    float purePursuit_headingE;
+};
+
+
+#endif
\ No newline at end of file