From d804b28638821e35cd6c1b1c281ccd00fd778c58 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sun, 13 Nov 2011 22:40:46 +0900 Subject: [PATCH] TradHeli - reversed the direction of "phase angle" to make it more intuitive. This parameter is used to correct for a heli's tendency to lean left or right when the pilot gives it a pitch forward command. --- ArduCopter/heli.pde | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ArduCopter/heli.pde b/ArduCopter/heli.pde index 7b6c357583..5188f2629c 100644 --- a/ArduCopter/heli.pde +++ b/ArduCopter/heli.pde @@ -28,14 +28,14 @@ static void heli_init_swash() g.heli_servo_4.set_angle(4500); // pitch factors - heli_pitchFactor[CH_1] = cos(radians(g.heli_servo1_pos + g.heli_phase_angle)); - heli_pitchFactor[CH_2] = cos(radians(g.heli_servo2_pos + g.heli_phase_angle)); - heli_pitchFactor[CH_3] = cos(radians(g.heli_servo3_pos + g.heli_phase_angle)); + heli_pitchFactor[CH_1] = cos(radians(g.heli_servo1_pos - g.heli_phase_angle)); + heli_pitchFactor[CH_2] = cos(radians(g.heli_servo2_pos - g.heli_phase_angle)); + heli_pitchFactor[CH_3] = cos(radians(g.heli_servo3_pos - g.heli_phase_angle)); // roll factors - heli_rollFactor[CH_1] = cos(radians(g.heli_servo1_pos + 90 + g.heli_phase_angle)); - heli_rollFactor[CH_2] = cos(radians(g.heli_servo2_pos + 90 + g.heli_phase_angle)); - heli_rollFactor[CH_3] = cos(radians(g.heli_servo3_pos + 90 + g.heli_phase_angle)); + heli_rollFactor[CH_1] = cos(radians(g.heli_servo1_pos + 90 - g.heli_phase_angle)); + heli_rollFactor[CH_2] = cos(radians(g.heli_servo2_pos + 90 - g.heli_phase_angle)); + heli_rollFactor[CH_3] = cos(radians(g.heli_servo3_pos + 90 - g.heli_phase_angle)); // collective min / max total_tilt_max = 0;