Commit Graph

146 Commits

Author SHA1 Message Date
Paul Riseborough b0ad8269a5 EKF: enable separate monitoring of aux velocity innovations 2017-11-21 11:18:09 +11:00
Paul Riseborough 8e30c2666d EKF: Add support auxiliary velocity observation
This enables the EKF to use an additional NE velocity measurement. This can be used to improve position hold stability when landing using a beacon system for positioning by fusing the beacon velocity estimates.
2017-11-21 11:18:09 +11:00
Paul Riseborough 141264fe63 EKF: Add method to set diagonals in covariance matrix 2017-11-13 07:05:56 +11:00
Paul Riseborough 32de90b9ef EKF: Add method to zero covariance terms 2017-11-13 07:05:56 +11:00
Paul Riseborough 29d383edbf EKF: Allow mag field estimates to stabilise before use 2017-11-13 06:55:02 +11:00
Paul Riseborough 363edf5eb9 EKF: Fix yaw reset for fixed wing
Ensures that a complete reset of velocity and position states will always be performed if yaw has had to be reset using GPS velocity.
Ensures that the yaw_align status cannot be set to false once the filter has aligned.
2017-11-13 06:55:02 +11:00
Paul Riseborough 01d68ef67c EKF: Enable use of rotated external nav estimates 2017-11-01 08:33:57 +11:00
Paul Riseborough 063533afae EKF: Add method to enable the IMU bias states to be reset externally 2017-10-26 10:41:39 +11:00
Paul Riseborough 9857fb9eb6 EKF: publish control limits for optical flow navigation 2017-10-20 14:22:06 +11:00
CarlOlsson 8c83167857 EKF: fixed comment
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-17 11:41:55 +02:00
CarlOlsson 8200e4b218 EKF: added get_wind_velocity_var function
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-02 14:47:56 +02:00
ChristophTobler 89236ef275 Merge pull request #314 from PX4/pr-check_stuck_rng
Pr check stuck rng
2017-08-21 07:54:06 +02:00
Paul Riseborough 3983ac23fa Merge pull request #316 from PX4/pr-ekfTrueAirspeed
EKF: Add true airspeed accessor
2017-08-11 08:18:04 +10:00
Paul Riseborough cc5db74d1b EKF: Add true airspeed accessor 2017-08-07 09:19:48 +10:00
ChristophTobler 7252284628 Add check for stuck range finder measurements 2017-07-31 17:59:16 +02:00
ChristophTobler 41f4b62cdb fix indentation 2017-07-31 17:58:03 +02:00
Paul Riseborough ce806768b7 EKF: Improve in-flight mag error detection, recovery and isolation for fixed wing 2017-07-31 19:39:07 +10:00
Paul Riseborough e08da1c599 EKF: Add ability to use EV and GPS data together
Fuse external vision data using a relative position odometry method when GPS data is also being used and enable both GPOS and EV data to be fused on the same time step.
2017-07-26 18:06:18 +10:00
Paul Riseborough aec01ce59c EKF: Update class variable documentation and make compatible with Doxygen 2017-07-20 20:16:42 +10:00
Paul Riseborough e1fe5b2229 Revert "Revert "Split get_terrain_vert_pos() into valid and get_vpos"" 2017-07-19 17:52:35 +10:00
Paul Riseborough c887b02f21 Revert "Split get_terrain_vert_pos() into valid and get_vpos" 2017-07-19 17:33:48 +10:00
ChristophTobler eae0522dc2 split into get_terrain_valid and get_terrain_vert_pos 2017-07-17 16:42:42 +02:00
Paul Riseborough f064915889 EKF: Enable planes to recover from bad mag data at start of flight
Adjusts yaw by the amount of the error between GPS and EKF course if innovations are large.
2017-07-08 11:13:40 +02:00
Paul Riseborough eb1e73ec81 Merge pull request #283 from PX4/ekf_matrix_cleanup
EKF matrix typedef cleanup
2017-07-03 21:02:24 +10:00
Daniel Agar c44488fdb8
EKF matrix typedef cleanup 2017-06-19 11:10:01 -04:00
Roman 39983a7d55 range aid: added hysteresis for switching in and out of range aid
- prevents rapid switching
- added innovation consistency check for using range aid

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 3778f0921a ekf: enable range finder to be used for estimating height even if it's not
the primary height source

