gps-wizard

GPS Exchange Format (GPX) - GPSBabel

Summary

The GPX 1.0 files produced by GPSBabel are pretty decent, but can potentially be improved:

These topics are described in more detail in the following sections.

Discussion

Schema Location

The header is missing xmlns:xsi and xsi:schemaLocation which are recommended by the GPX guidance:

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="GPSBabel - https://www.gpsbabel.org"
     version="1.0"
     xmlns="http://www.topografix.com/GPX/1/0">

Without the schema location it is impossible to validate the GPX files using SAXCount as described by TopoGrafix.

An example of a GPX 1.0 file specifying xmlns:xsi and xsi:schemaLocation:

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="GPSBabel - https://www.gpsbabel.org"
     version="1.0"
     xmlns="http://www.topografix.com/GPX/1/0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.topografix.com/GPX/1/0
                         https://www.topografix.com/GPX/1/0/gpx.xsd">

GPX 1.0 files can be validated using the method(s) described in the overview document.

Precision

The precision of various elements is probably too high:

The precision of latitude and longitude are fine as they are suitable for technologies such as RTK:

Speed

It has been observed that GPSBabel will sometimes impute speed from positional data and save it in the GPX file. This can lead to erroneous speeds (aka “spikes”) in the output GPX and is undesirable. I have personally observed this issue when converting Garmin FIT files to GPX format using GPSBabel.

Recommendations

Schema Location

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="GPSBabel - https://www.gpsbabel.org"
     version="1.0"
     xmlns="http://www.topografix.com/GPX/1/0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.topografix.com/GPX/1/0
                         https://www.topografix.com/GPX/1/0/gpx.xsd">

Precision

Reduce the precision of the following elements:

Speed

Do not impute speed from latitude and longitude (well, not by default).

If speed is absent for any trackpoints, it should simply be omitted.