Because synthetic position measurements at 0,0 are fused during position hold mode, a position timeout cannot be used as the only means of detecting position solution status.
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)
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.
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.
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
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.
This class didn't add any functionality beyond what the NotifyDevice class
already provided so in keeping with our desire to keep things simple we
can remove this class
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>
The time required for GPS to be lost or rejected before vehicles with airspeed sensors either reset to GPS or invoke the zero side-slip assumption to constrain drift has been reduced from 15 to 10 seconds
A duplicate zeroing of the GPS position offset has been removed
If the vehicle is a non hovering vehicle (eg a plane) then the speed at which the GPS offset is pulled back to zero after a reset is increased from 1 to 3 m/s
This also improves recovery from bad inertial data for planes
Doing this can cause large height and height rate errors if large GPS velocity errors cause the GPS tn be rejected for long enough to cause a timeout and reset of states.
this predicts ahead the height demand for landing, where we have a
continuous demanded descent. This removes the effect of the lag
introduced by the height demand filters
The introduction of the height rate flare logic caused the demanded height rate to be zero except when a flare manouevre was being performed. This caused the plane to lag behind height changes if the D gain was non-zero, which caused it to fly high during landing approach.
This reverts commit 13df6fb1c9.
This patch was a result of an incorrect merge of the optflow branch
into master. It reintroduced the bug fixed by this commit:
AP_NavEKF : Fix bug in reset of GPS glitch offset
8aa267f75f
Scales filter frequency using EKF nav gain scaler to take advantage of the reduced nav frequency whichcan tolerate a slower angle response.
This is required to reduce the effect of EKF optical flow noise increase with height.
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
This has been done to provide a smooth psotion hold when using an optical flow aided EKF which can be noisy.
Signed-off-by: priseborough <p_riseborough@live.com.au>