Switching to Loiter not possible

Copter 3.6.7 does not change to loiter mode.
I see ECode 5, Subsys 10 in logfile but cannot determine the reason.
Gps has 3d fix.

I found strange errors in the dataflash log.
Can sombody explain these to me ?

Test: Event/Failsafe = FAIL - ERRs found: FLT_MODE GPS_GLITCH
Test: GPS = UNKNOWN - join() takes exactly one argument (2 given)

I do not have a telemetry log. The dataflash log is too big for upload so here is a link:

2019-04-25 19-11-16.bin

2019-04-25 19-11-16.log.param (15.5 KB)

Having a GPS 3D fix is not enough for Ardupilot to allow you to use loiter. There are two quality requirements that must be met. The number of satellites being used and the quality of the received signals referred to as hdop. You can trip a failsafe if you don’t maintain the minimums. You can check the wiki for more information.

yes, but I had 14 sats and hdop 0,73 at the time the error occured.

I think I have a compass problem.

compass