I've wiped my board (reset APM to default), then reprogrammed 2.0.55.  I have the compass and sonar, along with an XBee 900 pro for telemetry.  Removed the XBee, no change.  Removed sonar, no change. 

The compass constantly reads in an endless loop of rotation, sometimes it changes direction after a reboot.  See the first 10 seconds of the youtube video below.

Previously when I enabled the compass in mission planner, it calculated my offset based on the GPS lock (at least that's how I remember it).  This time it didn't grab the declination until I entered the first three digits (14.1, San Jose CA) myself.

Level was set manually and works fine, pitch, yaw and roll respond normally, only the compass is whacked.  From the tuning (screencap below) I see the target_bearing go from 0-360 in an endless loop as well.

Worked fine in 2.0.49.  :-)  Any expert advice would be appreciated.

Views: 642

Reply to This

Replies to This Discussion

That looks to me like gyro drift that is not being compensated for by the compass. So it's not the compass that is providing the bad heading but rather the compass is not working and so it's not being used at all to offset the gyro drift.

Of course you've enabled your compass through the mission planner or CLI menu right?

Can you use the CLI menu to test the compass?  put the white switch towards the back, connect using usb, type "test" then "compass"

I finally figured out that loading code with the Arduino IDE v.1.0 doesn't work, kept thinking I was missing library files.  I loaded up 2.0.55+AltHold, I presume I can call this the latest stable release until Friday.

Compass test from the CLI shows it's fine one time.  After restoring the CLI switch to flight mode and restarting, it's doing it again.  This time in the opposite direction as well.  I went back to CLI, now the readings look to be off by 90 deg.  Completely wiped settings, reset everything.  Holds stable until I move the quad the first time, then it starts again.

Odd, it was fine with 2.0.49 and no crashes recently.  I'll wait for 2.1 and see what happens.  :-)

Going back over the sequence of events, I'm pretty sure a programming failure happened. I last flew successfully on 2.0.49. When I loaded 2.0.55 mission planner blew up during programming. I was a little worried the APM would get corrupted, but I've programmed it successfully since, from both MP and Arduino IDE 0.23.

A test shows compass problems but all other sensors respond normally. I presume the HMC5883L has firmware and it may have been corrupted.

From MP I deleted all settings once, then programmed it with 2.0.55 alt hold patch from the A-IDE. I'll try 2.1 tonight, it was released 15 minutes after I gave up for the evening last night. :-p

After loading 2.1 everything looks good.  Not sure what happened, but I will be back in the air soon.  Cheers.

Same hard/software here. Mine does the same thing: very slow, continuous CCW rotation- but only inside.  If I take it outside for a minute or less its spot-on and tracks very fast- till I bring it back inside. 


     I can only imagine that this is caused by magnetic interference in your house.  It's nearly impossible to imagine it has anything to do with the GPS because the GPS isn't involved in the yaw correction in any way.  It would be interesting to see how a regular hand-held compass fares in the house.  You also might want to double check that you don't have any metal screws near the compass that could be throwing it off although this wouldn't explain an indoor vs outdoor difference that you're seeing.


I wonder if the magnetic field inside the building is completely blocked, so the compass is not measuring anything?  Would mean that it is operational, but not returning any heading value?


For what its worth, I had this same problem. I did not have any problem with the installation of .55 and I had terrible drift in the compass. I had to disable simple mode as it would be almost impossible to fly. if it makes any difference, I also did an erase and re-flash before I flashed .55

after an upgrade to 2.1 now, the compass is very stable. Also I noticed the "level" in the mission planner is now actually level while in .55 it was not.

I know we are all past this, but I thought more information is better then less.

cheers all!

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service