From 1ce3d6d186816aa864b549a9317b107ca60993c3 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Wed, 24 Jun 2020 12:05:07 +0200 Subject: [PATCH] altMSL appeared in API 9. --- YSFGateway/APRSWriter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YSFGateway/APRSWriter.cpp b/YSFGateway/APRSWriter.cpp index 871e758..ae9e7cb 100644 --- a/YSFGateway/APRSWriter.cpp +++ b/YSFGateway/APRSWriter.cpp @@ -306,7 +306,11 @@ void CAPRSWriter::sendIdFrameMobile() float rawLatitude = float(m_gpsdData.fix.latitude); float rawLongitude = float(m_gpsdData.fix.longitude); +#if GPSD_API_MAJOR_VERSION >= 9 float rawAltitude = float(m_gpsdData.fix.altMSL); +#else + float rawAltitude = float(m_gpsdData.fix.altitude); +#endif float rawVelocity = float(m_gpsdData.fix.speed); float rawBearing = float(m_gpsdData.fix.track);