Commit Graph

41 Commits

Author SHA1 Message Date
Randy Mackay e37bf9ad53 AP_NavEKF3: drag fusion for att and velAiding
also add dragTimeout
2022-05-25 20:05:21 +09:00
Andrew Tridgell a33febd90a AP_NavEKF3: fixed gaps in EKF logging
timestamps should not be static as otherwise some lanes will not be
logged
2021-12-28 16:03:47 +11:00
Peter Barker 308f4e99b4 AP_NavEKF3: correct structure used for logging
XKF4 and XKF5 are clones of NKF4 and NKF5, which is why this worked
2021-12-03 15:34:21 +09:00
Josh Henderson 3006d50f97 AP_NavEKF3: use vector.xy().length() instead of norm(x,y) 2021-09-14 10:43:46 +10:00
Randy Mackay d1f2acd813 AP_NavEKF3: rename varInnovOptFlow to flowVarInnov
also renamed innovOptFlow to flowInnov
2021-08-24 16:49:04 +09:00
Peter Barker a4410a4b2e AP_NavEKF3: log EKF data source set in XKFS 2021-07-21 16:31:53 +10:00
Andrew Tridgell 885e518741 AP_NavEKF3: allow for double EKF build 2021-07-10 07:20:41 +10:00
Peter Barker d6348a0786 AP_NavEKF3: remove getBodyFrameOdomDebug
Not used after we moved logging to be within AP_NavEKF3
2021-06-07 09:28:52 +10:00
Peter Barker dd3ab29b2f AP_NavEKF3: remove getFilterGpsStatus
Not needed after we moved logging into NavEKF3
2021-06-07 09:25:53 +10:00
Iampete1 8173cd442a AP_NavEKF3 log position offset as float in meters 2021-03-02 10:03:12 +11:00
Peter Barker 65b780fad5 AP_NavEKF3: move GSF logging from EKF files into GSF files 2021-02-23 12:36:33 +11:00
Andrew Tridgell 8da511f039 AP_NavEKF3: make body odomotry build depend on vehicle type
saves about 11k of flash
2021-01-24 11:56:52 +11:00
Peter Barker 3582b69e9c AP_NavEKF3: remove getFilterTimeouts access methods 2021-01-22 13:04:36 +11:00
Peter Barker b3bacdd33c AP_NavEKF3: remove internal-only getTiltError method 2021-01-21 21:26:17 +11:00
Paul Riseborough c9ab4b18b0 AP_NavEKF3: Add multicopter wind estimation 2020-12-11 15:21:41 +11:00
Peter Barker 58f6570755 AP_NavEKF3: stop using QUAT_* defines from AP_Logger/LogStructure.h
The EKFs logging is independant so we can kill EKF2...

Also use correct structure for logging XKF1; these structures were
identical.
2020-12-08 11:30:10 +11:00
Peter Barker 287e9350a5 AP_NavEKF3: move log message IDs in from AP_Logger LogStructure 2020-12-03 19:22:26 +11:00
Peter Barker 79109458c2 AP_NavEKF3: move EKF3 logging structures into EKF3 LogStructure.h 2020-12-03 19:22:26 +11:00
Andrew Tridgell bdba430e55 AP_NavEKF3: save memory on beacon debug structure
only allocate when beacons are enabled. This relies on a guarantee in
the DAL that the beacon count cannot change
2020-12-01 10:53:08 +11:00
Peter Barker 200b085eea AP_NavEKF3: move XKY0 and XKY1 to be normal log structures (from Log_Write) 2020-11-22 20:47:29 +11:00
Peter Barker e1a033b296 AP_NavEKF3: make logging a core concern
Also dissolve some methods only used for logging
2020-11-22 20:47:29 +11:00
Andrew Tridgell 5686dafeef AP_NavEKF3: fixed logged core for GSF messages 2020-11-16 10:28:43 +11:00
Andrew Tridgell f3c3778169 prevent duplicate EKF logging
vehicle code sometimes tries to log the same data twice
2020-11-10 16:15:45 +11:00
Andrew Tridgell 096aab9388 AP_NavEKF3: convert to use AP_DAL for new replay structure
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00
Harshit Kumar Sankhla edc3709653 AP_NavEKF3: implement sensor affinity using EK3_AFFINITY parameter
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
2020-08-27 20:20:51 +10:00
Harshit Kumar Sankhla d7edc946b6 AP_NavEKF3: Relative Error based Lane-Switching
Improvments to the lane selection logic, we accumulate error for each
EKF lane relative to the primary for a more robust core selection
2020-08-27 20:20:51 +10:00
Peter Barker 3440a64b66 AP_NavEKF3: correct description on XKY0 2020-04-24 18:08:14 +10:00
Peter Barker aa3165b71c AP_NavEKF3: remove incorrect units from yaw esimtator LoggerMessage 2020-04-24 18:08:14 +10:00
Andrew Tridgell 43ef8a192b AP_NavEKF3: added missing log documentation for field C 2020-04-24 09:43:23 +10:00
Paul Riseborough 1720c8de0f AP_NavEKF3: Add documentation for GSF logging 2020-04-24 09:43:23 +10:00
Paul Riseborough 9bdb89474a AP_NavEKF3: Use unique names for EKF2 logging 2020-04-24 09:43:23 +10:00
Randy Mackay c1ef894a30 AP_NavEKF3: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +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 609b66a053 AP_NavEKF3: rename struct log_NKF2a to log_XKF2 2020-03-31 10:25:59 +11:00
Peter Hall 47e3fda8e9 AP_NavEKF3: add initalized flag and change to uint32_t 2020-02-19 06:45:07 +11:00
Peter Barker 03cca68c5a AP_NavEKF3: use instance number when logging rather than multiple message IDs 2019-12-17 12:22:07 +11:00
Peter Barker b055eb8889 AP_NavEKF3: use instance # when logging EKF core timings 2019-12-06 12:52:03 +09:00
Peter Barker 7ea449076f AP_NavEKF3: use timing logging from AP_NavEKF 2019-09-03 09:28:37 +10:00
Siddharth Purohit db9f7c3dd5 AP_NavEKF3: do logging for 3rd EKF core 2019-07-23 12:34:38 +10:00
Peter Barker ce45baa034 AP_NavEKF3: factor out and logging functions, reuse for 2nd core 2019-07-06 19:05:51 +10:00
Peter Barker f3f364de26 AP_NavEKF3: move logging in from AP_Logger 2019-07-06 19:05:51 +10:00