gps-wizard

GPS Exchange Format (GPX) - KA72

Background

The <course> and <speed> elements were present in GPX 1.0 but were accidentally omitted from GPX 1.1.

There are a number of ways that these elements may be represented in GPX 1.1 files, as described within this document.

Examples

GPX 1.0

Several applications still use GPX 1.0 so that <speed> and <course> can be included.

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <course>319.456</course>
  <speed>2.600</speed>
</trkpt>

GPSResults and COROS use <cog> instead of <course> which is not correct but can easily be supported.

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <cog>319.456</cog>
  <speed>2.600</speed>
</trkpt>

GPXDATA

This was invented for Suunto and has also been proposed for COROS.

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <extensions>
    <gpxdata:speed>2.600</gpxdata:speed>
  </extensions>
</trkpt>

The namespace is as follows:

xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0"

TrackPointExtension

This approach is used by Garmin, Waterspeed (Strava and Google), Hoolan, Sailmon (proposed).

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <extensions>
    <gpxtpx:TrackPointExtension>
      <gpxtpx:speed>2.600</gpxtpx:speed>
      <gpxtpx:course>248.19</gpxtpx:course>
    </gpxtpx:TrackPointExtension>
  </extensions>
</trkpt>

The namespace is as follows:

xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"

Note that Garmin are likely to use the namespace prefix ns3:

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <extensions>
    <ns3:TrackPointExtension>
      <ns3:speed>2.600</ns3:speed>
      <ns3:course>248.19</ns3:course>
    </ns3:TrackPointExtension>
  </extensions>
</trkpt>

GPXDATA + TrackPointExtension

This approach is used by Waterspeed (GPSAR).

<trkpt lat="52.0493617" lon="-0.5709269">
  <ele>43.195</ele>
  <time>2023-11-19T13:29:57.000Z</time>
  <extensions>
    <gpxtpx:TrackPointExtension>
      <gpxdata:speed>2.600</gpxdata:speed>
      <gpxtpx:course>248.19</gpxtpx:course>
    </gpxtpx:TrackPointExtension>
  </extensions>
</trkpt>

The namespaces are as follows:

xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"

Summary

Speed

The GPX reader should be able to recognise the following variations of SOG.

The namespaces would be as follows:

xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
xmlns:ns3="http://www.garmin.com/xmlschemas/TrackPointExtension/v2

Note: Technically speaking the namespace prefix (e.g. gpxdata, gpxtpx or ns3) can be chosen by the GPX creator.

Course

The GPX reader should be able to recognise the following variations of COG.

The namespaces would be as follows:

xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
xmlns:ns3="http://www.garmin.com/xmlschemas/TrackPointExtension/v2

Note: Technically speaking the namespace prefix (e.g. gpxtpx or ns3) can be chosen by the GPX creator.