Skip to content

Commit

Permalink
Merge branch 'master' into rtk_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danthony06 authored May 9, 2024
2 parents 2d24b17 + 68e8398 commit 1d77c70
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 45 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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}}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions gps_common/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package gps_common
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.3.4 (2023-06-14)
------------------

0.3.3 (2022-11-28)
------------------
* Fix truncation warning for UTM zone snprintf() (`#44 <https://github.com/swri-robotics/gps_umd/issues/44>`_)
Expand Down
1 change: 1 addition & 0 deletions gps_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ catkin_python_setup()
add_message_files(
FILES
GPSStatus.msg
GPSExtendedStatus.msg
GPSFix.msg
)

Expand Down
9 changes: 9 additions & 0 deletions gps_common/msg/GPSExtendedStatus.msg
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions gps_common/package.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0"?>
<package>
<name>gps_common</name>
<version>0.3.3</version>
<version>0.3.4</version>
<description>GPS messages and common routines for use in GPS drivers</description>

<maintainer email="timo.roehling@fkie.fraunhofer.de">Timo Roehling</maintainer>
<maintainer email="preed@swri.org">P. J. Reed</maintainer>
<author email="timo.roehling@fkie.fraunhofer.de">Timo Roehling</author>
<author email="preed@swri.org">P. J. Reed</author>
<maintainer email="swri-robotics@swri.org">Southwest Research Institute</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/gps_common</url>

Expand Down
3 changes: 3 additions & 0 deletions gps_umd/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package gps_umd
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.3.4 (2023-06-14)
------------------

0.3.3 (2022-11-28)
------------------

Expand Down
7 changes: 4 additions & 3 deletions gps_umd/package.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0"?>
<package>
<name>gps_umd</name>
<version>0.3.3</version>
<version>0.3.4</version>
<description>gps_umd metapackage</description>

<maintainer email="ken@tossell.net">Ken Tossell</maintainer>
<maintainer email="preed@swri.org">P. J. Reed</maintainer>
<author email="ken@tossell.net">Ken Tossell</author>
<author email="preed@swri.org">P. J. Reed</author>
<maintainer email="swri-robotics@swri.org">Southwest Research Institute</maintainer>

<license>BSD</license>

Expand Down
5 changes: 5 additions & 0 deletions gpsd_client/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package gpsd_client
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.3.4 (2023-06-14)
------------------
* GPSD API v12 Compatibility (`#78 <https://github.com/swri-robotics/gps_umd/issues/78>`_)
* Contributors: MariuszSzczepanikSpyrosoft

0.3.3 (2022-11-28)
------------------
* Adding better debugging output to help diagnose corner case (`#59 <https://github.com/swri-robotics/gps_umd/issues/59>`_)
Expand Down
7 changes: 4 additions & 3 deletions gpsd_client/package.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0"?>
<package>
<name>gpsd_client</name>
<version>0.3.3</version>
<version>0.3.4</version>
<description>connects to a GPSd server and broadcasts GPS fixes
using the NavSatFix message</description>

<maintainer email="timo.roehling@fkie.fraunhofer.de">Timo Roehling</maintainer>
<maintainer email="preed@swri.org">P. J. Reed</maintainer>
<author email="ken@tossell.net">Ken Tossell</author>
<author email="rob@umd.edu">Rob Thomson</author>
<author email="timo.roehling@fkie.fraunhofer.de">Timo Roehling</author>
<author email="preed@swri.org">P. J. Reed</author>
<maintainer email="swri-robotics@swri.org">Southwest Research Institute</maintainer>

<license>BSD</license>
<url type="website">http://ros.org/wiki/gpsd_client</url>
Expand Down
36 changes: 25 additions & 11 deletions gpsd_client/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -148,7 +153,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_NO_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) {
Expand All @@ -157,9 +164,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)
Expand Down Expand Up @@ -206,7 +215,7 @@ class GPSDClient {

/* TODO: attitude */
} else {
status.status = -1; // STATUS_NO_FIX
status.status = -1; // STATUS_NO_FIX or STATUS_UNK
}

fix.status = status;
Expand Down Expand Up @@ -242,15 +251,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
Expand Down

0 comments on commit 1d77c70

Please sign in to comment.