Commit Graph

597 Commits

Author SHA1 Message Date
Randy Mackay a3c658ea01 AP_NavEKF3: remove unused EK3_GSF_DELAY param 2021-08-14 10:44:08 +09:00
Randy Mackay 3c5bd942a6 AP_NavEKF3: skip GSF reset count check if source actively changed
also only fail all compass on emergency reset
2021-08-14 10:44:08 +09:00
Andrew Tridgell c00fa705b7 AP_NavEKF3: fixed output LLH to account for IMU offset
thanks to Paul and Randy
2021-08-14 10:44:08 +09:00
Paul Riseborough b2c24a0b58 AP_NavEKF3: Revert IMU and wind speed process noise parameter defaults
These give noisier state estimates, but are more robust to rapid changes in IMU biases.
TODO implement a means of using the modified parameters when there are more than one EKF instance running with IMU's that are sampling at a higher rate.
2021-07-22 19:07:36 +09:00
Paul Riseborough 762529a987 AP_NavEKF3: retune wind process noise for better airspeed fault detection 2021-07-22 19:07:36 +09:00
Paul Riseborough dd9cc70ad4 AP_NavEKF3: Fix bug preventing copter wind estimation at low speed
Also re-tunes process noise default for smoother wind velocity state estimates.
2021-07-22 19:07:36 +09:00
Paul Riseborough 84693ea3c4 AP_NavEKF3: Revert EK3_BETA_MASK parameter extension
These are not required due to use of bit 7 in FLIGHT_OPTIONS to achieve the same function.
2021-07-22 19:07:36 +09:00
Paul Riseborough d841615710 AP_NavEKF3: Rework non-airspeed wind estimation
Faster wind estimation when not using airspeed with acceptable noise in wind velocity estimates.
2021-07-22 19:07:36 +09:00
Paul Riseborough 1812d8ea3a AP_NAvEKF3: use #define value for bad IMU hold time 2021-07-22 19:07:36 +09:00
Paul Riseborough 6d6699f9f9 AP_NavEKF3: Increase lower state variance limit when vibration affected
This makes state corrections from GPS and baro observations more aggressive
2021-07-22 19:07:36 +09:00
Paul Riseborough 7abecb4e0e AP_NavEKF3: Use sensor variance when checking for bad IMU 2021-07-22 19:07:36 +09:00
Paul Riseborough 1cc7dc59a1 AP_NavEKF3: Make bad IMU status more persistent 2021-07-22 19:07:36 +09:00
Paul Riseborough 662bda1bbd AP_NavEKF3: Add accessor function for vibration affected status 2021-07-22 19:07:36 +09:00
Paul Riseborough f37caffb31 AP_NavEKF3: Don't update accel bias states if vibration affected 2021-07-22 19:07:36 +09:00
Paul Riseborough 36ead940d6 AP_NavEKF3: Use large accel process noise when IMU data is bad 2021-07-22 19:07:36 +09:00
Paul Riseborough 82ed96a927 AP_NavEKF3: Adjust gyro bias process noise tuning
NEw value is a compromise between roll/pitch angle and horizontal state velocity estimation errors and the noise in the gyro bias estimate
2021-07-22 19:07:36 +09:00
Paul Riseborough 3714c1b2e2 AP_NavEKF3: Allow smaller dvel bias state variances for improved tuning 2021-07-22 19:07:36 +09:00
Paul Riseborough a24df9d633 AP_NavEKF3: Retune IMU process noise
Required to achieve equivalent fusion noise and weighting on IMU vs other sources to previous param defaults with the old covariance prediction equations.
2021-07-22 19:07:36 +09:00
Paul Riseborough 5a3e0e7f17 AP_NavEKF3: Make gyro bias learning less noisy 2021-07-22 19:07:36 +09:00
Paul Riseborough 827d871c85 AP_NavEKF3: Fix bug preventing learning of XY IMU dvel bias in flight 2021-07-22 19:07:36 +09:00
Paul Riseborough aa13e86ac9 AP_NavEKF3: Change powf(x,2) to sq(x) 2021-07-22 19:07:36 +09:00
Paul Riseborough cb6371e952 AP_NavEKF3: Update covariance prediction equations 2021-07-22 19:07:36 +09:00
Paul Riseborough 4f8f187b81 AP_NavEKF3: Use alternate form for quaternion to rotmat equations in derivation 2021-07-22 19:07:36 +09:00
Randy Mackay e139bfa1b8 AP_NavEKF3: EK3_RNG_USE_HGT param references EK3_SRCx_POSZ 2021-07-22 19:07:36 +09:00
Peter Barker c4dbbfcc07 AP_NavEKF3: pass NavEKF failures back up to callers 2021-07-22 19:07:36 +09:00
Andrew Tridgell aadf179286 AP_NavEKF3: process GPS yaw independently of GPS fix
this processes GPS yaw with its own timestamp and as a separated step
from fusing position and velocity. This makes the yaw time handling
more accurate as yaw for moving baseline GPS comes in as a separate
piece of data from the position and velocity
2021-07-22 19:07:36 +09:00
Andrew Tridgell 93e1bd0160 AP_NavEKF3: fixed indentation in readGpsData() 2021-07-22 19:07:36 +09:00
Andrew Tridgell 9acb16acca AP_NavEKF3: implement moving origin
this shifts EKF_origin to the current location at 1Hz, while leaving
public_origin alone. All output APIs and logging are relative to
public_origin.

