Commit Graph

86 Commits

Author SHA1 Message Date
Paul Riseborough e117bedf6a AP_NavEKF2: Adjust output observer tuning
Use more accurate method by default.
Reduce overshoot on quaternion tracking
2016-06-28 14:20:13 +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 262c5fe56d AP_NavEKF2: Make setter loop through all instances
For setters where a success boolean is returned, return false if any instance fails.
2016-06-28 14:20:11 +10:00
Jonathan Challinger 8baf064317 AP_NavEKF2: setTakeoffExpected and setTouchdownExpected loop through instances 2016-06-28 14:20:11 +10:00
Paul Riseborough da0622827d AP_NavEKF: update tuning defaults
Increase speed of scale factor learning
2016-05-27 09:00:40 +10:00
Paul Riseborough 9eef97d108 AP_NavEKF2: use consistent parameter naming
M_NSE is a measurement noise
P_NSE is a observation noise
I_GATE is an innovation gate

This also ensures the new parameter values required to use the EKF2 will be enforced.
2016-05-25 12:06:04 +10:00
Paul Riseborough a3b78e6231 AP_NavEKF2: update tuning defaults 2016-05-21 15:13:51 +10:00
Paul Riseborough 71b589c89c AP_NavEKF2: extend fusion fault reporting coverage 2016-05-21 15:13:50 +10:00
Paul Riseborough 0982bd0b2b AP_NavEKF2: update parameter documentation 2016-05-21 15:13:50 +10:00
Paul Riseborough 46a2993a0d AP_NavEKF: use intuitive units for imu bias process noise parameters 2016-05-21 15:13:50 +10:00
Tom Pittenger d67b1edf10 AP_NavEKF2: (potential) compiler warning of float to double promotion 2016-05-17 20:30:51 -07:00
Ricardo de Almeida Gonzaga 64d14356b9 AP_NavEKF2: Fix typos 2016-05-13 19:20:06 -03: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
Andrew Tridgell b7ba0fa458 AP_NavEKF2: added ad-hoc logging example to EKF2 2016-05-07 18:27:20 +10:00
Andrew Tridgell 223c512188 AP_NavEKF2: added logging of sensor data in EKF2 2016-05-07 18:27:18 +10:00
Andrew Tridgell f92279f436 AP_NavEKF2: allow logging of IMT data from inside EKF2 2016-05-07 18:27:17 +10:00
Jonathan Challinger 97112ccd44 AP_NavEKF2: check mag instance id when returning mag offsets 2016-04-21 09:51:41 +10:00
Paul Riseborough 7e05646316 AP_NavEKF2: Improvements to non-GPS performance
Change to user adjustable fusion of constant position (as per legacy EKF) instead of constant velocity.
Enable user to specify use of 3-axis magnetometer fusion when operating without aiding.
Don't allow gyro scale factor learning without external aiding data as it can be unreliable
2016-02-18 08:53:41 +09:00
Paul Riseborough 287ebe8e6a AP_NavEKF2: Fix bug in application of sensor bias corrections
Sensor bias corrections were being applied to the incoming IMU data using the wrong delta time.
This was what was driving the different tuning between plane and copter for gyro bias process noise so the same gyro bias process noise default tuning value can now be used for all platform types.
Sensor bias corrections were being applied a a second time to the output observer inertial data.
2016-01-13 08:05:39 +11:00
Paul Riseborough 20923da23a AP_NavEKF2: Allow tuning of non-GPS mode
Eliminate the use of horizontal position states during non-aiding operation to make it easier to tune.
Explicitly set the horizontal position associated Kalman gains to zero and the coresponding covariance entries to zero after avery fusion operation.
Make the horizontal velocity observation noise used during non-aiding operation adjustable.
Use a fixed value of velocity noise during initial alignment so that the flight peformance can be tuned without affecting the initial alignment.
2016-01-13 08:05:39 +11:00
Andrew Tridgell c34626ec4e AP_NavEKF2: automatically cut back EK2_IMU_MASK to suit number of IMUs 2016-01-05 16:40:43 +11:00
Andrew Tridgell 0831661b3c AP_NavEKF2: mark EK2_ENABLE as an ENABLE parameter 2016-01-04 11:14:42 +11:00
Don Gagne 8573245963 AP_NavEKF2: fix invalid Range meta data 2015-12-27 16:10:44 +11:00
Siddharth Bharat Purohit b3c8dcee34 AP_NavEKF2: measurement buffer refactor 2015-11-23 19:34:50 +11:00
Paul Riseborough ff2782b790 AP_NavEKF2: Parameter changes to reduce noise on gyro bias estimates 2015-11-18 20:17:03 +09:00
Paul Riseborough 2fb5a4489b AP_NavEKF2: Prevent airspeed faults from causing excessive loss of accuracy 2015-11-18 11:39:54 +11:00
Paul Riseborough fc6978e4d9 AP_NavEKF2: Fix error in parameter documentations 2015-11-18 11:39:54 +11:00
Paul Riseborough f9cadaf15c AP_NavEKF2: Increase resolution of innovation consistency gate parameters
Also adds protection against setting the gate to a number that would casue numerical errors.
2015-11-18 11:39:53 +11:00
Paul Riseborough c9eea98142 AP_NavEKF2: Improve terrain height estimation
The ad-hoc scaling of error growth has been replaced with a consistent method that uses the main nav filters published vertical velocity uncertainty and the terrain gradient assumption.
2015-11-18 11:18:46 +11:00
Paul Riseborough 80bc64ee7a AP_NavEKF2: Update parameter documentation with GPS height source option 2015-11-18 11:18:18 +11:00
Paul Riseborough e8706db382 AP_NavEKF2: Update IMU tuning parameter limits 2015-11-16 09:05:42 +11:00
Paul Riseborough 0562529729 AP_NavEKF2: Tuning changes to make attitude less sensitive to GPS and compass errors 2015-11-16 09:05:42 +11:00
Paul Riseborough 6522fb2621 AP_NavEKF2: Allow user to relax pre-flight GPS checks 2015-11-12 20:39:15 +11:00
Paul Riseborough 0b653bb82b AP_NavEKF2: Update MAVLnk parameter documentation 2015-11-11 15:16:36 +11:00
Paul Riseborough ca31ced2b4 AP_NavEKF2: Fix bug preventing use of optical flow with multiple IMU's 2015-11-10 18:17:16 +11:00
Paul Riseborough 577670ccee AP_NavEKF2: Reduce memory required by 6KB when running at 400Hz
Down-sample the IMU and output observer state data to 100Hz for storage in the buffer.
This reduces storage requirements for Copter by 75% or 6KB
It does not affect memory required by plane which already uses short buffers due to its 50Hz execution rate.
This means that the EKF filter operations operate at a maximum rate of 100Hz.
The output observer continues to operate at 400Hz and coning and sculling corrections are applied during the down-sampling so there is no loss of accuracy.
2015-11-10 15:51:18 +11:00
Paul Riseborough e33aa7898a AP_NavEKF2: Prevent return of uninitialised variable 2015-11-09 22:30:38 +11:00
Paul Riseborough f00b1ff22d AP_NavEKF2: Publish the magnetometer selection index 2015-11-09 22:07:10 +11:00
Paul Riseborough 0b64ad0123 AP_NavEKF2: Enable EKF instance to be specified when requesting public data
Only applied to interfaces required for data logging.
If an invalid instance is requested, the data for the primary instance is returned. This allows the primary data to be returned by calling with a -1 instance value.
2015-11-08 15:37:28 +11:00
Paul Riseborough 2dcaeb0304 AP_NavEKF2: Update publishing of primary core index
Changes made in response to review comments
2015-11-08 15:37:27 +11:00
Paul Riseborough 1858da8307 AP_NavEKF2: Better switching in response to faults
Make selection sticky
If fault detected or unhealthy, then switch to healthy core with lowest fault score.
If no healthy core found, do not switch.
2015-11-08 15:37:27 +11:00
Paul Riseborough b24507d33c AP_NavEKF2: Publish the primary EKF index 2015-11-08 15:37:27 +11:00
Paul Riseborough 49f9ea317c AP_NavEKF: Update console message and param descriptions for multiple EKF's 2015-11-08 15:37:26 +11:00
Paul Riseborough 2340e18fdc AP_NavEKF2: Offset the fusion time horizon between multiple instances
Prevents frame over-runs due to simultaneous fusion of measurements on each instance.
The offset is only applied if less than 5msec available between frames
2015-11-08 15:37:26 +11:00
Andrew Tridgell d52279af27 AP_NavEKF2: don't try to allocate last bytes of memory to EKF2 2015-11-06 10:42:58 +11:00
Andrew Tridgell ee78e2d618 AP_NavEKF2: set primary to first healthy core 2015-11-06 10:42:58 +11:00
Andrew Tridgell 2ab2afc86a AP_NavEKF2: added EK2_IMU_MASK for multiple IMUs
no voting between multiple IMUs yet
2015-11-06 10:42:58 +11:00