From 240160c79b564c4014a61c7a9f7ec69a7288d9fa Mon Sep 17 00:00:00 2001 From: xBogas <119903183+xBogas@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:31:55 +0100 Subject: [PATCH] Sensors/GPS: Set invalid GPS position when reading position failed. --- src/Sensors/GPS/Task.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Sensors/GPS/Task.cpp b/src/Sensors/GPS/Task.cpp index 8e10178a49..96fcf560e9 100644 --- a/src/Sensors/GPS/Task.cpp +++ b/src/Sensors/GPS/Task.cpp @@ -675,6 +675,10 @@ namespace Sensors } else { + m_fix.lat = 0; + m_fix.lon = 0; + m_fix.height = 0; + m_fix.satellites = 0; m_fix.validity &= ~IMC::GpsFix::GFV_VALID_POS; }