Ikhee Jo / T-Motor_AK80_BaseCode

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
7:dc5f27756e02
Parent:
5:51c6560bf624
Child:
10:370851e6e132
--- a/Transforms/Transforms.cpp	Sat Mar 12 19:55:52 2016 +0000
+++ b/Transforms/Transforms.cpp	Tue Mar 29 01:05:46 2016 +0000
@@ -5,8 +5,10 @@
 using namespace FastMath;
 
 void Transforms::Park(float alpha, float beta, float theta, float *d, float *q){
-    float cosine = cos(theta);
-    float sine = sin(theta);
+    //float cosine = cos(theta);
+    //float sine = sin(theta);
+    float cosine = FastCos(theta);
+    float sine = FastSin(theta);
     *d = alpha*cosine - beta*sine;
     *q = -beta*cosine - alpha*sine;
     //*d = alpha*cosine + beta*sine;
@@ -16,8 +18,10 @@
     }
 
 void Transforms::InvPark(float d, float q, float theta, float *alpha, float *beta){
-    float cosine = cos(theta);
-    float sine = sin(theta);
+    //float cosine = cos(theta);
+    //float sine = sin(theta);
+    float cosine = FastCos(theta);
+    float sine = FastSin(theta);
     *alpha = d*cosine - q*sine;
     *beta = q*cosine + d*sine;
     }