Commit Graph

105 Commits

Author SHA1 Message Date
Tom Pittenger b32e8a4424 AP_NavEKF2: remove HAL_CPU_CLASS_150 check, 150 is already a minimum requirement 2019-02-17 12:59:52 -08:00
Andrew Tridgell ccc1f906f8 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-09 13:04:52 +11:00
chobits 3766ee1b60 AP_NavEKF2: add external navigation data lag 2019-01-31 08:30:22 +09:00
chobits 08b9bf4a89 AP_NavEKF2: fix extNav position noise 2018-10-24 19:14:54 +09:00
Andrew Tridgell 805647df85 AP_NavEKF2: enable use of in-flight compass learning 2018-10-24 07:25:42 +10:00
Peter Barker d8aa8d2b71 AP_NavEKF2: fix writeOptFlowMeas signature
const some of the vectors, stop taking references to scalars that aren't
being changed
2018-09-11 09:03:22 +10:00
Michael du Breuil ee9cc28fda AP_NavEKF2: Utilize the GPS drivers estimate for lag 2018-08-07 09:55:26 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 59e087214f AP_NavEKF2: spell in comments (NFC) 2018-07-10 08:17: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 9c8466dc03 AP_NavEKF2: use GPS singleton 2017-12-27 00:58:02 +00: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
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
Peter Barker 5da3759ff4 AP_NavEKF2: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
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.
2017-06-14 12:44:41 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas ce37517268 AP_NavEKF2: Improve comments, typos 2017-05-03 08:44:49 +09:00
priseborough 2d4eee0cce AP_NavEKF2: documentation update 2017-05-01 14:24:55 +10:00
Andrew Tridgell 2de8777669 AP_NavEKF2: added inter-EKF scheduling cooperation
this changes the stragegy for load levelling between EKF cores so it
works between EK2 and EK3, and with future estimators as well.

It allows us to run EK3 and EK2 at the same time with good scheduling
performance
2017-05-01 14:24:55 +10:00
priseborough e48f46c98b AP_NavEKF2: Add monitoring of average EKF time step 2017-04-29 11:03:44 +10:00
Andrew Tridgell ee5c032f27 AP_NavEKF2: added recording of timing statistics 2017-04-28 17:19:39 +10:00
Randy Mackay 563be389ee AP_NavEKF2: only use downward facing rangefinder 2017-02-27 15:18:10 +09:00
priseborough 5cd403c0b9 AP_NavEKF2: prevent NaN if RNGFND_GNDCLEAR is zero 2017-02-15 07:04:38 +09:00
Randy Mackay fc5f4c20cd AP_NavEKF2: remove redundant check of beacon nullptr
thanks to muramura for spotting this
2016-12-01 14:53:26 +09:00
Randy Mackay 1f4606e48a AP_NavEKF2: protect against null beacon 2016-11-30 17:56:45 +09:00
priseborough ef03a85cd3 AP_NavEKF2: add range beacon interface and fusion method 2016-11-30 17:56:43 +09:00
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
2016-10-27 17:09:06 +11:00
priseborough b40016db62 AP_NavEKF2: Fix documentation errors 2016-10-27 14:54:43 +11:00
priseborough 8922861359 AP_NavEKF2: Correct optical flow data for sensor position offset
Correction requires the body rates averaged across the flow sensor sampling interval. This data has been added to the sensor buffer.
The body rate data from the flow sensor driver does not contain the Z component, so an equivalent value sampled from the navigation IMU has been used instead.
The variable omegaAcrossFlowTime has been moved out of the class and into the only function that uses it.
2016-10-27 14:54:43 +11:00
priseborough 064a106808 AP_NavEKF2: Get IMU accelerometer body position offset data 2016-10-27 14:54:42 +11:00
priseborough 397033b7c3 AP_NavEKF2: Add flow sensor body position offset to data buffer 2016-10-27 14:54:42 +11:00
priseborough 92c086b40e AP_NavEKF2: Add rangefinder body position offset to data buffer 2016-10-27 14:54:42 +11:00
priseborough 3148ad4623 AP_NavEKF2: Add GPS antenna position offset data to data buffer 2016-10-27 14:54:42 +11:00
priseborough fd905c23e1 AP_NavEKF2: Add body position offset to optical flow interface 2016-10-27 14:54:42 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
priseborough 9779511425 AP_NavEKF2: Fix bug in median filter code 2016-10-19 19:45:00 +09:00
priseborough 5d09c78f34 AP_NavEKF2: Always perform optical flow takeoff check when receiving data
A specialised takeoff check is now always performed when we receive new flow data as the default behaviour is to try and use flow data whenever it is received, rather than limit its use to a use to a flow-only mode of operation that had to be selected via user parameter.
2016-10-10 14:49:48 +09:00
Randy Mackay 2ebb81b02f AP_NavEKF2: switching compass message to GCS downgraded to INFO 2016-09-21 21:42:44 +09:00
priseborough 8797714203 AP_NavEKF2: Fix bug in handling of invalid range finder data 2016-09-13 17:44:43 +09:00
priseborough e6f36f04db AP_NavEKF2: Enable automatic use of range finder height
The EK2_RNG_USE_HGT parameter sets the height (expressed as a percentage of the maximum range of the range finder as set by the RNGFND_MAX_CM parameter) below which the range finder will be used as the primary height source when the vehicle is moving slowly.

