jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
723 stars 271 forks source link

tcx export not a valid garmin tcx v2 ? #1046

Open zebeuz opened 2 years ago

zebeuz commented 2 years ago

Hello,

I would like to export my activities to the TCX format and import them in pytrainer database (pytrainer is a free software to store and analyse yours performances). But the tcx from Runner Up is not recognized by pytrainer.

I tried to create a plugin in pytrainer to import TCX files from runner Up but in fact, the problem seems to be a bug in the tcx file with the tag .

Runner up mark :

<Creator xsi:type="Device_t">
<Name>RunnerUp U FEEL LITE</Name>
</Creator>

But the XLM schema descriptor (https://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd) requires

Identifies the originating GPS device that tracked a run or used to identify the type of device capable of handling the data for loading. A test on online xml validator confirm the problem. If I add unitId/ProducId/Version like this : ``` Runner Up U FEEL LITE 3842416961 1264 2 50 0 0 ``` The file is correct (Online XML schema validator) and pytrainer accept to import the activity. PS: Yes, I try to improve my english.
gerhardol commented 2 years ago

That was a picky parser... The added data looks like it is taken from a GF305 with Garmin Training Center. The values should probably be more generic.

Do you want to send a PR?

zebeuz commented 2 years ago

Probably picky parsers (three). yes. Runner Up start the file with :

<TrainingCenterDatabase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ext="
http://www.garmin.com/xmlschemas/ActivityExtension/v2" xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">

I would look at the source

Uatschitchun commented 2 years ago

@zebeuz have you noticed #1043, too?

zebeuz commented 2 years ago

I'm giving up. I never succeeded in having my mapbox token recognized

gerhardol commented 2 years ago

I'm giving up. I never succeeded in having my mapbox token recognized

See #1042

The MapBox requirement is annoying...

Uatschitchun commented 2 years ago

@zebeuz

I'm giving up. I never succeeded in having my mapbox token recognized

See: https://github.com/jonasoreland/runnerup/wiki/How-to-build-this-project#free-version

zebeuz commented 2 years ago

Thank you.

The issue #1042 work well. The wikipage seems to be not complete. I create mapbox.properties with two entries : the mapboxDownloadToken (private token created with download:read checked i) and the mapboxAccessToken (default public token) and it's ok.

I prefer the non-free version, Uatschitchun :)

Uatschitchun commented 2 years ago

I've updated TCX export in https://github.com/jonasoreland/runnerup/pull/1054

This is what it outputs now:

      <Creator xsi:type="Device_t">
        <Name>RunnerUp Android SDK built for x86 with barometer</Name>
        <UnitId>0</UnitId>
        <ProductID>0</ProductID>
        <Version>
          <VersionMajor>2</VersionMajor>
          <VersionMinor>4.1</VersionMinor>
          <BuildMajor>2</BuildMajor>
          <BuildMinor>4.1</BuildMinor>
        </Version>
      </Creator>
    </Activity>
  </Activities>
  <Author xsi:type="Author_t">
    <Name>RunnerUp</Name>
    <Build>
      <Version>
        <VersionMajor>2</VersionMajor>
        <VersionMinor>4.1</VersionMinor>
      </Version>
    </Build>
  </Author>
zebeuz commented 2 years ago

I'll try it asap. Thank you.

zebeuz commented 2 years ago

Uatschitchun commit #1054 tested on Wiko Feel Lite . Tcx export work fine for XSD online validator and pytrainer

Thank you !