The effect of this change is to remove the distortion caused by a
spherical earth, which allows the EKF to operate without errors at
very long distances from the public_origin.
2021-07-22 19:07:36 +09:00
Andrew Tridgell 3df7c1a7c7 AP_NavEKF3: moved checkUpdateEarthField to be called less often 2021-07-22 19:07:36 +09:00
Andrew Tridgell 5543706626 AP_NavEKF3: update earth field at 1Hz
this prevents large mag errors on long distance flights
2021-07-22 19:07:36 +09:00
Andrew Tridgell 87b4ca47e8 AP_NavEKF3: convert code_gen.py to ftype 2021-07-22 19:07:36 +09:00
Andrew Tridgell 7bb971f07d AP_NavEKF3: convert powF(xx,2) calls to sq(xx) 2021-07-22 19:07:36 +09:00
Andrew Tridgell 395d2f1f7e AP_NavEKF3: convert EKF3 derivation to ftype 2021-07-22 19:07:36 +09:00
Andrew Tridgell 4f0f4608b9 AP_NavEKF3: allow for double EKF build 2021-07-22 19:07:36 +09:00
Paul Riseborough 1281033931 AP_NavEKF3: Remove unused class variable rngBcnTimeout 2021-06-23 13:26:02 +09:00
Paul Riseborough 9d85a4292e AP_NavEKF3: Ensure postion timeout flag and timer is always reset 2021-06-23 13:26:02 +09:00
Paul Riseborough de3c6d6e5c AP_NavEKF3: Fade each vert vel variance clip count over 1 second 2021-06-23 13:26:02 +09:00
Paul Riseborough ac92182153 AP_NavEKF3: Clean up initialisation of boolean array 2021-06-23 13:26:02 +09:00
Paul Riseborough b0763f04f1 AP_NavEKF3: Remove unwanted line 2021-06-23 13:26:02 +09:00
Paul Riseborough b7aad13cc8 AP_NavEKF3: Protect against collapse of velocity and position variances 2021-06-23 13:26:02 +09:00
Paul Riseborough 36160ba9ce AP_NavEKF3: Fix bug preventing horizontal position reset if badIMUdata 2021-06-23 13:26:02 +09:00
Paul Riseborough 5d00b7d042 AP_NavEKF3: Fix bug preventing height reset if badIMUdata 2021-06-23 13:26:02 +09:00
Paul Riseborough e4eb8339d0 AP_NavEKF3: Fix bug preventing velocity reset if badIMUdata 2021-06-23 13:26:02 +09:00
Josh Henderson 64dc3bbe41 AP_NavEKF3: Fix #17789 core's ekf origin altitude different if flying 2021-06-22 12:01:10 +10:00
Josh Henderson 0ae3730f11 AP_NavEKF3: non_GPS modes ensure EKF origin set only once and stays in sync
ekf3
2021-06-22 12:01:10 +10:00
Peter Barker d6348a0786 AP_NavEKF3: remove getBodyFrameOdomDebug
Not used after we moved logging to be within AP_NavEKF3
2021-06-07 09:28:52 +10:00
Peter Barker dd3ab29b2f AP_NavEKF3: remove getFilterGpsStatus
Not needed after we moved logging into NavEKF3
2021-06-07 09:25:53 +10:00
Siddharth Purohit cd5b764fd8 AP_NavEKF3: use first usable compass index to set magSelectIndex 2021-06-02 17:10:19 +10:00
Paul Riseborough a5a25411da AP_NavEKF3: Remove unnecessary baro limiting 2021-06-02 11:13:16 +09:00
Paul Riseborough 124f016e5b AP_NavEKF3: Use parameter to set baro ground effect dead-zone 2021-06-02 11:13:16 +09:00