Hi. Does anybody know why my magnetometer points to the opposite direction? When I open the Mission Planner the OSD acts as if the front of the oilpan is the back. First, it points to the oposite direction it should be displaying. If I am heading to the north, i says it's heading to the south. Then, If I tilt it to the left the OSD tilts right and viceversa. Although it's weird because pitch does point to the right directions. The magnetometer is directly soldered to the oilpan just like the manual indicates. I should mention that the copter flies alright and performs the stabilization ok, but the autopilot features that i have tried are a little unstable and I don't know if this has anything to do with that. Thanks for your help!
You need to be a member of diydrones to add comments!
Replies
Solved it. Thanks for your input, but thankfully this was a user based mistake, and apretty dumb one. Turns out I put the magnetic declination with a point instead of a comma, so I had 553 instead of 5.53, so that's pretty much the 180 degrees off that I had. What's unsettling is that the roll axis is still reversed
Definitely loiter, waypoints etc will not work if your compass heading is that far off. Unlike a car or plane a quad/heli can move in any direction not just forwards so we can't rely on the GPS for heading info..so we need to rely on the compass.
So if you rotate the compass, does it consistently give a direction of 180 degrees off? or is it just when you're pointing north it says you'er pointing south. If it's not consistently 180 degress off then I strongly suspect you've got some metal near the compass.
Also whenver you upload a new version which includes a significant change to how values are stored in the eeprom you'll find that your mag offsets get wiped out. This is likely related to your problem. the mag offsets (visible through the CLI) should be visible after your first flight (you may need to disarm your motors after you land to ensure the values are stored to the eeprom...I forget exactly when they're saved).
I could not say if this is your problem, but I can related a similar experience. When I first updated to 2.0.40, I saw the same thing. I dug through the code to see if the default components-down-pins-forward define had changed. I moved the APM about, watched the map and motion, it was all 180 degrees off.
I was pretty perplexed. Then I formed a long shot theory. To test it, I powered off .... moved the APM [in that version of the frame, retired already, I have a removable central column that houses all electronics except for the motors] far away from my solder-reword station and floor lamp, and reapplied power. Sure enough, this time the compass came up pointing north, and normal behavior was restored. I have some vague but likely incorrect theory about magnetic interference at boot. In any case, I haven't seen the behavior return, and I am more careful about booting around potential sources of strong magnetic fields (or, at least checking orientation after boot) But I have the sense that my theory is incidental and not on target. I just haven't had the conditions to bring it into question/test further.