Files
ardupilot/Tools
Henry WurzburgandClaude Sonnet 5 e0605354cf autotest: gradual RTL altitude descent in QRTL approach
Adds QRTLGradualAltDescent: flies out ~900m, triggers QRTL, and
asserts the vehicle does not shed more than 15m of altitude in the
first 15 seconds, then completes a normal VTOL landing.

Adds QRTLGradualAltDescentTerrain, covering the altitude-frame-mixing
bug found during review: flies over real sloped terrain near CMAC and
checks the approach ramp's target altitude starts near the aircraft's
current position instead of jumping by the terrain-height gap between
the approach start point and home. Does not cover the POSITION1/2 fix
from the same PR - reliably triggering that path needs an abrupt,
timed fault injection that would need dedicated harness support to
test safely.

The two message-polling loops in these tests are written as
MessageHook subclasses, matching this file's existing
DetectThrottleSpike convention, rather than hand-rolled recv_match
loops. Also fixes a failing location-ratchet check by replacing
home_position_as_mav_location()/home_relative_loc_ne() with the
frame-aware home_position_as_location()/offset_location_ne().

Verified locally: both tests pass with a real quadplane SITL build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 09:39:19 +10:00
..
2026-08-20 08:47:04 +09:00