ArduCopter. Not sure if the PX4 firmware requires these patches, or if they’ve integrated similar patches to address issues. If I’m not mistaken, they might not be subject to some of the SBs since PX4 is still based upon NuttX, not ChibiOS like recent ArduPilot firmwares are. Hardware-related SBs likely apply to both, still.
They’re two different Extended Kalman Filter models that ArduPilot uses for navigation and stabilization. They’ve been in development in parallel for a while now, but I believe the intent is for EKF3 to phase out EKF2 at some point.
Which to use? EKF2 is well-tested and stable. If you have any doubts, don’t change the defaults.
As for in-depth differences? I’m not certain, beyond this snippet on the GitHub PR for it:
This has been tested using a pixhawk 2.1 on an Iris with range beacon only and GPS + Optical flow modes of operation. Tuning of the EKF3 is preliminary and provides equivalent innovation sequences.
EKF3 uses 24 states the same as EKF2 .
EKF 3 uses essentially the same interfaces and data buffers and control logic as EKF2.
EKF3 makes the following changes to the state vector:
The 3 attitude error states are replaced with a direct quaternion representation (4 states)
The XYZ gyro scale factor states are removed
The Z axis accel bias is extended to include X and y axes
This is expected to provide a more accurate attitude solution for the majority of use cases, but does lose some of the ability to recover from extreme attitude errors caused by bad IMU data.
At the moment it exceeds the flash space 1MB build limit that the build system applies to all Pixhawk 2 and lower boards regardless of capability, so a temporary change to the PX4Firmware has been made to enable it to be built for the Pixhawk 2.1.