AP_NavEKF: take at most 30s to accept DCM attitude

velocity noise on the GPS can cause DCM to take a long time to
converge. If it takes longer than 30s then allow EKF to start
This commit is contained in:
Andrew Tridgell 2015-05-20 14:57:06 +10:00
parent 7a76f72bf5
commit 411a96b4b3

View File

@ -526,8 +526,9 @@ bool NavEKF::InitialiseFilterDynamic(void)
return false;
}
// If the DCM solution has not converged, then don't initialise
if (_ahrs->get_error_rp() > 0.05f) {
// If the DCM solution has not converged, then don't initialise,
// unless at least 30s has passed
if (_ahrs->get_error_rp() > 0.05f && _ahrs->uptime_ms() < 30000U) {
return false;
}