Andrew Tridgell
6634555e40
AP_NavEKF2: use origin lat for earth rates
...
home may not yet be set when this code is run, so using home may be
invalid
2019-07-29 10:44:37 +10:00
Andrew Tridgell
e9d51bb0c7
AP_NavEKF2: set origin on all cores
...
when EKF origin is set, make sure it is set on all cores
2019-07-29 10:44:32 +10:00
Andrew Tridgell
a75e2e1c0e
AP_NavEKF2: 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
2019-07-29 10:44:26 +10:00
Andrew Tridgell
450224b420
AP_NavEKF2: origin handling fixes from Francisco
2019-07-09 16:23:44 +10:00
Andrew Tridgell
6c54ba3e7a
AP_NavEKF2: don't allow height datum reset when not on ground
2019-07-06 15:50:34 +10:00
Andrew Tridgell
befefc152a
AP_NavEKF2: set terrainState to zero on height datum reset
2019-07-06 15:50:34 +10:00
Andrew Tridgell
358aaab472
AP_NavEKF2: continuously update gpsGoodToAlign
...
use it to determine how to handle a height datum reset
2019-07-06 15:50:34 +10:00
Andrew Tridgell
2fc28e2eae
AP_NavEKF2: ensure that both AMSL and relative alt are correct after a reset
...
this forces the EKF origin to the GPS alt on a height datum reset if
we have GPS lock. If we don't do this then the reported AMSL alt will
drift over time away from the GPS alt when we reset while on the
ground
2019-07-06 15:50:34 +10:00
Andrew Tridgell
760bbf9921
AP_NavEKF2: force first EKF lane when disarmed
...
this ensures we consistently fly with EKF lane1 if it is healthy at
the point we arm. Otherwise the choice of lane will be a lottery.
This is important as many systems have quite different filtering and
vibration characteristics on their different IMUs. We by default
enable fast sampling only on the first IMU for example, which means
the 2nd and 3rd IMUs are more vulnerable to high freq causing
aliasing.
2019-07-06 15:50:34 +10:00
Andrew Tridgell
1de946b29e
AP_NavEKF2: default EK2_MAG_EF_LIM to 50
...
this was supposed to be part of the original PR (agreed with Paul to
enable by default)
2019-07-06 15:50:34 +10:00
Andrew Tridgell
994a4b2082
AP_NavEKF2: constrain field by table after fusion
...
this should make for faster convergence
2019-07-06 15:50:34 +10:00
Andrew Tridgell
6f5d0fa3f0
AP_NavEKF2: added EK2_MAG_EF_LIM parameter
...
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.
2019-07-06 15:50:34 +10:00
Andrew Tridgell
14265d9580
AP_NavEKF2: don't use disabled gyros in opticalflow takeoff detection
2019-07-06 15:50:34 +10:00
Andrew Tridgell
9f4085b0bc
AP_NavEKF2: learn gyro biases for inactive gyros
...
this allows us to learn the gyro biases each lane would need if it had
to switch to another gyro due to a sensor failure. This prevents a
sudden change in gyro bias on IMU failure
2019-07-06 08:33:59 +10:00
Andrew Tridgell
fe724e40b3
AP_NavEKF2: fixed EKF compass switching
...
when we had 3 compasses the lack of the 'break' meant when we switched
compass in flight we would always switch back instantly to the one
that we had just rejected.
2019-02-25 10:52:25 +11:00
Randy Mackay
3d72022f6e
EKF: modify ALT_SOURCE param description
...
We regularly find users changing the ALT_SOURCE to 1 (range finder) when trying to implement terrain following which is not the correct way to do it
2018-07-18 08:31:09 +09:00
Andrew Tridgell
3d31773fb4
AP_NavEKF2: fill in gps_quality_good flag
2018-07-14 17:49:52 +10:00
Dr.-Ing. Amilcar do Carmo Lucas
59e087214f
AP_NavEKF2: spell in comments (NFC)
2018-07-10 08:17:57 +09:00
Peter Barker
baa818a812
AP_NavEKF2: use compass singleton for logging
2018-07-04 20:11:27 +01:00
murata
a9b2b9dddf
AP_NavEKF2: Delete unused definitions
2018-06-11 09:11:44 +09:00
murata
1e011c0c15
AP_NavEKF2: Clarify the message
2018-06-04 11:32:15 +09:00
Andrew Tridgell
fb0deba3aa
AP_NavEKF2: send airspeed variance over mavlink
2018-04-30 15:41:31 +10:00
Peter Barker
578facc9ad
AP_NavEKF2: do not pass GPS into Log_Write_GPS; it uses singleton
2018-04-18 13:50:55 +09:00
Peter Barker
81044760c7
AP_NavEKF2: const accessors
2018-04-04 12:20:36 +01:00
priseborough
12fd19ea26
AP_NavEKF2: Clarify definition for gps_glitching flag
2018-03-27 20:28:57 +09:00
Paul Riseborough
c680b931dc
AP_NavEKF2: Enable fusion of external nav position data
2018-03-27 20:28:42 +09:00
Peter Barker
40957ec430
AP_NavEKF2: use ins singleton
2018-03-16 00:37:35 -07:00
Peter Barker
5ab89324b2
AP_NavEKF2: use baro singleton
2018-03-08 21:20:05 -08:00
Peter Barker
5b7d5a9757
AP_NavEKF2: mark getEulerAngles as const
2018-03-07 12:34:39 +00:00
Peter Barker
dbe860152d
AP_NavEKF2: tight types on constants
...
This saves ~200 bytes on at stm32 build, at the expense of people having
to watch the type carefully when increasing the values
2018-03-01 20:27:19 +09:00
Peter Barker
3a99b2bce1
AP_NavEKF: move initialisation of EKF constants into header file
...
Various comments where getting out of sync with one-another, and
having everything in one place lets you match values against types.
2018-03-01 20:27:19 +09:00
bugobliterator
b1213a522d
AP_NavEKF2: allocate NavEKF core from MEM_FAST region
2018-01-15 11:46:02 +11:00
Peter Barker
9c8466dc03
AP_NavEKF2: use GPS singleton
2017-12-27 00:58:02 +00:00
Pierre Kancir
171e80d8dc
AP_NavEKF2: only report terrain estimator innovations with valid rng value
2017-12-18 22:51:46 +00:00
Andrew Tridgell
4d4e66d825
AP_NavEKF2: removed create() method for objects
...
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
priseborough
3b32d583a9
AP_NavEKF2: Fix delta time use error
2017-12-12 11:39:38 +11:00
priseborough
440d361aff
AP_NavEKF2: Limit range of delta times
2017-12-12 11:39:38 +11:00
Andrew Tridgell
97729a12f0
AP_NavEKF2: don't run IMU updates until buffer fills
...
this prevents us using bad initial data multiple times. It fixes a bug
where the IMU may pause during EK2 initialisation
2017-12-12 11:39:38 +11:00
Andrew Tridgell
4019a167a9
AP_NavEKF2: fixed inverted function setInhibitGpsVertVelUse()
2017-11-29 09:47:14 +09:00
Samuel Tabor
1b4705242c
AP_NavEKF2: print reason for EKF2 arming failure when no GPS is available
2017-11-20 13:53:31 +09:00
priseborough
efdc651d1a
AP_NavEKF2: Require reboot after changing ALT_SOURCE parameter
...
Toggling between alt sources in flight using the parameter can have unpredictable effects due to the various height offsets and the possibility that the data source may be unavailable.
2017-10-04 00:24:15 +01:00
Lucas De Marchi
3c04f4e4d1
AP_NavEKF2: add static create method
2017-09-26 03:01:21 +01:00
Peter Barker
1e83ef3c44
AP_NavEKF2: use rangefinder backend accessors
2017-08-15 18:30:45 +01:00
priseborough
f2f3067326
AP_NavEKF2: Add interface to control GPS vertical velocity use
2017-08-10 19:49:45 +10:00
Michael du Breuil
dffa3d3b40
AP_NavEKF2: Fix possible compass nullptr dereference
2017-08-01 15:25:05 +01:00
priseborough
ac568bae53
AP_NavEKF2: Initialise EKF origin height to field elevation
...
Enables copters to set bit position 2 in the EK2_OGN_HGT_MASK parameter without having a large jump in reported local position height.
2017-07-17 02:22:02 +01:00
priseborough
027552ef44
AP_NavEKF2: Fix default behaviour for height origin corrections
...
Previous default was to apply in-flight height origin changes to local position instead of to reported origin height. This caused problems with copters that took off before getting GPS lock.
2017-07-17 02:22:02 +01:00
Peter Barker
5da3759ff4
AP_NavEKF2: eliminate GCS_MAVLINK::send_statustext_all
2017-07-11 23:53:53 +01:00
Randy Mackay
7e7f78d4b5
AP_NavEKF2: final mag reset at 2.5m
2017-07-08 08:39:43 +09:00
priseborough
c69c5440a0
AP_NavEKF2: Fix calculation of predicted LOS rate in terrain estimator
2017-06-26 14:58:06 +01:00