Trail Notes

Heart Rate, Cadence, and Sensor Data in GPX Files

GPX carries more than position. Here's how devices store heart rate, cadence, temperature, and speed inside a track — and why that data sometimes vanishes.

Reading time: 7 minutes Last updated: July 2026

Where Sensor Data Lives in a GPX File

The core GPX 1.1 schema only knows position, elevation, and time. Everything a chest strap or cadence sensor records travels in each point's <extensions> block, almost always using Garmin's TrackPointExtension schema. A fully-loaded track point looks like this:

<trkpt lat="32.3120640" lon="-114.5392010">
  <ele>45.2</ele>
  <time>2026-07-01T14:30:00Z</time>
  <extensions>
    <gpxtpx:TrackPointExtension>
      <gpxtpx:atemp>31.5</gpxtpx:atemp>
      <gpxtpx:hr>142</gpxtpx:hr>
      <gpxtpx:cad>85</gpxtpx:cad>
      <gpxtpx:speed>12.6</gpxtpx:speed>
    </gpxtpx:TrackPointExtension>
  </extensions>
</trkpt>
ElementMeaningUnitNotes
hrHeart ratebeats/minute0 usually means a strap dropout, not a reading
cadCadencerevolutions/minute0 is a real value — coasting
atempAmbient temperature°CDevice sensor; reads high in direct sun
speedSpeed over groundmeters/secondRequires v2 of the extension schema

The Prefix Trap: gpxtpx, ns3, and Friends

The gpxtpx: part of each element name is a namespace prefix, and here's the trap: the prefix is chosen by whatever wrote the file. Garmin Connect exports commonly use ns3:hr instead of gpxtpx:hr — same data, same schema, different label. Software that looks for the literal text "gpxtpx:hr" reports no heart rate for millions of perfectly good files.

Well-behaved tools match the element's local name (hr) regardless of prefix. Our GPX Analyzer does exactly that, so gpxtpx:, ns3:, and Cluetrust-style gpxdata:heartrate files all chart correctly.

Editing can silently strip sensors. Some editors and converters drop the whole <extensions> block on save. After processing a file elsewhere, drop it into the analyzer — if the heart-rate chart is gone, the tool that touched it last discarded the data.

Seeing Your Sensor Data

Load a track into the GPX Analyzer and any sensor stream present appears automatically:

  • Avg HR and Max HR join the statistics cards (dropout readings excluded from the average)
  • Heart Rate, Cadence, and Temperature charts plot each stream against distance, aligned with the elevation and speed profiles — so you can see exactly where on the climb your heart rate spiked
  • Temperature follows the unit toggle: °C in metric, °F in imperial

Getting Sensor Data Into GPX

If your data starts life outside a GPX file — a spreadsheet from a logger, an export from analysis software — the CSV to GPX converter maps heart rate, cadence, temperature, and speed columns (auto-detected from headers like hr, cadence, temp, speed_kmh) and writes a proper TrackPointExtension block. The result round-trips: convert a CSV with sensor columns, load it in the analyzer, and the charts appear.

Editing is safe too: the GPX Track Editor preserves all four sensor streams through trims, cuts, and splits.

Troubleshooting

No heart-rate chart for a Garmin file

Open the file in a text editor and search for "hr>". If you find ns3:hr elements, the data is there — the viewer you used before just couldn't see past the prefix.

Heart rate flatlines at zero

Strap dropouts record as 0 bpm. Analysis tools should exclude zeros from averages; if yours doesn't, your average HR will read absurdly low on a ride with poor strap contact.

Speed chart looks different from the app's

When a file has no embedded speed, tools compute it from distance over time between points, which is noisier than the device's filtered value. Files with embedded speed elements chart the device's own numbers.

Temperature reads high

Device temperature sensors sit next to warm electronics and often in the sun. Expect readings a few degrees above ambient, especially on stopped or slow-moving vehicles.

Related Tools and Guides