Question about EKF filters in the ardupilot code

What is the reason for having 2 EKF filters (EKF2 and EKF3) in the ardupilot code? The only difference I see is the noise parameter values. I am trying to understand the ardupilot codebase and would appreciate it if someone could provide some insight.

Although EKF2 and EKF3 are similar they have differences. I’m not an expert so let me direct you to the PR introducing it: https://github.com/ArduPilot/ardupilot/pull/5336

What is the reason for having 2 EKF filters (EKF2 and EKF3) in the ardupilot
code? The only difference I see is the noise parameter values. I am trying
to understand the ardupilot codebase and would appreciate it if someone
could provide some insight.

We have been through a few different versions of the EKF filter - as the
names might suggest to you!

Because of how vital that code is, we like to test the filters
"ride-along" before making a new filter the one used by the aircraft for
its estimations by default.

You can fiddle with which EKF is used with the AHRS_EKF_USE parameter.