For those developers who fly “latest” (aka “master”) we have just changed the default AHRS (Attitude Heading Reference System) from EKF2 to EKF3. Please be careful and report any issues you find either here or directly on discuss.
Please note that we do not recommend that users fly “latest” because it could have issues and the dev team doesn’t have the resources to provide support for this largely untested code. Instead it is best to stick with the stable and beta releases (once they are made available).
The differences between EKF2 and EKF3 include:
- EKF3 works better for tailsitters or any other vehicle that spends a lot of time pointing directly upwards or downwards. This is because EKF3 estimates accelerometer biases for all 3 axis while EKF2 only does the vertical axis
- EKF3 supports some additional sensors including Beacons and Wheel Encoders
- EKF3 supports GPS-for-Yaw
- EKF3 supports GPS to Non-GPS transitions
- EKF2 may work better on vehicles that spin very rapidly because it estimates gyro scale factors while the EKF3 does not. Modern gyro scale factors are nearly always 1.0 though so this is probably not an issue
Even with the change to EKF3, the older EKF2 is still available on most boards and users can switch between them by changing these parameters (and rebooting the autopilot):
- AHRS_EKF_TYPE = 2 or 3 depending upon which EKF you want
- EK2_ENABLE = 1 to enable EKF2
- EK3_ENABLE = 1 to enable EKF3
It is best not to enable both EKF2 and EKF3 at the same time because it could overload the CPU on some autopilots. It is unlikely to crash but it may fly badly.
This change is in preparation for the start of beta testing for ArduPilot-4.1. It is difficult to predict exactly when 4.1 beta testing will begin but it is likely that at least Rover will start in the next month followed by Plane and Copter. Thanks for your patience!