Add more gpsd sanity checking.

This commit is contained in:
Jonathan Naylor 2020-06-04 08:52:29 +01:00
parent 8355d6012d
commit 6f4a283526

View file

@ -279,6 +279,9 @@ void CAPRSWriter::sendIdFrameMobile()
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;