Prius IPM controller

Dependencies:   mbed

Fork of analoghalls5_5 by N K

Revision:
14:1cc975207995
Parent:
11:dccbaa9274c5
Child:
27:846c08fb3697
--- a/util/transforms.cpp	Mon Mar 09 01:40:43 2015 +0000
+++ b/util/transforms.cpp	Mon Mar 09 02:06:06 2015 +0000
@@ -7,6 +7,11 @@
     *beta = (a + 2.0f * b)/sqrt(3.0f);
 }
 
+void Transforms::InverseClarke(float alpha, float beta, float *a, float *b) {
+    *a = alpha;
+    *b = -0.5 * alpha + sqrt(3.0f) / 2.0f * beta;
+}
+
 void Transforms::Parke(float alpha, float beta, float theta, float *d, float *q) {
     float cos = FastCos(theta);
     float sin = FastSin(theta);