Yep ... a clear yaw error due to powering on the drone in magnetic interference.
From time to time I throw in my "Newbie Card" to greet newcomers in the forums Pilot Check In section ... below 3 important points from that card regarding
-How to power on in order to avoid this kind of incidents
-How to check that everything is OK before take-off
-How to treat compass calibration prompts in the app
Power on in the right order ... First power on your RC & start the app ... after that, power on the drone (& do it on the spot you're going to take off from). Reverse order to shut down.
Preferably power on the drone keeping it horizontal in your out stretched hand (without watches, rings or other magnetic objects) … once the live view have turned up in your mobile device you can put it on ground for take-off. (This supports the point below …)
Before take-off ALWAYS ... add in one very easy check to avoid a really scary event coming from accidentally launching from a magnetic disturbed place with following flyaway at height in an uncontrollable circular or straight flight path. After powering on your drone, connected to your RC/app & placed it in the take-off spot ... but before lift-off, ALWAYS check that the drone icon on the map in your app is pointing equal in relation to other objects in the map as the drone does in reality ... if not, abort launch attempt, POWER DOWN & move away, power up again and repeat.
Don't go & calibrate everything on a regularly basis ... why fix things that are working, it's just a higher risk that you by mistake calibrate your compass in a magnetic disturbed area & the drone goes haywire 10 meters up in the air. Calibrate IMU + compass according to user manual, keep away from magnetic things like cars, metal tables & reinforced concrete at take-off & compass calibrations. If the app recommend a compass calibration first try another launch spot on a far distance from the first ... if calibration still is recommended by the app do it, but only then.
You have a full "Newbie Card" here if you want it all -->
Newby - Just joined - Hi everyone. Look forward to being part of the group and learning a lot more about droning. I am new to droning and own a 2s.
Just a smaller clarification what actually happens & why the drone fly's away ...
The data conflict between the compass & IMU as such isn't the problem ... you can have situations with bigger deviations between these 2 during flight that doesn't start off fly away's. One example is when you shortly fly into magnetic disturbance (close to a big steel object perhaps), this will deflect the compass but the IMU will not immediately follow ... so nothing will happen, this as it's the IMU that handles yaw during flight, not the compass. Staying to long in the interference will eventually cause problems as the compass will slowly feed in adjustments to the IMU ... which over time will cause a yaw error.
What happens & what's the cause of the rapid fly away is instead that the IMU have wrong info about the heading direction from start. When the IMU needs to hold position due to drifts (drone affected by wind for instance) it will command the wrong motors to take the drone back to it's intended position. This leads to that the positional error grows instead of becoming smaller ... & the IMU tries again & again more & more forceful ... with the wrong motors and the drone speeds away often exceeding both specified tilt angel & max air speed.