SITL: use sinf() and cosf()

for some strange reason the double precision functions can crash
This commit is contained in:
Andrew Tridgell 2014-01-04 17:45:20 +11:00
parent bb0eed5c14
commit 9e3bf685c2

View File

@ -132,8 +132,8 @@ void SITL::convert_body_frame(double rollDeg, double pitchDeg,
thetaDot = ToRad(pitchRate);
psiDot = ToRad(yawRate);
*p = phiDot - psiDot*sin(theta);
*q = cos(phi)*thetaDot + sin(phi)*psiDot*cos(theta);
*r = cos(phi)*psiDot*cos(theta) - sin(phi)*thetaDot;
*p = phiDot - psiDot*sinf(theta);
*q = cosf(phi)*thetaDot + sinf(phi)*psiDot*cosf(theta);
*r = cosf(phi)*psiDot*cosf(theta) - sinf(phi)*thetaDot;
}