Couldn't enter PosHold. EKF and FlightMode errors

I’ve had a couple flights now where pos_hold doesn’t do anything…
Today I changed it to Loiter, and it worked.
So, I checked my last PosHold log, and see Err: EKF_Check-2 and Err: Flight_Mode-16

I don’t know what is causing that… Vibes and GPS look OK. That’s about the extent of what I know to look at.
Does anyone know what causes those errors? I’ll post the log of the flight.

https://drive.google.com/file/d/0B0jw4onOClYOOW1vbm9pMURYQnM/view?usp=sharing

Edited to say… Could it be a magnetometer issue? I don’t really know how to interpret those logs… but I do occasionally have magnetometer issues. OTOH, my last several flights w/ pos_hold did not work… And my last few I’ve tried today w/ loiter have all worked fine… so is it an issue w/ the pos_hold flight mode?

The EKF error is when the failsafe is activated - and it never went off.
The flight mode error is when a flight mode can’t be entered, in this case PosHold, which is internally 16.

Looking at your log the first thing that I saw is that your velocity variance is always zero and the innovations always the same value through all the flight. I’m not the best debugging EKF but looking at various items it looks like some issue with the GPS - it was never used by the EKF, with the speed accuracy being sometimes reported as too low for the GPS to be used.

Anyone know what to do about that?
It’s a csgshop GPS. It was connected, had plenty of sats, low hdop, etc. All that shows up in the logs.

But now that you mention it, I have seen a prearm error about the GPS not maintaining 5hz or something… But what would cause that?

According to my own experience that is compass fail.
Two of my multicopters had same problem.
One is EMI issue that caused by cheap power module and wrong place. Another is bad built-in compass of clone Pixhawk.
Maybe you could unplug I2C connector of GPS and calibrate compass again. To find out which compass had problem.

For your reference.