Plane: tiltrotor: fix canceling out of FWD_GAIN

This commit is contained in:
Peter Hall 2024-05-05 03:36:26 +01:00 committed by Andrew Tridgell
parent 1aa79ba489
commit 795657b768
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ void Tiltrotor::continuous_update(void)
// operate in all VTOL modes except Q_AUTOTUNE. Forward rotor tilt is used to produce // operate in all VTOL modes except Q_AUTOTUNE. Forward rotor tilt is used to produce
// forward thrust equivalent to what would have been produced by a forward thrust motor // forward thrust equivalent to what would have been produced by a forward thrust motor
// set to quadplane.forward_throttle_pct() // set to quadplane.forward_throttle_pct()
const float fwd_g_demand = 0.01f * quadplane.forward_throttle_pct() / plane.quadplane.q_fwd_thr_gain; const float fwd_g_demand = 0.01 * quadplane.forward_throttle_pct();
const float fwd_tilt_deg = MIN(degrees(atanf(fwd_g_demand)), (float)max_angle_deg); const float fwd_tilt_deg = MIN(degrees(atanf(fwd_g_demand)), (float)max_angle_deg);
slew(MIN(fwd_tilt_deg * (1/90.0), get_forward_flight_tilt())); slew(MIN(fwd_tilt_deg * (1/90.0), get_forward_flight_tilt()));
return; return;