diff --git a/host/lib/usrp/gpsd_iface.cpp b/host/lib/usrp/gpsd_iface.cpp index 79b5213..771ff4e 100644 --- a/host/lib/usrp/gpsd_iface.cpp +++ b/host/lib/usrp/gpsd_iface.cpp @@ -158,8 +158,15 @@ private: // member functions % _gps_data.fix.longitude); tmp["lat"] = str(boost::format("%f deg") % _gps_data.fix.latitude); +// https://gitlab.com/gpsd/gpsd/commit/2607bf6d6e22a6303b8320d9ddb3ada3ff27cd35 +// Large, but simple variable change: altitude -> altHAE +#if GPSD_API_MAJOR_VERSION < 9 tmp["alt"] = str(boost::format("%fm") % _gps_data.fix.altitude); +#else + tmp["alt"] = str(boost::format("%fm") + % _gps_data.fix.altHAE); +#endif } else { tmp["lon"] = "n/a"; tmp["lat"] = "n/a"; @@ -259,11 +266,21 @@ private: // member functions string.append( str(boost::format("%.2f,") % _gps_data.dop.hdop)); +// https://gitlab.com/gpsd/gpsd/commit/2607bf6d6e22a6303b8320d9ddb3ada3ff27cd35 +// Large, but simple variable change: altitude -> altHAE +#if GPSD_API_MAJOR_VERSION < 9 if (boost::math::isnan(_gps_data.fix.altitude)) string.append(",,"); else string.append( str(boost::format("%.2f,M,") % _gps_data.fix.altitude)); +#else + if (boost::math::isnan(_gps_data.fix.altHAE)) + string.append(",,"); + else + string.append( + str(boost::format("%.2f,M,") % _gps_data.fix.altHAE)); +#endif // https://gitlab.com/gpsd/gpsd/commit/c711d531a6faab93df68ec625a076631569a729d // "gpsdata.separation moved into gpsdata.fix.geoid_sep"