ekf2: collect_gps() don't throttle updates until WMM set initially

This commit is contained in:
Daniel Agar 2023-09-25 10:04:14 -04:00 committed by Mathieu Bresciani
parent 1e594747ab
commit b817eb0370
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ bool Ekf::collect_gps(const gpsMessage &gps)
ECL_INFO("GPS checks passed");
}
if (isTimedOut(_wmm_gps_time_last_checked, 1e6)) {
if ((isTimedOut(_wmm_gps_time_last_checked, 1e6)) || (_wmm_gps_time_last_set == 0)) {
// a rough 2D fix is sufficient to lookup declination
const bool gps_rough_2d_fix = (gps.fix_type >= 2) && (gps.eph < 1000);