Question about the EKF's flags

Hi,

I was testing the EKF’s failsafe behavior with sitl looking the ekf status’ window for the variances. While setting a gps failure, I noticed while none of the variances changed, two flags changed from On to Off, velocity_horiz and pos_horiz_abs and activated the failsafe. This behavior made me think of the following questions:

  1. The documentation says that failsafe is activated when any two of the variances are higher than the ekf threshold. What happened ? Did the changes happened in the background and were not sent to the window or does the failsafe also activates in case one or more flags are set to 0?

  2. When the failure is absent, there are two flags off, pos_vert_agl and const_pos_mode. I read that const_pos_mode is only set in case EKF is in constant position mode and does not know it’s absolute or relative position. Since the other flags are set it makes sense this is off, but I don’t understand why the other is off in the simulation.

  3. Why is it allowed to arm and fly if these two flags are set to off? Are these a non priority in case the other are On?

can someone help with these questions?

So I studied ekf_check.cpp and got my answers.