Altitude from baro or GPS? (APM:Plane)

Is it advisable to give GPS altitude a little weight over baro alt due to baro drift? We are seeing a +10m to -10m altitude variance after a 90 minute flight so auto-landing is out of the question (until we can fit a laser altimeter).

ALT_MIX can be set from 0 to 1 so I presume that 0.9 would be 90% baro and 10% GPS so would this correct the drift or is GPS alt less reliable than baro alt?

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

Join diydrones

Email me when people reply –


  • Developer
    I'm having a similar problem trying to do auto-landing with long flights. @Graham, what mix ended up working best for you?
  • Moderator

    Before takeoff: GPS - 562m / Baro - 562m

    After landing:    GPS - 562m / Baro - 568m

    • Moderator

      How does one get baro alt and gps alt in the tuning window while flying?

      • Moderator

        2nd flight - ALT_MIX - 0.9

        Before takeoff: GPS - 560m / Baro - 570m

        After landing:    GPS - 560m / Baro - 559m

        • So at .9, what altitude error did your HUD show after landing? Was it 90% of the 11m baro error (10m)?
          I still don't understand why the GPS shows no error at all. That just can't be right. Which Gps are you using? Pixhawk with 2 GPS's?
          Give it a try at .5 and see if the baro error is adequately minimized. We can't be 100% dependent on gps as it can glitch.
          I'm looking forward to testing this myself, but I won't be able to fly for a while.
  • Interesting idea. I hadn't considered this as a work around to the frustrating baro drift issue. I wonder what other side effects it may have. Paul Riseborough is the man to ask since he wrote the TECS.
    • Moderator

      Well, I had set it to 0 earlier after a flight to watch for a change from -11m (100% baro) and then I accidentally left it at 0 for the last flight of 80 minutes, the altitude was a perfect 0 when I landed. Maybe 0.5 is a good compromise?

      • It's a bit suspicious that there was 0 gps alt error. It might be interesting to graph the baro vs gps alt from that last flight. GPS is notoriously less accurate than baro. However with the Ublox M8 and dual GPS units, it is probably better than when the ALT_MIX default was chosen back in the days of MediaTek.

        I'm looking forward to the results of your testing.
        • Moderator
          I'll graph the two alts in the morning, it's late here now and I need some sleep.
This reply was deleted.


sam liked Jimmy Oliver's profile
Aug 25
Mike Whitney liked Mike Whitney's profile
Jul 19
Abdulatif Tlaib liked Ryan's profile
Jun 24