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
Andrew Tridgell
853271dd37
Replay: moved replay tool into Tools/Replay
2014-03-01 14:30:55 +11:00
Andrew Tridgell
295cd9adba
AP_NavEKF: give a sensible error for no such file on replay
2014-03-01 14:24:51 +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
Andrew Tridgell
8b59e564ba
AP_NavEKF: improved replay timing
2014-02-27 08:11:04 +11:00
Andrew Tridgell
66f238c0da
AP_NavEKF: support 400Hz replay from 50Hz logs
2014-02-26 19:34:01 +11:00
Andrew Tridgell
63874dfffd
AP_NavEKF: set fix type in GPS replay
2014-02-25 21:10:49 +11:00
Andrew Tridgell
09cce5d24e
AP_NavEKF: fixed replay with current copter logs
2014-02-25 20:56:53 +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
Paul Riseborough
89e0b48320
AP_NavEKF : Bug fix for height drift due to timer wrap-around
2014-02-23 19:50:35 +11:00
Paul Riseborough
939a32a7bb
AP_NavEKF : Improved stability of Z accel bias
2014-02-23 19:50:34 +11:00
Andrew Tridgell
ffbd655ba0
AP_NavEKF: support dual sensors in log replay, and fix flight altitude
2014-02-23 08:17:55 +11:00
Andrew Tridgell
707cc2b532
AP_NavEKF: allow log filename to be specified in replay
2014-02-23 08:17:01 +11:00
Andrew Tridgell
4e56196655
AP_NavEKF: allow states to be accessed using names as well as a Vector22
2014-02-21 20:24:47 +11:00
Andrew Tridgell
20b0444c15
AP_NavEKF: remove sleep on init of EKF
...
this prevents HIL from locking up, and also prevents a possible 1s
delay in flight on EKF init
2014-02-19 22:04:12 +11:00
Andrew Tridgell
c9d0c1face
AP_NavEKF: use ahrs->get_armed() for static mode demanded
2014-02-19 10:52:57 +11:00
Andrew Tridgell
536160a3fb
AP_NavEKF: use AHRS get_correct_centrifugal()
2014-02-19 10:28:45 +11:00
Andrew Tridgell
869e41fd03
AP_NavEKF: fixed detection of airspeed sensor
...
the get_airspeed() AHRS call can change as the user enables/disables
the airspeed sensor, plus it only gets enabled after the NavEKF
constructor runs.
2014-02-19 09:22:45 +11:00
Paul Riseborough
1ade39977a
AP_NavEKF : covariance prediction cleanup
2014-02-19 09:22:45 +11:00
Paul Riseborough
8daca145d0
AP_NavEKF : useAirspeed set automatically
2014-02-19 09:22:45 +11:00
Paul Riseborough
6fbada26d3
AP_NavEKF : Improvements to staticMode robustness
2014-02-19 09:22:45 +11:00
Andrew Tridgell
5bf170c440
AP_NavEKF: fixed log replay code
...
also added BARO and ARSP messages
2014-02-18 09:25:07 +11:00
Paul Riseborough
7a82746fcc
AP_NavEKF : fixed bug in pos and vel reset when in static mode
2014-02-16 22:35:19 +11:00
Paul Riseborough
275ef86f86
AP_NavEKF : Position and Velocity reset bugfix
2014-02-16 21:05:37 +11:00
Paul Riseborough
b22dc706b2
AP_NavEKF : staticMode bugfix and robustness improvements
2014-02-16 21:04:55 +11:00
Paul Riseborough
2926602718
AP_NavEKF : Cleaned up InitialiseFilterDynamic
2014-02-16 21:04:51 +11:00
Paul Riseborough
404fbafe26
AP_NavEKF : Changed timout behaviour to only reset PosVel states
2014-02-16 21:04:46 +11:00
Andrew Tridgell
24e1070eb2
AP_NavEKF: initialise quaternion from rotation matrix
2014-02-15 12:21:11 +11:00
Andrew Tridgell
c6b24c521b
AP_NavEKF: force healthy false when initialising
...
this prevents us feeding off our own values when booting
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2014-02-15 09:25:40 +11:00
Andrew Tridgell
8201f9c928
AP_NavEKF: don't build example
2014-02-15 06:40:06 +11:00
Andrew Tridgell
a7a44a9a5c
AP_NavEKF: fixed init order warning
2014-02-15 05:48:24 +11:00
Paul Riseborough
b56c8211c9
AP_NavEKF: Reduced number of Mavlink tuneable parameters
2014-02-15 05:48:23 +11:00
Paul Riseborough
c20fac1269
AP_NavEKF: Updated comments for private functions
2014-02-15 05:48:23 +11:00
Paul Riseborough
deb64c4cbd
AP_NavEKF: Pos Vel reset after long GPS timeout
2014-02-15 05:48:23 +11:00
Paul Riseborough
7ac0172db1
AP_NavEKF: removed repeated intialisation
2014-02-15 05:48:23 +11:00
Paul Riseborough
28fb5e364b
AP_NavEKF: Fixed bug in pos/vel/hgt reset on timout
2014-02-15 05:48:23 +11:00
Paul Riseborough
f74cce8b4e
AP_NavEKF : Removed double to float conversions
2014-02-15 05:48:23 +11:00
Paul Riseborough
80f6dba694
AP_NavEKF: Improved control of fusion update intervals
2014-02-15 05:48:23 +11:00
Paul Riseborough
13b9daeff5
AP_NavEKF: Added constraints to Mavlink tuneable parameters
2014-02-15 05:48:23 +11:00
Paul Riseborough
b123e1bb16
AP_NavEKF: Improved in-air reset behaviour
2014-02-15 05:48:22 +11:00
Paul Riseborough
1651980b9f
AP_NavEKF: Improved behaviour following loss and regaining of GPS
2014-02-15 05:48:22 +11:00
Paul Riseborough
14eb63e7c9
AP_NavEKF: Made most tuning parameters Mavlink adustable
2014-02-15 05:48:22 +11:00
Andrew Tridgell
f800f5592d
AP_NavEKF: fixup parameter handling
2014-02-15 05:48:22 +11:00
Paul Riseborough
f0f76920fa
AP_NavEKF : Mavlink tunable parameter - first attempt
2014-02-15 05:48:22 +11:00
Paul Riseborough
128f71157d
AP_NavEKF: Fixed bug in pre GPS fix updates
2014-02-15 05:48:22 +11:00
Paul Riseborough
357743ee2d
AP_NavEKF: Adjusted tuning parameters for plane use
2014-02-15 05:48:22 +11:00
Paul Riseborough
b4171853b1
AP_NavEKF: allow initialisation before GPS lock to aid indoor testing
2014-02-15 05:48:21 +11:00
Paul Riseborough
7fb60812c2
AP_NavEKF: Added pitch and roll inertial sensor to body trim adjustment
2014-02-15 05:48:21 +11:00
Paul Riseborough
9d375da550
AP_NavEKF: changed sqrt to sqrtf
2014-02-15 05:48:21 +11:00
Paul Riseborough
1f0b4b02d0
AP_NavEKF: fixed merge error that inverted static mode
2014-02-15 05:48:21 +11:00
Paul Riseborough
401e3aee43
AP_NavEKF : Changes to test harness to support accel bias states
2014-02-15 05:48:21 +11:00
Paul Riseborough
5219869389
AP_NavEKF : Added Z accel bias state and bootstrap initialisation method
2014-02-15 05:48:21 +11:00
Randy Mackay
301a04b74a
AP_NavEKF: update params for copter
2014-02-15 05:48:21 +11:00