From cf3e49eea204082a88dffaba8c6b10efd094114c Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Thu, 11 Oct 2012 17:54:42 +0900 Subject: [PATCH] ArduCopter: changed sin_pitch and sin_roll to faster equivalents --- ArduCopter/ArduCopter.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index e73e1f05f0..f05b9ab7e9 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -2165,8 +2165,8 @@ static void update_trig(void){ cos_yaw_x = yawvector.y; // 0x = north // added to convert earth frame to body frame for rate controllers - sin_roll = sin(ahrs.roll); - sin_pitch = sin(ahrs.pitch); + sin_pitch = -temp.c.x; + sin_roll = temp.c.y / cos_pitch_x; //flat: // 0 ° = cos_yaw: 0.00, sin_yaw: 1.00,