- moved height control into single function in order to decide which sensor
should be used for estimating height
- under certain conditions allow to use the range finder to estimate height
even if it's not the primary height source
- fixed a bug where the delta time for the baro offset calculation was always
zero
- use methods to set height control flags to reduce code duplication and
to prevent bugs

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman 36bffd2571 ekf: calculate the delta time between consecutive baro measurments
(used for calculating filtered baro offset when primary height source
is not baro)

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman a1e67396f4 ekf: added methods for setting control height flags
Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Paul Riseborough 05c3c46f83 ekf2: changes arising from code review 2017-05-17 08:59:01 +02:00
Paul Riseborough 394dd95cba EKF: Don't do magnetic field estimation without earth frame measurements
Use horizontal acceleration to check if yaw is observable independent of the magnetometer.
Use rotation about the vertical to check if mag raises are observable.
If neither yaw of mag biases are observable, save the magnetic field variances and switch to magnetic yaw fusion.
Use the last learned declination when using magnetic yaw fusion so that the yaw reference remains consistent.
When yaw or biases become observable, reinstate the saved variances and switch back to 3D mag fusion.
2017-05-17 08:59:01 +02:00
Daniel Agar 3919d60f66
ekf2 initialization fixes 2017-04-24 18:56:50 -04:00
Paul Riseborough 465b145929 EKF: Add multi-rotor drag model for wind estimation 2017-04-16 13:07:12 +02:00
Paul Riseborough 2f2ac5be43 EKF: Improve protection against severe IMU accel errors
Use vertical velocity and position innovation failure to detect bad accelerometer data caused by clipping or aliasing which can cause large vertical acceleration errors and loss of height estimation. When bad accel data is detected:

1) Inhibit accelerometer bias learning
2) Force fusion of vertical velocity and height data
3) Increase accelerometer process noise
2017-04-07 08:47:13 +10:00
Paul Riseborough fa07536314 EKF: Prevent rounding errors causing bad conditioned covariance matrix
The previous practice of relying on the off-diagonals being zero caused problems with conditioning of the magnetometer fusion on one flight. By storing the variances when the learning inhibit becomes active and ensuring that the rows and columns in the covariance matrix for the inhibited states are always zero, the observed numerical conditioning error has been eliminated for replay of the problem flight log .
2017-04-06 13:34:37 +10:00
Paul Riseborough 588b27bde7 EKF: inhibit accelerometer bias learning if manoeuvre levels are excessive
This prevents bad scale factors and other errors associated with rapid manoeuvres corrupting the accelerometer bias estimates.
2017-03-10 10:14:06 +01:00
Paul Riseborough 5fb24c3032 EKF: Reduce EKF prediction delta time jitter
Make the target EKF rate an integer multiple of the IMU rate. This slightly increases the average prediction time step for the EKF from just over 10msec to 12msec, but the variation reduces significantly which makes filter tuning more deterministic.
Improve the algorithm used to adjust the collection time criteria to reduce jitter in the correction.
2017-03-10 10:14:06 +01:00
Paul Riseborough 8511754094 EKF - detect and fix badly conditioned accel bias covariance values. 2017-03-10 10:14:06 +01:00
Paul Riseborough 8070691aa4 EKF: Add accessor function for velocity accuracy 2017-02-25 21:17:01 +01:00
Paul Riseborough d6abf3f2e4 EKF: add accessor function for local position accuracy 2017-02-25 21:17:01 +01:00
Paul Riseborough b7d0b3c4d0 EKF: Improve naming of WGS-84 accuracy accessor function 2017-02-25 21:17:01 +01:00
Paul Riseborough d22599b440 EKF: Add reporting of inertial dead-reckoning status 2017-02-25 21:17:01 +01:00
Roman 6480fcc3d5 terrain estimator: fixed computation of filtered time since last range update
- do not use hrt to compute delta time
- limit filter state
- do not use static variables

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Paul Riseborough 6561edb9a5 EKF: Clean up terrain estimation functionality.
This is a functionally equivalent. It moves all of the code for the terrain estimator into a single function call from the main filter update, making it clear that it is independent of the main filter.
2017-02-22 14:12:05 +01:00
devbharat 8004e9fe7e EKF: Make range finder data continuous check more robust
Use a filtered arrival time delta to determine if range data is continuous
2017-02-22 14:12:05 +01:00
Paul Riseborough cf9c8de167 EKF: Add arbitrary pitch offset for range sensor 2017-02-22 14:12:05 +01:00
Daniel Agar 2750961be6 c++11 initialization cleanup (#237) 2017-02-05 13:05:10 -05:00
Paul Riseborough 934890c2df EKF: Add validity flag to ekf origin reporting
Flag is false until the origin has been initialised
2016-12-28 00:56:09 +01:00
CarlOlsson 5205a8198b added function to control when to fuse beta 2016-11-05 12:19:01 +01:00
CarlOlsson 8f6c75bb0b adopted ekf.h 2016-11-05 12:19:01 +01:00