Numero Uno / Mbed 2 deprecated PID_VelocityExample

Dependencies:   HIDScope PID QEI mbed EMG

Fork of PID_VelocityExample by Aaron Berk

Revision:
14:102a2b4f5c86
Parent:
9:07189a75e979
--- a/Point.cpp	Tue Oct 06 11:30:38 2015 +0000
+++ b/Point.cpp	Tue Oct 06 14:17:11 2015 +0000
@@ -27,10 +27,10 @@
     }
     bool fromRotational(float a, float b)
     {
-        rotA = a*M_PI/180;
-        rotB = b*M_PI/180;
-        posX = (tan(rotB)*l)/(tan(rotA)+tan(rotB));
-        posY = tan(rotA)*posX;
+        rotA = a;
+        rotB = b;
+        posX = (tan(rotB*M_PI/180)*l)/(tan(rotA*M_PI/180)+tan(rotB*M_PI/180));
+        posY = tan(rotA*M_PI/180)*posX;
         
         return true;