When using a height reference other than GPS, the height datum can drift due to air pressure changes if using baro, or due to terrain height changes if using range finder as the primary height source. To ensure that a consistent height datum is available when switching between altitude sources, the WGS-84 height estimate of the EKF's local positi norigin is updated using a
single state Bayes estimator,

If rngfinder or gps height data is lost whilst being used, there will be a fall-back to baro data.
2016-08-08 10:56:44 +09:00
Andrew Tridgell 567d5cdbe6 AP_NavEKF2: use mavlink messages not printf for state change notifications 2016-07-19 12:16:51 +10:00
priseborough bd7bf21475 AP_NavEKF2: Speed improve switch-over to backup magnetometer
When switching over to a back up magnetometer, ensure that the earth field estimate are reset. other wise mag earth field estimates due to the previous failed mag could cause data from the new mag to be rejected.
2016-07-19 12:16:50 +10:00
priseborough e2b8807260 AP_NavEKF2: Fix bug causing switching in and out of aiding
If the GPS receiver was disconnected and no data received, then then the gpsGoodToAlign check did not get a chance to run and becasue it was previously true the EKF would switch back into aiding.
This prevents this by ensuring that gpsGoodToAlign defaults to false when the check is not being performed.
An additional check has also been dded to ensure that there is GPS data to fuse before we declare ready to use GPS.
2016-07-19 12:16:50 +10:00
priseborough 9a23152ee4 AP_NavEKF2: Fix bugs and consolidate aiding switch logic
Switching in and out of aiding modes was being performed in more than one place and was using two variables.
The reversion out of GPS mode due to prolonged loss of GPS was not working.
This consolidates the logic and ensures that PV_AidingMode is only changed by the setAidingMode function.
2016-07-19 12:16:50 +10:00
priseborough 10470b2dc1 AP_NavEKF2: fix bug in initialisation of declination co-variances
Co-variances were being re-zeroed after being set. This meant that the initial declination learning was sensitive to measurement errors which could result in poor initial yaw accuracy.
2016-07-10 08:21:18 +10:00
priseborough 55dee347e0 AP_NavEKF2: Fix bug in averaged filter delta time
Average EKF time delta was not being updated.
2016-07-09 15:57:36 +10:00
priseborough 191c34612d AP_NavEKF2: Fix bug in use of corrected IMU data
IMU data was being corrected before being used by the co-variance prediction, whereas the delta angles and velocities in the derivation were supposed to be uncorrected.
This patch creates separate variable for the corrected data
2016-07-09 15:57:35 +10:00
Paul Riseborough fe06606193 AP_NavEKF2: Ensure corrected IMU data used by EKF
Don't try to pop new IMU data from the buffer unless we have written data.
Correct IMU data as soon as it is popped from the buffer
2016-06-28 14:20:12 +10:00