EKF2 Altitude Offset

Vehicle Setup

  • Autopilot: Pixhawk 6C mini

  • PX4 Firmware Version: v1.17.1

  • Frame: Multirotor (Quadcopter)

  • Companion Computer / Interface: Companion computer [Vicharak Axon] running MAVSDK Python (Offboard control via TELEM2)

  • Height Sensors: Internal Barometer, GPS [CUAV Neo 3 Pro]

  • Flight Log Link: https://logs.px4.io/plot_app?log=be8dbf81-68c4-48e0-b559-cbadcf979396


Description of the Issue

I am encountering an altitude estimation discrepancy and stability issue.

1. Static / Takeoff Altitude Bias

  • Takeoff is commanded to 2 m relative altitude.

  • The autopilot/telemetry reports that it has reached 2 m, but physically the drone is only hovering higher or lower above the ground.

  • The reported EKF2 altitude stays clamped near ~2 m while the actual drone is much lower or higher.

2. Inconsistent / Erroneous Altitude Display in QGroundControl

  • At times, QGC shows the drone as never reaching the commanded target altitude, even though the vehicle has physically stabilized there.

  • At other times, the altitude value displayed in QGC goes negative, despite the drone being airborne and well above the ground.


I have tried both using GPS and Barometer as the primary altitude source by configuring the following parameters, but it does not seem to work

Parameters

  • EKF2_HGT_REF = 0 / 1 — Barometer / GPS

  • EKF2_BARO_CTRL = 1 — Barometer enabled

  • EKF2_GPS_CTRL = 5 / 7 — 2D / 3D position

  • EKF2_ABL_LIM = 0.4 — Baro bias estimation limit

  • EKF2_BARO_NOISE = 1.5 / 3.5


Any insights or recommendations on parameter adjustments or hardware isolation best practices would be greatly appreciated!

Are there any other high-quality sources that can be utilized, such as external vision, RTK, or altitude radar?

No such sensors can be used. Is there any way to make it efficient with only gps?

Could you please provide me with a log file? I would like to view the original data related to the barometer and GPS. If the original data is drifting, it is unlikely that a stable effect can be achieved by adjusting the EKF.

https://logs.px4.io/plot_app?log=25262c03-adbb-47ce-9b3a-7e60ee74a9d6

Can the log file be regarded as an attachment so that I can download it?