Commit Graph

85 Commits

Author SHA1 Message Date
Paul Riseborough 9a4108f55e AP_NavEKF3: Simplify setting EK3_MAG_CAL
Don't require user to separately set EK3_MAG_CAL to fly without a magnetomer
2020-07-07 15:33:58 +10:00
Paul Riseborough 8ff6780323 AP_NavEKF3: Clarify distinct use cases for 'takeoff expected' 2020-07-07 15:33:58 +10:00
Paul Riseborough d1a0c2eb30 AP_NavEKF3: Start EKF-GSF yaw estimator before fixed wing takeoff 2020-07-07 15:33:58 +10:00
Dr.-Ing. Amilcar do Carmo Lucas fca8d33c50 AP_NavEKF3: fix vertical flyaways when rangefinder stops providing data 2020-06-24 21:16:50 +09:00
Randy Mackay ca0ae57b56 AP_NavEKF3: protect against position-delta sensor data being NaN 2020-06-19 13:46:52 +09:00
Randy Mackay 331f2f5fe7 AP_NavEKF3: writeExtNavData stores pos to buffer first
This is a non-functional change
2020-06-19 13:46:52 +09:00
Randy Mackay 578800dfbb AP_NavEKF3: protect against ExtNav being NaN 2020-06-19 13:46:52 +09:00
chobits 9b448b83c0 AP_NavEKF3: use err info from ext nav interface 2020-06-09 13:31:21 +09:00
Randy Mackay 0f212ca727 AP_NavEKF3: accept extnav at up to 50hz 2020-06-09 09:42:14 +10:00
chobits c7817eaca1 AP_NavEKF3: support VISION_SPEED_ESTIMATE
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2020-06-02 08:33:42 +09:00
Randy Mackay ef02942459 AP_NavEKF3: writeBodyFrameOdom accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay c28fd27b02 AP_NavEKF3: writeExtNavData accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay 45e6896d95 AP_NavEKF3: ensure extnav angle error is at least 5deg 2020-05-14 08:02:13 +10:00
Andrew Tridgell 5350ea5c58 AP_NavEKF3: avoid build warnings with g++ 9 2020-05-10 15:11:22 +10:00
priseborough c5e465aec9 AP_NavEKF3: add external nav system support
includes decoupling height source from use of external nav data
2020-04-30 15:55:59 +09:00
Paul Riseborough ad5ae1813d AP_NavEKF3: Don't use geomag data when user specifies declination 2020-04-28 11:42:31 +09:00
Andrew Tridgell 216935c1f2 AP_NavEKF3: fixed loss of GPS fusion
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
2020-04-24 09:43:23 +10:00
Paul Riseborough 863f989130 AP_NavEKF3: Fix integration of GPS yaw options
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
2020-04-24 09:43:22 +10:00
Paul Riseborough 410b5825fb AP_NavEKF3: Enable use of EKF-GSF yaw estimate
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.
2020-04-24 09:43:22 +10:00
Peter Barker 87108b86c8 AP_NavEKF3: add documentation for XKFM message 2020-04-21 09:48:43 +10:00
Andrew Tridgell 1f8cd830ea AP_NavEKF3: fixed use of tabs 2020-04-11 21:14:31 +10:00
Paul Riseborough eeac0a05b9 AP_NavEKF3: Improvements to on ground movement check
Reduce sensitivity and log test ratios.
Reduce base logging rate to 5Hz and log when status changes.
2020-04-11 21:14:31 +10:00
Paul Riseborough ebb8bb4f6f AP_NavEKF3: Enable use of yaw fusion before external yaw sensor starts 2020-04-11 21:14:31 +10:00
Andrew Tridgell 6f04fae4a0 AP_NavEKF3: added fallback to mag option with external yaw
this allows for a magnetometer to be used as a fallback yaw source in
flight when using an external yaw source such as a GPS. The
magnetometer bias is learned while the GPS yaw is available and
fallback is only done if the mag yaw and GPS yaw are consistent when
fallback is enabled

