Drone "drifts" upwards uncommanded in GUIDED mode -> disagreement between GPS/BARO/XKF altitudes

I’ve recently noticed a problem with my drone in that it has been drifting upwards during part of my testing with setting x/y/z velocity using Mavlink commands in GUIDED mode despite my commands not commanding more than about about 0.2m/s vertically at the time of the problem.

It never used to happen till recently and I have not changed any params or updated firmware for a while (it uses 4.3.8 as it supports precision landing). I did recalibrate the compass and accelerometers recently but I was careful to do this the same way I always do.

I have checked that the reported altitude by Arducopter over Mavlink is stable (I assume this is the XKF altitude), however the quadcopter obviously ascends.

The most obvious visual upwards drifting occurs at 15:18:14 (edit: corrected this timestamp) and continues for about 3 seconds. If we look at the graph there is a disagreement at this time between the XKF altitude and GPS/BARO (which both agree with one another more or less and show an increase in altitude):

The log is here:

Please download it and use “arducopter2024” as the password to unzip.

Why is my XKF altitude so badly wrong? My only thought is that the problem occurs when the wind is behind the drone. Maybe this is giving a cooling breeze that affects the accelerometers? The Pixhawk 1 is mounted inside the drone and there are only small holes to allow ventilation.


Have you read and used the methodic tuning Blog?

1 Like

No but the blog looks really useful though involved. Given the drone was flying fine for the last 2 years and now is not, I’d like to identify a physical cause of my problems that have not been obviously seen before.

Is it fair to assume that the XKF altitude is wrong because it is using the accelerometer inputs with a heavier weighting in the short term than the baro or GPS?

In this case, could my problem be with the accelerometers playing up?

I am aware they can be temperature sensitive however I have been flying in 10 deg C conditions before and had no problems. I am aware of the IMU temperature calibration however as my autopilot is buried inside the drone I’m not keen to dismantle it so that I can put it in a freezer for the calibration.

I realise it seems that I’m asking for a “quick fix” but rather I’m keen to identify the source of the problems which seems to have only recently manifested itself.

Would it help to do accel calibration in colder weather? Perhaps this would be a half-solution?

Tonight where I live it is due to be about 2 degrees C so is there a way I can use this cold weather to measure accelerometer characteristics to see if they are prone to drift or error in colder weather?

I realise this is not cold enough for a proper IMU-temperature calibration but maybe I could get some metrics or measure drift or something?


I would like to present a comparison of 3 flights which took similar flightpaths to the one described above, and showed very similar problems with the drone “drifting” up as it started turning its back in the direction of where the wind was coming from.

The IPD graphs below show a yellow vertical line which is where all 3 flights started drifting upwards (as judged visually). All flights show this same characteristic change in IPD from about -2 to about +2.