I have set my quad up and it flies great in stabilize mode and alt-hold works well.
However, I have been unable to maintain loiter in nil wind conditions. Approx 1-2 seconds after selecting loiter (from approx 10m agl) the quad will begin to track anti-clockwise from its original position in an large arc approx 15m in diameter. Speed increases and if I were to leave it in loiter it would fly into the ground at a shalllow angle after a few seconds. I immediately thought toilet bowling! BUT:
I have an Adafruit HMC5883L compass module specified to run on 3.3v or 5v power/logic - perfect for APM. 3DR 2.6 board with Arducopter 3.15 quad firmware, sonar and 433mhz Mavlink groundlink.
My 2 compassmot results were 3% and 2% respectively. The compass is mounted on a post and the mount is braced, solid and cannot move.
Hdop figures are good.
I have tried disabling COMPASS_AUTODEC and inputing the figure manually.
My live calibration technique is as per Chris Anderson's demo video and I generally get over 800 samples before completion.
Vibration levels in the log file data are within recommended specs.
My frame is an S500 - very solid with minimal flex and balanced with underslung battery.
Note: I have also noticed that the quad occasionally looses orientation in stabilize mode i.e. pitch forward may result in roll left etc etc. Sometimes this will self fix and othertimes I must land and then take off again. I originally thought that this maybe something to do with Simple/Super Simple modes triggering - but they are all disabled in the parameters. I have not determined the cause but suspect it occurs after yawing maneuvers.
If I were to guess I would suggest a compass error but surely this would manifest at all times and in stabilize mode? I'm stuck! Any advice appreciated as always.