Compass orientation + AHRS Orientation

Hi,

I’m wondering if anyone has had any experience with with compass orientation + AHRS orientation.

This morning I was installing the Navio2. It is yaw 270. I’m running APM:Rover v3.1.0beta1 which has the 2nd compass 180 roll.

So I set the AHRS_ORIENTATION to yaw 180 which fixes the IMU. After multiple attempts could not get the compass to point correctly. Reading the compass orientation says it does combine the AHRS orientation. This doesn’t seem to be the case, I yaw 180 on each compass and now it points correctly.

I’m not for sure if doing something wrong or if this might help anyone.

Update: When driving around (rover) I’m still getting mixed results. Think it maybe a combo of bad settings and EMI.

What compass you’re trying to attach? You need to take into account the alignment of a compass to your vehicle for sure.

As far as I understood, the board itself is rotated on the frame, isn’t?

Just using the onboard compasses with the Navio2. Yes the Navio2/Pi is rotate 270 on the frame.

I’m out in the garage atm and will redo all the calibration and report what I find.

So interesting results. I tried wil having the AHRS_ORIENTATION = Yaw 270. I then set compass to yaw 270 restarted APM, took screenshot, then tried it with compass set to 0. I’m only powering the Navio2 so my GNSS receiver isn’t sending location.

Compass Settings = Yaw 270


Compass Settings = 0


I’m finding this inconsistent for having the orientation changed that much. At first was thinking my settings were being ignored so was rebooting the Pi between tests. Also confirmed the settings were set via mavproxy show params. COMPASS_ORIENT was set to 0 then to 6. Isn’t adding up…

You don’t need to change compass orientation. It’s also recommended to calibrate the compass outside the building because of the interference electronic devices and cables can generate.

something similar happened to me theese past days. Had a lot of frustrating atemps to calibrate.

but solved turning off the internal rpi3 wifi.

maybe same issue for you?

So getting frustrated I borrowed a windows laptop and opened up Mission Planner. I immediately got a “Bad Compass Health” message, so luck for doing calibration with APM planner.

I proceeded to follow these instructions found here https://docs.emlid.com/navio2/Navio-APM/ardupilot-tips/#onboard-calibraton.

Running this I’m seem to be getting corrections only for Compass #2. For w/e reason I can’t copy and paste the Onboard Mag Calibration to a text file. So taking screenshots:



I do not get any ending messages for id:0.

Good point, I have moved from doing calibration with the sik radio to using USB wifi dongle, less things flying around when rotating the Navio2. I’m using Rpi2 so shouldn’t have internal wifi.

Defaulted everything and still getting same issue of id:0 never getting fit, and id:1 getting a fit but xyz values of 0.

I can do a live calibration and I get stuff on both, get low values which look sane, but still getting Error compass variance. As mentioned before to try this outside, I’ve tried in my office and in the garage. In a bit I’m rolling out a rolly chair in my lawn and see if I get better results.

Finally got something to work. Here is what I did to reproduce. Run the Emlid ArduRover binary, run the live calibration, Onboard mag never worked for me.

Once that was complete I was able to then run my beta and use those offsets. At this point I probably sound crazy and I’m still not 100% sure what is causing me so much grief.

Why do you set compass #2 as external?

Sorry, that was just me trying every combination :slight_smile: My normal tests had that sets as internal.