In my first 100 mile attempt, I encountered an interesting problem–my Garmin 920xt started to give me a low battery warning around 14 hours into the run. My experience with Garmins told me that I might have 2-3 more hours but it was hard to tell. What I knew was that I did not want to lose any tracking data for this huge event in my life. I brought my older Garmin 910xt as a backup. At the 15 hour mark, I stopped the event on the 920 and started recording on the 910. When the race was complete, I had all of the data but in two separate events. Not a huge deal, but for someone like me, I wasn’t happy that I couldn’t view the whole race as one single event. I’m a bit of a data geek. I’ve been using the Garmin Connect website since 2010 and started using Stava at the end of 2014. I enjoy disecting and analyzing my performances to see paterns, areas for improvement, possible new routes to run, and as motivational tool. Seeing all of my runs in one location gives me tangible proof of my hard work and dedication–especially on those days when I feel like I am in a rut.
Back to the dilema, when I was looking at the Race Analysis view of my event on Strava, it really started to bug me that I couldn’t view the whole race at once. Plus (I know it is egotistical) I wanted to be able to look at my training log and see one giant run of 161 km (100 mi). To the GOOGLE! I started searching about how to merge events.
On a side note, I had learned a few days earlier that when it comes Garmin GPS data, TCX files are more useful than GPX files. When I finished my race, I forgot to hit the stop button. That ended up adding stationary data for another hour and half. To fix that problem I exported the GPX file from the Garmin Connect site and figured out how to remove all the unnecessary data. Essentially, GPX and TCX files are written in XML markup. I work in IT but not as a programmer. That said, I have learned over the years how to read markup languages which essentially have certain information coded by using opening and closing markers. For example, <lap> followed by </lap> data then closed with contains all the data for a single lap. If you learn to look for the opening and closing markers, you can parse the data. I knew what time I finished the race so I deleted all the data after that time but I had to remember to convert the time to GMT since all of the GPS data is based on that time zone.
After removing the data, I uploaded the GPX file. Success–at least partially. I noticed that on the Garmin website much of the data such as type of event, what device I used, as well as other meta data fields were missing. I repeated the data removal procedure on the TCX file and uploaded. This time it had all the extra information.
Based on that experience, the merging of the two parts of my race would be done with TCX files. I first found some websites that claimed they could automatically merge the data for me but when I did it, the data was a bit faulty. It seemed to have combined the first lap of each event as one single lap. The resulting TCX file was about 95% accurate but I was not satisfied. If I was going to do this, I needed it to be 100% correct.
My next try was to try to merge the data manually. To do this I needed to open the TCX files in a text editor (like Notepad on a PC or TextEdit on Mac). The problem is that the raw text has no line breaks and is very difficult to read. I used a combination of a online XML viewer and Notepad++ for PC. These programs automatically format the XML data in the TCX file to something much more readable. Essentially it lines up all the data to show you the opening and closing markers like I mentioned above like .
I opened part 1 of my race and part two. I looked through all the data in part 1 and found that the tracking data ended with the final appearance </Lap> of and before <Creator xsi:type=”Device_t”>.
I pasted that data into the part 1 file after the final appearance of </Lap> and before <Creator xsi:type=”Device_t”>.
I saved that file and uploaded it to Garmin and Strava–VOILA problem solved.