# Pixhawk 6X (v1.17.0): horizontal drift in Altitude and Stabilised mode

**URL:** <https://discuss.px4.io/t/pixhawk-6x-v1-17-0-horizontal-drift-in-altitude-and-stabilised-mode/49625>\
**Category:** PX4 Autopilot\
**Created:** [October 21, 2026, 3:40pm UTC](https://discuss.px4.io/t/pixhawk-6x-v1-17-0-horizontal-drift-in-altitude-and-stabilised-mode/49625 "2026-10-21T15:40:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rathi\_Meena.R](https://discuss.px4.io/user_avatar/discuss.px4.io/rathi_meena.r/32/22171_2.png) [@Rathi\_Meena.R](https://discuss.px4.io/u/Rathi_Meena.R)\
**Post date:** [October 21, 2026, 3:40pm UTC](https://discuss.px4.io/t/pixhawk-6x-v1-17-0-horizontal-drift-in-altitude-and-stabilised-mode/49625/1 "2026-10-21T15:40:11Z")

</div>

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):

 ![image](https://discuss.px4.io/uploads/default/original/3X/d/6/d6aa1eae815bd8d2dbdcfd4dc430384e38c14580.png)

Altitude mode is ~15x worse than Position on the same airframe.

**Effect of Level Horizon accuracy:**

I have two videos showing the difference.

1. With a good level horizon calibration value takeoff is vertical and clean, and drift is present but slow.

2. 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:

 ![image](https://discuss.px4.io/uploads/default/original/3X/4/f/4f4ab92ffdcc4602b15889995fdf804373a1f9ac.png)

**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

1. 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?
2. 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?
3. 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?
4. 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?
5. 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:

 ![image](https://discuss.px4.io/uploads/default/original/3X/8/6/861bdb34a140ea59a5d571aa853b6e70e93a307a.png)

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:

1. [https://logs.px4.io/plot\_app?log=db2699f3-5d27-4029-ad1c-05de3e1875c0](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.
2. [https://logs.px4.io/plot\_app?log=cf87e535-5e53-4254-bf9f-7f24082b2105](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.
3. [https://logs.px4.io/plot\_app?log=079ad835-fc28-4d8a-8d11-6ee3e94d1377](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.
4. [https://logs.px4.io/plot\_app?log=dea31054-2717-4fd8-80ac-4e7959e50c46](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).
5. [https://logs.px4.io/plot\_app?log=1302bc3e-4005-4652-8779-fccec23409d5](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!

---

<div class="post-metadata">

**Author:** ![yigitcan-ozturk](https://discuss.px4.io/user_avatar/discuss.px4.io/yigitcan-ozturk/32/22039_2.png) [@yigitcan-ozturk](https://discuss.px4.io/u/yigitcan-ozturk)\
**Post date:** [October 22, 2026, 5:08am UTC](https://discuss.px4.io/t/pixhawk-6x-v1-17-0-horizontal-drift-in-altitude-and-stabilised-mode/49625/2 "2026-10-22T05:08:48Z")

</div>

Hi Rathi,

Thank you for the detailed measurements and for separating the horizontal drift, Stabilized-mode descent, and Level Horizon calibration behaviour.

I checked `src/modules/commander/level_calibration.cpp` in PX4 v1.17.0. I think the Level Horizon repeatability issue deserves priority because it could affect the interpretation of the subsequent flight tests.

The implementation uses `vehicle_attitude` rather than raw accelerometer samples, collects attitude measurements over a 500 ms window, and checks motion primarily through the roll/pitch variation within that window.

I do not see an explicit estimator-settling stage after updating the board offsets.

This makes estimator convergence and calibration feedback worth investigating, although it does not yet establish the root cause of the oscillation you observed.

I would suggest three separate investigations.

**1. Level Horizon calibration**

For the bench log, align each calibration event with:

- `SENS_BOARD_X_OFF` and `SENS_BOARD_Y_OFF` changes.

- Estimated roll and pitch before and after each calibration.

- Estimator status, innovation behaviour and any attitude resets.

- IMU/accelerometer measurements and vibration indicators.

An important question is whether each calibration begins before the estimator has settled following the previous offset update.

A useful regression test would repeat Level Horizon calibration on a stationary simulated vehicle and check whether the resulting offsets converge consistently.

**2. Altitude/Stabilized horizontal drift**

Your observation that these modes do not command horizontal position or velocity hold is important.

Therefore, comparing their hands-off drift directly against Position mode does not establish a controller fault.

However, the difference between expected acceleration from residual tilt and measured horizontal displacement is worth investigating.

I would compare estimated horizontal velocity against independent position measurements where available, and examine actual attitude, thrust, wind/airflow, vehicle balance and motor behaviour.

I would avoid changing rate-loop gains or thrust-curve parameters until those contributions are better isolated.

**3. Stabilized-mode descent**

In Stabilized mode, throttle is manually commanded rather than being controlled by an altitude-hold loop.

The observed mean throttle value below the estimated hover thrust is consistent with descent, but the relationship between stick position and actual thrust depends on the configured throttle mapping.

I would not assume that changing `MPC_THR_HOVER` alone will eliminate the descent.

Before further flight testing, I would recommend restoring a verified calibration and confirming stable attitude estimation on the bench.

The 13-run Level Horizon dataset looks particularly useful for a focused upstream issue or regression test.

Best regards,  
Yiğitcan Öztürk  
PAMILANGA LIMITED
