mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
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
This commit is contained in:
parent
948ae05922
commit
32404f5aa5
@ -2333,6 +2333,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…
Reference in New Issue
Block a user