Struggling to Calibrate Compasses

I’m having some issues calibrating the compasses on a large quadplane, and would appreciate some help!

  • Pixhawk4 w/ Cube Blue
  • Using 3 compasses: an mRo KitCAN (on CAN bus), mRo Location One (on CAN bus), and the mag internal to the Cube.
  • KitCAN is primary, LocOne is secondary, and Cube is tertiary. All three enabled and communicating with the flight controller.

I have previously setup and successfully calibrated this arrangement on an identical aircraft. This one is being troublesome. Mags 1 and 3 will calibrate just fine, but Mag 2 will struggle until mid-90% complete, then reset to 0% complete.

I’ve checked the orientations and behaviors of each (all correct). I’m in the Northern Hemisphere, and the X, Y, and Z values all behave like they are supposed to.

Log file from the latest calibration attempt attached. Any thoughts??

Edit: I can’t upload the log file; it’s too large…

Thanks!

Use Magfit, it’s the best method. It’s very straight forward using MAVExplorer.
Magfit

And the video example is a quad plane.

Is there a way to do this with Mission Planner? I would need to install and learn MAVExplorer…?

No. I wouldn’t get hung up on learning MAVExplorer. All you need to do is install it with a desktop shortcut and drop the log file onto the shortcut. The video takes it from there.

This is also the best method for compass motor calibration. The old compass dance and spinning motors with props on the ground is outdated. Although you do need a basic compass calibration to get in the air to record the reference log.

1 Like

Unless you have a good reason to keep it enabled, simply disable the internal compass on the Cube. They are notoriously inaccurate.

1 Like

It is the basic calibration that is still an issue - the old method fails and I have too much compass variance to allow arming the vehicle. Can I use the log from the old method on the ground with Magfit to get an initial hack calibration?

I have some constraints that others do not: I must use all three compasses, I cannot disable a faulty compass, and I cannot fly the airplane until compass issues are resolved.

There are a number of reasons I must keep it enabled. Also, it is not the compass that is failing the calibration.

No, you have to make a flight. If the craft will fly as is even with compass errors then do it.

Not sure how to help then.

You really should disable it, it has caused us nothing but issues. I wouldn’t even be surprised if the compass order was wrong and that WAS the one failing.

Although if you have an external compass that is failing then you should consider moving it to somewhere with less interference.

what i found with compass and MP calibration: it does NOT set the orientation itself. As soon as you provide the correct orientation of the sensors, it worked instantly for me.

Problem solved:

I opened up the GPS bay and found that unshielded servo power and PWM wires had been run directly over the magnetometer.

After rerouting the wires away from the mag everything works fine and the calibration was successful.

Thanks for the help everyone, learned some things along the way. Now that I have a good initial cal I’ll look at using Magfit to refine the cals as I get into flight test.

1 Like

Glad you got it sorted. Curious about your compelling reason for keeping the internal compass enabled. It’s far more compelling in almost all cases to simply ignore it.