Commit Graph

87 Commits

Author SHA1 Message Date
Michael du Breuil ee9cc28fda AP_NavEKF2: Utilize the GPS drivers estimate for lag 2018-08-07 09:55:26 +10:00
Peter Barker 81044760c7 AP_NavEKF2: const accessors 2018-04-04 12:20:36 +01:00
Paul Riseborough c680b931dc AP_NavEKF2: Enable fusion of external nav position data 2018-03-27 20:28:42 +09: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
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
Andrew Tridgell 4019a167a9 AP_NavEKF2: fixed inverted function setInhibitGpsVertVelUse() 2017-11-29 09:47:14 +09:00
Lucas De Marchi 3c04f4e4d1 AP_NavEKF2: add static create method 2017-09-26 03:01:21 +01:00
priseborough f2f3067326 AP_NavEKF2: Add interface to control GPS vertical velocity use 2017-08-10 19:49:45 +10:00
priseborough 77d21f72d4 AP_NavEKF2: Allow reporting of origin height for specified instance 2017-06-14 12:44:41 +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
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
Andrew Tridgell ee5c032f27 AP_NavEKF2: added recording of timing statistics 2017-04-28 17:19:39 +10:00
Randy Mackay b255c7b370 AP_NavEKF: add setOrigin 2017-04-22 10:37:31 +09:00
Andrew Tridgell 9f3c2cb704 AP_NavEKF2: allow access to quaternion for each instance 2017-04-16 14:01:36 +10:00
priseborough 44fa82d58c AP_NavEKF2: Reference correct derivation 2017-03-13 11:31:51 +11:00
Jacob Walser e7a34b0fb3 AP_NavEKF2: Add set_baro_alt_noise method 2017-02-21 11:26:14 +11:00
priseborough 1a7b5538e5 AP_NavEKF2: Enable simple heading fusion to be set for specific cores 2017-02-15 19:17:53 +00:00
priseborough fe69d9a0ea AP_NavEKF2: remove duplicate include 2016-12-18 10:28:04 +11:00
priseborough 76106889d5 AP_NavEKF2: Prevent unwanted core switch on startup
Require primary core to be healthy for 10 seconds before starting selection logic
2016-12-13 01:18:28 +00:00
priseborough 14a0155f5e AP_NavEKF2: Allow threshold speed for range finder use to be adjusted 2016-12-09 21:17:28 +00:00
Randy Mackay 66a9093cd0 AP_NavEKF2: getRangeBeaconDebug returns false on failure to get beacon data 2016-11-30 17:56:51 +09:00
priseborough ef03a85cd3 AP_NavEKF2: add range beacon interface and fusion method 2016-11-30 17:56:43 +09:00
Randy Mackay e9ea06bd10 AP_NavEKF2: minor comment fix 2016-11-24 19:58:03 +09:00
priseborough 0df45703f1 AP_NavEKF2: Fix errors in position reset delta publishing 2016-11-24 19:57:47 +09:00
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
2016-11-24 19:57:45 +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 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 ab55991b33 AP_NavEKF2: Report position jumps due to lane switches
Also moves code required to update reset data due to lane switches into separate functionscto improve readability.
2016-10-10 11:56:14 +09:00
Francisco Ferreira 42cd8e9721 AP_NavEKF2: Handle yaw jumps due to core switches
Based on work from Paul Riseborough (priseborough)
2016-09-25 18:24:11 -07:00
Francisco Ferreira 8da22e441b Revert 3 commits about yaw reset core switch
Revert "AP_NavEKF2: Fix bug in published yaw reset value found during code review"
commit 175faf1e41.

Revert "AP_NavEKF2: use a struct for all yaw step class variables"
commit 77fad065d1.

Partially revert "AP_NavEKF2: Handle yaw jumps due to core switches"
commit 885bfd1b4e.
2016-09-25 18:24:11 -07:00
priseborough cb1d3c7ed2 AP_NavEKF2: Allow for terrain gradient when using range finder for height 2016-09-13 17:45:03 +09:00
priseborough 77fad065d1 AP_NavEKF2: use a struct for all yaw step class variables 2016-09-13 17:35:16 +09:00
priseborough 885bfd1b4e AP_NavEKF2: Handle yaw jumps due to core switches 2016-09-13 17:35:14 +09:00
Andrew Tridgell dd812cfc0c AP_NavEKF2: added getPrimaryCoreIMUIndex()
needed for correct AHRS gyro estimate
2016-09-05 12:53:53 +10: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
priseborough 230ba2700f AP_NavEKF2: fix documentation errors 2016-07-19 12:16:50 +10:00
priseborough b1717649b1 AP_NavEKF2: remove combined NED local position interface 2016-07-19 12:16:49 +10:00
priseborough e374ec634d AP_NavEKF2: Add separate horizontal/vertical local position interfaces 2016-07-19 12:16:49 +10:00
priseborough 14bb4f4574 AP_NavEKF2: Publish output observer tracking errors 2016-07-09 15:57:35 +10:00
Paul Riseborough 165335b9e3 AP_NavEKF2: Improve ability to tune magnetic field learning
Allow different process noise to be set for body (sensor bias) and earth field states.
This allows a stable magnetometer bias estimate to be available at end of flight whilst still allowing for external magnetic anomalies during landing.
Adjust default values to give stable mag bias learning and fast learning of external anomalies.
2016-06-28 14:20:12 +10:00
Paul Riseborough 6523481c76 AP_NavEKF2: Improve tracking accuracy of output predictor
Automatically use the highest gain consistent with a 5% overshoot to minimise RMS tracking errors.
Provide an alternative correction method for the position and velocity states that allows the user to specify the time-constant. This can be used to fine tune the output observer for for platform specific sensor errors and control loop sensitivity estimation noise.
2016-06-28 14:20:12 +10:00
Paul Riseborough 1400dc9d02 AP_NavEKF2: Add tuning parameters for magentic yaw fusion
Enable simple magnetic yaw fusion observation noise and innovation consistency check gate width to be tuned independantly.
2016-06-28 14:20:12 +10:00
Paul Riseborough 71b589c89c AP_NavEKF2: extend fusion fault reporting coverage 2016-05-21 15:13:50 +10:00
Andrew Tridgell ea508f1b80 AP_NavEKF2: use LOG_REPLAY and EK2_LOG_MASK parameters 2016-05-09 12:26:57 +10:00
Andrew Tridgell 32af886ba9 AP_NavEKF2: use consistent logging timestamps for sensors 2016-05-07 18:27:22 +10:00