User Tools

Site Tools


standards:gpx_extensions

Background

AGTEK is using GPX files to record tracks and simulations on the Android platform. Largely we follow the GPX Standard. The use of GPX may also be useful on other platforms, desktop computers, etc. The core portion of GPX is fine for most of our uses (currently - August 2012), but there are some additional bits of information we need. These extra pieces of information are coded into the GPX file using the extension mechanism. To be of maximum use, all AGTEK applications should use the same extensions. This document covers the format of the AGTEK GPX files so other applications can be as compatible as possible.

General comments about using GPX.

  • All times are specified using the ISO 8601 standard. It is not correct to specify times in any other format.
  • String data must be XML save, which generally means no “<” or “>” characters.
  • GPX applications are free ignore extensions they do not understand
  • The AGTEK extensions can not be required, but some parts of the application may not functional “normally”. The functions must not fail, however.
  • Apropos of the GPX standard, coordinates must be LAT/LON/ELEV measured in decimal degrees, and meters of elevation.

See the GPX Standard for the documentation on the standardized portions of the format.

An example GPX file looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
 <gpx xmlns="http://www.topografix.com/GPX/1/1">
  <metadata>
    <link href="http://www.agtek.com">
      <text>AGTEK Earthworks</text>
    </link>
    <time>2012-05-21T14:29:24.360-0700</time>
  </metadata>
  <extensions>
     <agtek>
        <provider>Leica</provider>
     </agtek>
  </extensions>
  <trk>
    <name>5/21/12 2:29 PM</name>
    <trkseg>
      <trkpt lat="37.69882038778071" lon="-121.81280981721213">
        <ele>86.87749096378684</ele>
        <time>2012-05-21T14:29:25.171-0700</time>
        <extensions>
           <agtek>
              <status-fixtype>Fixed</status-fixtype>
              <status-satellite>8-0</status-satellite>
              <compass>64.245964</compass>
           </agtek>
        </extensions>
      </trkpt>
      <trkpt lat="37.69882042900191" lon="-121.81280982182977">
        <ele>86.87943022698164</ele>
        <time>2012-05-21T14:29:25.192-0700</time>
        <extensions>
           <agtek>
              <status-fixtype>Fixed</status-fixtype>
              <status-satellite>8-0</status-satellite>
              <compass>64.245964</compass>
           </agtek>
        </extensions>
      </trkpt>
      <trkpt lat="37.69882044902325" lon="-121.812809827169">
        <ele>86.88186285737902</ele>
        <time>2012-05-21T14:29:25.200-0700</time>
        <extensions>
           <agtek>
              <status-fixtype>Fixed</status-fixtype>
              <status-satellite>8-0</status-satellite>
              <compass>64.245964</compass>
           </agtek>
        </extensions>
      </trkpt>

      ...snip...

      <trkpt lat="37.69885776454766" lon="-121.81314775154998">
        <ele>86.83196703717113</ele>
        <time>2012-05-21T14:46:29.989-0700</time>
        <extensions>
           <agtek>
              <status-fixtype>Fixed</status-fixtype>
              <status-satellite>8-0</status-satellite>
              <compass>48.64595</compass>
           </agtek>
        </extensions>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

Extensions

Each extension is wrapped in an <agtek> tag. This tag indicates that AGTEK define extensions are coming up.

Track Extensions

There is just one extensions at the file (track) level. This extension is optional and indicates the type of GPS device which was used to record the track. If the extension is absent, the application should assume a “generic” GPS device. Currently the Android platform uses this extension to pick the correct shape of device to draw on the grade rod. No other information about the device should be inferred from the provider name. If additional information is required, it should be provided in this extension section.

  <extensions>
     <agtek>
        <provider>Leica</provider>
     </agtek>
  </extensions>

Valid provider names are:

  • Altus
  • AltusCell
  • Leica
  • LeicaCell
  • Topcon
  • TopconCell
  • Trimble
  • NMEA (non RTK quality).
  • Builtin (functionally equivalent to an NMEA device, not RTK quality).

Track Point Extensions

Each track point (trkpt) can has a few extensions to accomodate AGTEK Software. An example track point (with all extensions, looks like):

      <trkpt lat="37.69882038778071" lon="-121.81280981721213">
        <ele>86.87749096378684</ele>
        <time>2012-05-21T14:29:25.171-0700</time>
        <extensions>
           <agtek>
              <status-fixtype>Fixed</status-fixtype>
              <status-satellite>8-0</status-satellite>
              <compass>64.245964</compass>
              <x>-5096.123</x>
              <y>1037.987</y>
              <z>394.7</z>
           </agtek>
        </extensions>
      </trkpt>

Each of the following extensions are optional and are defined as follows.

status-fixtype

The fixtype of each track point is one of the following:

  • Fixed
  • Float
  • DGPS
  • Auto

If this extension is not present, the application should consider that the point is Autonomous. The fix type values must be spelled (case is significant) exactly like they are presented here.

status satellite

The satellite status is composed of two integers separated by a minus (dash) “-” character. These two values represent the number GPS and Glonass satellites used for this this track point. Applications are not required to do anything with this extension.

compass

This represents the value of a some sort of compass bearing in use when this point was recorded. Some recording devices may make use of a hardware compass, others may calculate using other criteria. This value is always relative to TRUE NORTH and is measured in degrees.

x

The X coordinate of the track point, decimal units. Currently this is not used in Android, and is not defined if it is Feet or Meters. This is TBD.

y

The Y coordinate of the track point, decimal units. Currently this is not used in Android, and is not defined if it is Feet or Meters. This is TBD.

z

The Z coordinate of the track point, decimal units. Currently this is not used in Android, and is not defined if it is Feet or Meters. This is TBD.

standards/gpx_extensions.txt · Last modified: 2013/10/24 16:27 by mjallison