jovandeginste / workout-tracker

A workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities
Other
945 stars 31 forks source link

Heart rate not imported ? #202

Closed dalecooper closed 1 month ago

dalecooper commented 2 months ago

Hey there, I've recently decided that I'll ditch Garmin from my life, so I'm glad I've found this project, looks very nice and much much easier to install than FitTracker :) I've imported about 100 gpx files, most of them come from Garmin Connect, some more recent come from the OpenTracks Android app. In all cases I have heart rate data recorded in the file, but this won't show up in WT. Did I miss something ? How can I get this data handled by WT ? Cheers

jovandeginste commented 2 months ago

Can you share a snippet of the gpx file?

dalecooper commented 1 month ago

Sure ! Here's none from Garmin connect, including headers and one example track point :

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="Garmin Connect" version="1.1"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/11.xsd"
  xmlns:ns3="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
  xmlns="http://www.topografix.com/GPX/1/1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
  <metadata>
    <link href="connect.garmin.com">
      <text>Garmin Connect</text>
    </link>
    <time>2023-12-03T17:33:45.000Z</time>
  </metadata>
  <trk>
    <name>Dijon - Base</name>
    <type>running</type>
    <trkseg>
      <trkpt lat="47.321082763373851776123046875" lon="5.03707386553287506103515625">
        <ele>237</ele>
        <time>2023-12-03T17:53:21.000Z</time>
        <extensions>
          <ns3:TrackPointExtension>
            <ns3:hr>138</ns3:hr>
            <ns3:cad>79</ns3:cad>
          </ns3:TrackPointExtension>
        </extensions>
      </trkpt>

And this one is from OpenTracks :

<?xml version="1.0" encoding="UTF-8"?>
<gpx
version="1.1"
creator="OpenTracks"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:topografix="http://www.topografix.com/GPX/Private/TopoGrafix/0/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:opentracks="http://opentracksapp.com/xmlschemas/v1"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
xmlns:gpxtrkx="http://www.garmin.com/xmlschemas/TrackStatsExtension/v1"
xmlns:cluetrust="http://www.cluetrust.com/Schemas/"
xmlns:pwr="http://www.garmin.com/xmlschemas/PowerExtension/v1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/Private/TopoGrafix/0/1 http://www.topografix.com/GPX/Private/TopoGrafix/0/1/topografix.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v2 https://www8.garmin.com/xmlschemas/TrackPointExtensionv2.xsd http://www.garmin.com/xmlschemas/PowerExtension/v1 https://www8.garmin.com/xmlschemas/PowerExtensionv1.xsd http://www.garmin.com/xmlschemas/TrackStatsExtension/v1 http://www.cluetrust.com/Schemas http://www.cluetrust.com/Schemas/gpxdata10.xsd http://opentracksapp.com/xmlschemas/v1 http://opentracksapp.com/xmlschemas/OpenTracks_v1.xsd">
<trk>
<name><![CDATA[Wednesday, July 3, 2024 at 5:50:12 PM +02:00]]></name>
<desc><![CDATA[]]></desc>
<type><![CDATA[running]]></type>
<extensions>
<topografix:color>c0c0c0</topografix:color>
<opentracks:trackid>cc1edd5e-9780-4b5e-aa39-542a46b04231</opentracks:trackid>
<opentracks:typeTranslated><![CDATA[running]]></opentracks:typeTranslated>
<gpxtrkx:TrackStatsExtension>
<gpxtrkx:Distance>4613.59765625</gpxtrkx:Distance>
<gpxtrkx:TimerTime>1717</gpxtrkx:TimerTime>
<gpxtrkx:MovingTime>1717</gpxtrkx:MovingTime>
<gpxtrkx:StoppedTime>0</gpxtrkx:StoppedTime>
<gpxtrkx:MaxSpeed>3.656536102294922</gpxtrkx:MaxSpeed>
</gpxtrkx:TrackStatsExtension>
</extensions>
<trkseg>
<trkpt lat="47.325987" lon="5.072536">
<ele>311.9</ele>
<time>2024-07-03T18:03:01.008+02:00</time>
<extensions><gpxtpx:TrackPointExtension>
<gpxtpx:speed>2.61</gpxtpx:speed>
<gpxtpx:hr>140</gpxtpx:hr>
<opentracks:accuracy_horizontal>4.034</opentracks:accuracy_horizontal></gpxtpx:TrackPointExtension></extensions>
</trkpt>

Please let me know if you need the full files, but I'm not willing to share them publicly so I'll send them to you over email

jovandeginste commented 1 month ago

Did you update to the most recent version of my app, and upload the files (or refresh the workouts) after updating?

dalecooper commented 1 month ago

Version is v1.16.4 so yes I'm up to date And refreshing does nothing more

In case it's important, the version I'm using right now was installed via Yunohost, but I was facing the same issue when I initially installed it with docker

As you can see the HR graph is empty image

jovandeginste commented 1 month ago

I will build a new release from master now, where I added support for more extension standards. Can you update your code when the new image is ready (give it 15 minutes)? You can follow the progress here: https://github.com/jovandeginste/workout-tracker/releases/tag/v1.16.5

dalecooper commented 1 month ago

I can confirm this update fixed the issue for both types of gpx files. That was fast! Thank you very much and keep up the excellent work

jovandeginste commented 1 month ago

It was already fixed :smirk: I just needed to cut a release.