this fixes a bug introduced in #21834
this fix in #21834 was correct for getPosD, but should not have been
applied to getLLH
this caused cruise mode in plane to descend/ascend by the difference
between the public and local origins on mode entry
fixes#21984
When returning our last-known-position we were supplying lat/lng but not
altitude.
This usually really doesn't matter as this result generally isn't used,
especially for altitude. OTOH, it may prevent a bug into the future.
this shifts EKF_origin to the current location at 1Hz, while leaving
public_origin alone. All output APIs and logging are relative to
public_origin.
The effect of this change is to remove the distortion caused by a
spherical earth, which allows the EKF to operate without errors at
very long distances from the public_origin.
Enable default airspeed variance to be specified externally
Improve control of sideslip fusion
Don't modify non wind states unnecessarily when using synthesised air data measurements
this allows the EKF core index to be used to select a GPS/baro/mag
instance. This is an alternative to GPS blending that allows EKF lane
switching to be used to select the right combination of GPS and IMU
add logging to XKFS message
AP_NavEKF3: fix failure to arm with EK3_MAG_CAL = 7
AP_NavEKF3: Fix failure to arm when not using magnetometer
AP_NavEKF3: Reduce yaw drift when EK3_MAG_CAL = 7
AP_NavEKF3: Add emergency yaw reset using a Gussian Sum Filter estimate
AP_NavEKF3: Reduce default minimum GPS velocity noise for Copters
Enables fail-safe to be set with more sensitivity and improves tracking accuracy.
Origin values were set using typical GPS performance for receivers on sale 6 years ago. Receiver performance has improved since then.
AP_NavEKF3: Prevent constant mag anomaly yaw resets
Prevents constant magnetic anomaly induced resets that can be triggered when flying with vehicle generated magnetic interference.
Allows for two resets per takeoff. Allowance for two resets is required, becasue a large ground based magnetic yaw anomaly can cause a sufficiently large yaw innovation that two resets in close succession are required.
AP_NavEKF3: Add option to fly without magnetometer
AP_NavEKF3: Rework emergency yaw reset logic
Use a separate external accessor function to request the yaw reset.
Allow reset requests to remain active for a defined period of time.
Tidy up reset function to split out accuracy check.
AP_NavEKF3: Fix vulnerability to lane switch race condition
Prevents the situation where a lane switch results in a lane being selected that does not have the correct yaw. This can occur if the primary lane becomes unhealthy before the external failsafe monitor has time to react.
AP_NavEKF3: Fix EKF_MAG_CAL = 6 behaviours
Fix bug causing the yaw alignment to be performed at startup before the GSF had a valid estimate.
Fix bug causing emergency yaw message to be output for a normal reset.
Fix vulnerability to reported negative yaw variance.
Remove duplicate timer checks.
AP_NavEKF3: Update EK3_MAG_CAL documentation
AP_NavEKF3: Relax yaw gyro bias convergence check when not using mag
AP_NavEKF3: Reduce yaw drift in hover with no yaw sensor
Uses the GSF yaw estimate if available which is better than the EKF's own yaw when no yaw sensor is available.