This also learns the Z gyro bias until first yaw alignment when
MAG_CAL is EXTERNAL_YAW_FALLBACK. This prevents large gyro bias
building while waiting for GPS lock
2020-04-11 21:14:31 +10:00
Peter Barker 4c19eb4bab AP_NavEKF3: use compass reference rather than repeatedly asking AHRS for it 2020-03-13 08:26:18 +11:00
Peter Barker 4431d01230 AP_NavEKF3: stop relying on the presence of a RangeFinder 2019-12-11 08:09:01 +11:00
Andrew Tridgell c6aad9b1ec AP_NavEKF3: don't use WMM tables unless we have a compass scale factor set 2019-12-03 20:48:23 +11:00
Peter Barker fe8599d6d7 AP_NavEKF3: adjust for renaming of RangeFinder files 2019-11-12 07:14:37 +08:00
Peter Barker 11b372a986 AP_NavEKF3: use enum-class for RangeFinder Status 2019-11-09 08:01:53 +11:00
Randy Mackay b4a8691a9e AP_NavEKF3: remove wheel encoder update limit 2019-10-22 07:15:48 +08:00
Jaaaky 54f8e1137e AP_NavEKF3: added EK3_MAG_EF_LIM parameter
Adapted from EKF2 implementation as of commits
3835d2613, e9ed3540f and df4fc0fff
this sets a limit on the difference between the earth field from the
WMM tables and the learned earth field inside the EKF. Setting it to
zero disables the feature. A positive value sets the limit in mGauss.
2019-10-20 07:34:35 +11:00
Andrew Tridgell c2067d5bc2 AP_NavEKF3: set a min yaw accuracy from GPS of 5 degrees
GPS modules tend to be rather optimistic about their yaw accuracy. By
setting a min or 5 degrees we prevent the user constantly getting
warnings about yaw innovations
2019-10-15 11:06:11 +11:00
Peter Barker 1c187d8feb AP_NavEKF3: correct return of empty prearm string 2019-09-19 08:47:47 +09:00
Michael du Breuil 9a7d64e8fc AP_NavEKF3: Allow the GPS to be responsible for logging 2019-09-10 09:09:17 +10:00
Andrew Tridgell 451fe840ee AP_NavEKF3: ensure that EKF origin stays in sync on all cores
this prevents the EKF origin on different cores from being initialised
to different values. A common value is stored in the frontend and used
by a core if it doesn't have an origin
2019-07-29 10:08:22 +10:00
Andrew Tridgell b56914b879 AP_NavEKF3: use GPS yaw if available and enabled
this allows a suitable GPS to be used as an external yaw source
2019-07-13 11:05:57 +10:00
priseborough 977a7b68ed AP_NavEKF3: Add push to buffer for external yaw sensor data 2019-07-13 11:05:57 +10:00
priseborough 87c7649d09 AP_NavEKF3: Add interface for yaw angle measurements 2019-07-13 11:05:57 +10:00
Andrew Tridgell 634db441f8 AP_NavEKF3: origin handling fixes from Francisco 2019-07-11 06:40:55 +10:00
Andrew Tridgell f3fc910abe AP_NavEKF3: continuously update gpsGoodToAlign
use it to determine how to handle a height datum reset
2019-07-07 19:20:32 +10:00
Andrew Tridgell 209bca162c AP_NavEKF3: added inactive bias learning
this allows for biases on inactive IMUs to be learned so that an IMU
switch within an EKF lane does not cause a jump in the IMU data
2019-07-07 19:03:01 +10:00
Peter Barker ef2589738d AP_NavEKF3: use beacon singleton 2019-07-01 07:20:58 +09:00
Michael du Breuil b624f6f008 AP_NavEKF3: Reduce scope of AP_Baro.h 2019-06-27 14:56:21 +10:00
Michael du Breuil be74b631fe AP_NavEKF3: Fix AP_GPS.h include 2019-06-18 10:02:05 +10:00
Peter Barker dce472745e AP_NavEKF3: take EAS2TAS from AHRS rather than airspeed 2019-06-06 12:44:36 +10:00
Pierre Kancir b3a1c9c90c AP_NavEKF3: use get_distance_NE instead of location_diff 2019-04-08 08:00:52 -07:00
Arjun Vinod f382a657bd AP_NavEKF3: fixed typos 2019-02-26 08:33:39 +11:00
Tom Pittenger 55377b234f AP_NavEKF3: remove HAL_CPU_CLASS_150 check, 150 is already a minimum requirement 2019-02-17 13:00:00 -08:00
Andrew Tridgell 39ffef1f08 AP_NavEKF3: fixed EKF compass switching
when we had 3 compasses the lack of the 'break' meant when we switched
compass in flight we would always switch back instantly to the one
that we had just rejected.
2019-02-09 13:04:52 +11:00
Andrew Tridgell de58fb4637 AP_NavEKF3: support in-flight compass learning 2018-10-24 07:25:42 +10:00