Peter Barker
032b7c81e5
AP_NavEKF2: correct includes
5 years ago
Dr.-Ing. Amilcar do Carmo Lucas
280d33d030
AP_NavEKF2: reduce duplicated code.
5 years ago
Paul Riseborough
11a0fef3d0
AP_NavEKF2: Fix indent
5 years ago
Paul Riseborough
fc18ee91df
AP_NavEKF2: Add missing fallback to baro for range beacon use case
5 years ago
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.
5 years ago
chobits
dee095b4a4
AP_NavEKF2: support VISION_SPEED_ESTIMATE
5 years ago
Randy Mackay
6e93f54cff
AP_NavEKF2: handle external nav position resets
5 years ago
Randy Mackay
43c9e13372
AP_NavEKF2: rename HGT_SOURCE_EV to HGT_SOURCE_EXTNAV
...
presumably EV stands for ExternalVision but we normally refer to this source as External Nav
5 years ago
Andrew Tridgell
c83e2d7c0e
AP_NavEKF2: fixed loss of GPS fusion
...
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
5 years ago
Paul Riseborough
de0040ad69
AP_NavEKF2: Enable use of EKF-GSF yaw estimate
...
Enables the yaw to be reset in flight to a value estimated from a specialised yaw estimator. This allows faster recovery if taking off with a bad magnetometer and also allows yaw alignment and GPS use to commence in-air when operating without any yaw sensing.
AP_NavEKF2: Add missing accesor functions for default airspeed
5 years ago
Randy Mackay
35dcb0d752
AP_NavEKF2: CorrectExtNavForSensorOffset made const
5 years ago
Randy Mackay
85704e4989
AP_NavEKF2: CorrectGPSForAntennaOffset made const
...
also reduce scope of call to slightly reduce CPU load
5 years ago
Randy Mackay
8749f30c64
AP_NavEKF2: external nav pos offsets from AP_VisualOdom library
5 years ago
Randy Mackay
9f81da1bf9
AP_NavEKF2: minor comment fix
5 years ago
Andrew Tridgell
9030590a88
AP_NavEKF2: 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
Peter Barker
369292f7f3
AP_NavEKF2: stop relying on the presence of a RangeFinder
5 years ago
Peter Barker
99689f65f8
AP_NavEKF2: adjust for renaming of RangeFinder files
5 years ago
Paul Riseborough
c26c6fd078
AP_NavEKF2: Add missing vertical position derivative calculation
...
Use a third order order complementary filter to estimate the rate of change of vertical position output.
5 years ago
Andrew Tridgell
f7e138bddd
AP_NavEKF2: 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
255981c60c
AP_NavEKF2: moved some of the intermediate vars to the stack
...
this keeps stack frames below 1k, while giving faster access to the
variables and saving more memory
5 years ago
Randy Mackay
94a52b3525
EKF2: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder
5 years ago
Andrew Tridgell
098701ec79
AP_NavEKF2: 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
2427440e13
AP_NavEKF2: origin handling fixes from Francisco
6 years ago
Andrew Tridgell
e8d9a1fae9
AP_NavEKF2: don't allow height datum reset when not on ground
6 years ago
Andrew Tridgell
f5fd38aef2
AP_NavEKF2: set terrainState to zero on height datum reset
6 years ago
Andrew Tridgell
9372073f63
AP_NavEKF2: continuously update gpsGoodToAlign
...
use it to determine how to handle a height datum reset
6 years ago
Andrew Tridgell
20ebb2500b
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
6 years ago
Michael du Breuil
f04e47fc17
AP_NavEKF2: Reduce scope of AP_Baro.h
6 years ago
Michael du Breuil
892b687c09
AP_NavEKF2: Fix AP_GPS.h include
6 years ago
Arjun Vinod
78b165e36f
AP_NavEKF2: fixed typos
6 years ago
Arjun Vinod
a0e7c37f8c
AP_NavEKF2: fixed typos
6 years ago
Tom Pittenger
b32e8a4424
AP_NavEKF2: remove HAL_CPU_CLASS_150 check, 150 is already a minimum requirement
6 years ago
chobits
08b9bf4a89
AP_NavEKF2: fix extNav position noise
6 years ago
Paul Riseborough
c680b931dc
AP_NavEKF2: Enable fusion of external nav position data
7 years ago
Peter Barker
5ab89324b2
AP_NavEKF2: use baro singleton
7 years ago
Peter Barker
9c8466dc03
AP_NavEKF2: use GPS singleton
7 years ago
Peter Barker
1e83ef3c44
AP_NavEKF2: use rangefinder backend accessors
8 years ago
priseborough
f2f3067326
AP_NavEKF2: Add interface to control GPS vertical velocity use
8 years ago
priseborough
36e7dfb5f6
AP_NavEKF2: Improve GPS reference height estimator
...
Fix rounding error bug preventing state from updating after initial convergence.
Decouple GPS reference height from published EKf origin height.
Add bitmask parameter to control update and publishing of GPS reference height.
8 years ago
Jonathan Challinger
c53125f3b5
AP_NavEKF2: apply height innovation floor only when barometer is in use
8 years ago
priseborough
8c46d4316b
AP_NavEKF2: handle position jump caused by change in GPS receiver
...
If the GPS receiver selection changes and we are using GPS for height, the
vertical position will be reset to the new GPS height measurement.
correct output observer history when doing a GPS height reset
8 years ago
Randy Mackay
563be389ee
AP_NavEKF2: only use downward facing rangefinder
8 years ago
Francisco Ferreira
c6875e1756
AP_NavEKF2: remove editor information wrongly added in d408d25
8 years ago
Dr.-Ing. Amilcar Do Carmo Lucas
d408d25f92
More spelling stuff
8 years ago
priseborough
69f3c83c20
AP_NavEKF2: Don't use speed switch criteria when speed estimate is invalid
...
Prevent unwanted switches from range finder to Baro height aiding due to triggering of the speed threshold
8 years ago
priseborough
14a0155f5e
AP_NavEKF2: Allow threshold speed for range finder use to be adjusted
8 years ago
priseborough
ef03a85cd3
AP_NavEKF2: add range beacon interface and fusion method
8 years ago
priseborough
f6021c959d
AP_NavEKF2: capture and publish vertical position reset deltas
...
Calculate the change in vertical position due to a internal EKF state reset or a EKF core switch
8 years ago
Andrew Tridgell
82365f8670
AP_NavEKF2: save some memory in the position offsets in EKF2
...
we don't need to copy that vector3f for every sample. A uint8_t does
the job
8 years ago
priseborough
1890bbdafa
AP_NavEKF2: Don't correct GPS for zero position offset
8 years ago