From 0ccf5724aa71e4aef3dfb9b97ae7bc8b37e7c3c8 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Tue, 19 Jun 2012 20:01:05 -0700 Subject: [PATCH] Small fix to angle boost - increases by about 20% to deal with inefficiencies of non-downward thrust --- ArduCopter/Attitude.pde | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ArduCopter/Attitude.pde b/ArduCopter/Attitude.pde index 7fd4bd8fca..41e4803d29 100644 --- a/ArduCopter/Attitude.pde +++ b/ArduCopter/Attitude.pde @@ -434,15 +434,9 @@ get_nav_yaw_offset(int yaw_input, int reset) static int16_t get_angle_boost(int16_t value) { -// float temp = cos_pitch_x * cos_roll_x; -// temp = 1.0 - constrain(temp, .5, 1.0); -// int16_t output = temp * value; -// return constrain(output, 0, 200); -// return (int)(temp * value); - float temp = cos_pitch_x * cos_roll_x; temp = constrain(temp, .5, 1.0); - return ((float)g.throttle_cruise / temp) - g.throttle_cruise; + return ((float)(g.throttle_cruise + 80) / temp) - (g.throttle_cruise + 80); } #if FRAME_CONFIG == HELI_FRAME