diff --git a/host/lib/usrp/gpsd_iface.cpp b/host/lib/usrp/gpsd_iface.cpp index 2524222..f2dc26a 100644 --- a/host/lib/usrp/gpsd_iface.cpp +++ b/host/lib/usrp/gpsd_iface.cpp @@ -166,8 +166,15 @@ % _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"; @@ -267,11 +274,21 @@ 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"