From 0d5dae1d294f572518cef503ba9f6b0460dfda25 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Jun 2020 09:13:14 +0100 Subject: [PATCH] More sanity checking for gpsd. --- Common/APRSWriter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 089c0a0..16ee9e6 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -441,6 +441,9 @@ void CAPRSWriter::sendIdFramesMobile() if (::gps_read(&m_gpsdData, NULL, 0) <= 0) return; + if (m_gpsdData.status != STATUS_FIX) + return; + bool latlonSet = (m_gpsdData.set & LATLON_SET) == LATLON_SET; bool altitudeSet = (m_gpsdData.set & ALTITUDE_SET) == ALTITUDE_SET; bool velocitySet = (m_gpsdData.set & SPEED_SET) == SPEED_SET;