Upload GPX with Heartrate

2,174 views
Skip to first unread message

Christopher Brandt

unread,
Feb 24, 2017, 1:00:22 PM2/24/17
to Strava API
Hi there,

I'm uploading .gpx files created by Garmin that contain heartrate information, but Strava does not seem to be taking the heartrate data in. The documentation here says that Strava can import GPX 1.1 files with Garmin's trackpoint extensions v1.1. The trackpoint extensions include a <hr> tag for heartrate.

I've created a tool to upload gpx files using the /uploads API. Neither that API or the web interface (which is likely using the same API underneath) is reading the heartrate info.

Anyone have experience or suggestions?

I've already uploaded ~1000 gpx files and just realized the heartrate data didn't get in :-(

Mateo Ortega

unread,
Feb 24, 2017, 4:31:08 PM2/24/17
to Christopher Brandt, Strava API
Christopher,

Are you qualifying the extensions? Here's an abbreviated sample:

[snip]
   <trkpt lat="37.7812250" lon="-122.3957890">
    <ele>5.3</ele>
    <time>2017-02-24T20:14:15Z</time>
    <extensions>
     <gpxtpx:TrackPointExtension>
      <gpxtpx:hr>78</gpxtpx:hr>
      <gpxtpx:cad>56</gpxtpx:cad>
     </gpxtpx:TrackPointExtension>
    </extensions>
   </trkpt>
[snip]


M

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Mateo A. Ortega
STRAVA
Head of Devices and Integrations

Christopher Brandt

unread,
Feb 24, 2017, 4:36:18 PM2/24/17
to Mateo Ortega, Strava API
Yes, the extensions are qualified. I'm using the file Garmin output. This only difference I see is the name of the namespace.

<gpx creator="Garmin Connect" version="1.1"
 [snip]
  <trk>
    <name>Progression Run</name>
    <desc>Progression Run - Last 30 min Steady</desc>
    <type>running</type>
    <trkseg>
      <trkpt lat="49.2767002992331981658935546875" lon="-123.100065551698207855224609375">
        <ele>0.20000000298023223876953125</ele>
        <time>2009-05-11T13:20:50.000Z</time>
        <extensions>
          <ns3:TrackPointExtension>
            <ns3:hr>102</ns3:hr>
          </ns3:TrackPointExtension>
        </extensions>
      </trkpt>
[snip]
--
Chris Brandt

Continuous improvement is better than delayed perfection. - Mark Twain

Jeffrey Friedl

unread,
Feb 24, 2017, 11:26:08 PM2/24/17
to Strava API
> <trkpt lat="49.2767002992331981658935546875" lon="-123.100065551698207855224609375">

I'd just like to ask what GPS unit you're using, that is precise down to 28 decimal digits.
At this level of precision, you're ten million times more granular than the theorized size of quarks and electrons, so in my use case perhaps I won't miss a KOM by a rounding error.
:-)

Christopher Brandt

unread,
Feb 25, 2017, 9:16:39 PM2/25/17
to Strava API, jfr...@yahoo.com
That's funny, hadn't noticed. For the record, that workout came from my old Garmin 405, not likely accurate to much better than 5 decimals places. 

Yi Zeng

unread,
Apr 20, 2018, 10:41:35 PM4/20/18
to Strava API
Ran into the same situation.

Yes, updating the XML namespace schema worked! Change Garmin's exported GPX ns3 to gpxtpx. Now HR, cadence and temperature show up on Strava.

However, one other problem I noticed is that there is no "Lap" view in the sidebar for GPX files exported from Garmin.
Reply all
Reply to author
Forward
0 new messages