Compass
i cannot stress enough how important it is to keep the APM board as far away as possible from the power distribution board and other electronics in general -
What happens is that the compass is affected by all the electronics and shifts - so the further you place the compass from all electronics the better -
You will know your compass is off by trying loiter - if the quad starts shifting in a circular motion 9they call it toilet bowling) then stop and redesign your frame - this is the main reason i use the frame i purchased as it allowed me to place two blocks of wood under the APM so now it is further away.
You will also know your compass is off by enabling simple mode and rotating the quad 45 degrees and pitching slowly forward back - it should only move forward back in relation to you its its off then you compass is the issue.
if you run an auto mission and the quad goes in the wrong direction then 99.99999999% of the time its due to the compass.
So move the APM away from electronics.
Another item is that you should calibrate the compass manually - dont use the log calibrate function - i thought initially this was the way to do it but it isnt -
The development team recently implemented the compass mot calibration - this is to shift the compass based on your throttle so the compass is always right - i actually disabled this functionality in the advanced parameters list on mission planner as i found i didnt need it once i moved the APM further away. of course i probabally should do the compass mot calibration but its working so i dont.
I also read recently that putting metal tape under the apm will block electrical interference - i have some and am going to put this on even though my quad is working fine now.
Turn off compass learn in the parameters.
the last time i measured my compass interefence due to the throttle it was this