Servers by jDrones

Compass Calibration alignment out by 60 degrees (images updated)

I am seeking guidance on how to identify and correct the following:

  1. Why a calibrated compass is 60 degrees out from magnetic north even when removed from a rover chassis and motors?
  2. Are raw compass orientation values xmag, ymag, zmag values from Mavlink Inspector derived from physically installed orientation or after calibration automatic orientation values Roll180Yaw90?
  3. Am I missing some obvious parameter setting to correct this offset?

Here are some results of my investigation in an attempt to correct this error.

Firmware: Ardurover 4.0.0
autopilot: Omnibus F4 Pro V3
Omnibus orientation Forward
Compass: 1. HMC5883 (GY-273)
2. QML5883 (GY-273)
Compass hardware orientation X-forward Y-left Z-up
Compass calibration automatic orientation reports COMPASS_ORIENT 10:Roll180Yaw90
(two mangnetometers were compared to confirm that it was not a mangetometer issue)
GCS: Mission Planner 1.3.74
QGroundControl 4.0.6
(Two GCS where used to compare results)

Setting up an Omnibus F4 Pro V3 with an external compass, I have encountered an issue where Mission Planner reports calibration as a success (see screen capture), but the orientation compared with a physical compass is out by 60 degrees.
This was first thought it was caused by either the rover chassis and motors.
To confirm this, the rover driver board was removed from the chassis so only some circuit boards remain nearby the omnibus F4 and magnetometer. These were not powered. Only the Omnibus and compass was powered over USB.
After recalibration, the same result of a 60 degree error was encountered.

I repeated the compass calibration using QGroundControl. Calibration reports Red (Red indicates a compass which should not be used.) (see screen capture)
I obtained the same Red calibration result for both HMC5883 and QML5883 compasses.

Refererance images. Driver broard is aligned North as indicated on Mission Planner HUD. An orientering compass in placed with the read bearing marker aligned with the forward direction of the driver board. The orienteering compass red needle points to magnetic north, the offset is 60 degrees.

RAW_IMU settings for the magnetometer where observed using Mavlink Inspector.
xmag, ymag maximum/minimum/zero crossing values align with the true magnetic field as confirmed with a physical compass.

OmnibusF4 compass orientation & xmag ymag values
North xmag=455, ymag=5, zmag=-234
East xmag=0, ymag=-430, zmag=-309
South xmag=-439, ymag=2, zmag=-310
West xmag=2, ymag=460, zmag=-251

So it seems the magnetometer raw data is correctly oriented with the magnetic poles.
These results were obtained from a QML5883. The original issue was identified using a HMC5883 the results being much the same as those presented here for the replacement compass QML5883. This confirms it is not caused by a compass hardware issue.

Omnibus ardurover parameter file:!Ah-hIfFuDe3ZgRlH-ivggUjSR1hc?e=mRgjyB

Refering to documentation “Advanced Compass Setup”

I can confirm the following results:

Southern Hemisphere:
        Z-component should be negative (confirmed correct)
        when pitching the vehicle down, the X component should decrease in value (confirmed correct)
        when rolling the vehicle right, the Y component should decrease in value (confirmed correct)

Referring to documentation “Archived: External Compass”

This was useful for understanding orientation of the mangetometer readings.

Compass hardware orientation X-forward Y-left Z-up

Compass calibration automatic orientation reports COMPASS_ORIENT 10:Roll180Yaw90
Calibrated orientation ? Y-forward X-left Z-down (can someone validate whether this interpretation is correct?)

COMPASS_DEC value was wrong.
It seems greatly improved.

Servers by jDrones