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
Peter Barker
914629351f
AP_NavEKF3: use scalar rather than array for state-prediction-allowed
...
EKF2 needs this for choosing alternate cores. EKF3 does not.
2020-11-22 14:09:48 +11:00
Paul Riseborough
8561f5239d
AP_NavEKF3: Fix bug preventing yaw alignment to EKF-GSF estimate
2020-11-21 12:56:10 +11:00
Andrew Tridgell
1e4b1d7563
AP_NavEKF3: convert to using common buffer classes
...
this saves a considerable amount of flash
2020-11-20 21:56:32 +11:00
Randy Mackay
d1983b0b77
AP_NavEKF3: fixup source param conversion
...
shorten param conversion config error
if gps and optical flow are enabled we default SRC2_VELXY to optflow
convert_params run from InitialiseFilter
ensure param conversion only run once
2020-11-20 16:43:44 +09:00
Randy Mackay
04e3623620
AP_NavEKF3: improve MAG_CAL vs EK3_SRCn_YAW checks
...
MAG_CAL param description include deprecated values
Pre-arm check of MAG_CAL using deprecated values
effective_magCal interprets 5 (was EXTERNAL_YAW) as Never, 6 (was EXTERNAL_YAW_FALLBACK) as WhenFlying
Update comments in param conversion from MAG_CAL to EK3_SRC1_YAW
2020-11-20 16:43:44 +09:00
Andrew Tridgell
36c946113d
AP_NavEKF3: handle compass fallback in yaw source reset
...
if we get to this point we must be using the compass fallback logic,
and should do the reset
2020-11-20 16:43:44 +09:00
Randy Mackay
8895d20c45
AP_NavEKF3: rename setPosVelYawSourceSet
2020-11-20 16:43:44 +09:00
Randy Mackay
5eb3875ebb
AP_NavEKF3: rename posxy_source_last and posxy_source_reset
2020-11-20 16:43:44 +09:00
Randy Mackay
f88364d653
AP_NavEKF3: use_compass minor order fixup
2020-11-20 16:43:44 +09:00
Randy Mackay
b475f01b25
AP_NavEKF3: update comments
2020-11-20 16:43:44 +09:00
Randy Mackay
0f8d0ef11b
AP_NavEKF3: move sources to 2nd bank of parameters
2020-11-20 16:43:44 +09:00
Randy Mackay
33b6212cce
AP_NavEKF3: rename _sources to sources
2020-11-20 16:43:44 +09:00
Randy Mackay
9716b09cad
AP_NavEKF3: minor indenting fix
2020-11-20 16:43:44 +09:00
Randy Mackay
6daaa06317
AP_NavEKF3: integrate AP_NavEKF_Source::useVelXYSource
...
also integrate useVelZSource
2020-11-20 16:43:44 +09:00
Andrew Tridgell
72ee7d15e1
AP_NavEKF3: fixup for AP_DAL
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
58aa6086df
AP_NavEKF3: always calculate GPS innovations and variances
2020-11-20 16:43:44 +09:00
Randy Mackay
e7e91b1c3b
AP_NavEKF3: always calculate extNav innovations and variances
2020-11-20 16:43:44 +09:00
Randy Mackay
6b2b5c4ca0
AP_NavEKF3: add CalculateVelInnovationsAndVariances
2020-11-20 16:43:44 +09:00
Randy Mackay
2505fd5c1c
AP_NavEKF3: body and wheel odometry check source
2020-11-20 16:43:44 +09:00
Randy Mackay
1263648d88
AP_NavEKF3: beacon fusion checks source
2020-11-20 16:43:44 +09:00
Randy Mackay
8a56ce49be
AP_NavEKF3: optical flow fusion checks source
2020-11-20 16:43:44 +09:00
Randy Mackay
4cadaa5194
AP_NavEKF3: readyToUseOptFlow, Beacon, ExtNav check source
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
Paul Riseborough
aaf558f593
AP_NavEKF3: Add velocity innovation check to use of EKF-GSF yaw
...
Only apply to non fly forward vehicle, eg copters, because magnitude of velocity innovation produced by plane launches is TBD.
2020-11-16 16:01:13 +11:00
Paul Riseborough
db86a5acc8
AP_NavEKF3: Don't update yaw estimator with bad GPS
2020-11-16 16:01:13 +11:00
Andrew Tridgell
5686dafeef
AP_NavEKF3: fixed logged core for GSF messages
2020-11-16 10:28:43 +11:00
Andrew Tridgell
03f2e853ce
AP_NavEKF3: fixed memory corruption on push before init
...
this fixes a bug that happens with VISION_SPEED_ESTIMATE from a
companion computer, which may come in before the EKF buffers are
allocated. That causes a push to an uninitialised ringbuffer which
triggers memory corruption
found using the new memory guard system
2020-11-15 15:42:48 +11:00
Andrew Tridgell
c14d19be68
AP_NavEKF3: fixed gcc 9.3 build error
...
gcc 9.3 doesn't like the use of get_accel(i) when array length is 1
2020-11-13 14:30:11 +11:00
Andrew Tridgell
0bc77a3baf
AP_NavEKF3: fixed whitespace
2020-11-10 16:15:45 +11:00
Andrew Tridgell
6ee1b23d28
AP_NavEKF3: removed use of another lanes gyro in optflow takeoff detection
...
as discussed with Paul
2020-11-10 16:15:45 +11:00
Andrew Tridgell
6fe05a9ab6
AP_NavEKF3: restore XKTV message
2020-11-10 16:15:45 +11:00
Andrew Tridgell
f5275fd0ad
AP_NavEKF3: fixed use of pointers in ringbuffers
...
these don't work with AP_DAL
2020-11-10 16:15:45 +11:00
Andrew Tridgell
eaa8474563
AP_NavEKF3: cope with INS_MAX_INSTANCES below 3
2020-11-10 16:15:45 +11:00
Andrew Tridgell
9b81c5a1e0
AP_NavEKF3: use dal reference in EKF backends
...
saves a bit of flash space
2020-11-10 16:15:45 +11:00
Andrew Tridgell
1bdf6173ec
AP_NavEKF3: removed have_ekf_logging
2020-11-10 16:15:45 +11:00
Andrew Tridgell
21dfdc2192
AP_NavEKF3: use DAL for body frame odometry
2020-11-10 16:15:45 +11:00
Andrew Tridgell
a0de6c620f
AP_NavEKF3: use selected GPS for gps_yaw_deg()
...
more than one GPS could provide yaw
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
7bbbbd314c
AP_NavEKF3: added optflow support for AP_DAL
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