Yet Another Cycling Forum
General Category => The Knowledge => GPS => Topic started by: Hot Flatus on 02 October, 2011, 02:40:39 pm
-
I have two tcx files that I want to merge for the purposes of DIY by GPS validation. The GPS nunit decided to switch itself off at one point, hence the two files. How the bloody hell do I do it? I tried cutting and pasting the second file onto the end of the first in Notepad, but it wouldn't have it.
Confused of Gloucestershire.
-
Just send both, sometimes I get 2 or 3 in a zip file and they open in the software together. Other times I just open them separately to validate them.
They will be fine as it's only proof that you have passed through the controls in a specified time that counts.
The route between them doesn't matter as the shortest distance has been ok'd beforehand.
Rich
-
Ah thanks Rich. I did send them, in a fit of pique, after trying for half an hour to merge them. It has taken a week for me to have guilt pangs. ;D
-
I've not tried this but I did read this thread on the Garmin forum. Seems to suggest they can be merged either via XSLT or a java prog. Usual rules about downloading s/w from forums but might be worth a shot?
A solution for combining/merging two TCX files (activies) (https://forums.garmin.com/showthread.php?t=13784)
-
Thanks, but to be honest that starts to stray into territory into which my ICBA side pops out ;D
-
You could import them both into Garmin Basecamp, then join the tracks (Edit menu -> Advanced -> Join selected tracks), then export as a TCX file.
-
Ah. First I'll have to find out what Garmin Basecamp is. Thanks, I'll give it a whirl.
-
An XML file is just a set of nested tags. All you need to do is strip the appropriate tail tags off the first file and the top tabs off the second file. After two beers that should be easy.
-
Further to Jaded's post.
Using notepad (or even better, use foxe (http://www.firstobject.com/dn_editor.htm)):
- For the 1st file, delete all the tags from (and including) the <Creator xsi:type="XXXX"> tag onwards. The last tag should now be </Lap>.
- For the 2nd file, copy all the tags from (and including) the first <Lap StartTime="YYYY-MM-DD..."> tag onwards, paste at the end of the 1st file and Save As "combined.tcx".
-
This entry is a duplicate of what I posted at http://yacf.co.uk/forum/index.php?topic=58702.msg1236152#msg1236152
Thought it might also be appropriate to relist it here:
I've encountered the "Edge 800 crash after 400km" three times. After the first two times I returned the unit to Garmin and they replaced it.
The new unit had the same issue. After a bit a research I found that a number of other people had experienced the same issue.
There are a few entries on the Garmin forums eg:
https://forums.garmin.com/showthread.php?t=17002
Until Garmin confirm a definite fix for the issue a way round this problem is to reset your activity at a "safe" distance of say 300km and then merge the multiple activities into one.
I tried a few different ways of doing this:
Garmin Basecamp (http://www.garmin.com/uk/maps/trip-planning-software/basecamp) - Can join activities, but only a basic track. You loose other info like heart rate and cadence.
TCX Converter (http://www.teambikeolympo.it/TCXConverter/TeamBikeOlympo_-_TCX_Converter/TCX_Converter_ENG.html) - Can join two activities, but seems to consistently corrupt very long rides, placing random points several thousand km away. It also can't deal with activities spaning two or more days.
CombineActivities.jar (https://forums.garmin.com/showthread.php?t=13784) - This works in so much that it successfully joins the two activities. The problem is that you need to copy and paste the result from the program into a text file. Most computer operating systems can't cope with this, due to the size. I found that Windows 7 and Mac OSX couldn't deal with 2x200km, Ubuntu Linux could. Even Linux couldn't cope with 2x300km
Ascent (http://www.montebellosoftware.com/) - I've successfully used the free trial version of this software to join two 300km .fit files. Unfortunately this software is only available for Max OSX.
Training Peaks (http://home.trainingpeaks.com/) - I read somewhere that you could do this on the desktop version of this product. They now seem to have a web based version. I've not tried it.
If anybody knows any other methods other than Ascent (http://www.montebellosoftware.com/) please share.
-
I'd do it by hand in a text editor. But then I am a bit old-school hackerish.
It should be a very short python script along the lines of
import xml.dom.minidom
doc1=xml.dom.minidom.Document(filename1)
doc2=xml.dom.minidom.Document(filename2)
creator=doc1.getElements("Creator")
for e in doc2.getElements("Lap"):
creator.insertBefore(e)
print doc1.asxml()
This won't work as I haven't looked up the proper methods but should be pretty close to what you can do.
..d
-
Garmin Basecamp (http://www.garmin.com/uk/maps/trip-planning-software/basecamp) - Can join activities, but only a basic track. You loose other info like heart rate and cadence.
Have you tried the latest version of Basecamp (currently v 3.3.3)? Older versions stripped the heart rate data, but that has since been fixed. It works fine for me anyway - joining/splitting activities from my Forerunner or Foretrex, then exporting as GPX or TCX. The exported files have all of the heart rate data (I've not got a cadence sensor).
Or Garmin Training Center should also be able to do this.
Or you could try SportTracks.
-
I'd do it by hand in a text editor. But then I am a bit old-school hackerish.
Surely the easiest and IMO the safest way. If you combine stuff in software, you don't know what else it might be doing to the data.