At the Embedded Linux Conference
http://elinux.org/images/1/11/Application_of_Data_Fusion_to_Aerial_Robotics.pdf and
https://www.youtube.com/watch?v=Z3Qpi1Rx6HM one of the topics discussed was improvements to the underlying maths used by the EKF to improve performance and robustness. I was finally able to get some uninterrupted time and to get an APM prototype running this weekend
https://github.com/priseborough/ardupilot/tree/ekfNewMaths-wip
This is very much a quick hack prototype (please no-one fly it yet), but so far it has demonstrated
1) Ability to self align from any orientation and self calibrate large gyro bias errors whilst moving, making the need for static alignment a thing of the past.
2) Ability to estimate gyro scale factors given sufficient rotation.
3) Improved stability
4) Reduced computational load compared to the current NavEKF (if used with an output observer)
New design features include:
1) Use of a 3x1 vector to estimate attitude errors instead of estimating the 4x1 quaternion state directly. This uses the technique outlined in this paper. Mark E. Pittelkau. "Rotation Vector in Attitude Estimation", Journal of Guidance, Control, and Dynamics, Vol. 26, No. 6 (2003), pp. 855-860. This means the filter is able to converge reliably from any orientation unlike the current EKF, that needs to be reset if the angle errors become too large
2) Addition of states to estimate gyro scale factors
3) More efficient covariance prediction that takes half the time
4) Ability to run in different state configurations from 16 states to 24 states depending on the application. In its 16 state configuration the filter does not estimate magnetic field or wind.
5) The new EKF handles time delays by running the whole filter about 250msec behind time using delayed IMU data. and fusing measurements when the delayed filter time catches up to the time that each measurement was taken. The delayed states (position, velocity and attitude) are then would forward to the current time using either the buffered IMU data (less memory required / more accuracy / more calculations required) or an output observer (more memory required /much less calculations required / less accuracy)
http://users.cecs.anu.edu.au/~trumpf/pubs/khosravian_trumpf_mahony_hamel_ACC2015.pdf .
This significantly improves filter stability as measurements are being fused with consistent state and covariance data.
6) Addition of a simple compass fusion model that doesn't require magnetic field states. This is used for initial alignment and ground operation. It can also be used in flight if robustness is more important than accuracy.
See the following plots of showing what happens to the new EKF and DCM (logged as AHR2) when the board is started without a gyro calibration whilst being moved around.
The EKF3.TE is a tilt error convergence metric for the new filter, analagous to the ErrorRP for DCM.
DCM does well for the first 10 seconds. but as soon as the initial startup gain is relaxed, the bias errors cause it do develop large offsets.
The new EKF was able to converge in less than 10 seconds after startup and switch to full GPS mode.
The roll gyro error in this instance was almost 6 deg/sec, so a pretty good test.
This start-up test was conducted indoors with noisy GPS, hence the noise that can be seen on the EKF angles. DCM had not started using GPS before logging was stopped.

Here's the gyro bias estimates in deg/sec

The TO DO list includes:
Airspeed, sideslip and optical flow fusion methods need to be added (currently it can only handle GPS, baro, range finder and magnetoemeter)
Addition of a simple observer to provide a smoothed output that doesn't have the small steps in output at each measurement fusion.
The code that stores and extracts measurements when they fall behind the filter tie horizon is inefficient and needs to be re-worked
It needs to be refactored and pulled into separate files
-Paul