Autopilot landing: touchdown detection and ground effect follow-ups from #15661
Author: blckmnCreated Sep 26, 2026Updated Sep 28, 2026
Follow-up from #15563 and #15661 by @dmitrii-galantsev. #15763 fixes the landing target running out on landings started high (#15651). These parts of #15661 are not on master and need a landing log on current master before we settle on a design, since #15584 changed the estimator underneath them.
- Mid-air disarm latch.
updateLanding()inflight_plan_nav.clatcheslandingDescentEstablishedon a single descending sample. After that, any quiet period ofap_landing_detection_timedisarms withDISARM_REASON_LANDINGat any height. Gating the quiet check onisBelowLandingAltitude()stops that, but it is measured against the arming altitude, so a landing site more thanap_landing_altitude_mabove the arming point (or altitude drift of that size) would never disarm. - Ground contact does not end the descent. Touchdown is only the quiet velocity timer, which resets on any transient, so a craft bouncing or skittering on its feet can keep near hover thrust on the ground and ground effect can lift it again. With
landing_disarm_thresholdat its default of 0 nothing else disarms an autopilot landing. #15661 inferred contact from impact (accelerometer amplitude plus jerk), a stalled descent or a timeout, then bled throttle toap_throttle_min.ap_landing_throttle_thresholdexists in the autopilot PG but nothing reads it, so a throttle based contact signal may be the simpler route and would not depend on altitude above the arming point. - Ground effect sink. A phantom baro plunge near the ground can drive D and launch the craft. #15661 bounded the sink D acts on during a landing, fitted to one blackbox captured before #15584.
What would help: blackbox logs of Flight Plan or GPS rescue landings on current master with baro and debug_mode = AUTOPILOT_ALTITUDE, ideally including a landing on ground higher than the arming point. The author's tests and simulation are on the #15661 branch.
Source: betaflight/betaflight