Tools: autotest: add Copter AirModeStabZeroThrottle and AirModeLanding tests

AirModeStabZeroThrottle flies the scenario from a bug report of air-mode not
working when armed with the ARMDISARM_AIRMODE switch: hover in STABILIZE,
check the pilot has roll control, then drop the throttle to zero and check the
vehicle holds attitude against a SIM_TWIST disturbance while descending.  Note
ATC_THR_MIX_MAN defaults to the same value as ATC_THR_MIX_MIN, so the test
raises it; otherwise there is no attitude authority to lose at zero throttle
and the test cannot see the difference.

AirModeLanding checks the land detector does not call a landing in mid-air
when the throttle stick is at zero in air-mode.  An updraft just over terminal
velocity holds the vehicle in equilibrium, so every land-detector check says
"landed" and only its timeout is left; the trigger is timed from the onboard
log because MAVLink timing cannot separate LAND_DETECTOR_TRIGGER_SEC (1s) from
LAND_AIRMODE_DETECTOR_TRIGGER_SEC (3s).

Both run for air-mode from the AIRMODE aux switch and from arming with the
ARMDISARM_AIRMODE switch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Peter BarkerandClaude Opus 5 authored and Randy Mackay committed 2026-08-04 10:38:06 +09:00
1 parent 890622b001
commit c5040e778a
1 file changed
+233
File diff suppressed because it is too large. Load diff