Paul Riseborough
a3725e2581
AP_NavEKF3: Fix bug in calculation of rotation order
5 years ago
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.
5 years ago
Paul Riseborough
ebb8bb4f6f
AP_NavEKF3: Enable use of yaw fusion before external yaw sensor starts
5 years ago
Andrew Tridgell
3ae0b0d446
AP_NavEKF3: added using_external_yaw() method
...
needed by AHRS for attitudes_consistent() check
5 years ago
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
5 years ago
Andrew Tridgell
a3100251a8
AP_NavEKF3: use enum class for EK3_MAG_CAL values
...
and use effective_magCal() everywhere for consistency
5 years ago
Andrew Tridgell
be674fc36c
AP_NavEKF3: make mag variance reporting consistent
...
logged scaled variance should match the value used in MAVLink
EKF_STATUS_REPORT
5 years ago
Peter Barker
609b66a053
AP_NavEKF3: rename struct log_NKF2a to log_XKF2
5 years ago
Daniel Magree
b3ff81648b
Nav_EKF3: varInnovBodyVel assigned the innovation covariance, rather than inverse
5 years ago
Peter Barker
4c19eb4bab
AP_NavEKF3: use compass reference rather than repeatedly asking AHRS for it
5 years ago
Andrew Tridgell
772438f3ed
AP_NavEKF3: fixed use of antenna position when switching GPS primary
...
when GPS primary switches we were using a position which had not been
corrected for antenna offset. This was used for calculating the reset
for sensor change.
This fixes that (trivial fix) and also fixes a similar issue on
position reset
5 years ago
Siddharth Purohit
545331024f
AP_NavEKF3: Primary compass is always at serial number 0
5 years ago
Peter Hall
47e3fda8e9
AP_NavEKF3: add initalized flag and change to uint32_t
5 years ago
Peter Barker
e289020332
AP_NavEKF3: stop taking ahrs in constructor
5 years ago
Peter Hall
dd75609599
AP_NavEKF3: get_time_flying in vehicle
5 years ago
Peter Barker
03cca68c5a
AP_NavEKF3: use instance number when logging rather than multiple message IDs
5 years ago
Peter Barker
9ed37e4486
AP_NavEKF3: make send_status_report const
5 years ago
Peter Barker
4431d01230
AP_NavEKF3: stop relying on the presence of a RangeFinder
5 years ago
Peter Barker
b055eb8889
AP_NavEKF3: use instance # when logging EKF core timings
5 years ago
Andrew Tridgell
c6aad9b1ec
AP_NavEKF3: don't use WMM tables unless we have a compass scale factor set
5 years ago
Peter Barker
fe8599d6d7
AP_NavEKF3: adjust for renaming of RangeFinder files
5 years ago
Peter Barker
11b372a986
AP_NavEKF3: use enum-class for RangeFinder Status
5 years ago
Randy Mackay
f24afbcf4b
AP_NavEKF3: initialise pre-arm failure message
5 years ago
Mark Whitehorn
3e21ef1389
AP_NavEKF3: add prearm failure message for null core pointer
5 years ago
Randy Mackay
b4a8691a9e
AP_NavEKF3: remove wheel encoder update limit
5 years ago
Randy Mackay
63309c6925
AP_NavEKF3: suppress ekf fail-to-set-origin if core disabled
5 years ago
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.
5 years ago
Randy Mackay
5baed38266
AP_NavEKF3: reduce EK3_HRT_FILT max to 30
5 years ago
Paul Riseborough
5b1d9ed868
AP_NavEKF3: Add missing vertical position derivative calculation
5 years ago
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
5 years ago
Andrew Tridgell
3995db49a4
AP_NavEKF3: use parent class for intermediate static variables
...
this makes the code faster as well as using less memory when both EK2
and EK3 are enabled
5 years ago
Andrew Tridgell
0e3a27f74f
AP_NavEKF3: change optimisation from -O3 to -O2
5 years ago
Andrew Tridgell
96c6544997
AP_NavEKF3: moved intermediate variables to common memory
...
this moves intermediate variables from being per-core to being common
between cores. This saves memory on systems with more than one core by
avoiding allocating this memory on every core.
This is an alternative to #11717 which moves memory onto the stack. It
doesn't save as much memory as #11717 , but avoids creating large stack
frames
5 years ago
Andrew Tridgell
05d62c62bb
AP_NavEKF3: fixed use of uninitialised variable in EKF3 mag fusion
...
not all elements of H_MAG are initialised, but they are used, as found
by valgrind
5 years ago
Andrew Tridgell
c6f43e9700
AP_NavEKF3: fixed use of old irqsave() API
5 years ago
Peter Barker
1c187d8feb
AP_NavEKF3: correct return of empty prearm string
5 years ago
Andrew Tridgell
fae2e44eac
AP_NavEKF3: reset inhibitMagStates on in-flight yaw reset
...
this is needed to prevent the next ConstrainVariances() from zeroing
the variances, which leads to very slow learning of mag states
6 years ago
Randy Mackay
0e1a2efb7c
EKF3: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder
6 years ago
Michael du Breuil
9a7d64e8fc
AP_NavEKF3: Allow the GPS to be responsible for logging
6 years ago
Peter Barker
7ea449076f
AP_NavEKF3: use timing logging from AP_NavEKF
6 years ago
Peter Barker
61ed6e07eb
AP_NavEKF3: shorten EKF3 initialisation send-text string
...
Now:
pbarker@bluebottle:~/rc/ardupilot(master)$ echo -n "EKF3 IMU1 buffers IMU=11 OBS=4 OF=10, dt=0.0120" | wc
0 7 47
pbarker@bluebottle:~/rc/ardupilot(master)$
Closes #11952
6 years ago
Andrew Tridgell
fc65e04ef2
AP_NavEKF3: fixed baro innovation gate when on ground with AIDING_NONE
...
when on the ground without a position source we would disable the
innovation gate for the barometer. This meant that a single (or small
number of) really bad baro readings would be fused into the EKF,
causing it to destabilise
Fixes #11903
6 years ago
Andrew Tridgell
04944fa6ce
AP_NavEKF3: review fixes
...
thanks Paul!
6 years ago
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
6 years ago
Andrew Tridgell
0fcb2037e1
AP_NavEKF3: use origin lat for earth rates
...
home may not yet be set when this code is run, so using home may be
invalid
6 years ago
Andrew Tridgell
a3411efdb5
AP_NavEKF3: set origin on all cores
...
when EKF origin is set, make sure it is set on all cores
6 years ago
Andrew Tridgell
3818d8ecda
AP_NavEKF3: restrict setting of EKF origin
...
only allow EKF origin to be set if EKx_GPS_TYPE is set to 3, which is
used for indoor operation
6 years ago
Siddharth Purohit
db9f7c3dd5
AP_NavEKF3: do logging for 3rd EKF core
6 years ago
priseborough
209a32b8b9
AP_NavEKF3: Fix bug in use of external 321 yaw to align
6 years ago
priseborough
122f214416
AP_NavEKF3: Don't allow mag to interfere with use of external yaw sensor
6 years ago