GPX File Format

GPX File Format

The following are standard values used on the platform. Other values can be added if they do NOT duplicate these values.

Post below if you want to add extra values to these standard values.

GPX Header Standard

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx
xmlns="https://www.topografix.com/GPX/1/1"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.topografix.com/GPX/1/1 https://www.topografix.com/GPX/1/1/gpx.xsd"
creator="app.contacttrace.com.au"
version="1.1">

creator = application creating the GPX

GPX Track Standard

<trk>
 <name>20200806204409_20200806211410_sydneyaustralia</name>
 <desc>sessionid_Tgyh78jBhFGvTHU9I7JYfdcdeb8j3floJhKu96g8</desc>
 <cmt>server_https://dis1.contacttrace.com.au</cmt>
</trk>

name = duration of track (start,end,timezone)
desc = tracked device id (e.g. session id, alias id etc.)
cmt = external source of data (outside of app)

GPX Track Point Standard

<trkpt lat="-33.8799027" lon="151.204598">
   <time>2020-09-01T07:12:43Z</time>
   <ele>5.00</ele>
   <extensions>
     <speed>0.051</speed>
     <course>209.600</course>
     <accuracy>500.00</accuracy>
     <altitudeaccuracy>50.00</altitudeaccuracy>
     <batterylevel>90.00</batterylevel>
     <cmt>locationid_63264276555454228732389</cmt>
     <src>webapp</src>
   </extensions>
</trkpt>

Different devices has their own "standards" we called synonyms, here we try to translate them the best we can into our gpx standard.

row field name field synonyms meaning
1 accuracy acc, hdop accuracy in meters
2 batterylevel bat, batt, battery, power battery level in percent
3 carplate number plate of a vehicle
4 cmt comment, osmid location id
5 course heading, bearing, direction bearing in decimal degrees
6 desc description event id
7 email email address of trackpoint
8 eve alt, altitude, elevation altitude in meters
9 lat latitude decimal latitude
10 level level in building, 0 is ground, negative is basement
11 lon longitude decimal longitude
12 name name of trackpoint
13 osmid OSM ID of trackpoint
14 phone tel phone number of trackpoint
15 qrcode qrcode of trackpoint
16 receipt receipt at trackpoint in safe base64
17 src useragent source of trackpoint data
18 time timestamp utc in iso8601
19 type category type or category of trackpoint
20 url url of trackpoint

Note we are translating hdop (precision) into accuracy (metres), not because they are the same, but because some devices return (incorrectly) the accuracy in metres under the hdop synonym.

GPX File Name Standard

The GPX file name is made up of 3 components:

Start Time _ End Time _ Time Zone . gpx

e.g.
20200806204409_20200806211410_sydneyaustralia.gpx

Full GPX Example

Please scroll down within code window to view all.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
creator="app.contacttrace.com.au"
version="1.1">

<trk>
 <name>20200806204409_20200806211410_SydneyAustralia</name>
 <desc>sessionid_Tgyh78jBhFGvTHU9I7JYfdcdeb8j3floJhKu96g8</name>
 <cmt>server_dis1.contacttrace.com.au</src>
 <trkseg>
  <trkpt lat="-33.90361659" lon="151.24097619">
   <time>2020-08-06T10:44:09Z</time>
   <ele>90.55</ele>
   <extensions>
     <speed>1.452</speed>
     <course>250.480</course>
     <accuracy>0.00</accuracy>
     <batterylevel>60.00</batterylevel>
     <cmt>locationid_93264276555454678433228</cmt>
     <src>webapp</src>
   </extensions>
  </trkpt>
  <trkpt lat="-33.90367398" lon="151.24105148">
   <time>2020-08-06T11:14:10Z</time>
   <ele>72.94</ele>
   <extensions>
     <speed>0.002</speed>
     <course>91.170</course>
     <accuracy>0.00</accuracy>
     <batterylevel>58.00</batterylevel>
     <cmt>locationid_63264276555454228732389</cmt>
     <src>webapp</src>
   </extensions>
  </trkpt>
 </trkseg>
</trk>
</gpx>