Pixhawk Barometer Temperature Compensation

Hey everybody,

I have seen quite a few discussions about the barometer on the autopilots. A lot of people, myself included, have noticed substantial altitude drifting with the barometers, even after only 10 minutes or so. I know that there will be weather and pressure changes out of my control that would cause this, but I have noticed another issue that I can't seem to find a good explanation for.

It seems like temperature is affecting the pressure readings quite drastically. I know there is a function in the AP_Baro_MS5611.h file in the Arduplane code to compensate for temperature based on the MS5611 barometer datasheet, and I have actually used the same temperature compensation with the same barometer on another project and it worked very well.

With my project I was able to raise the temperature by 40-50 degrees Celsius and the pressure readings stayed very stable, which means the temperature compensation is doing its job well. However, if I power on a Pixhawk and heat it up even a little the pressure will change quite drastically, causing my altitude to change quite drastically as well. Obviously this is an issue because it is nearly impossible to regulate the temperature of the autopilot during flight.

I have seen some people mention that you should allow the autopilot to reach operating temperature and then recalibrate the barometer. I don't see why this would matter because with my project it didn't matter what my temperature was because it would be compensated for each time it read the pressure by reading the temperature as well. It almost seems like the Pixhawk only compensates for temperature once during calibration, and then uses whatever temperature it used for calibration for the rest of its compensations, but I can't imagine that would be the case.

I have looked into the Arduplane code a little but I was hoping someone with a little more experience could help shed some light on this and explain how the code compensates for temperature.

By the way I am using a Pixhawk with Arduplane 3.2.3



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • anyone reach a conclusion to this?  I think I am having temperature issues as well.

  • I armed (and started logging) a Pixhawk after running it outside in -8 degreeC for an hourat start the airspeed logged +4m/s  .. after a while I brought it inside (~22degC) , let it run to 40minutes inside, the airspeed was ~1.2m/s

    • what about the altitude values?

      • unable to get data on that, tested at roof of the office building elevation difference plus airconditiong system between that and my office alone will make a difference.

        If temperatures drop again this weekend, will test at home.

        • ok, because I think we are talking about the baro, and airspeed is another sensor, isn't it?

          • yes, but both are really the same (MS5611) - the airspeed just has a bigger housing..  is one needs temperature stabilization, so does the other.

            The onboard MS5611 does gets heat from other components, while the external one is a better way to measure actual temperature influence.

            • Yeah, but it could be, that the implementation in the software differs and there is a fault in the temperature compensation with just one of them.

  • I was thinking about the same thing, it looks like the temperature compensation is not active while using the autopilot.

    I am having a drift of several meters after plugging in and leaving the aircraft sit on my bench for 10 minutes..

This reply was deleted.


Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
Benewake LiDAR liked Benewake LiDAR's profile
Apr 12
Gremsy liked Gremsy's profile
Mar 12