glennreyes / runtastic-gpx

💪 Convert Runtastic JSON exports to GPX
https://runalyze.com/runtastic-converter
27 stars 11 forks source link

Option to use gpx or tcx export #7

Open mipapo opened 5 years ago

mipapo commented 5 years ago

TCX provides better sport detection on different platforms

glennreyes commented 5 years ago

I don't have any experience working with TCX, but I'm down for adding it.

glennreyes commented 5 years ago

This might require changing the name (breaking) to avoid confusion. Could look smth like:

# Default gpx
$ runtastic-export [in-path] [out-path]

# For both
$ runtastic-export --tcx --gpx [in-path] [out-path]

# For just tcx
$ runtastic-export --tcx [in-path] [out-path]

But I'm generally open for better ideas.

mipapo commented 5 years ago

Shorted and "xxxx"ed tcx:

<?xml version="1.0" encoding="UTF-8"?>
<TrainingCenterDatabase xsi:schemaLocation="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd" xmlns:ns5="http://www.garmin.com/xmlschemas/ActivityGoals/v1" xmlns:ns3="http://www.garmin.com/xmlschemas/ActivityExtension/v2" xmlns:ns2="http://www.garmin.com/xmlschemas/UserProfile/v2" xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Activities>
  <Activity Sport="Running">
   <Id>2019-07-29T16:21:36.275Z</Id>
   <Lap StartTime="2019-07-29T16:21:36.000Z">
    <TotalTimeSeconds>401</TotalTimeSeconds>
    <DistanceMeters>1000</DistanceMeters>
    <MaximumSpeed>3.3</MaximumSpeed>
    <AverageHeartRateBpm><Value>148</Value></AverageHeartRateBpm>
    <MaximumHeartRateBpm><Value>173</Value></MaximumHeartRateBpm>
    <Calories>79</Calories>
    <Cadence>1</Cadence>
    <Track>
     <Trackpoint><Time>2019-07-29T16:21:36.275Z</Time><Position><LatitudeDegrees>48.xxx</LatitudeDegrees><LongitudeDegrees>10.xxx</LongitudeDegrees></Position><AltitudeMeters>510</AltitudeMeters><DistanceMeters>0.0</DistanceMeters><HeartRateBpm><Value>0</Value></HeartRateBpm><Extensions><TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2"><RunCadence>59</RunCadence></TPX></Extensions></Trackpoint>
  </Track>
   </Lap>
    <Lap StartTime="2019-07-29T17:57:32.000Z">
    <TotalTimeSeconds>321</TotalTimeSeconds>
    <DistanceMeters>762</DistanceMeters>
    <MaximumSpeed>2.4</MaximumSpeed>
    <AverageHeartRateBpm><Value>142</Value></AverageHeartRateBpm>
    <MaximumHeartRateBpm><Value>147</Value></MaximumHeartRateBpm>
    <Calories>68</Calories>
    <Cadence>1</Cadence>
    <Track>
     <Trackpoint><Time>2019-07-29T17:57:32.000Z</Time><Position><LatitudeDegrees>48.xxxx</LatitudeDegrees><LongitudeDegrees>10.xxxx</LongitudeDegrees></Position><AltitudeMeters>514</AltitudeMeters><DistanceMeters>14004.2</DistanceMeters><HeartRateBpm><Value>147</Value></HeartRateBpm><Extensions><TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2"><RunCadence>84</RunCadence></TPX></Extensions></Trackpoint>
     <Trackpoint><Time>2019-07-29T18:02:49.000Z</Time><Position><LatitudeDegrees>48.xxx</LatitudeDegrees><LongitudeDegrees>10.xxxx</LongitudeDegrees></Position><AltitudeMeters>500</AltitudeMeters><DistanceMeters>14756.1</DistanceMeters><HeartRateBpm><Value>136</Value></HeartRateBpm><Extensions><TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2"><RunCadence>80</RunCadence></TPX></Extensions></Trackpoint>
    </Track>
   </Lap>
  </Activity>
 </Activities>
</TrainingCenterDatabase>
neo-apz commented 5 years ago

👍 Most services do not recognize the activity type when I try to import the converted GPX files. TCX, however, provides better suppprt when it comes to this.

neo-apz commented 5 years ago

Any update on this?

mipapo commented 5 years ago

Absolutely no time for this. Sorry