Hi all,
I am testing an X500 V2 indoors and outdoors and have a repeatable difference between modes that I would like help understanding, plus a Level Horizon calibration that will not converge.
Setup: Pixhawk 6X, PX4 v1.17.0 (ver_sw_release 17891583) in Holybro X500 V2 frame
What I observe:
Altitude mode: altitude is held correctly with respect to the throttle stick, but the vehicle drifts horizontally and does not stop.(both indoors and outdoors)
Stabilized mode: altitude is not maintained — it sinks. Over 5 Stabilized segments mean vz is +0.064 m/s (descending) and mean altitude change −0.71 m, versus Altitude mode at vz −0.008 m/s and +0.32 m.(both indoors and outdoors)
Position mode is stable at outdoors, since indoors GPS do not get the fix.
For magnitude reference, hands-off drift rates measured on earlier sessions of the same airframe that did have a GPS fix (sticks centred, airborne, xy_valid 100%, dead_reckoning 0%, segments ≥3 s):
Altitude mode is ~15x worse than Position on the same airframe.
Effect of Level Horizon accuracy:
I have two videos showing the difference.
-
With a good level horizon calibration value takeoff is vertical and clean, and drift is present but slow.

-
With an incorrect level horizon calibration value (each time it will vary during calibration, observation is explained below in the specific section)takeoff is unstable, it departs horizontally, and the drift is much faster.

The logs confirm it — peak tilt and peak body rate in the first 6 s after takeoff:
What I have already checked:
- Residual tilt correlates with drift rate (r = 0.75, n = 7), but does not explain the magnitude: at 0.11° residual, g·tan(0.11°) = 0.019 m/s² predicts 0.24 m over 5.1 s, while 2.01 m was measured (~8x). On another segment observed acceleration was 0.338 m/s² versus 0.082 m/s² implied by attitude (4.1x), with xy_valid 100% and GPS velocity innovations of only 0.05–0.08 m/s.
- From FlightTaskManualAltitude.cpp, Altitude and Stabilized have no horizontal position or velocity hold by design — the task writes only _acceleration_setpoint.xy() and never sets _position_setpoint(0/1) or _velocity_setpoint(0/1). My logs confirm those setpoints are non-finite 100% of the time. So I expect coasting; my question is the magnitude and what else contributes.
- Drift bearings have a circular mean of 41° with concentration R = 0.49, i.e. a loose directional preference rather than a fixed bias.
- hover_thrust_estimate measures 0.536 while MPC_THR_HOVER is set to 0.5. In the Stabilized segments the throttle stick averaged 0.414 on the 0–1 scale, below the 0.536 needed to hover, so the sink may be stick position combined with the 0.5 vs 0.536 mismatch rather than a mode fault.
Questions
- What are the contributing factors to horizontal drift in Altitude and Stabilized mode specifically, when Position mode is stable on the same airframe? Beyond residual level-calibration error, what else should I look at — IMU/accel bias, thrust-curve linearity, motor/ESC mismatch, CG offset, indoor recirculation?
- Is ~0.5 m/s hands-off drift acceptable for Altitude mode on a correctly calibrated multirotor, or does it indicate a fault worth chasing?
- Are there parameters I should tune or modify to reduce the drift and make the vehicle stable in both Altitude and Stabilized mode? I have already set MPC_MAN_TILT_MAX 20. Would THR_MDL_FAC, MPC_MANTHR_MIN, MPC_VELD_LP or the rate-loop gains be relevant?
- For the Stabilized sink: should MPC_THR_HOVER be set to the measured hover_thrust_estimate of 0.536 instead of 0.5? Does MPC_USE_HTE 1 affect manual-throttle modes at all, or only the position controller? Is a mid-stick sink expected whenever MPC_THR_HOVER is below the true hover thrust?
- Level Calibration at bench gives different value each time, why is it so?
Separate concern: Level Horizon does not converge
Each time doing level calibration in QGC it drifts the level horizon (i.e., SENS_BOARD_OFFESTS)
Bench test, bare board on the surface, never armed, never airborne, stationary (peak gyro 4.3 deg/s), SDLOG_MODE 2, 155 s, 13 Level Horizon runs back-to-back in QGC about 10 s apart, no reboot, board untouched. Values taken from PX4’s own Updating SENS_BOARD_* log messages:
It took 12 runs to settle. Spread: X_OFF 2.46°, Y_OFF 8.76° (−0.28° to +10.49°). A 10.5° offset is not physically possible for a board lying flat on a bench, so this is not a mounting problem.
The values do not wander randomly — they oscillate and overshoot. Y_OFF: 1.7 → 7.5 → 10.5 → 6.9 → 3.9 → 2.9 → 7.2 → 10.3 → 7.2 → 6.0 → 6.9 → 6.83 → 6.78. The estimated pitch swings with it (+5.8°, +0.3°, −3.7°, +1.5°, +3.4°, −1.9°, finally −0.01°) while the board is physically motionless.
In level_calibration.cpp the calibration is incremental — it samples the estimated attitude (vehicle_attitude, i.e. EKF output, not raw accel) for only 500 ms, subtracts the existing offset, and writes the result, with no wait for the EKF to re-converge:
Logs attached:
- https://logs.px4.io/plot_app?log=db2699f3-5d27-4029-ad1c-05de3e1875c0 bench test, bare board on the surface, never armed. Contains all 13 consecutive Level Horizon calibrations, which gave different value of SENS_BOARD_OFFEST_X and Y.
- https://logs.px4.io/plot_app?log=cf87e535-5e53-4254-bf9f-7f24082b2105— good level horizon calibration value. Pre-takeoff residual tilt 0.00°, peak tilt 1.3°, peak body rate 9 deg/s. This is the clean vertical takeoff in my first video.
- https://logs.px4.io/plot_app?log=079ad835-fc28-4d8a-8d11-6ee3e94d1377 — incorrect level horizon calibration value . Pre-takeoff residual tilt 3.27°, peak tilt 16.6°, peak body rate 313 deg/s. This is the unstable takeoff in my second video.
- https://logs.px4.io/plot_app?log=dea31054-2717-4fd8-80ac-4e7959e50c46— Stabilized mode altitude sink. Altitude change −2.10 m, mean vz +0.125 m/s (descending).
- https://logs.px4.io/plot_app?log=1302bc3e-4005-4652-8779-fccec23409d5— Stabilized sink confirmation. Altitude change −1.09 m, mean vz +0.178 m/s. Also ends with a kill switch.
Thanks in advance!


