I have a quadcopter running arducopter 4.2.1 (upgraded from 4.0.3 fairly recently)
Shortly after takeoff I receive the messages:
EKF3 IMU1 MAG0 ground mag anomaly, yaw re-aligned
EKF3 IMU2 MAG0 in-flight yaw alignment complete
I am used to seeing this on each flight, however in recent flights the drone also makes a significant yaw and then continues to slowly turn until pilot yaw input is given.
As far as I can tell this looks like it was caused by a compass issue on takeoff
The only thing making me less certain is that did not use to have this behavior or any compass issues on this drone before upgrading from arducopter 4.0.3 to 4.2.1.
It seems like the compass calibration is less accurate on the newer version, but maybe I’m doing something wrong.
Before the flight I performed a compass calibration and a compass motor calibration.
I did notice that the motor calibration interference was quite high - 67 if I remember correctly.
Is this just simply a compass issue, or might I be missing something?
How did you calibrate these? I would suggest using the Magfit utility in MAVExplorer. You will get better results compared to the traditional methods if that’s what you used. Magfit
Note: I looked at your parameter file for mag info and happened to notice this:
ATC_ACCEL_P_MAX,162000
ATC_ACCEL_R_MAX,1800000
This was calibrated using Mission Planner default calibration.
I will take a look at MAVExplorer.
How does it differ from Mission Planner calibrations?
I did some more test flights recently which I used to compare 4.0.3 (my previous version) and 4.2.1 performance.
In both situations, as a baseline, I used the Mission Planner compass calibration, motor calibration and in flight compass learn.
I did not use the internal compass - only two external compasses.
I tested both 4.0.3 and 4.2.1 with both compasses enabled, or either one enabled individually.
In 4.0.3 the drone performs well in all situations.
The in-flight yaw alignment does not cause any significant yaw maneuvers.
On the first flight after calibration the drone makes some small adjustments when first flying forwards, but does not do this again on subsequent flights.
In 4.2.1 in every test there is a significant yaw maneuver coinciding with in-flight yaw alignment. If no yaw input is provided the drone starts to spiral badly, eventually becoming completely unstable unless changed to a flight mode which does not rely on the compass.
After the initial yaw maneuver, the drone also makes some small adjustments when first flying forwards, but then flies well.
However, the drone has to make these adjustments after every take-off, not only on the first post-calibration flight like on 4.0.3
Also, on 4.2.1 if both compass are enabled after an in-flight calibration, there is an extreme compass inconsistency which prevents arming, which is not seen on 4.0.3.
I agree that the compass calibration can be improved by MAVExplorer.
However, do not see why the performance is so much worse on the newer version when using the standard calibration.