Browse Source

SITL: use sinf() and cosf()

for some strange reason the double precision functions can crash
mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
9e3bf685c2
  1. 6
      libraries/SITL/SITL.cpp

6
libraries/SITL/SITL.cpp

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

Loading…
Cancel
Save