Hello,
I’ve custom built drone, controlled by Pixhawk (board version 2.8.4), firmware 1.7.3_v3, and I have an issue with hold mode. When drone is take off it automatically enters to hold mode and hovers about launch point. It hovers about 30-40 seconds normally and after that starting moving by expanding spiral which increasing a diameter by every loop. I’ve tried different types of GPS receiver but it doesn’t help.
This behavior is sometimes called toilet bowling and it’s usually caused, as @Fafa_Mandrake already wrote, by a wrong heading estimate due to the magnetometer.
Two things that are important there:
Calibration as mentioned already.
Make sure the mag which is often integrated in the GPS mast is as far away as possible from high current DC wiring such as the wires going from battery to the ESCs. To reduce the electromagnetic effect you can also twist the DC wires which should reduce the disturbance. Two check if you have this problem, check the plot “Thrust and Magnetic Field”.
I’m found a solution. An aluminium plate with thickness 3mm underneath Pixhawk, between Pixhawk and a power distributor isolates it quite good.
Before: