gps-wizard

TCX - Training Center XML

The following trackpoint elements and attributes are supported:

TPX Name Description Name Type Units Resolution
Time Date + Time ts float64 s 1 x 10-3
LatitudeDegrees 1 Latitude lat float64 deg 1 x 10-7
LongitudeDegrees 1 Longitude lon float64 deg 1 x 10-7
AltitudeMeters 2 Elevation ele float64 m 1 x 10-3
HeartRateBpm Heart Rate hr uint16 bpm -
Speed 3 4 Speed Over Ground sog float32 m/s 1 x 10-3

Notes:

  1. Latitude and longitude are rounded to 7 decimal places by the TCX reader; see comments below.
  2. Elevation does not have a fixed precision but will rarely be more than 3 decimal places.
  3. Speed over ground relies on Garmin’s ActivityExtension - either v1 or v2.
  4. Speed over ground does not have a fixed precision but will rarely be more than 3 decimal places.

Latitude and Longitude

It is worth noting that TCX files will sometimes include as many as 16 decimal places for longitude and latitude. This is simply an artifact of the floating point arithmetic used by Garmin Connect, whilst generating the TCX file.

GPS / GNSS chips typically output the equivalent of 7 decimal places. For example, SiRF and ublox binary formats both provide latitude and longitude with exactly 7 decimal places.

7 decimal places provides a resolution equivalent to 1.11 cm at the equator so it should be easy to see that providing more than this level of precision is highly misleading, given the accuracy of GPS technology.

Elevation

Elevation is recorded to the nearest 0.2m in Garmin TCX files and the same resolution in FIT + GPX files from Garmin Connect.

However, TCX files from Garmin Connect will often show as many as 16 decimal places despite the true resolution being 0.2m.

This spurious precision is ignored by the GPS Wizard when it loads TCX files into memory.

Speed

Garmin added support for speed in ActivityExtensionv1 and ActivityExtensionv2 for use with TCX.

It should be noted that the native TCX units are m/s, but COROS are using km/h. This is obviously a bug on the part of COROS.

TCX vs GPX

The TCX schema clearly draws some inspiration from the GPX schema. There are however some fundamental differences in structure, primarily around the concepts of activities, laps, and tracks.

GPS Wizard is capable of reading TCX files which contain multiple activities, including multisport activities. Each activity within the TCX is simply treated as a separate track by GPS Wizard, so a single TCX may be regarded as containing multiple tracks.

Laps have no meaning within GPS Wizard, so an activity within a TCX file is simply a single track containing a collection of track points. De-duplication has been implemented, such as when the last point of one lap is identical to the first point of the following lap.