This object is in archive! 

TCX and GPX export

HyPhan shared this question 7 years ago
Answered

Using Locus Pro I intended to replace my former Garmin Forerunner with Locus.

A BT4LE HF belt works well (hr data gets recorded). The Audio coach tells me current figures every km (while I would certainly be interested in a good and official support for an Android Wear watch - but dont yet own one..).


But when it comes to export (btw. would be nice if it was possible to specify more than one format for auto-export in a track recording profile) it does not look good.

Using TCX, my target App SportTracks (tried latest version / free version) cannot even read it - no data imported.

Using GPX, I only get the track. While heartbeat data seems to be in there (looking into the xml), it does not get imported. SportTracks seems to offer to import various parts of the file separately using checkboxes, but the checkboxes for everything except GPS track are greyed out.

In addition, there is no lap data (I would expect 1km intervals with times - per default but anyways after specifying them for the audio coach).

Also no cadence and similar - this is probably something that really cannot be recorded with the Smartphone.


So for the moment it seems, Locus cannot fully (or lets say in relevant parts) replace a Forerunner.


Any chance you can fix the TCX export or GPX export to include the heartrate data in a more compatible way?


Thanks!

Replies (12)

photo
1

Have you tried importing the TCX file into another program like Garmin Connect or Runalyze.com? It would reveal if the TCX file cannot be properly imported by many programs or if the problem is limited to some programs.

Alternately, you can attach your TCX file here (as a .zip) and I'll test it with Connect and Runalyze.

photo
1

I am well aware that probably the TCX files work with some other programs, otherwise it would be strange. But then I thought SportTracks is also quite well-known and often-used and should not have big implementation issues that it is to blame for (and of course it had no problems with the Garmin-watch-created TCX files). I would say probably Locus does not write fully correct TCX format and hoped this can be corrected. (or is it not publicly specified by Garmin, only possible by re-engineering?)

If I can help there by trying to import modified TCX files (I could even manipulate my own exported file in a way described to me) just say the word.


Alternatively it would also be OK if the GPX format would be improved so that more of the running-relevant info is included in a way compatible to more programs (in my case SportTracks - of course the question is always which side does it "wrong" in some way, it sure _can_ be SportTracks too).

photo
1

Garmin's Training Center XML file format (TCX) is described here. It also contains links to the TCX schema and its extensions.

https://en.wikipedia.org/wiki/Training_Center_XML

photo
1

According to this the TCX/XML generated by Locus is "well formed and valid" (using an online schema validator).

But thats only the Syntax, probably no program will understand anything that could be written within that schema.

One should probably stay as close to the "original" Format use (by its inventor Garmin) as possible to ensure maximum compatibility.

Comparing a Locus generated TCX with one of my former Forerunner 620, various differences can be noticed.

While Garmin writes an <Activity>, Locus uses a <Course>.

Both contain a lap, but with some differences - and an activity lap contains a track, within a course the track follows the lap.

I managed to change my Locus TCX so that SportTracks was able to import it by doing the following things:


  • changing Courses/Course to Activities/Activity where an Activity must contain attribute Sport="Running"
  • Lap element must contain attribute StartTime="2017-03-16T18:43:49Z"
  • change Name to Id, which must contain a dateTime like '2017-03-16T18:43:49Z'
  • put the closing Lap tag behind the track instead of before it (include Track into Lap)
  • remove BeginPosition and EndPosition elements from the Lap element
  • before the Intensity include a Calories element (if not calculated calories, a zero should work?)
  • after the Intensity include a TriggerMethod element, which is one of a list of strings as defined in the schema, obviously it should denote how multiple laps are triggered (and at the moment Locus does not include multiple laps at all), I used 'Distance'

With all of this the xml was still/again well-formed and valid and could be imported.

Dont know if Menion could consider changing this for the TCX export. Never know if this breaks other programs that now understand the Locus-TCX, but after all thats the way Garmin does things..

Thanks for attention.

photo
1

Good day HyPhan,

thanks for a time you invested into this.

