Arduplane v3.7.1? If EKF_ENABLE = 1, EK2_ENABLE = 0, and AHRS_EKF_TYPE = 2, whats running inside?

As said in the title, If EKF_ENABLE = 1, EK2_ENABLE = 0, and AHRS_EKF_TYPE = 2, whats running inside? Is EKF still running? From the attitude data, it seems EKF was not running.

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?

1 Like

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.

@tridge. Could you anwser this ? Thank you very much !!!

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
Value Meaning
0 Disabled
2 Enable EKF2
3 Enable EKF3

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.
Value Meaning
0 Disabled
1 Enabled

i can´t find this parameter on:

EKF_ENABLE can only be found in parameter list of arduplane v3.7.1

In Plane it would be using DCM - I’m not sure if pre-arm checks would pass in this bad configuration.

@OXINARF Thank you very much! Till now it seems everything is OK! Altitude is good, and plane flies well too.

Hi FireFly,
What is the solution to get good altitude? I don’t understand very well if we have to disable EKF or change EKF mode…

imho: disabling EKF

EK2_ENABLE = 0, and

Good altitude vs smooth flight, it’s a big deal to choose !

@kikislater I need good landin accuracy! But with bad altitude, always have bad landing.

1 Like

So did this solve your issues with the alt error that we were having?

@pompecukor Yes, till now my plane works well, no any alt problem, although I dont think this is a perfect way.

Bro, you are not clear on what you actually did. kikislater asked the same question.
If we make

then there is arming problem. “Pre-Arm AHRS not Healthy”

So what exactly did you set?

1 Like

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.

I don’t get how you do it. for us it give arming error.
What value have you set for arming check?

@pompecukor Just have a check that I have turn off arming-check, the value is 0. :joy::joy::joy:
Is there any potential problems?

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.