Commit Graph

642 Commits

Author SHA1 Message Date
Andrew Tridgell 16f7e51ea5 AP_NavEKF2: fixed use of pointers in ringbuffers
these don't work with AP_DAL
2020-11-10 16:15:45 +11:00
Andrew Tridgell 246a441883 AP_NavEKF2: cope with INS_MAX_INSTANCES below 3 2020-11-10 16:15:45 +11:00
Andrew Tridgell 5f0e943f0f AP_NavEKF2: use dal reference in EKF backends
saves a bit of flash space
2020-11-10 16:15:45 +11:00
Andrew Tridgell 8591b31665 AP_NavEKF2: cleanup unused code 2020-11-10 16:15:45 +11:00
Andrew Tridgell bec095d661 AP_NavEKF2: support replay with external navigation data 2020-11-10 16:15:45 +11:00
Andrew Tridgell 224792b8b8 AP_NavEKF2: added optflow support for AP_DAL 2020-11-10 16:15:45 +11:00
Andrew Tridgell 90a8c5cb1a AP_NavEKF2: use ekf_low_time_remaining for core scheduling 2020-11-10 16:15:45 +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 6be3d19e82 AP_NavEKF2: 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 84c92b717f AP_NavEKF2: make coreBetterScore const 2020-11-03 10:39:35 +11:00
Randy Mackay fccc1fcb72 AP_NavEKF2: minor comment fix 2020-10-28 12:17:22 +09:00
Andrew Tridgell dc32f7a12f AP_NavEKF2: fixed multi-core yaw reset
thanks to Alex Burka for finding this
2020-10-24 19:35:30 +11:00
Peter Barker 0496ecc4f6 AP_NavEKF2: remove unused state variables 2020-10-22 08:47:08 +11:00
Peter Barker 53305ba2a4 AP_NavEKF2: remove unused quat2Tbn method 2020-10-20 11:40:54 +11:00
Peter Barker 312cf725aa AP_NavEKF2: remove dangling method declarations 2020-10-20 11:40:54 +11:00
Peter Barker c90265f94d AP_NavEKF2: fix includes 2020-10-20 11:40:54 +11:00
Peter Barker 80f9ef7ed1 AP_NavEKF2: remove unused innovationIncrement and lastInnovation 2020-10-20 11:24:34 +11:00
Randy Mackay b2d4622320 AP_NavEKF2: replace prearm_healthy with pre_arm_check 2020-10-07 11:53:07 +11:00
Andrew Tridgell 35e95d3328 AP_NavEKF2: reset body mag variances at key points
reset on sensor switch or when changing to 3D fusion
2020-09-20 09:25:57 +10:00
Andrew Tridgell 534e63e2fa AP_NavEKF2: fixed init of earth state mag variances
we were starting with zero variance for X and Y earth states, it
should start with sq(magNoise)
2020-09-20 09:25:57 +10:00
Andrew Tridgell d6dcbda0d3 AP_NavEKF2: removed duplicate compass switch check
left over from last set of changes
2020-09-20 09:25:57 +10:00
Andrew Tridgell 067001bd61 AP_NavEKF2: take into account alignment when comparing cores
ensure we don't switch to a lane that does not have yaw or tilt
alignment from a lane that is aligned
2020-09-14 20:29:04 +10:00
Paul Riseborough da7bb44a61 AP_NavEKF2: Consolidate magnetometer timeout checks 2020-09-08 11:01:14 +10:00
Andrew Tridgell 6b9e595602 AP_NavEKF2: fixed handling of failed compass
when a compass goes unhealthy due to sensor failure we should try
another compass after 10s if another compass is available
2020-09-08 11:01:14 +10:00
Andrew Tridgell 6ee527d3e0 AP_NavEKF2: fixed segfault when IMU mask covers more IMUs than GSF mask 2020-08-28 10:17:00 +10:00
Harshit Kumar Sankhla 56cbcb42ee AP_NavEKF2: Add core relative error and errorscore logging in NKF3 packet
TODO : Port lane switching logic from EKF3 to make use of these terms
Since both share the same NKF3 log structure, needed to do this.
Just log 0 as of.
2020-08-27 20:20:51 +10:00
Andrew Tridgell 83e5639225 AP_NavEKF2: apply min GPS accuracy at measurement point
this fixes an issue a RTK GPS gives 1cm horizontal and vertical
accuracy and that causes the variances to get too small
2020-08-21 07:40:13 +10:00
Peter Barker 032b7c81e5 AP_NavEKF2: correct includes 2020-08-07 19:20:07 +10:00
Andy Piper e39e24bd18 AP_NavEKF2: INS get_sample_rate() renamed to get_loop_rate_hz() 2020-07-10 16:45:29 +10:00
Paul Riseborough 25cba50f10 AP_NavEKF3: Fix EK2_MAG_CAL parameter description 2020-07-07 15:33:58 +10:00
Paul Riseborough ea4589ea94 AP_NavEKF2: Reset yaw estimator bias states at start of flight
Enables yaw bias to be learned when sitting stationary on ground.
2020-07-07 15:33:58 +10:00
Paul Riseborough b6d9b6f3c7 AP_NavEKF2: Update documentation for non-compass use case
Instruction now explicitly specifies that all COMPASS_USE parameters must be set to 0 and COMPASS_ENABLE must be set to 1
2020-07-07 15:33:58 +10:00
Paul Riseborough ccaa4d6aa9 AP_NavEKF2: Fix one frame delay in processing yaw estimator velocity data 2020-07-07 15:33:58 +10:00
Peter Barker 081c0bbfe0 AP_NavEKF2: correct comments on getFilterFaults and getFilterTimeouts methods 2020-07-07 10:50:41 +10:00
Paul Riseborough 9507a2e157 AP_NavEKF2: Fix parameter description 2020-06-24 21:16:50 +09:00
Randy Mackay a8c2be26ba AP_NavEKF2: remove unused terrainHgtStableSet_ms 2020-06-24 21:16:50 +09:00
Paul Riseborough 502b96f49c AP_NavEKF2: Clarify intended use of setTerrainHgtStable accessor 2020-06-24 21:16:50 +09:00
Dr.-Ing. Amilcar do Carmo Lucas 83dc46d539 AP_NavEKF2: fix vertical flyaways when rangefinder stops providing data 2020-06-24 21:16:50 +09:00
Dr.-Ing. Amilcar do Carmo Lucas 280d33d030 AP_NavEKF2: reduce duplicated code. 2020-06-24 21:16:50 +09:00
Paul Riseborough 11a0fef3d0 AP_NavEKF2: Fix indent 2020-06-24 21:16:50 +09:00
Paul Riseborough fc18ee91df AP_NavEKF2: Add missing fallback to baro for range beacon use case 2020-06-24 21:16:50 +09:00
Paul Riseborough d118c8fc38 AP_NavEKF2: Fix range aid switching logic
Clarifies use of EK2_RANGE_USE_HGT and EK2_ALT_SOURCE parameters to control range finder use.
Setting EK2_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 EK2_ALT_SOURCE parameter.
2020-06-24 21:16:50 +09:00
Pierre Kancir 9bbd2b19c2 AP_NavEKF2: add --debug-ekf to debug the EKF 2020-06-20 19:59:05 +10:00
Randy Mackay 989ffb79cd AP_NavEKF2: minor format fix 2020-06-19 13:46:52 +09:00
Randy Mackay 966d59a26d AP_NavEKF2: protect against ExtNav being NaN 2020-06-19 13:46:52 +09:00
chobits f5f403947c AP_NavEKF2: clarify POSNE_M_NSE desc 2020-06-09 20:44:57 +09:00
chobits e64c92b322 AP_NavEKF2: use err info from ext nav interface 2020-06-09 13:31:21 +09:00
Randy Mackay 6c10655059 AP_NavEKF2: accept extnav at up to 50hz 2020-06-09 09:42:14 +10:00
Peter Barker b02d9abd32 AP_NavEKF2: avoid compiler warnings from -Wclass-memaccess
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp: In member function ‘void NavEKF2_core::InitialiseVariables()’:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:343:50: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
  343 |     memset(&extNavVelNew, 0, sizeof(extNavVelNew));
      |                                                  ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
  518 |     struct ext_nav_vel_elements {
      |            ^~~~~~~~~~~~~~~~~~~~
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:344:58: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
  344 |     memset(&extNavVelDelayed, 0, sizeof(extNavVelDelayed));
      |                                                          ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
  518 |     struct ext_nav_vel_elements {
      |            ^~~~~~~~~~~~~~~~~~~~
2020-06-05 08:42:45 +10:00
chobits dee095b4a4 AP_NavEKF2: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00