Big MAG ground anomaly and EKF yaw reset Problem in Flight (694.5 KB)

We use ARDUPILOT in copters for fawn rescue with thermal imaging cameras.

Problem description:
In some of our 14 copters the following serious problem occurs irregularly:
Directly after takeoff the copter toilet bowls and even flies uncontrolled in one direction.
The problem occurs in loiter flight mode. The pilot has no influence on the flight behavior, a crash is mostly guaranteed.

This morning the problem occurred again during a mission.
We were able to secure the logfiles and have attached them.
The error pattern is reproducible.
The logfile shows two flights. The error occurred already on the first flight, here landing was still possible. On the second flight the error occurred again. A controlled landing was no longer possible.

Error sequence:

  1. start of the copter
  2. MAG0 Ground mag anomaly, yaw realigned + EKF_Yaw reset

Background to our setup:
Magnetic interference from the motors can probably be ruled out since the compass is maximally far away from the motors. Furthermore, we use the motor test from Ardupilot and were able to detect interference of less than 30%.

As batteries we use large LI-ION batteries with different capacities (~10.000 - 15.000 mAh).

A compass calibration is performed regularly.

It is probably a chain of different problems, probably also depending on the batteries.
The problem occurs more often with some batteries than with others.
We have not been able to find out anything more yet, because we are at our wit’s end.

We are currently using the copter on a daily basis to rescue fawns. Therefore we are glad about a quick answer.

Try calibrating the compass and motor interference compensation using Magfit.

This is all I do now on all craft. The couple where interference were particularly problematic improved significantly.

And you shoul not recalibrate the compass often. There is no need for it if you do not change anything in the vehicle. So once you do it right, you do not need to repeat it. But you must do it outside, with no metal in sight and with good GPS signal.

Recalibration, when done wrong, will cause the issues you describe.