From 02c38a8b351b0da793906a307e1ea36787b85c3a Mon Sep 17 00:00:00 2001 From: Firat Kasmis Date: Mon, 13 Nov 2023 12:06:25 +0100 Subject: [PATCH] socktap: remove gpsd status field from checks --- tools/socktap/gps_position_provider.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tools/socktap/gps_position_provider.cpp b/tools/socktap/gps_position_provider.cpp index b965c723b..5928514d2 100644 --- a/tools/socktap/gps_position_provider.cpp +++ b/tools/socktap/gps_position_provider.cpp @@ -25,24 +25,9 @@ int gpsd_read(gps_data_t& data) #endif } -constexpr int gpsd_status(const gps_data_t& data) -{ -#if GPSD_API_MAJOR_VERSION < 10 - return data.status; -#else - return data.fix.status; -#endif -} - -#if GPSD_API_MAJOR_VERSION < 12 - constexpr int cStatusFix = STATUS_FIX; -#else - constexpr int cStatusFix = STATUS_GPS; -#endif - constexpr bool gpsd_has_useful_fix(const gps_data_t& data) { - return gpsd_status(data) >= cStatusFix && data.fix.mode >= MODE_2D; + return data.fix.mode >= MODE_2D; } constexpr double gpsd_get_altitude(const gps_data_t& data)