Bad Compass Health - 2.76, MP 1.2.9x

Hey all…

I saw Tridge replying on someone else’s post on DIYD about this but never saw an output of the tlog analysis. I’m attaching mine here in hopes that someone has some thoughts. Also, if it is easier, here is the droneshare. I am also hoping that the fact the compass thinks I’m going in a completely different direction than I really am is related to the snaking I’m seeing, but I’m going to work more tomorrow on tuning the L1 controller because I’m pretty sure it isn’t related. Nonetheless, I was hoping to find out if my compass is fixable or not based on this flight.

Airframe is a Skywalker X8 and auto and loiter and auto-takeoff, etc, all work … pretty well, save the snaking. I’d really like to get that compass set up properly so that the RTH arrow in the minimOSD points correctly. I’ve performed the live calibration, but perhaps I need to redo?

Mission Planner for the flight was 1.2.92 but the condition was present all the way back to the current version as of a few months ago when I first started flying this guy.

Thanks in advance! …fyi I am not having the “No Receiver” error mentioned in that diyd post.

Josh

[attachment=0]x8_2300ftagl.jpg[/attachment]

I got my NAV tuning sorted today (or at least much nicer now) and also did a new Live Compass Calibration, which seemed to help, but, its still not perfect yet. Wonder what I should expect for perfect, but hoping that 1) the “Bad Compass Health” error message goes away (because its gone not suppressed) and 2) the RTH arrow in the OSD is accurate 100% of the time rather than “kind of close, most of the time.”

Here is a pic of the flight path showing that nav tuning is better:

[attachment=3]x8_moretuned.jpg[/attachment]

Here is the plane in Loiter. You can see the GPS heading (black) is perfect, however the compass seems to still be offset a bit:

[attachment=1]x8_gpscorrect_compassnotsomuch.jpg[/attachment]

Primarily annoying really because if I want to FPV a long range flight, I’ll rely on the RTH arrow to get me home. I can rely on an Auto mission too I suppose, but that isn’t solving the problem, more just working around it.

[attachment=2]bch.jpg[/attachment]

Also attached is the latest tlog. If a DF will help let me know and I’ll pull it. Hoping someone has some thoughts.

[attachment=0]2013-12-30 16-16-35.tlog[/attachment]

Bad compass health is a larger than normal variation between your GPS track and your compass heading for longer than 2 secs.

While we never could get our X8’s to fly acceptably with v2.76 (see my other threads), getting rid of all compass interference helped a lot!

  • Remove ALL magnets in the X8, especially those holding the canopy on, use velcro instead.
  • Make sure all your power wires (e.g. from battery to ESC) are as far away from the APM or compass as possible.
  • Twist same wires as many times as possible to reduce EMI (we even wrapped the power wires in a special magnetic shielding tape)

Bad compass health is a larger than normal variation between your GPS track and your compass heading for longer than 2 secs.

While we never could get our X8’s to fly acceptably with v2.76 (see my other threads), getting rid of all compass interference helped a lot!

  • Remove ALL magnets in the X8, especially those holding the canopy on, use velcro instead.
  • Make sure all your power wires (e.g. from battery to ESC) are as far away from the APM or compass as possible.
  • Twist same wires as many times as possible to reduce EMI (we even wrapped the power wires in a special magnetic shielding tape)

Thanks Graham, I’ll give it a go. Good idea on the magnets. I assumed they were small enough and far enough away that it wouldn’t be a problem, but considering how sensitive things are it definitely can’t help. I think the separation from the mag from the closest pair of mags is ~4-4.5 inches.

Wires are already twisted and the becs have copper tape wrapped around them and are as far out of the way as I can get them, but the wires themselves could be wrapped too… I hadn’t considered that one.

Is the copper tape what you’re referring to, or is there another type of tape for magnetic inference vs electronic interference? I caught myself assuming it was the same but thought it best to make sure…

Thanks again, I’ll try the tips and report back.

Just to add to this discussion about compass health…

1, I didn’t know I had a problem until version 2.74 and up… ( am still unsure if I have a problem, or the firmware has a problem)

  1. so since I was told I had a lot of interference with Mag I opted to install an external mag far out on the boom, toward the tail, away from everything , and I still have bad compass health and Tridge says I still have " unacceptable levels" of interference…

Yet my Penguin flew great with 2.73 and under… seems odd to me.

I am an engineer, and trying to think about this in terms of “change analysis” I didn’t change, but the firmware did.

Great, thanks for the feedback!

Did he give examples of what the unacceptable values were?

Graham, I’ve gone ahead and marked this as solved, thank you for the advice on the magnets in the X8. I removed them all and only got the “Bad Compass Health” call out once from MP today across a couple different flights. I know I can do some more work to clean up the bay, but now that I have this progress I will go ahead and finish it out. Thanks again! With those magnets as small as they are I never would have thought they would have been able to interfere with the magnetometer 4-5" away, but, they clearly were. I’ll do that clean-up work and re-run the compass cali to get new offsets and doubt I’ll hear that message in normal flying conditions.

FWIW, here is a dvr video of the X8 doing an auto mission today including an Autoland. I had to help with the flare a bit as I think the wind caused some baro drift over the 50min flight and the plane was lower than it thought it was, but overall I’m very happy with the performance.

[youtube]http://www.youtube.com/watch?v=qWjey0LHaG0[/youtube]

You definitely had a magnet or something nearby. I ran magfit on your log and got (27.13, 179.44, 320.04). Those offsets are huge, putting you in danger of saturating the magnetometer, causing the message.

Originally I thought that you had very large interference from your ESC wires, but then i realized that the correlation I was seeing wasn’t actually there, the magfit fixed the problem and you have very low interference. So I almost embarrassed myself :slight_smile:

What is magfit?

Part of the pymavlink toolkit - the mission planner should give you the same answer if you do the logfile calibration on your log.