From 113b55d1aa200c7e534d25f263c20d7b6433e055 Mon Sep 17 00:00:00 2001 From: "P. J. Reed" Date: Thu, 5 Mar 2020 16:08:44 -0600 Subject: [PATCH 01/20] Update CHANGELOGs --- gps_common/CHANGELOG.rst | 3 +++ gps_umd/CHANGELOG.rst | 3 +++ gpsd_client/CHANGELOG.rst | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 2cf0c68..b6be09f 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.0 (2019-10-03) ------------------ * Switching order of commands to make catkin happy diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 24ecd43..731af97 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.0 (2019-10-03) ------------------ diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index d20374f..63f022d 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* Fix for gpsd-3.19 compatibility (`#26 `_) +* Contributors: P. J. Reed + 0.3.0 (2019-10-03) ------------------ From b6f9f493d42d8fe9e00d5efb9cd80b354a588386 Mon Sep 17 00:00:00 2001 From: "P. J. Reed" Date: Thu, 5 Mar 2020 16:08:51 -0600 Subject: [PATCH 02/20] 0.3.1 --- gps_common/CHANGELOG.rst | 4 ++-- gps_common/package.xml | 2 +- gps_umd/CHANGELOG.rst | 4 ++-- gps_umd/package.xml | 2 +- gpsd_client/CHANGELOG.rst | 4 ++-- gpsd_client/package.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index b6be09f..5db839d 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.1 (2020-03-05) +------------------ 0.3.0 (2019-10-03) ------------------ diff --git a/gps_common/package.xml b/gps_common/package.xml index 206e566..8de4af4 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -1,7 +1,7 @@ gps_common - 0.3.0 + 0.3.1 GPS messages and common routines for use in GPS drivers Timo Roehling diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 731af97..6414eef 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.1 (2020-03-05) +------------------ 0.3.0 (2019-10-03) ------------------ diff --git a/gps_umd/package.xml b/gps_umd/package.xml index 856ee82..af82169 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -1,7 +1,7 @@ gps_umd - 0.3.0 + 0.3.1 gps_umd metapackage Ken Tossell diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index 63f022d..bff9c52 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.1 (2020-03-05) +------------------ * Fix for gpsd-3.19 compatibility (`#26 `_) * Contributors: P. J. Reed diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index 7ee936e..acc4a16 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -1,7 +1,7 @@ gpsd_client - 0.3.0 + 0.3.1 connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message From f8fa003997755eb9b592cf4072870ae2bf49bb71 Mon Sep 17 00:00:00 2001 From: "P. J. Reed" Date: Mon, 25 May 2020 11:45:50 -0500 Subject: [PATCH 03/20] Fix build with gpsd 3.20 (#28) --- gpsd_client/src/client.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 3df33db..45258bc 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -85,8 +85,13 @@ class GPSDClient { if (p == NULL) return; - if (!p->online) +#if GPSD_API_MAJOR_VERSION >= 9 + if (!p->online.tv_sec && !p->online.tv_nsec) { +#else + if (!p->online) { +#endif return; + } process_data_gps(p); process_data_navsat(p); @@ -153,7 +158,11 @@ class GPSDClient { status.status |= 18; // same here #endif +#if GPSD_API_MAJOR_VERSION >= 9 + fix.time = (double)(p->fix.time.tv_sec) + (double)(p->fix.time.tv_nsec) / 1000000.; +#else fix.time = p->fix.time; +#endif fix.latitude = p->fix.latitude; fix.longitude = p->fix.longitude; fix.altitude = p->fix.altitude; @@ -188,7 +197,7 @@ class GPSDClient { /* TODO: attitude */ } else { - status.status = -1; // STATUS_NO_FIX + status.status = -1; // STATUS_NO_FIX } fix.status = status; @@ -201,10 +210,17 @@ class GPSDClient { /* TODO: Support SBAS and other GBAS. */ - if (use_gps_time && !std::isnan(p->fix.time)) +#if GPSD_API_MAJOR_VERSION >= 9 + if (use_gps_time && (p->online.tv_sec || p->online.tv_nsec)) { + fix->header.stamp = ros::Time(p->fix.time.tv_sec, p->fix.time.tv_nsec); +#else + if (use_gps_time && !std::isnan(p->fix.time)) { fix->header.stamp = ros::Time(p->fix.time); - else +#endif + } + else { fix->header.stamp = ros::Time::now(); + } fix->header.frame_id = frame_id; From d1877bd9ca421d9a49ed143c1aab5eaf5613e571 Mon Sep 17 00:00:00 2001 From: "P. J. Reed" Date: Mon, 25 May 2020 11:46:31 -0500 Subject: [PATCH 04/20] Update CHANGELOGs Signed-off-by: P. J. Reed --- gps_common/CHANGELOG.rst | 3 +++ gps_umd/CHANGELOG.rst | 3 +++ gpsd_client/CHANGELOG.rst | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 5db839d..3b2d4b8 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.1 (2020-03-05) ------------------ diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 6414eef..be9cca1 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.1 (2020-03-05) ------------------ diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index bff9c52..f94a446 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* Fix build with gpsd 3.20 (`#28 `_) +* Contributors: P. J. Reed + 0.3.1 (2020-03-05) ------------------ * Fix for gpsd-3.19 compatibility (`#26 `_) From d218a50c7d988ef906f20d72100d9e66a11331cf Mon Sep 17 00:00:00 2001 From: "P. J. Reed" Date: Mon, 25 May 2020 11:46:46 -0500 Subject: [PATCH 05/20] 0.3.2 --- gps_common/CHANGELOG.rst | 4 ++-- gps_common/package.xml | 2 +- gps_umd/CHANGELOG.rst | 4 ++-- gps_umd/package.xml | 2 +- gpsd_client/CHANGELOG.rst | 4 ++-- gpsd_client/package.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 3b2d4b8..45b8e20 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.2 (2020-05-25) +------------------ 0.3.1 (2020-03-05) ------------------ diff --git a/gps_common/package.xml b/gps_common/package.xml index 8de4af4..c426185 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -1,7 +1,7 @@ gps_common - 0.3.1 + 0.3.2 GPS messages and common routines for use in GPS drivers Timo Roehling diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index be9cca1..bf2ea9a 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.2 (2020-05-25) +------------------ 0.3.1 (2020-03-05) ------------------ diff --git a/gps_umd/package.xml b/gps_umd/package.xml index af82169..fbc97d6 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -1,7 +1,7 @@ gps_umd - 0.3.1 + 0.3.2 gps_umd metapackage Ken Tossell diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index f94a446..a1f6f3d 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.2 (2020-05-25) +------------------ * Fix build with gpsd 3.20 (`#28 `_) * Contributors: P. J. Reed diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index acc4a16..b1d5dab 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -1,7 +1,7 @@ gpsd_client - 0.3.1 + 0.3.2 connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message From 7106e0f91a19352e37498f23b16231f6b8013642 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 25 Aug 2021 02:50:00 -0700 Subject: [PATCH 06/20] Fix build with gpsd-3.21 Adapt to changes from this commit: https://gitlab.com/gpsd/gpsd/-/commit/29991d6ffeb41ecfc8297db68bb68be0128c8514 Signed-off-by: Martin Jansa --- gpsd_client/src/client.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 45258bc..ac391e0 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -148,13 +148,22 @@ class GPSDClient { #endif } +#if GPSD_API_MAJOR_VERSION >= 10 + if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { +#else if ((p->status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { +#endif + status.status = 0; // FIXME: gpsmm puts its constants in the global // namespace, so `GPSStatus::STATUS_FIX' is illegal. // STATUS_DGPS_FIX was removed in API version 6 but re-added afterward #if GPSD_API_MAJOR_VERSION != 6 +#if GPSD_API_MAJOR_VERSION >= 10 + if (p->fix.status & STATUS_DGPS_FIX) +#else if (p->status & STATUS_DGPS_FIX) +#endif status.status |= 18; // same here #endif @@ -228,7 +237,11 @@ class GPSDClient { * so we need to use the ROS message's integer values * for status.status */ +#if GPSD_API_MAJOR_VERSION >= 10 + switch (p->fix.status) { +#else switch (p->status) { +#endif case STATUS_NO_FIX: fix->status.status = -1; // NavSatStatus::STATUS_NO_FIX; break; From 4897221f5f7ea39085f6b16e893342632095f771 Mon Sep 17 00:00:00 2001 From: Kevin Hallenbeck Date: Mon, 28 Mar 2022 13:12:16 -0400 Subject: [PATCH 07/20] Fix truncation warning for UTM zone snprintf() (#44) --- gps_common/include/gps_common/conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gps_common/include/gps_common/conversions.h b/gps_common/include/gps_common/conversions.h index 4b9869e..f73bf2d 100644 --- a/gps_common/include/gps_common/conversions.h +++ b/gps_common/include/gps_common/conversions.h @@ -183,7 +183,7 @@ static inline void LLtoUTM(const double Lat, const double Long, LongOriginRad = LongOrigin * RADIANS_PER_DEGREE; //compute the UTM Zone from the latitude and longitude - snprintf(UTMZone, 4, "%d%c", ZoneNumber, UTMLetterDesignator(Lat)); + snprintf(UTMZone, 13, "%d%c", ZoneNumber, UTMLetterDesignator(Lat)); eccPrimeSquared = (eccSquared)/(1-eccSquared); @@ -210,7 +210,7 @@ static inline void LLtoUTM(const double Lat, const double Long, static inline void LLtoUTM(const double Lat, const double Long, double &UTMNorthing, double &UTMEasting, std::string &UTMZone) { - char zone_buf[] = {0, 0, 0, 0}; + char zone_buf[13] = {0}; LLtoUTM(Lat, Long, UTMNorthing, UTMEasting, zone_buf); From 5cdab23fbdf2e9339e6fc1a282e8507c27d05042 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Thu, 23 Jun 2022 14:05:39 -0500 Subject: [PATCH 08/20] Adding better debugging output to help diagnose corner case (#59) * Adding better debugging output to help diagnose corner case DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC #4584 --- gpsd_client/src/client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index ac391e0..579f0e8 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -267,6 +267,8 @@ class GPSDClient { * fake results, which have NaN variance */ if (std::isnan(p->fix.epx) && check_fix_by_variance) { + ROS_DEBUG_THROTTLE(1, + "GPS status was reported as OK, but variance was invalid"); return; } From 38a41273e8bc560024cf4ad74c0bfa9e93116be0 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Mon, 28 Nov 2022 15:22:47 -0600 Subject: [PATCH 09/20] Updating changelogs for new release --- gps_common/CHANGELOG.rst | 5 +++++ gps_umd/CHANGELOG.rst | 3 +++ gpsd_client/CHANGELOG.rst | 12 ++++++++++++ 3 files changed, 20 insertions(+) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 45b8e20..4233a11 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* Fix truncation warning for UTM zone snprintf() (`#44 `_) +* Contributors: Kevin Hallenbeck + 0.3.2 (2020-05-25) ------------------ diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index bf2ea9a..1faeeb1 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.2 (2020-05-25) ------------------ diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index a1f6f3d..fba2138 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,6 +2,18 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* Adding better debugging output to help diagnose corner case (`#59 `_) + * Adding better debugging output to help diagnose corner case + DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC `#4584 `_ +* Merge pull request `#39 `_ from shr-project/jansa/gpsd + Fix build with gpsd-3.21 +* Fix build with gpsd-3.21 + Adapt to changes from this commit: + https://gitlab.com/gpsd/gpsd/-/commit/29991d6ffeb41ecfc8297db68bb68be0128c8514 +* Contributors: David Anthony, Martin Jansa + 0.3.2 (2020-05-25) ------------------ * Fix build with gpsd 3.20 (`#28 `_) From 9509b09393d05ff13d9cf9fba1e2b88233821a65 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Mon, 28 Nov 2022 15:23:23 -0600 Subject: [PATCH 10/20] 0.3.3 --- gps_common/CHANGELOG.rst | 4 ++-- gps_common/package.xml | 2 +- gps_umd/CHANGELOG.rst | 4 ++-- gps_umd/package.xml | 2 +- gpsd_client/CHANGELOG.rst | 4 ++-- gpsd_client/package.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 4233a11..01f2d0b 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.3 (2022-11-28) +------------------ * Fix truncation warning for UTM zone snprintf() (`#44 `_) * Contributors: Kevin Hallenbeck diff --git a/gps_common/package.xml b/gps_common/package.xml index c426185..f5486c2 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -1,7 +1,7 @@ gps_common - 0.3.2 + 0.3.3 GPS messages and common routines for use in GPS drivers Timo Roehling diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 1faeeb1..a6a753b 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.3 (2022-11-28) +------------------ 0.3.2 (2020-05-25) ------------------ diff --git a/gps_umd/package.xml b/gps_umd/package.xml index fbc97d6..5f9e1e0 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -1,7 +1,7 @@ gps_umd - 0.3.2 + 0.3.3 gps_umd metapackage Ken Tossell diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index fba2138..5819b3b 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.3 (2022-11-28) +------------------ * Adding better debugging output to help diagnose corner case (`#59 `_) * Adding better debugging output to help diagnose corner case DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC `#4584 `_ diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index b1d5dab..d8e86ae 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -1,7 +1,7 @@ gpsd_client - 0.3.2 + 0.3.3 connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message From 3dc731657a721a48344a443ce628eac73da0b4b8 Mon Sep 17 00:00:00 2001 From: MariuszSzczepanikSpyrosoft <118888269+MariuszSzczepanikSpyrosoft@users.noreply.github.com> Date: Wed, 14 Jun 2023 16:31:18 +0200 Subject: [PATCH 11/20] Fix build according to modification of GPSD (#78) GPSD since version 3.23.1 (GPSD_API_MAJOR_VERSION=12) has introduced interfaces changes on the below values: - Change STATUS_NO_FIX to STATUS_UNK to avoid confusion with fix mode. - Change STATUS_FIX to STATUS_GPS to avoid confusion with fix mode. - Change STATUS_DGPS_FIX to STATUS_DGPS to avoid confusion with fix mode. --- gpsd_client/src/client.cpp | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 579f0e8..736bfef 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -148,7 +148,9 @@ class GPSDClient { #endif } -#if GPSD_API_MAJOR_VERSION >= 10 +#if GPSD_API_MAJOR_VERSION >= 12 + if ((p->fix.status & STATUS_GPS) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { +#elif GPSD_API_MAJOR_VERSION >= 10 if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { #else if ((p->status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { @@ -157,9 +159,11 @@ class GPSDClient { status.status = 0; // FIXME: gpsmm puts its constants in the global // namespace, so `GPSStatus::STATUS_FIX' is illegal. -// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward +// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward and next renamed since the version 12 #if GPSD_API_MAJOR_VERSION != 6 -#if GPSD_API_MAJOR_VERSION >= 10 +#if GPSD_API_MAJOR_VERSION >= 12 + if (p->fix.status & STATUS_DGPS) +#elif GPSD_API_MAJOR_VERSION >= 10 if (p->fix.status & STATUS_DGPS_FIX) #else if (p->status & STATUS_DGPS_FIX) @@ -206,7 +210,7 @@ class GPSDClient { /* TODO: attitude */ } else { - status.status = -1; // STATUS_NO_FIX + status.status = -1; // STATUS_NO_FIX or STATUS_UNK } fix.status = status; @@ -242,15 +246,20 @@ class GPSDClient { #else switch (p->status) { #endif +#if GPSD_API_MAJOR_VERSION >= 12 + case STATUS_GPS: +#else case STATUS_NO_FIX: - fix->status.status = -1; // NavSatStatus::STATUS_NO_FIX; - break; - case STATUS_FIX: - fix->status.status = 0; // NavSatStatus::STATUS_FIX; +#endif + fix->status.status = 0; // NavSatStatus::STATUS_FIX or NavSatStatus::STATUS_GPS; break; -// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward -#if GPSD_API_MAJOR_VERSION != 6 +// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward and next renamed since the version 12 +#if GPSD_API_MAJOR_VERSION != 6 +#if GPSD_API_MAJOR_VERSION >= 12 + case STATUS_DGPS: +#else case STATUS_DGPS_FIX: +#endif fix->status.status = 2; // NavSatStatus::STATUS_GBAS_FIX; break; #endif From bb2885fd345e0f6aa2b18f083b350064b6758095 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Wed, 14 Jun 2023 10:12:19 -0500 Subject: [PATCH 12/20] Updating changelogs --- gps_common/CHANGELOG.rst | 3 +++ gps_umd/CHANGELOG.rst | 3 +++ gpsd_client/CHANGELOG.rst | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 01f2d0b..e2bdf07 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.3 (2022-11-28) ------------------ * Fix truncation warning for UTM zone snprintf() (`#44 `_) diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index a6a753b..84b5900 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.3 (2022-11-28) ------------------ diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index 5819b3b..1c875c8 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* GPSD API v12 Compatibility (`#78 `_) +* Contributors: MariuszSzczepanikSpyrosoft + 0.3.3 (2022-11-28) ------------------ * Adding better debugging output to help diagnose corner case (`#59 `_) From 99130b95cda595f776cff20893fe4a7158a96f1b Mon Sep 17 00:00:00 2001 From: David Anthony Date: Wed, 14 Jun 2023 10:20:04 -0500 Subject: [PATCH 13/20] 0.3.4 --- gps_common/CHANGELOG.rst | 4 ++-- gps_common/package.xml | 2 +- gps_umd/CHANGELOG.rst | 4 ++-- gps_umd/package.xml | 2 +- gpsd_client/CHANGELOG.rst | 4 ++-- gpsd_client/package.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index e2bdf07..03ba1dc 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ 0.3.3 (2022-11-28) ------------------ diff --git a/gps_common/package.xml b/gps_common/package.xml index f5486c2..5ede991 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -1,7 +1,7 @@ gps_common - 0.3.3 + 0.3.4 GPS messages and common routines for use in GPS drivers Timo Roehling diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 84b5900..c59ef12 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ 0.3.3 (2022-11-28) ------------------ diff --git a/gps_umd/package.xml b/gps_umd/package.xml index 5f9e1e0..0acfa76 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -1,7 +1,7 @@ gps_umd - 0.3.3 + 0.3.4 gps_umd metapackage Ken Tossell diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index 1c875c8..29ed45d 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ * GPSD API v12 Compatibility (`#78 `_) * Contributors: MariuszSzczepanikSpyrosoft diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index d8e86ae..b536431 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -1,7 +1,7 @@ gpsd_client - 0.3.3 + 0.3.4 connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message From 34fed302d82890855a64f7985d399317fc951d77 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Thu, 21 Sep 2023 17:32:31 -0500 Subject: [PATCH 14/20] Updating CI process (#84) --- .github/workflows/main.yml | 16 ++++++++++++++++ .travis.yml | 25 ------------------------- gps_common/package.xml | 5 +++-- gps_umd/package.xml | 5 +++-- gpsd_client/package.xml | 5 +++-- 5 files changed, 25 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7312fff --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: CI + +on: [push, pull_request] + +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: noetic, ROS_REPO: testing} + - {ROS_DISTRO: noetic, ROS_REPO: main} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0c32515..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: required -dist: trusty -language: generic -compiler: - - gcc -notifications: - email: - on_success: always - on_failure: always -env: - matrix: - - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu - - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu - - USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu -install: - - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config -matrix: - allow_failures: - - env: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu -script: - - source .ci_config/travis.sh -# - source ./travis.sh # Enable this when you have a package-local script diff --git a/gps_common/package.xml b/gps_common/package.xml index 5ede991..b5d868a 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -4,8 +4,9 @@ 0.3.4 GPS messages and common routines for use in GPS drivers - Timo Roehling - P. J. Reed + Timo Roehling + P. J. Reed + Southwest Research Institute BSD http://ros.org/wiki/gps_common diff --git a/gps_umd/package.xml b/gps_umd/package.xml index 0acfa76..50aa502 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -4,8 +4,9 @@ 0.3.4 gps_umd metapackage - Ken Tossell - P. J. Reed + Ken Tossell + P. J. Reed + Southwest Research Institute BSD diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index b536431..1e5edac 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -5,10 +5,11 @@ connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message - Timo Roehling - P. J. Reed Ken Tossell Rob Thomson + Timo Roehling + P. J. Reed + Southwest Research Institute BSD http://ros.org/wiki/gpsd_client From 52116cd2810e92a6b701056a6b6785f998bc836c Mon Sep 17 00:00:00 2001 From: David Anthony Date: Fri, 29 Sep 2023 10:07:13 -0500 Subject: [PATCH 15/20] Clarifying that license is BSD 3-clause according to original author's wishes (#87) --- LICENSE | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b8c0cdb --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Copyright 2023, Ken Tossell + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 6b8c31f8821cbdd375b257bcef7e0e38c6f3b98a Mon Sep 17 00:00:00 2001 From: David Anthony Date: Thu, 9 May 2024 14:03:09 -0500 Subject: [PATCH 16/20] Port of PR #89 (#97) * Port of PR #89 * Fixing variable name --- gpsd_client/src/client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 736bfef..1642ae3 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -59,7 +59,12 @@ class GPSDClient { if (!gps->waiting(1e6)) return; - gps_data_t *p = gps->read(); + // Read out all queued data and only act on the latest + gps_data_t* p = NULL; + while (gps->waiting(0)) + { + p = gps->read(); + } #else gps_data_t *p = gps->poll(); #endif From 68e8398f119ab386503368426c36a473547a62ae Mon Sep 17 00:00:00 2001 From: agyoungs Date: Thu, 9 May 2024 14:32:39 -0500 Subject: [PATCH 17/20] Added GPSExtendedStatus msg to allow for additional status enums (#93) Co-authored-by: Alex Youngs Co-authored-by: David Anthony --- gps_common/CMakeLists.txt | 1 + gps_common/msg/GPSExtendedStatus.msg | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 gps_common/msg/GPSExtendedStatus.msg diff --git a/gps_common/CMakeLists.txt b/gps_common/CMakeLists.txt index 44567df..3d7b13f 100644 --- a/gps_common/CMakeLists.txt +++ b/gps_common/CMakeLists.txt @@ -28,6 +28,7 @@ catkin_python_setup() add_message_files( FILES GPSStatus.msg + GPSExtendedStatus.msg GPSFix.msg ) diff --git a/gps_common/msg/GPSExtendedStatus.msg b/gps_common/msg/GPSExtendedStatus.msg new file mode 100644 index 0000000..de5816e --- /dev/null +++ b/gps_common/msg/GPSExtendedStatus.msg @@ -0,0 +1,9 @@ +# Extended Measurement status to use for GPSStatus.msg +int16 STATUS_NO_FIX=-1 # Unable to fix position +int16 STATUS_FIX=0 # Normal fix +int16 STATUS_SBAS_FIX=1 # Fixed using a satellite-based augmentation system +int16 STATUS_GBAS_FIX=2 # or a ground-based augmentation system +int16 STATUS_DGPS_FIX=18 # Fixed with DGPS +int16 STATUS_RTK_FIX=19 # Real-Time Kinematic, fixed integers +int16 STATUS_RTK_FLOAT=20 # Real-Time Kinematic, float integers +int16 STATUS_WAAS_FIX=33 # Fixed with WAAS From 6f5963e0e09d8e9201e015a4d1ee17ef3b0450d3 Mon Sep 17 00:00:00 2001 From: Logan Elliott <31803076+laelliott@users.noreply.github.com> Date: Thu, 9 May 2024 14:48:37 -0500 Subject: [PATCH 18/20] GPS Extended Fix Not Populating under RTK (#74) * fixing bug where extended fix doesn't populate in rtk fi * removing pycache * Update client.cpp Making fix for all GPSD versions. --------- Co-authored-by: Logan Elliott Co-authored-by: David Anthony --- gpsd_client/src/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 1642ae3..0c8ff2c 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -154,11 +154,11 @@ class GPSDClient { } #if GPSD_API_MAJOR_VERSION >= 12 - if ((p->fix.status & STATUS_GPS) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { + if ((p->fix.status != STATUS_NO_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { #elif GPSD_API_MAJOR_VERSION >= 10 - if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { + if ((p->fix.status != STATUS_NO_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { #else - if ((p->status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { + if ((p->status != STATUS_NO_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { #endif status.status = 0; // FIXME: gpsmm puts its constants in the global From ecf8df8d0bd4ebcf5f0dae9f27fd46e7c770e993 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Fri, 10 May 2024 09:51:52 -0500 Subject: [PATCH 19/20] Improving port parameter initialization (#102) --- gpsd_client/src/client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 0c8ff2c..f41fea4 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -23,12 +23,12 @@ class GPSDClient { privnode.param("frame_id", frame_id, frame_id); std::string host = "localhost"; - int port = 2947; + int port = atoi(DEFAULT_GPSD_PORT); privnode.getParam("host", host); privnode.getParam("port", port); char port_s[12]; - snprintf(port_s, 12, "%d", port); + snprintf(port_s, sizeof(port_s), "%d", port); gps_data_t *resp = NULL; From 2476620bb1b2ae9c4ba013ce2949bfdd7d3e82cb Mon Sep 17 00:00:00 2001 From: David Anthony Date: Fri, 10 May 2024 09:54:58 -0500 Subject: [PATCH 20/20] Changing NavSatFixPtr to NavSatFix --- gpsd_client/src/client.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index f41fea4..e87b36d 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -224,23 +224,23 @@ class GPSDClient { } void process_data_navsat(struct gps_data_t* p) { - NavSatFixPtr fix(new NavSatFix); + NavSatFix fix; /* TODO: Support SBAS and other GBAS. */ #if GPSD_API_MAJOR_VERSION >= 9 if (use_gps_time && (p->online.tv_sec || p->online.tv_nsec)) { - fix->header.stamp = ros::Time(p->fix.time.tv_sec, p->fix.time.tv_nsec); + fix.header.stamp = ros::Time(p->fix.time.tv_sec, p->fix.time.tv_nsec); #else if (use_gps_time && !std::isnan(p->fix.time)) { - fix->header.stamp = ros::Time(p->fix.time); + fix.header.stamp = ros::Time(p->fix.time); #endif } else { - fix->header.stamp = ros::Time::now(); + fix.header.stamp = ros::Time::now(); } - fix->header.frame_id = frame_id; + fix.header.frame_id = frame_id; /* gpsmm pollutes the global namespace with STATUS_, * so we need to use the ROS message's integer values @@ -256,7 +256,7 @@ class GPSDClient { #else case STATUS_NO_FIX: #endif - fix->status.status = 0; // NavSatStatus::STATUS_FIX or NavSatStatus::STATUS_GPS; + fix.status.status = 0; // NavSatStatus::STATUS_FIX or NavSatStatus::STATUS_GPS; break; // STATUS_DGPS_FIX was removed in API version 6 but re-added afterward and next renamed since the version 12 #if GPSD_API_MAJOR_VERSION != 6 @@ -265,16 +265,16 @@ class GPSDClient { #else case STATUS_DGPS_FIX: #endif - fix->status.status = 2; // NavSatStatus::STATUS_GBAS_FIX; + fix.status.status = 2; // NavSatStatus::STATUS_GBAS_FIX; break; #endif } - fix->status.service = NavSatStatus::SERVICE_GPS; + fix.status.service = NavSatStatus::SERVICE_GPS; - fix->latitude = p->fix.latitude; - fix->longitude = p->fix.longitude; - fix->altitude = p->fix.altitude; + fix.latitude = p->fix.latitude; + fix.longitude = p->fix.longitude; + fix.altitude = p->fix.altitude; /* gpsd reports status=OK even when there is no current fix, * as long as there has been a fix previously. Throw out these @@ -286,11 +286,11 @@ class GPSDClient { return; } - fix->position_covariance[0] = p->fix.epx; - fix->position_covariance[4] = p->fix.epy; - fix->position_covariance[8] = p->fix.epv; + fix.position_covariance[0] = p->fix.epx; + fix.position_covariance[4] = p->fix.epy; + fix.position_covariance[8] = p->fix.epv; - fix->position_covariance_type = NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN; + fix.position_covariance_type = NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN; navsat_fix_pub.publish(fix); }