Commit Graph

158 Commits

Author SHA1 Message Date
priseborough
d25883f712 AP_NavEKF : Limit rate of Z accel bias adaptation
Aliasing can causes the bias estimate to fluctuate very rapidly as it tries
to keep up, which degrades the benefit of switching between
accelerometers to avoid aliasing.

This patch give a much more stable bias estimate during aliasing, and
allows the bias to adapt at a maximum rate of 1.0 m/s2 in 50 seconds
2014-04-04 21:01:18 +11:00
priseborough
36b3cbc365 AP_NavEKF : Relax aliasing check limits
This reduces the chance of noisy data inhibiting GPS glitch protection
2014-04-04 21:01:15 +11:00
priseborough
0ae736c3a0 AP_NavEKF : clean up convoluted logic used in sensor health checks
This doesn't change the behavior, but does make the code easier to
understand
2014-04-04 21:01:13 +11:00
Andrew Tridgell
cd3038fabd AP_NavEKF: fixed return of offset in getVariances() 2014-04-03 07:49:06 +11:00
Andrew Tridgell
a7f213a5c5 AP_NavEKF: use pythagorous2() 2014-04-01 22:13:03 +11:00
priseborough
04036d7777 AP_NavEKF : Updated GPS glitch protection logic
This adds new functionality to the detection and compensation of GPS
glitches:

