Commit Graph

402 Commits

Author SHA1 Message Date
Paul Riseborough 3cdf56e57c Merge pull request #122 from CarlOlsson/airspeed_fix
fixed_airspeed_healthy_bug
2016-05-09 10:24:22 +10:00
Paul Riseborough e06c0f41d7 Merge pull request #117 from PX4/ekf2AccuracyImprovement
EKF: Accuracy Improvements
2016-05-09 09:24:44 +10:00
CarlOlsson ee7d7aeb8a fixed_airspeed_healthy_bug 2016-05-08 18:30:37 +02:00
Paul Riseborough 175723f690 EKF: Allow for larger accel bias offsets on startup 2016-05-08 18:03:58 +10:00
Paul Riseborough 161ac2e051 EKF: ensure position co-variances are reset
When transitioning into optical flow nav  from a non-aiding condition during ground operation, ensure position covariances are reset as they could be invalid.
2016-05-08 18:03:09 +10:00
Paul Riseborough feb4db6347 EKF: protect against large IMU errors during initial tilt alignment
Turn off innovation consistency checks for height and synthetic position measurements until the tilt as aligned
2016-05-08 17:54:45 +10:00
Paul Riseborough 00973d6215 EKF: fix pos/vel fusion innovation variance bug 2016-05-08 17:51:47 +10:00
Paul Riseborough 2144a40a3c EKF: redefine accelerometer bias state inhibit switch bit location 2016-05-08 16:03:21 +10:00
Paul Riseborough 724280fd1f EKF: move calculation of optical flow observation variance into a function
Allows it to be used when calculating initial state variance
2016-05-08 15:40:06 +10:00
Paul Riseborough 25682dce91 EKF: Prevent badly conditioned covariance calculation when starting or resetting to optical flow 2016-05-08 10:30:40 +10:00
Paul Riseborough c66ed7b662 EKF: Add interface method for filter fault status 2016-05-07 21:18:00 +10:00
Paul Riseborough 020b87933e EKF: replace fault status struct with a union to facilitate logging 2016-05-07 21:11:16 +10:00
Paul Riseborough 7f5669fb2d EKF: consolidate covariance corrections
Combines the forced symmetry, variance limiting and zeroing of covariances for unwanted states in the one function.
This ensures a consistent correction is applied after every covariance prediction or correction.
2016-05-07 20:29:50 +10:00
Paul Riseborough 0c6a367e1b EKF: fix Travis build error 2016-05-07 17:45:49 +10:00
Paul Riseborough 22f0f52bf1 EKF: fix travis build error 2016-05-07 17:06:45 +10:00
Paul Riseborough 9e53ff2f80 EKF: Improve protection against bad optical flow fusion 2016-05-07 14:23:56 +10:00
Paul Riseborough 1126048a93 EKF: Improve protection against bad airspeed fusion 2016-05-07 14:23:38 +10:00
Paul Riseborough c8d95586e7 EKF: Improve protection against bad magnetometer fusion 2016-05-07 14:23:20 +10:00
Paul Riseborough 310bd97080 EKF: Improve protection against bad pos vel fusion 2016-05-07 14:22:59 +10:00
Paul Riseborough da9d894441 EKF: Improvements to covariance reset 2016-05-07 12:57:41 +10:00
Lorenz Meier 199c423f1f Attitude fw: Remove builtin perf counters 2016-05-05 20:06:01 +02:00
Paul Riseborough d9aeace6ac EKF: tuning update 2016-05-05 21:23:03 +10:00
Paul Riseborough f1b7e7714e EKF: Make average update rate of EKF closer to target
With the EKF, the average update rate is more important than the instantaneous value as it affects tuning. This patch ensures that the EKF prediction cycle will be performed early if the previous one was late in an attempt to maintain the target update rate.
2016-05-05 21:23:03 +10:00
Paul Riseborough 1daa6c7866 EKF: update tuning defaults 2016-05-05 21:23:03 +10:00
Paul Riseborough fc6c0c7ebf EKF: Update covariance prediction
Refresh auto generated code
Make 3-axis accel fusion the default and no accel fusion the option
2016-05-05 21:23:03 +10:00
Paul Riseborough ecaffe63af EKF: update tuning defaults 2016-05-05 21:23:03 +10:00
Paul Riseborough 7a74d58591 EKF: reduce initial accel bias uncertainty 2016-05-05 21:23:03 +10:00
Paul Riseborough a7d08d08fc EKF: Relax tilt alignment check 2016-05-05 21:23:03 +10:00
Paul Riseborough 5523a4f225 EKF: Fix IMU bias compensation scale error in output filter
Delta angle and velocities are calculated assuming data is at the filter update rate, not the IMU update rate
2016-05-05 21:23:03 +10:00
Paul Riseborough fd109b00ab EKF: replace in-line code with existing function 2016-05-05 21:23:03 +10:00
Paul Riseborough 727a43764f EKF: update initial angle alignment check 2016-05-05 21:23:03 +10:00
Paul Riseborough bc34b14779 EKF: Initialise height state variance to a value compatible with the measurement
A large height state variance and small measurement variance can destabilise the filter in the first few seconds after alignment
2016-05-05 21:23:03 +10:00
Paul Riseborough 29a361d3a3 EKF: Use intuitive units for gyro and accel bias process noise
This also makes the tuning less sensitive to changes in the EKF update rate.
2016-05-05 21:23:03 +10:00
Paul Riseborough 799865c934 EKF: update default tuning parameters 2016-05-05 21:23:03 +10:00
Paul Riseborough f01f4ae4b1 EKF: tidy up mag declination fusion 2016-05-05 21:23:03 +10:00
Paul Riseborough 0d31aad33a EKF: Fix bad limit on magnetometer noise parameter 2016-05-05 21:23:03 +10:00
Paul Riseborough 7069fb7a04 EKF: refresh auto code for mag fusion 2016-05-05 21:23:03 +10:00
Paul Riseborough ffea65e1a4 EKF: fix bug in state prediction 2016-05-05 21:23:03 +10:00
Paul Riseborough 63f093a10a EKF: Update upper limits for state variances
This limiting is a  last resort measure and the limiting for normal operation should be achieved by modification in the covariance prediction
2016-05-05 21:23:03 +10:00
Paul Riseborough 26a51c667d EKF: Improve robustness to initial gyro bias errors
Allows for ~6 deg/sec of startup bias
2016-05-05 21:23:03 +10:00
Paul Riseborough 7530e30012 EKF: Improve IMU data collection
Use IMU driver published delta angle integration time to determine when enough data has been accumulated.
Perform basic first order sculling corrections on delta velocity data
Comment steps to make make method clearer
2016-05-05 21:23:03 +10:00
Paul Riseborough f23f0b1035 EKF: fix bugs in stationary process model covariance prediction
Noise variance for stationary states was  being overwritten by the covariance prediction operations for the kinematic states
Unwanted states could end up with non-zero covariance values
The forced symmetry operation was being applied too late to be effective
2016-05-05 21:23:03 +10:00
Paul Riseborough a373ada858 EKF: explicitly define floating point type in hardcoded constants 2016-05-05 21:23:03 +10:00
Paul Riseborough a189c60d33 EKF: update code fragment text files 2016-05-05 21:23:03 +10:00
Paul Riseborough f4e84a2234 EKF: fix axis label error in comments 2016-05-05 21:23:03 +10:00
Paul Riseborough 57d3036ee7 EKF: update derivation files 2016-05-05 21:23:03 +10:00
Paul Riseborough 82da832816 EKF: tidy up Kalman gain calculations
Inhibiting of states is controlled via zeroing rows and columns in the covariance prediction so conditional logic in gain calculations is unnecessary.
2016-05-05 21:23:03 +10:00
Paul Riseborough 311d046a26 EKF: Enable optional activation of XY delta velocity bias estimation 2016-05-05 21:23:03 +10:00
Paul Riseborough 572c2280bd EKF: tidy up covariance prediction 2016-05-05 21:23:03 +10:00
Paul Riseborough 54e713969d EKF: Fix rebase error 2016-05-05 21:23:03 +10:00