My goal has been to create fully autonomous miniquads. Because of the close proximity of all the equipment, the main challenge is preventing interference of all the components. I am progressing in figuring the sources of interference and designing proper shielding.
I have attached logs which show a quadcopter on an autonomous mission about 500m long. I begin each mission in stabilise, then a bit of flight, then switch into Loiter prior to activating Auto mode. If loiter looks good, only then do I activate the Mission.
On the fights, the compass offsets suddenly go haywire at a certain point on the mission.
[size=85](note: it might coincide with my transmitter throttle failsafe, which is set to “Continue with Mission (Auto)”.)[/size]
I am careful in always calibrating the compass (all offsets less than 100) and have done the CompassMot procedure (many times–generally max offset is about 29%).
Attached is a picture of Droid Planner, showing where the craft enters the “spiral of death”.
And the KMZ from the logs.
[attachment=0]Screen Shot 2014-10-11 at 11.37.04 am.jpg[/attachment]
Note: for this flight I set Compass_Learn to 1, and WP_Yaw_Behaviour to 0, but I did three other flights where the mag offsets suddenly caused a problem with Compass_Learn at 0, and WP_Yaw_Behaviour to 2.
I do see that there are some issues with my compass interference, but am confused as to why the mission starts off well then goes haywire at a certain point.
Logs for four flights are here: deuce4.net/web/APMlogs.zip
In general, after browsing many forums, there seems to be an unresolved issue with what is sometimes called the “death spiral” in loiter and auto modes. It clear that it is caused by compass magnetic issues, but I wonder if the code could be modified to make the response more robust. The death spiral appears to me as a fight between the altitude PID (trying to regain altitude, and sending more power to motors), and the roll/pitch/yaw (trying to move to the designated GPS point). Once it gets into the spiral, it continues. It seems to me the code could recognise this spiral, and switch into stabilise, or somehow recover from the death spiral. I originally posted this as a possible issue at github.com/diydrones/ardupilot/issues/1474 . There I got some excellent analysis from jschall, who identified that I had yaw error, but I still don’t understand how the quad initially flies well in loiter or auto, and only part way through the mission enters the spiral of death.