This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A solution for combining/merging two TCX files (activies)

Former Member
Former Member
This weekend I needed to adjust my interval workout while it was in progress (yes, I needed a break!) This resulted in me having two different activities and two TCX files for each.

I searched and downloaded various software, but they didn't do exactly what I wanted. (Some didn't preserve the calories, and some turned the workout into a course, etc)

I then tried just copying all the laps from one TCX to the other using notepad, but that didn't work either. The distance was corrupt when I uploaded to Garmin Connect. I realized that the the individual laps in each activity have a cumulative distance tracker. So all I needed to do to make this work is offset the last distance tracked to all of the distances from the other activity.

I created a simple XSLT transform that can be applied to two TCX files and it will create a new merged activity.

Thought I'd share.

(Note, you'll need a XSLT processor like saxon/xalan or others)
  • Former Member
    0 Former Member over 12 years ago
    Awesome!

    I just whipped up a quick and dirty Java program that is self contained and easy to execute.

    Make sure you have Java installed, then...

    Download this .jar file, and then double click it.

    CombineActivities.jar


    This was just amazing! Thanks so much! Makes it so easy!
  • Hi all,

    I tested for the first time my new Edge 810 today riding on my MTB. I always make a break in the middle, and I found that the device has saved two different activities.

    I uploaded them to Garmin Connect and they appear as two separated activities, but in my computer (Mac), the software I use to register my workouts understood that they was only one activity divided in two parts.

    I think Garmin Connect should allow to join manually two activities, or set as a preference that workouts separated by a given amount of time should be considered the same workout.

    Don't you think so?
  • @AIMFORMIN this is awesome

    Thank you so very much!
  • Former Member
    0 Former Member over 11 years ago
    Hi... Can I use the combine activities for .fit I'm trying to combine two files from my garmin 810 into one. Could you guys help, sounds like you understand pretty much about it... I'm new to all of this. Thks!
  • Hi... Can I use the combine activities for .fit I'm trying to combine two files from my garmin 810 into one. Could you guys help, sounds like you understand pretty much about it... I'm new to all of this. Thks!


    Have you read through the thread? The Java applet is really quite simple. :)
  • Te easiest way from my point of view to merge activity files (.fit and .tcx) is to use the Fit File Repair Tool. Merging two files takes 1-2 minutes with the Tool and all min/max/average/total values are automatically recalculated.

    To get more information please visit http://fitfilerepairtool.info.

    Mathias


    Hi... Can I use the combine activities for .fit I'm trying to combine two files from my garmin 810 into one. Could you guys help, sounds like you understand pretty much about it... I'm new to all of this. Thks!
  • Where's the append button?

    TrailRunner seems to work really well for the task. I exported the files to TCX, imported them on Trail Runner, then used the button Append, exported the combined ride back out to a TCX activity.


    I've been trying to append a couple of files in Trail Runner, but I can't seem to find the append button....
  • Former Member
    0 Former Member over 11 years ago
    Hi,

    First i have to say that this is a great tool!
    Second, is there any chance i could get the source code? i'd like to tinker with it :)
  • I just whipped up a quick and dirty Java program that is self contained and easy to execute.

    Make sure you have Java installed, then...

    Download this .jar file, and then double click it.

    CombineActivities.jar


    Thanks so much for putting this together! It did exactly what I needed on the first try.