AP_NavEKF3: Fix GPS < 3D empty PreArm: msg-as EKF2

This commit is contained in:
Jaaaky 2019-05-11 07:59:55 +03:00 committed by Andrew Tridgell
parent 1c816b1fe1
commit f21e4d833c
1 changed files with 3 additions and 0 deletions

View File

@ -409,6 +409,9 @@ bool NavEKF3_core::InitialiseFilterBootstrap(void)
{
// If we are a plane and don't have GPS lock then don't initialise
if (assume_zero_sideslip() && AP::gps().status() < AP_GPS::GPS_OK_FIX_3D) {
hal.util->snprintf(prearm_fail_string,
sizeof(prearm_fail_string),
"EKF3 init failure: No GPS lock");
statesInitialised = false;
return false;
}