What are differences between NavEKF and NavEKF2

I’ve searched in forums, but failed to find clear results. If it’s already answered, please let me know the link…
According src code, it uses EKF2 in px4-v1 and px4-v2, but enable EKF1 if px4-v4 is used.
So,

  1. It seems EKF1(NavEKF) is more complicated and advanced than EKF2(NavEKF2) ?
  2. Any other key differences ?
  3. By my understanding, ArduCopter will use EKF1 or EKF2, but never use both. Is that right?

Thanks a lot.

EKF2 is used in Copter in all supported boards. EKF2 is the successor of the EKF1. They are different, telling which one is more complicated or advanced wouldn’t exactly correct. But, of course, EKF2 is supposed to be better, otherwise we wouldn’t need or use it.

EKF1 is still in the code but by default is not compiled in anymore due to space constraints in Pixhawk boards.

Tanks for your help.
Because in AP_AHRS_NavEKF.h


So, it still use EKF1 in Pixhawk v4( like pixracer? ), and Pixracer is somehow improved in hardware like sensors, etc…
That makes me think EKF1 is better than EKF2…

No. Sorry, I should have explained better in my previous post. PX4-v1 (PX4FMU) and PX4-v2 (Pixhawk) don’t have space to have EKF1 build in anymore. PX4-v4 (Pixracer) does have that space so it is compiled in but it isn’t used by default. All vehicles, with whatever board, use EKF2 by default.

OK, got it. Thank you.