a fork of priustroller

Dependencies:   mbed

Fork of priustroller_current by N K

Revision:
14:1cc975207995
Parent:
11:dccbaa9274c5
Child:
27:846c08fb3697
diff -r 79e247e54d78 -r 1cc975207995 util/transforms.cpp
--- 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);