Stopping Compass mid-flight

Hello,

2 weeks ago our 5 multicopters (voxl2 w/ m10 mro GPS/MAG) were working without fail. This week all 5 will stop listening to the compass mid flight. This results in a position hold that is not accurate, and eventual crash.

2 weeks ago the weather was warmer outside, but the temp is still above the -40 C that is specified on the GPS and MAG sensors.

Things we have tried

  • Calibrated the mags in the cold
  • Swapped out the mags/gps to make sure they werent damaged.

We are at a loss as to why the heading is just lost mid-flight.

Here are some of the logs from when this error occurs

Flew into a tree during mission mode: https://review.px4.io/plot_app?log=11645d56-3353-47cc-9a59-e64324ff9c17

This one was a flyaway in position mode, we took manual control of it:
https://review.px4.io/plot_app?log=ceab0f87-4d12-491a-bb8a-13d192170dad

This is what the flight is SUPPOSED to look like: https://review.px4.io/plot_app?log=ff1d9d17-5ba5-4647-b4a3-29ca98817d1d

Any insight would be great. Thank you!

1 Like

I can see that PX4 does register a mag fault. I am just unsure exactly why. These drones were flying fine for the last year and now all of them are having issues

@Benja pointed out that mag_test_ratio increases over time

We are thinking this might be more of an IMU issue than a compass heading issue

I have not proven it, but all signs point to the IMU being exposed to the cold affects its estimation relative to the compass. diverging the two estimates, and the EKF2 incorrectly stopping use of the compass

Did a temp calibration and added a cover to the top of the drone. Didn’t have a flyaway, but vibrations are still in the yellow. A bit higher than I would like. mag test innovations are lower

Here is one from a log file I found online as a comparison. we are reaching double what this log is at, but at least we arent crashing

1 Like

I learned stuff from this forum post.
Thanks for sharing it.