Compass variance on Copter 3.4-rc1 on Navio 2

Are you inside a building while trying to do the Cal or outdoor? Mine always come out better when trying it outside.

usually I do it once incise with a 10 foot USB cable to get a rough calibration and to check everything. Once I get outside I do it again and check it. Do you think the compasses are more sensitive?

I think the compass cal is definitely best done outside. Any compass cal Iā€™ve ever done on any system gives better results outdoors. Thereā€™s too many variables indoors to interfere with the cal.

You are right, I will have to try outside tomorrow. Thanks for the input. Have you flown yet after calibrating the compass onboard?

Yes and the compass issues seem to have been taken care of. I have other issues now lolā€¦ when will it end!? Lol probably my setup this time though

PM me so we donā€™t clutter the thread. Maybe I can help?

I second that you need to calibrate the compass outdoors and well away from any large metal objects.

After doing the onboard mag ā€“ I can now get a stable hover in Loiter, as well as run Auto missions again. However, I still get EKF Compass Variance warnings (from orange to red). This mostly only occurs when providing any sort of change in yaw.

Thoughts? Anyone else have something similar? I have not yet tried to manually set the declinationā€¦

Austin M

Austin,

While flying the AC if you have mission planner up you can click on the EKF and it will give you a basic bar graph as to what is causing it to go orange or red. Something in there is making it spike. Check that out and report back what is causing the spike and we can go from there.

Only the ā€œCompassā€ column goes into the orange/red. Mostly on a change of yaw (Not just a quick 360 deg spin, either.). Also, at one point the EKF value was stuck in the red with an ā€œError Compass varianceā€ on the HUD. I had to power cycle to get rid of itā€¦

See attached for a log. *Note: this is not the flight where the EKF value was stuck.

EKF_Compass_Var.BIN (4.2 MB)

Austin M

Iā€™m definitely not the guy to review your logs sorry man Iā€™m no good at that. I can confirm this- if you are moving one firmware to another, you need to do it on a clean sd card. I swapped firmware to 3.4 and I had all kinds of bugsā€¦ i.e. motor bounce, wacky ekf values, compass errors, GPS receiver wouldnā€™t grab more than 8-10 sats and took forever to get dgps. I started over from scratch and bingo! Itā€™s good now!

Ahoy!
I should note that this is from a clean install and clean compile. I just updated some params from a past log (camera triggers, voltage params, etc. I did NOT update any params related to EKF, the compass, mag, etc. from the old log params).

Austin M

Update: Did the same flight. Same place. Same batteries. Same Params.

Only difference was MAYBE the orientation of the batteries was flippedā€¦

Horiz and vert EKF errors. Had to immediately switch from loiter to stab. On top of compass variance. Which seemed to stay even after landingā€¦

Is anyone having these issues in 3.3 with navio+? My sbus to ppm converter comes tomorrow. So I may very well shelf this navio2 until things are looking up.

Austin M

Man that sucks, sorry itā€™s not working out for you. Iā€™ve been through hell with my build but itā€™s looking up. Once itā€™s complete Iā€™ll give you a comprehensive list of all things done to get it flying. Keep your chin up!

Invest in an external compass. I did that after there was no way to get rid of my compass issues. Effectively, the concept of having on board compasses is always a difficult one on a quad because while you need the FC to be on the frame, the magnetometer is pretty much in the worst location that way.

It seems like you need to recalibrate your compasses once more outside. You can also try compassmot calibration. As far as I can see, compass values should be nearer. Have tried to use compass 2 for position estimation?

@ADSB2016 Iā€™ll get there! The problem is that Iā€™m going into the field next week for one month of field work, and I need it working! Iā€™d rather not use this plebeian Phantom3ā€¦

@markvanhaze The external compass is coming today or tomorrow. How do you have yours mounted? Also, did you follow this guide? I couldnā€™t find another resourceā€¦ Do you mind sharing your connection/setup re: the external compass?

@george.staroselskiy I can confirm that I calibrated outside, at the flight location and away from metal objects, power lines, etc. Compass values should be ā€œnearerā€ to what? I have Compass 1 and Compass 2 checked to ā€œUse this compassā€, but my Compass 2 is selected as my ā€œPrimary Compassā€. Should I de-select ā€œUse this compassā€ for Compass 1?

Thanks all!
Austin M

@amadson

Take a look at this post. ``mxandmx2``` are pretty close, right? This is something to strive for.
Iā€™m trying to come up with a fix for you. Meanwhile, you can try the first compass. Even though, it has greater offsets, it shouldnā€™t affect the flying behaviour.

It would be also nice to have as much log data as possible. You can enable disarmed logging as well. This way weā€™ll get more logs and data to analyze. Iā€™d be happy to get logs with any issues you have.

@george.staroselskiy

I just got a navio+ working on this frame, and will do some flights with that tomorrow in order to see how she does.

Afterwards, Iā€™ll just switch back to the navio2 and re-do the calibrations. Iā€™ll try setting primary to Compass 1 as well as a compassmot tomorrow and report back.

I have a 3DR gps/compass coming in tomorrow tooā€¦

Also, it was working fine on 3.4 unstable. So, I suppose I could revert back and give it a try.

Austin M

Itā€™d be awesome to have logs for each configuration. This way weā€™ll get to the bottom of this.

  1. Navio+ with AC stable (this is the version you were able to get working?)
  2. Navio 2 + AC 3.4-rc1
  3. Navio 2 + AC 3.4 unstable (donā€™t forget about this peculiar ROLL_180 on second compass. Sorry for that.)

I know it sound like a lot of work but this is not really that much. You donā€™t really need to start from scratch every time.

sudo apt-get remove apm-<version>
sudo rm -rf /var/APM to wipe out old parameters just to be sure that are no interferences between the tests.