Paul Riseborough
69d4bd2481
AP_NavEKF: Protect against baro data errors in constant position mode
...
Large baro data errors when flying without GPS could cause total failure of the EKF.
This patch provides protection against this happening in-flight but allows for large innovations during preflight alignment.
2015-11-02 17:46:55 +09:00
Paul Riseborough
778b1c3e18
AP_NavEKF: Remove dead code for constant velocity mode
2015-11-02 17:46:54 +09:00
Paul Riseborough
fb8e01a73c
AP_NavEKF: Do not automatically accept DCM alignment data after 30 seconds
...
A looser check is applied at 30 seconds rather than no check.
2015-11-02 17:46:53 +09:00
Paul Riseborough
be11e12f81
AP_NavEKF: Improve height reset during climbs and descents
...
Resets the vertical velocity to the GPS when the height is reset is the GPS is healthy
2015-11-02 17:46:53 +09:00
Paul Riseborough
59df23bc0f
AP_NavEKF: Reduce EKF health pre-arm check false positives
2015-11-02 17:46:52 +09:00
Paul Riseborough
a1e32d71ec
AP_NavEKF: Prevent large rotation rates corrupting the in-flight mag reset
2015-10-30 15:34:14 +09:00
Lucas De Marchi
831d8acca5
Remove use of PROGMEM
...
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Randy Mackay
3f29365cae
AP_NavEKF: constify getLastPosNorthEastReset
2015-10-30 12:24:15 +09:00
Randy Mackay
758c5a7d7f
AP_NavEKF: constify getLastYawResetAngle
2015-10-30 12:24:11 +09:00
Paul Riseborough
7c40448bab
AP_NavEKF: Remove GPS glitch offset logic
...
The correction for offsets due to position and velocity resets will now be handled in the control loops.
2015-10-30 12:24:01 +09:00
Paul Riseborough
5489ff9118
AP_NavEKF: publish position and velocity state reset data
...
Used by the control loops to compensate for steps in velocity and/or position resulting from state resets.
2015-10-30 12:24:00 +09:00
Paul Riseborough
44f42fe72d
AP_NavEK: Reduce settling time after start-up disturbance
...
Now that we are using a consistent 50Hz minimum update rate for the covariance prediction we do not need a different initial gyro bias uncertainty for plane and copter to maintain filter stability margins.
The default value of 0.1 rad/s was too high and gave excessive settling time of the filter attitude after startup.
The initial attitude uncertainty has been increased to allow for some movement during startup.
2015-10-22 16:23:14 +11:00
Paul Riseborough
6c017ffcb5
AP_NavEKF: Predict covariance more often to prevent instability on startup
...
If the baro data and magnetometer data are interleaved (arriving every 100 msec and offset by 50 msec), then the filter will go unstable during startup and fail to complete checks.
2015-10-22 09:57:38 +09:00
Andrew Tridgell
f66966ccae
NavEKF: use new perf counter API
2015-10-20 18:16:15 +11:00
Paul Riseborough
240ea92947
AP_NavEKF: Re-center gyro bias limits on arming
...
Allows the gyro bias to vary by up to +-10 deg/second before and after arming.
2015-10-20 15:21:39 +11:00
Paul Riseborough
8515dda727
AP_NavEKF: Fix bug in vertical position derivative calculation
2015-10-20 15:21:39 +11:00
Paul Riseborough
6b3e114cd6
AP_NavEKF: Enable EKF1 to be disabled to reduce frame over-runs
2015-10-20 15:21:39 +11:00
Paul Riseborough
840f307d58
AP_NavEKF: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
dab658f6ed
AP_NavEKF: Add methods to output and calculate vertical position derivative
2015-10-20 15:21:36 +11:00
Andrew Tridgell
f5b5a3b0f8
AP_NavEKF: added EKF_DISABLE_INTERRUPTS
...
this helps with performance tuning
2015-10-20 14:37:41 +11:00
Andrew Tridgell
10fddf4c7e
AP_NavEKF: enable optimisation level 3 for the EKF
2015-10-20 14:36:56 +11:00
Andrew Tridgell
6f36267a66
AP_NavEKF: fixed EKF error message during 10 second warmup
2015-10-16 14:58:46 +11:00
Gustavo Jose de Sousa
afccf615d5
AP_NavEKF: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:03 +09:00
Paul Riseborough
3479a0e209
AP_NavEKF: Prevent blocking of synthetic position fusion
...
Fixes a potential error where changes to timing and arrival rate of magnetometer and baro data could block the fusion of synthetic position and velocity measurements, allowing unrestrained tilt errors during operation without GPS or optical flow.
Fusion of synthetic position or velocity measurements is now timed to coincide with fusion of barometer observations.
If a new barometer observation has not arrived after 200 msec then the synthetic position or velocity is fused anyway so that fusion of synthetic position or velocity observations cannot occur any slower than 5 Hz
2015-10-13 14:05:36 +09:00
Paul Riseborough
a895b16fa6
AP_NavEKF: Prevent GPS glitch activating EKF failsafe
2015-10-12 16:29:21 +09:00
Paul Riseborough
f451a81ef9
AP_NavEKF: Add missing GPs check report
2015-10-10 21:22:49 +09:00
Paul Riseborough
a3a1dabb94
AP_NavEKF: Update GPS check description and default setting
...
Previous check default only checked the number of satellites and horizontal position accuracy.
Updated default value also checks HDoP and speed accuracy.
2015-10-10 21:21:25 +09:00
Paul Riseborough
ef5049862a
AP_NavEKF: Add fix status to GPS check report message
2015-10-10 14:49:05 +09:00
Paul Riseborough
5177746c00
AP_NavEKF: Add reporting of GPS check status
2015-10-10 14:49:01 +09:00
Paul Riseborough
2b0434f089
AP_NavEKF: Improved detection of GPS glitch behaviour
2015-10-08 15:09:45 +09:00
Paul Riseborough
d48d4ac950
AP_NavEKF: Add GPS glitching monitor to EKF status report
2015-10-08 15:09:43 +09:00
Paul Riseborough
8a9d9c04c5
AP_NavEKF: Add public function to declare GPS glitch
2015-10-08 15:09:40 +09:00
Paul Riseborough
21e4910149
AP_NavEKF: Allow user to select preflight GPS checks
2015-10-08 15:09:37 +09:00
Paul Riseborough
cdae84aec1
AP_NavEKF: Additional pre-arm GPS quality checks
2015-10-08 15:09:34 +09:00
Paul Riseborough
8a66c9c2ed
AP_NavEKF: Critical Bugfix
2015-10-08 10:54:34 +09:00
Randy Mackay
b5c49e0792
AP_NavEKF: minor comment fix
...
No functional change
2015-09-24 16:57:36 +09:00
Jonathan Challinger
51fb13a329
AP_NavEKF: fix getLastYawResetAngle to return yaw reset system time
2015-09-24 16:57:33 +09:00
Paul Riseborough
02408861a1
AP_NavEKF: Remove unused function
2015-09-24 12:58:43 +10:00
Tom Pittenger
e2fde36ec6
AP_NavEKF: index out of range due to incorrect assignment
2015-09-22 11:41:51 +09:00
Paul Riseborough
5c32bb8858
AP_NavEKF: Add pre-flight check for gyro quality
2015-09-21 17:06:31 +09:00
Paul Riseborough
8cfde42e15
AP_NavEKF: Ensure bad mag data cannot cause the heading to reset too often
2015-09-16 15:13:37 +09:00
Paul Riseborough
930f730612
AP_NavEKF: Reset mag and heading states to try and pass pre-flight checks
2015-09-16 15:13:36 +09:00
Staroselskii Georgii
b5b6d767bd
AP_NavEKF: make EKF use milligauss
2015-09-09 10:38:16 +10:00
Andrew Tridgell
0ca534bfab
AP_NavEKF: only call calcGpsGoodToAlign if we need to
...
avoid calling it once we have an origin. This avoids some calculations
and string operations
2015-09-08 16:07:33 +10:00
Andrew Tridgell
c10ce3ffbd
AP_NavEKF: added prearm_failure_reason()
2015-09-08 16:07:33 +10:00
Paul Riseborough
21f873662c
AP_NavEKF: Prevent false triggering of optical flow takeoff detection
...
Now that we have a pre-arm check in place to detect bad lidar, the motion check is unnecessary and can false trigger for copters with flexible undercarriages or on uneven ground.
2015-08-27 20:57:38 +09:00
Randy Mackay
ec2bc5e41d
NavEKF: use maxf when retrieving vibration levels
...
This reduces the performance hit that was caused by multiple calls to get_vibration_levels
2015-08-19 16:44:36 +09:00
Randy Mackay
629a5fd714
NavEKF: IMUSwitchState enum
2015-08-19 16:44:31 +09:00
Randy Mackay
c179ed5253
NavEKF: IMU ratio set to primary accel when neither IMU is used
...
This forces the EKF IMU ratio to indicate which IMU is used except that it will be "0" in the unlikely case that the third IMU is used
2015-08-19 16:44:28 +09:00
Paul Riseborough
559cc29635
AP_NavEKF: Add hysteresis to IMU switching logic
2015-08-19 16:44:26 +09:00