Skip to content

Commit

Permalink
socktap: remove gpsd status field from checks
Browse files Browse the repository at this point in the history
  • Loading branch information
firolino committed Nov 13, 2023
1 parent 1f99001 commit 02c38a8
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions tools/socktap/gps_position_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 02c38a8

Please sign in to comment.