DataFlash: don't write out parameters if log open fails
DataFlash: don't try and open logfile on failure more than once

this prevents a corrupted microSD card from causing a continuous
attempt to open a log file while in flight, which can cause large
scheduler delays

Pair-Programmed-With: Grant Morphett <grant@gmorph.com>
AP_NavEKF: Increase rate at which GPS glitch offsets are reduced for planes
AP_NavEKF: Rationalise health status reporting

1) Un-used public methods to report height and position drifting have been removed
2) A time-out has been added to the airspeed innovation consistency check so that if we are relying on airspeed to constrain velocity drift, a filter divergence or other fault that causes the airspeed to be continually rejected will trigger a change in health status.
3) A timeout of velocity, position or height measurements does not cause a filter fault to be reported. Timeouts can be due to sensor errors and do not necessarily indicate that the filter has failed.
4) Time-outs of various measurements are used to present a consolidated bitmask which inidicates which parts of the solution can be used, eg attitude, height, velocity, relative position, absolute position, etc.
DataFlash: Log EKF solution status message

This message is a bitmasked integer that will be used by control software to determine what data is available from the EKF and decide what control modes are available.
Duplicate static mode message removed. Static mode is now contained in the bitmasked solution status message
AP_NavEKF: Fix comments error in description of flow sensor sign conventions
AP_NavEKF: Fix bug causing magnetic field state learning to be forgotten
AP_NavEKF: Improved handling of no GPS

This patch enables indoor operation of the EKF by putting it into static mode if optical flow operation is not enabled and no GPS is available
AP_NavEKF: Fix bug preventing no GPS mode being selected externally

When on the ground it is likely the flow sensor will be returning  data that does not meet the minimum quality requirements selected.
The previous check was for the presence of valid data. This has been loosened to look for the presence of data.
When the vehicle becomes airborne, the quality of flow data normally improves as the image comes into focus.
AP_NavEKF: remove unnecessary function
AP_NavEKF: Fix error in comments
AP_NavEKF: Add static mode to solution status message
AP_NavEKF: Improve behaviour recovering from a GPS timeout

When regaining GPS after a timeout, an offset is applied when fusing  GPS velocity so that GPS velocity and position data as fused by the EKF is kinematically consistent.
This velocity offset is also accounted for when fusing air data so that wind estimates are not corrupted when the GPS position offset is being pulle back to zero.
The intended behaviour is that the EKF position will be pulled back to the GPS position at a rate of 5m/s for planes and 1 m/s for copters. This avoids large deviations in trajectory when GPS is regained.
AP_NavEKF: Compensate optical flow fusion for GPS glitch recovery offset
AP_NavEKF: Rename static mode to avoid confusion with other non-GPS modes

This renames static mode as posHoldMode to make it clearer what this and the other non-GPS modes do
AP_NavEKF: Use compensation for baro delay  in position hold mode
AP_NavEKF: Relax timeout check applied to optical flow data

200 msec was too short and could lead to false positives. 5000 msec is the largest time we can go free inertial.
AP_NavEKF: Latch use of position hold mode for duration of flight

Required to prevent acquisition of GPS mid flight causing unwanted change in position and velocity
A distinction has been mad between the arm and disarm transition and the decision to use position hold mode (formerly static mode)
AP_NavEKF: Initialise timeout status to true

This status will be cleared when data arrives and is fused successfully