Because as you confirmed, Locus Map exported TCX file is valid, I see no problem that needs to be fixed in Locus Map. Fact, that one web service is able to handle "activity" content only, is not an Locus Map problem, sorry.

There are three possible solutions I see:


  • change behavior in Locus Map to allow export an "activity" tags as well
  • using exporting Sporttracks API for directly export from Locus Map to this service ( https://www.sporttracks.mobi/api/doc )
  • using different web service or any service that allows to re-upload data to this sporttrackers web site

Unfortunately first two options takes some time to make them real and without bigger interest from more users, I can't imagine to realize them now, sorry.

EDIT:


photo
1

Thanks Menion for your response.


I am only interested in imports to the standalone / local SportTracks program (dont want my data in any cloud).

I just voted at the other topic you mentioned.

What is described there suggests there _are_ other programs/services that do _not_ understand the TCX with course data ("so the tcx can be uploaded to Garmin connect and/or other platforms that support tcx", the mentioned example runalyze seems not to be able to import the files too as I understand this?)

The changes I described should not be very difficult to do as an additional export format variation, but of course it is a bit work, no doubt. Thanks for considering.


The other thing would be to find out, why the GPX-included hr data also is not recognized by ST. Maybe I will investigate this further too sometimes.

photo
1

Found out now how to import the GPX including hr data into ST - it's enough to change the xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v2"; to v1 (one char at the end) -- so this probably ST is to blame for.

Its not needed to remove the course-data not supported by v1 schema - so ST does not even seem to validate.

So, I have a fairly quick possibility to get my data imported.

However, interval info as "laps" would be something to include in a TCX activity-based file in the future I guess (or would GPX support "laps" too?).

photo
1

Hello HyPhan,

I firstly wanted to leave this task be, because of a lot of other work to do last weeks ( never-ending fixing of bugs mainly ... ). On second side, export as "Activity" solve also export to Garmin Connect web site and also I see you had a lot of time invested here.


So as I wrote in second topic, idea "Export TCX as activity" will be implemented in next version.

photo
1

Hello Menion,

great news, looking forward to next version :)

photo
1

Worked for me :)

photo
1

This is very good news for me as well :). Thank you for help with this, testing and confirmation!

photo
1

TCX export with activity is currently broken (since about mid March).

If you choose "activity" (instead of "course") on manual export, nonetheless a course is in the .tcx file.

If you try to set "activity" export type in profile's automatic export settings, after save/apply checking back, the setting is back to "course".

Hope this can easily and soon be corrected again. Thanks!

photo
1

Good day HyPhan,

I'm glad that someone, even after two years, takes care about proper exporting of TCX files :). Thanks and sorry for this bug. Seems to be a side-effect of changes made for export into FIT format (where I made exactly same problem). If you export track manually, at that moment, it should still work and correctly export an activity (maybe small workaround). Anyway, problem found and fixed. Unfortunately, the new version is planned at the end of April, so if you really need this functionality, you will have to downgrade to older Locus Map version. Thanks for understanding.

photo
1

Dont know if I am last TCX user, hope not..

As I said manual export did not work either, with choosing "activity" still a course was in the export file.

Will have to use GPX (and thus do without the HF data) until this is fixed - and will survive that ;)

Thanks for caring.

photo
1

OK - SORRY - just tried again with a track and this time the manual export choosing activity was successful. Must have done something wrong the first time.

photo
1

No no, there really IS issue. When you do simple manual export, then selection works correctly. But when you return back to export later again, the first option is again selected. So selection is not stored permanently. In the case of automatic export, it may be a bigger problem as always "Activity" (first option) is chosen.

photo
1

In my case an activity is what I want / need (course cannot be imported by my client). So the problem is that in automatic export always course is used and that cannot be changed to activity. It definitely used to be activity (stored in my profile) for the last months. So the problem cannot be simply "first" (alphabetically) in order.

In manual export I first thought I got a course even if I selected activity, but another try with that got me an activity, so maybe I made an error on first try.

It seems until automatic export is fixed I can use manual export.

photo
1

Fixed with 3.38, Thank you.

photo
1

Perfect, thanks for the confirmation!

Replies have been locked on this page!