1) A maximum allowable innovation is calculated using the GPS noise
parameter multiplied by the gate, with an additional component allowing
for growth in position uncertainty due to acceleration error since
the last valid measurement
2) Includes per vehicle type values for the acceleration error limit
3) If the innovation length exceeds the maximum allowable, no fusion occurs
4) If no fusion has occurred for long enough such that the position uncertainty
exceeds the maximum set by a per vehicle parameter or a maximum time, an offset
is applied to the GPS data to so that it matches the value predicted by the filter
5) The offset is never allowed to be bigger than 100m
6) The offset is decayed to zero at a rate of 1.0 m/s to allow GPS jumps to
be accommodated gradually
7) The default velocity innovation gate has been tightened up for copter and rover
8) The variance data logging output has been updated to make it more useful
2014-04-01 21:22:14 +11:00
Andrew Tridgell
5a2e84e792 AP_NavEKF: changes for new GPS API 2014-04-01 06:38:24 +11:00
priseborough
9c5f564dc5 AP_NavEKF : Fixes bug in initial earth magnetic field states
The calculation for these states was not being bias corrected
2014-03-30 07:43:52 +11:00
priseborough
e1819bb53a AP_NavEKF : Add initial parameter defaults for Copter, Rover and Plane 2014-03-29 14:06:43 +11:00
priseborough
55c60b8f07 AP_NavEKF : Reduce Magnetometer innovation consistency check threshold 2014-03-26 21:29:47 +11:00
priseborough
45b1a2fa46 AP_NavEKF : Reduce GPS position innovation consistency fail threshold
This patch reduces the maximum acceptable GPS jump from approximately 16 to 8 metres
This will provide copters with more protection for close in loiter situations
2014-03-26 21:29:45 +11:00
Andrew Tridgell
bafc664750 AP_NavEKF: use APM_BUILD_TYPE() macro 2014-03-26 12:42:11 +11:00
Andrew Tridgell
e3792f9b26 AP_NavEKF: added a mechanism for per-vehicle-type defaults in EKF 2014-03-26 12:30:17 +11:00
priseborough
17cdac7bc8 AP_NavEKF : Clean up angle and mag field initialisation
This path reduces duplicated code, eliminates unused variables and
causes the earth magnetic field states to be reset when exiting static mode
which will occur every time copter is armed. This enables copters to be
powered on and initialised inside vehicles or houses, without bad earth
field values affecting flight.
2014-03-24 19:54:48 +11:00
priseborough
7ae86b3979 AP_NavEKF : Track baro height observations pre-arm
This prevents copter from failing the pre-arm height discrepancy test
2014-03-23 18:25:50 +11:00
priseborough
7780d55788 AP_NavEKF : Prevent large magnetic field adaptations early in flight 2014-03-22 19:55:26 +11:00
Paul Riseborough
f7007569d1 AP_NavEKF : Fix bug that limits copter sensor delay compensation to 125
msec
2014-03-21 21:52:20 +11:00
Paul Riseborough
b2c0979947 AP_NavEKF : Fixes bug that causes accel bias to diverge in static mode, preventing copter arming 2014-03-21 21:49:50 +11:00
Paul Riseborough
8a2d16d13d AP_NavEKF : modifed Zaccel bias noise parameter to prevent unstable bias estimate 2014-03-20 08:50:00 +11:00
Paul Riseborough
dacba5d911 AP_NavEKF : Update default tuning parameters (for plane use) 2014-03-14 06:07:58 +11:00
Paul Riseborough
d0828d9c15 AP_NavEKF : Prevent bad user parameter causing incorrect GPS fusion 2014-03-14 06:07:58 +11:00
Paul Riseborough
a24bfc1b8a AP_NavEKF : Use synthetic sideslip fusion during GPS denied operation with airspeed 2014-03-14 06:07:57 +11:00
Paul Riseborough
35811758d7 AP_NavEKF : Update comments and remove un-used function declarations 2014-03-14 06:07:57 +11:00
Paul Riseborough
784034170d AP_NavEKF : increased useage of helper functions 2014-03-10 21:54:03 +11:00
Paul Riseborough
7b3130cfcc AP_NaVEKF : Enable operation without airspeed and compass 2014-03-10 21:53:09 +11:00
Paul Riseborough
3a5acb9cea AP_NavEKF : improved on-ground, in-air check and GPS yaw alignment 2014-03-10 14:07:34 +11:00
Paul Riseborough
b47a11edf6 AP_NavEKF : improved static and on-ground mode selection logic 2014-03-10 04:39:59 +11:00
Paul Riseborough
15a44571c2 AP_NavEKF : enable operation without a compass for planes 2014-03-09 20:01:45 +11:00
Paul Riseborough
2019708056 AP_NavEKF : Make all compass use autodetect 2014-03-09 19:59:19 +11:00
Paul Riseborough
e485b246e7 AP_NavEKF : update comments 2014-03-09 19:59:18 +11:00
Paul Riseborough
c8bd415b00 AP_NavEKF : Add sideslip constraint to allow plane flight without magnetometer 2014-03-09 19:59:17 +11:00
Paul Riseborough
52fabc822f AP_NavEKF : Add low speed magnetometer calibration option 2014-03-09 19:59:16 +11:00
priseborough
6ace31b6c1 AP_NavEKF : Fix bug that leaves height unconstrained in static mode 2014-03-09 19:27:21 +11:00
Paul Riseborough
94ff7522fc AP_NavEKF : Fix bug in initial East mag field state variance 2014-03-08 07:44:34 +11:00
Andrew Tridgell
449d09051e AP_NavEKF: cope with compass going offline while in flight 2014-03-02 14:32:10 +11:00
Andrew Tridgell
77f91e6250 AP_NavEKF: don't assume the number of gyros == number of accels 2014-03-02 13:53:19 +11:00
Paul Riseborough
ebb3cc3348 AP_NavEKF : Use average of dual IMU gyro data when available 2014-03-02 13:28:44 +11:00
Paul Riseborough
a39d00fc13 AP_NavEKF : Fix bug that prevents Zacc bias state variance being updated 2014-03-02 13:27:22 +11:00
Paul Riseborough
573b3210dd AP_NavEKF : Add div0 protection to the IMU1_weighting calc 2014-03-02 08:10:06 +11:00
Paul Riseborough
bd152d332c AP_NavEKF : Add accel aliasing protection 2014-03-02 08:10:04 +11:00
Paul Riseborough
854f013146 AP_NavEKF : Fixes zero compass offsets on initialisation 2014-02-28 19:43:12 +11:00
Andrew Tridgell
736201689b AP_NavEKF: only use the active accel from DCM if fly_forward is set 2014-02-27 17:40:13 +11:00
Paul Riseborough
62eff63267 AP_NavEKF : Increase the tuning range for magnetometer measurement noise 2014-02-27 17:20:38 +11:00
Andrew Tridgell
a9e683dada AP_NavEKF: use the accelerometer chosen by DCM for each step 2014-02-27 09:41:48 +11:00
Paul Riseborough
78a1cac560 AP_NavEKF : Improved heading and magnetic field state initialisation 2014-02-27 08:12:10 +11:00
Paul Riseborough
d83b382e59 AP_NavEKF : Fix variance constraint bug
Constraining variances to a minimum value of 1e-9 was causing problems
with gyro bias and angular accuracy in noisy GPS environments.
Because the constraint is applied after every covariance prediction
and correction, a lower value of 0 is more appropriate.
2014-02-27 08:12:03 +11:00
Paul Riseborough
72a91ccbca AP_NavEKF : Prevents aliasing triggering innovation consistency check failures 2014-02-25 15:55:44 +11:00
Paul Riseborough
5db9a87d31 AP_NavEKF : fixed bug in velocity rate of change filter
This bug meant the velocity rate of change used to scale the GPS measurement variances was noisy and too small
2014-02-23 19:50:37 +11:00
Paul Riseborough
01c84c3f47 AP_NavEKF : fixed bug in height limit range 2014-02-23 19:50:36 +11:00
Paul Riseborough
36d619ec3a AP_NavEKF : Changed default IMU bias process noise to use smallest value 2014-02-23 19:50:36 +11:00