Browse Source

Plane: cope with high angle error in airbrake state

if we are flying too far off the target vector then exit airbrake
state. This prevents flying for a long distance away from the landing
point in airbrake mode
apm_2208
Andrew Tridgell 3 years ago
parent
commit
3659669409
  1. 1
      ArduPlane/quadplane.cpp

1
ArduPlane/quadplane.cpp

@ -2337,6 +2337,7 @@ void QuadPlane::vtol_position_controller(void) @@ -2337,6 +2337,7 @@ void QuadPlane::vtol_position_controller(void)
if (poscontrol.get_state() == QPOS_AIRBRAKE &&
poscontrol.time_since_state_start_ms() > min_airbrake_ms &&
(aspeed < aspeed_threshold ||
fabsf(degrees(closing_vel.angle(desired_closing_vel))) > 60 ||
closing_speed > MAX(desired_closing_speed*1.2, desired_closing_speed+2) ||
labs(plane.ahrs.roll_sensor - plane.nav_roll_cd) > attitude_error_threshold_cd ||
labs(plane.ahrs.pitch_sensor - plane.nav_pitch_cd) > attitude_error_threshold_cd)) {

Loading…
Cancel
Save