It's too easy to look at these events and just assume that it was magnetic interference at startup. This event was more complex. The clues are all there, but you have to dig.
Firstly, the position mismatch is characteristic of simple compass interference:
View attachment 105553
The error does look like nearly 180° (it actually starts off at about 140°), but that's the first clue - 180° yaw errors do not produce curved flight paths - they produce linear uncontrolled flight. So what is going on here?
Firstly, the compass was calibrated after power up, so look there, because it is very telling:
View attachment 105554
Okay - that's very interesting. Two CCW 360° rotations, as expected, and as detected by the IMU yaw values (green), the VPS yaw (red) and most significantly the pure inertial yaw computed from just the rate gyros (orange). The magnetometer data are clearly wrong though - the first rotation is correct, but when the aircraft is switched to the second requested orientation prior to the second rotation, the magnetic yaw changes by 180° with no actual rotation, and then it doesn't change much at all for the subsequent 360° rotation. That's weird, and a big red flag.
So next look at the aircraft attitude for those two calibration rotations:
View attachment 105556
First rotation - pitch and roll approximately zero with the aircraft level. Then the aircraft is rolled onto its right side (pitch ≈ 0°, roll ≈ 90°). That causes the 180° change in magnetic yaw when there was actually no change in yaw. That's not the calibration procedure specified in the manual, although that sometimes differs from the on-screen instructions - I don't have an
MA so I cannot verify:
View attachment 105557
The direction of rotation doesn't matter for calibration, but using an unexpected axis may, or may not matter.
Anyway - the compass was apparently significantly out of calibration based on those data, so the question is - did the calibration fix the issue. Looking at takeoff makes it clear that it did not:
View attachment 105558
The magnetic yaw changes with no physical rotation as the aircraft lifts off - indicating a local external field at the takeoff location. Then, at around 3.8 seconds, the FC rotates the aircraft CCW, likely to attempt to match the new magnetic yaw. Normally that is done while holding the IMU yaw constant; in this case the active IMU1 yaw deviates and is then returned to its original value (-135°), but the magnetic yaw doesn't see the rotation, and so the attempt at convergence fails. At this point it is hard to say what the real yaw value is since we clearly can't trust the compass even after takeoff.
So looking at the remainder of the flight:
View attachment 105559
After the FC-commanded rotation stops, we have a magnetic yaw of around 10° (N) and an active IMU yaw of around -135° (SW). At 22 seconds the pilot rotates the aircraft further CCW by 162° back to its original takeoff heading, but the compass only sees a 40° CCW turn. IMU1 goes with the rate gyro data and the IMU yaw changes to 70°.
At 26 seconds we finally get to find out the real aircraft yaw, when the pilot applies full forward elevator. Note that the IMU velocities completely disagree with the GPS velocities, which are correct. Computing the actual track from the GPS velocity data shows the following:
View attachment 105561
The aircraft heads southwest on a track of -135°, and so the original takeoff yaw was actually correct, but IMU1 is now on 70°. The other significant feature is at 28.5 seconds, when the compass records a nearly 180° CCW turn in 0.2 seconds, followed by the reverse turn at 30.5 seconds, also in 0.2 seconds. That's impossible, of course, and another red flag with a very obvious cause - here's the x-axis magnetic field strength plotted with pitch:
View attachment 105562
That is either a broken compass or a bad calibration, because the magnetic yaw is changing by 180° with a 30° pitch change. Yaw varying with pitch was the main trigger of the flight problems. Whether it was caused by, or made worse by the compass calibration procedure used is hard to say, but the calibration didn't fix it, that much is clear. And the change in yaw on takeoff - normally indicative of magnetic interference, was actually just due to a pitch change on takeoff, followed by a failed reconciliation attempt by the FC. There likely was no interference.