Compass failure and crash after takeoff

I recently tried an automated takeoff using python and mavsdk. Immediately after takeoff, the vehicle started drawing to one direction and was only held back by the leash, which I luckily attached. When I switched to land mode, the drone crashed and got badly damaged. Due to the flight log, it seems to be a compass issue.

This came to no surprise. From the beginning, PX4 didn’t like my compass setup. I’m using a Pixhawk 1 and a Zubax GNSS2 which includes a compass. When I installed both compasses, set their priorities (CAL_MAGX_PRIO) to high and then performed a calibration, PX4 refuses to arm and complains that the compass readings diverge by somewhat around 120 degrees (Preflight Fail: Compasses xxx inconsistent). The same happens when I disable the internal compass and only leave the external on. I’ve no idea which compass the external one diverges to now, but that’s what it says. So I disabled the external one and only left the internal one working.
The calibration also tends to quit with an “out of memory” error, unless I disable my companion computer connection by setting MAV_2_CONFIG to disabled.
The calibration was performed on the flight site. Also note that I was using ArduPilot on the same setup until recently without any issues.

You need to up load the flight log to here:
https://review.px4.io/upload

I edited the link in my original post to point there.