Understanding LAND.stage values in ArduPlane DataFlash logs (4.7)

I’m developing an open-source landing analysis tool for ArduPlane that works from DataFlash (.BIN) logs.

I’m trying to understand the exact meaning of the LAND.stage field recorded in the LAND message.

From several flights (ArduPlane 4.7 beta) I’ve observed:

  • LAND.stage transitions from 0 → 1 at approximately 10 m AGL, before the rangefinder becomes valid (RNGFND1_MAX = 6 m).

  • LAND.stage transitions from 1 → 2 later during final approach.

  • LAND.stage transitions from 2 → 3 shortly before the aircraft begins slowing rapidly for the flare.

  • The transitions appear consistent across multiple landings.

I’m not looking for the user-facing description of the landing sequence, but the internal logic behind these stage changes.

Specifically:

  1. What does each LAND.stage value represent?

  2. What conditions trigger the transitions between stages?

  3. Which sensors or estimates are involved (baro altitude, rangefinder, airspeed, flare logic, etc.)?

  4. Is there any documentation or source file that defines the landing state machine?

The goal is to align the analysis tool with ArduPlane’s actual behaviour rather than inferring the stages from flight plots.

Thanks.

Check the source code, that’s the best place too look for such information.

1 Like