EKF: Compass Variance After Landing

Hello,

I have a recurring issue I’m looking to solve;

After a flight, right after the landing, I’m getting “PreArm: EKF compass variance” and the pixhawk won’t arm again - Meaning I need to take out the battery between flights.

This problem reproduces on every flight.

What could be the issue? Where should I look to debug this?
A log file is attached

Thanks
Nitay

Hi,

I seem to have missed a key point in the log here - There is a big mismatch between the 2 compasses Z values.
The external compass (compass 1) gets a constant error after the engines start.
(See Mag.MagZ vs Mag2.MagZ vs ThrOut)

I don’t think it’s a Compass-Motor mag field problem because the log shows a (big) constant error and not a disturbance
The compass in this build is not elevated above the quad (on the same plane as the motors, in the middle of the quad. The quad is 550mm diagonal), however I don’t remember ever having this problem.

Any idea of what can cause such a problem?

I’ll try and replace the compass anyway

Thanks
Nitay

nitay, are you using a 3DR Pixahwk or a Clone Pixhawk?

Hello, Nitay. I’m getting the same error, when I’m trying to arm the vehicle after landing.

Have you found some kind of solution?

Hi Oleg,

Yes - It was a compass-motor interference after all. Recalibrating the CompassMot parameters fixed it.
To be on the safe side, I’ve moved the compass to a pole (elevated from the motors plane) so it’s farther away from the motors.

Hope this helps you solve your problem
Nitay

Nitay, thank you for reply!

Now I’m having an external GPS/Compass module, which is installed away from the motors already. So may be I just have to disable the internal compass somehow?

Also, with which software you did that calibration, QGroundControl/APM Planner/Mission Planner?

Hi Oleg!

I’ve used Mission Planner.
There shouldn’t be a problem with your internal compass still on. Just
calibrate them together and make sure your pixhawk orientation is set
correctly (AHRS_ORIENTATION)

If that doesn’t work, could you take a picture of your setup on attach a
log file?

Thanks
Nitay

Unfortunately, it’s seems like I can’t do CompasMot calibration, as I don’t have battery current monitor.
PixHawk orientation is correct.

Here is the photo of how the GPS is installed:

Hi Oleg,

I think your setup should be okay regarding interference.
2 questions:

  1. Did you re-calibrate the compasses AFTER installing the GPS/Compass on the pole?
  2. What board are you using? Is that BeagleBoard?

Could you add a log file of a flight where you takeoff, land, try to take off again?

Thanks
Nitay