Problems with Sensor drift (Yaw)


Dear Ladies and Gentlemen,

as in the following Picture to see, i do have the problem that the yaw heading is drifting after a turn. I tried seperate hardware to cancel out a hardware malfunction.

My current stand is that i think that it is a temperature problem, but the temperature calibration dosnt seem to help with this problem. I dont know if i am doing the temp calibration right (using the manual in the user guide) since there aren`t any succes notifications or anything.

In my previous post describes my path up to now already and can be found here Strong yaw drift on the Pixhawk 2.1

Is there anything that i may be missing in the calibration setup or is there something special to the temp calibration which is not posted in the user guide? Also, is it alright if i connect to QGC when i get the AP out of the cold soak?

EDIT: I tried to read out the status of the calibration via the mavlink console. But i cant find how i do that or what i need to type in the console. The user guide just says that it is possible.
I`m hoping for help.


@Kirschgemtec Could you provide any more information regarding the environment you are flying in?


The picture above was taken with the AP on my table right next to me. (Normal office space, wood desk.)

But the problem persists even when i`m out in the field (grass field, nearest tree in around 100m, no buildings near, no power cables or the like)


@Kirschgemtec Where did you calibrate your compass?

If this issue is not something more fundamental, calibrating the compass on the environment you are flying might solve this.


We did this on site also, but the problem reappears after a change in temperatur. As far as we could identify


Hi @Jaeyoung-Lim,
I have actually the same problem with our pixracers. Calibration is done in regular office space but even when using the pixracer at the exact same spot later or next day we are facing the drift. The temperature makes sense though as we get with every calibration significantly different values for the gyro bias which make sense for the heating up phase.


There are some crapy sensors out there. Out of 8 pixracers, I got one with a lis3mdl with 60° yaw mag drift over 20 deg temperature change. The others have about 2 to 16 deg drift.

An other one had a mpu6050 with about 10x acceleration noise than the others.

To verify this, you have to enable sensor logging, connect power, start the logger for about 10 min warm up and then watch the sensor log data. It seams this is not done in the pixracer production test.

By the way: Temperature calibration calibrates just the gyro / acc / baro offset drifts. Mag is not calibrated:


Hello @hdiethelm

i was able to fix this problem with the temp calibration. The yaw drift is a product of a temp drifiting gyro/acc and a quite stable mag which seem to be linked in the yaw estimation.
That is as far as i could observe/analyze it.

But i`m still not an expert in how the yaw estimation works with the sensors so i could be wrong and ym problem just vanished.