From 5155346d60ea139e1405066179d9df51b6639db4 Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 30 Nov 2022 13:38:17 +0100 Subject: [PATCH] ekf2: do not use gnss data when no lock --- src/modules/ekf2/EKF/estimator_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/EKF/estimator_interface.cpp b/src/modules/ekf2/EKF/estimator_interface.cpp index e08c7b7124..7764259ca1 100644 --- a/src/modules/ekf2/EKF/estimator_interface.cpp +++ b/src/modules/ekf2/EKF/estimator_interface.cpp @@ -151,7 +151,7 @@ void EstimatorInterface::setGpsData(const gpsMessage &gps) if (time_us >= static_cast(_gps_buffer->get_newest().time_us + _min_obs_interval_us)) { - if (!gps.vel_ned_valid) { + if (!gps.vel_ned_valid || (gps.fix_type == 0)) { return; }