Commit Graph

129 Commits

Author SHA1 Message Date
Randy Mackay 33b6212cce AP_NavEKF3: rename _sources to sources 2020-11-20 16:43:44 +09:00
Randy Mackay 73835f0c11 AP_NavEKF3: pre_arm_check includes sources 2020-11-20 16:43:44 +09:00
Randy Mackay 6c0bb6a198 AP_NavEKF3: add convert_params for source 2020-11-20 16:43:44 +09:00
Randy Mackay 849e94cc24 AP_NavEKF3: call sources align inactive sources 2020-11-20 16:43:44 +09:00
Randy Mackay ba9f60abc7 AP_NavEKF3: add getVelInnovationsAndVariancesForSource 2020-11-20 16:43:44 +09:00
Randy Mackay faed58a027 AP_NavEKF3: integrate Source for yaw 2020-11-20 16:43:44 +09:00
Randy Mackay 8931e50166 AP_NavEKF3: integrate Source for alt 2020-11-20 16:43:44 +09:00
Randy Mackay c21d58ebea AP_NavEKF3: integrate Source for position 2020-11-20 16:43:44 +09:00
Andrew Tridgell 4c606a30bb AP_NavEKF3: use common structure names 2020-11-17 13:45:07 +11:00
Andrew Tridgell 21dfdc2192 AP_NavEKF3: use DAL for body frame odometry 2020-11-10 16:15:45 +11:00
Andrew Tridgell f4c3d7286c AP_NavEKF3: support replay with wheel odomotry 2020-11-10 16:15:45 +11:00
Andrew Tridgell e87f98066f AP_NavEKF3: support replay with external navigation data 2020-11-10 16:15:45 +11:00
Andrew Tridgell 31091d6307 AP_NavEKF3: use ekf_low_time_remaining for core scheduling 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
Peter Barker fc49b55b85 AP_NavEKF3: make coreBetterScore const 2020-11-03 10:39:35 +11:00
Paul Riseborough 16ae75a681 AP_NavEKF3: Consolidate and log tilt error variance calculation 2020-10-26 11:03:50 +11:00
Andrew Tridgell a4716fb9bf AP_NavEKF3: fixed multi-core yaw reset
thanks to Alex Burka for finding this
2020-10-24 19:35:30 +11:00
Randy Mackay eeb1a1846c AP_NavEKF3: replace prearm_healthy with pre_arm_check 2020-10-07 11:53:07 +11:00
Andrew Tridgell 2bc7d17e7a AP_NavEKF3: improved core comparison to check alignment
this adds coreBetterScore() which takes account of tilt and yaw
alignment when comparing cores for lane switching

this ensures we don't switch to a lane that is unaligned due to the
zero error score for unaligned lanes
2020-09-14 20:29:04 +10: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 6b701ae3b3 AP_NavEKF3: correct includes 2020-08-07 19:20:07 +10:00
chobits 4b8be2e535 AP_NavEKF3: fix comments 2020-08-04 18:16:18 +10:00
Andy Piper e35458cedf AP_NavEKF3: INS get_sample_rate() renamed to get_loop_rate_hz() 2020-07-10 16:45:29 +10:00
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 0dc598a6e1 AP_NavEKF3: Fix param description and comment 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
Peter Barker 2e55584417 AP_NavEKF3: correct comments on getFilterFaults and getFilterTimeouts methods 2020-07-07 10:50:41 +10:00
Randy Mackay dccc3e22d9 AP_NavEKF3: minor comment fix re RNG_USE_HGT 2020-06-24 21:16:50 +09:00
Paul Riseborough ed5b695c94 AP_NavEKF3: Clarify intended use of setTerrainHgtStable accessor 2020-06-24 21:16:50 +09:00
Paul Riseborough 906731222d AP_NavEKF3: Fix range aid switching logic
Clarifies use of EK3_RANGE_USE_HGT and EK3_ALT_SOURCE parameters to control range finder use.
Setting EK3_RNG_USE_HGT to a positive number to enable automatic switching between the primary height source (baro or GPS) and range finder should be disabled if any primary height source other than Baro or GPS is selected via the EK3_ALT_SOURCE parameter.
2020-06-24 21:16:50 +09: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
Henry Wurzburg 8b3f07416c AP_NAVEKF3: change plane check_scaler value to match EKF2 value 2020-05-10 07:59:27 +10:00
Randy Mackay d763597065 AP_NavEKF3: compensate for visual odometry sensor position 2020-04-30 15:55:59 +09: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
Randy Mackay c1ef894a30 AP_NavEKF3: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay ed3d072318 AP_NavEKF3: rename GSF_RUN_MASK, GSF_USE_MASK, GSF_RST_MAX 2020-04-24 09:43:23 +10:00
Paul Riseborough 6ec69e6ed1 AP_NavEKF3: Update EK3_MAG_CAL parameter advice 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 d19f8db06f AP_NavEKF3: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Andrew Tridgell 3ae0b0d446 AP_NavEKF3: added using_external_yaw() method
needed by AHRS for attitudes_consistent() check
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 e289020332 AP_NavEKF3: stop taking ahrs in constructor 2020-01-21 11:53:18 +11:00
Peter Barker 9ed37e4486 AP_NavEKF3: make send_status_report const 2019-12-11 07:54:41 +09:00
Peter Barker 4431d01230 AP_NavEKF3: stop relying on the presence of a RangeFinder 2019-12-11 08:09:01 +11:00
Mark Whitehorn 3e21ef1389 AP_NavEKF3: add prearm failure message for null core pointer 2019-10-29 11:59:29 +08:00
Randy Mackay 63309c6925 AP_NavEKF3: suppress ekf fail-to-set-origin if core disabled 2019-10-22 07:15:48 +08:00