EKF3 + ExternalNav POSZ: altitude runaway during LOITER takeoff (XKF1.PD drift)

Hi,

I am experiencing a repeatable altitude runaway (Z-axis drift) during takeoff in LOITER mode when using EKF3 with ExternalNav (Vision) in ArduCopter.


Setup

  • Firmware: ArduCopter (EKF3 enabled)

  • Flight Controller: CUAV V6X

  • Sensors:

    • Barometer

    • ExternalNav (Vision-based position)

    • No rangefinder

  • Test environment:

    • GPS-denied

    • Indoor parking garage

  • EKF source selection is assigned to RC switches

    • The issue is observed while testing with SRC1 selected

EKF Source Selection (detailed)

SRC1

  • EK3_SRC1_POSXY = ExternalNav

  • EK3_SRC1_POSZ = ExternalNav

  • EK3_SRC1_VELXY = None

  • EK3_SRC1_VELZ = None

  • EK3_SRC1_YAW = ExternalNav

SRC2

  • EK3_SRC2_POSXY = ExternalNav

  • EK3_SRC2_POSZ = Baro

  • EK3_SRC2_VELXY = None

  • EK3_SRC2_VELZ = None

  • EK3_SRC2_YAW = ExternalNav

SRC3

  • EK3_SRC3_POSXY = GPS

  • EK3_SRC3_POSZ = Baro

  • EK3_SRC3_VELXY = None

  • EK3_SRC3_VELZ = None

  • EK3_SRC3_YAW = Compass


Problem Description

  • The vehicle is armed in LOITER mode.

  • When throttle is increased to initiate takeoff:

    • The vehicle behaves as if it is falling

    • Throttle command increases very aggressively

    • Even when the throttle stick is brought to minimum, the vehicle continues to climb

  • When switching to LAND mode, the vehicle descends slowly and normally


Log and Visual Analysis

I have uploaded the log file here:
Google Drive link:
https://drive.google.com/file/d/1cBvUwwqFpyNfa9rJp6uYedJMyUeJ7ged/view?usp=drive_link

Along with the log, I am sharing a single graph image generated using MAVExplorer.

In the graph, during the time interval marked with an arrow, the following behavior is observed:

  • VISP.PZ remains stable with no sudden jumps

  • BARO.Alt is noisy but stays within a reasonable range

  • Despite this:

    • XKF1[0].PD rapidly drifts down to approximately -25 meters

I am unable to understand why this drift occurs, especially while both the Vision Z and Barometer altitude appear stable.

Since XKF1.PD represents the Down position in NED, this negative drift causes the EKF to assume that the vehicle’s altitude is increasing rapidly, which results in very aggressive throttle commands during takeoff.


Questions

  1. While VISP.PZ and BARO.Alt are stable, what could cause EKF3 to drift XKF1.PD by such a large amount in a short time?

  2. When using POSZ = ExternalNav, what known conditions could lead to this kind of vertical position state degradation in EKF3?

  3. Are there any recommended additional debug plots or known EKF3 / ExternalNav limitations related to this behavior?


Thank you for your time and interest.