Copter and Plane can use an Extended Kalman Filter (EKF) algorithm to estimate vehicle position, velocity and angular orientation based on rate gyroscopes, accelerometer, compass, GPS, airspeed and barometric pressure measurements.
The advantage of the EKF over the simpler complementary filter algorithms, is that by fusing all available measurements it is better able to reject measurements with significant errors. This makes the vehicle less susceptible to faults that affect a single sensor. EKF also enables measurements from optional sensors such as optical flow and laser range finders to be used to assist navigation.
Commonly modified parameters:
AHRS_EKF_USE : set to “1” to enable the EKF, “0” to disable and rely on DCM for attitude control, inertial nav (Copter-3.2.1) or ahrs dead reckoning (Plane) for position control. In Copter-3.3, this feature is forced to “1” and cannot be changed.
EKF_ALT_NOISE: Default is “1.0”. Lower number reduces reliance on accelerometers, increases reliance on barometer.
EKF_GPS_TYPE: Controls how GPS is used.
- 0 : use 3D velocity & 2D position from GPS
- 1 : use 2D velocity & 2D position (GPS velocity does not contribute to altitude estimate)
- 2: use 2D position
- 3 : no GPS (will use optical flow only if available)
A more detailed overview of EKF benefits, theory and tuning parameters is available on the developer wiki topic Extended Kalman Filter Navigation Overview and Tuning.