Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Diff: Transforms/Transforms.cpp
- 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;
}