Badly need help, compass became n*ts!

Hi everyone! My first post and wished it was in better circumstances.

Here is my problem. My craft (Alien style frame) flew fine for the last couple of months. Does alt-hold fine, loiter and rth was great too. But my last flight nearly ended in disaster if I had not regained control. I heard “dcm bad heading” from droidplanner and since then my craft just toilet bowls in loiter (it nearly crashed once too) and rtl takes the craft somewhere else. Craft still flies great in stab and alt-hold though.

I figured it was something to do with my compass, plugged in MP and found the heading off. Tried recalibrating but now I get crazy offsets (-300) and sometimes it doesn’t even complete the compass calibration.

I’m completely lost here, where do I start now?

Thanks in advance.

@millow_99,
Please provide tlogs and/or dataflash logs to help troubleshoot your issue.
Wiki http://copter.ardupilot.com/wiki/common-downloading-and-analyzing-data-logs-in-mission-planner/
Regards,
TCIII GM

Here are the last logs.

dropbox.com/s/1e0t3kz1990p92w/Logs.rar?dl=0

You will find the last good flight, first time I encountered the bug, near disaster with light crash in loiter and the last flight.

Thanks for looking at it.

Disregard the previous message, I did not know I could upload files directly here. So here are attached the logs for the last good known flight, the first time the bug appeared, a light crash and the last flight.

Thanks for looking.

Logging set low so not all data available to look at.

The logs show that the compass is upside down, Compass Orientation = 8.

Otherwise offsets look good.

Sometimes the auto complete in Mission Planner ends too soon. Try turning the auto complete check box off.

Mike

I give up on this one. Just ordered a Neo M8N to test. I suspect its the external LEA 6H playing tricks on me cause everything was good before I heard “DCM bad heading” once from Droidplanner and since then everything has gone south. I tried calibrating outside the frame, far from any electronics and still I get ~300 offsets. Internal one gives -143’ish. I have tried everything, from reflashing the FW to 3.1.5 to erase, reinstalled MP, redid everything from scratch and still it won’t give in. I will update when I get the new GPS unit.

Thanks for the help.

As promised I am back to report on this issue. It is in fact a faulty compass. The battery was causing problems, hacked the battery off and eureka, it started giving good offsets again. It was not my idea, someone pointed me to it. So its a stop gap solution until I get my new unit.

Thanks everyone for the help.