I’m not a developer, but I can read some of the source.
I think you are correct, AHRS_EKF_TYPE = 2 implies that NavEKF2 is used for state estimation, while EK2_ENABLE = 0 indicates that NavEKF2._enable == 0. So it looks like the plane was attempting to use a disabled filter.
The parameters agree with your conclusion, that “it seems the EKF was not running.” Does this help? Or do you have a more specific question?
Yes, it helps. Till now the alt is good, and plane flies well. Just want to figure out if this is OK. And if there will be some problems on this setting.
AHRS_EKF_TYPE: Use NavEKF Kalman filter for attitude and position estimation
Note: This parameter is for advanced users
This controls which NavEKF Kalman filter version is used for attitude and position estimation
Values
Value Meaning
0 Disabled
2 Enable EKF2
3 Enable EKF3
EK2_ENABLE: Enable EKF2
Note: This parameter is for advanced users
This enables EKF2. Enabling EKF2 only makes the maths run, it does not mean it will be used for flight control. To use it for flight control set AHRS_EKF_TYPE=2. A reboot or restart will need to be performed after changing the value of EK2_ENABLE for it to take effect.
Values
Value Meaning
0 Disabled
1 Enabled
I think there is a problem if you set this pompecukor :
AHRS_EKF_TYPE = 2 relay on usage of EKF2. So if you disable EKF2 with EK2_ENABLE = 0, IMO it should be a problem.
Disable these 3 params and you completely disable EKF, so you could fly as well as Arduplane v3.4. I have problem with altitude since AP v3.5 when EKF was enable since this release.
@kikislater@pompecukor I have tried, but AHRS_EKF_TYPE cannot be set to 1, if set to 1, it will be 2 again after a reboot. Till now not seeing any pre-arm problem, and my plane flys well for many flights.
haha, yes. that means it is not checking for anything before arming. So you could launch even with not GPS lock.
Anyway this confirms what Kikislater has been saying, you have practically disabled EKF (both 1 and 2) and are using good old DCM. So you might as well set AHRS_EKF_TYPE = 0
I would say 2014 value for pre-arm is a good point. That is will check for basic stuff like GPS lock, barometer, battery level, logging, and similar.
@pompecukor OK, thanks! I will have a try at the value 2014. As @OXINARF said this is no EKF running anymore, whether AHRS_EKF_TYPE = 0 or AHRS_EKF_TYPE = 2 , we will have the same plane behavior.