25 May 2011

how to manually edit your Garmin GPS file

Unlike most technology enthusiasts it usually takes me a little longer to figure out all the functions and features on my toys. Like in this case how the hell to use the goddamn 'Start' or 'Lap' button on my Garmin Edge 500.

ASIDE – I really do love this cyclometer, The Edge 500 is the bomb. BOMB.

One of the things I still seem to struggle with is when to press the lap button. I'm able to start the thing up just fine but then after a portion of the ride is over – like my warm up prior to a race for example – and I want to designate the race as a unique lap, my skillset breaks down. Three times now I have left the computer on after putting the bike in the car or simply managed to not record my race at all. Stuff like that. It happened again last night at Pacific Raceways.

Luckily there are people out there who are much smarter than me; like Jeff R. He showed me how to edit the data file from my Garmin allowing me to snip out sections like the drive home. Thanks Jeff.

As with anything else involving technology there are many ways to do this but here is the method I used.
  • Upload your messed up activity to Garmin Connect.
  • View the messed up activity and click the Export button.
  • Select "TCX File" and save the file to your computer.
  • Open the file in any basic text editor (I prefer Notepad++).
  • Each lap will be surrounded by the <Lap></Lap> tag, delete the one that you don't want (like my drive home).
  • Save the modified TCX file to your computer.
  • Delete the messed up activity from Garmin Connect.
  • Upload the corrected TCX file to Garmin Connect using the Manual Upload feature.
Done!
Technorati Tags: ,

44 comments:

Susanne said...

Thanks! I just used me Garmin 500 for the first time and also had the bogus 4 minute lap.
Much better without it

Martin Criminale said...

@Susanne - glad this worked for you.

Phil Turk said...

Very helpful ... muchas gracias!

Martin Criminale said...

@Phil - glad you found this helpful.

Andrew said...
This comment has been removed by the author.
aewills said...

This was so helpful--I don't know why Garmin can't seem to add a "delete lap" feature, but it's great to finally know how to do it manually. Much thanks!

Martin Criminale said...

@aewills - glad you found this useful.

MPM said...

Thanks Martin. I used to have the Forerunner 405, which had a "Delete Lap" function, but I upgraded to the Forerunner 910xt, and that functionality was removed. Thanks for the info.

(P.S. I also agree, Notepad ++ rocks)

Martin Criminale said...

@MPM - I have been lusting after that 910xt... not in the cards yet I'm afraid. :) What I would ideally like is a GPS watch that had a true 24-hour battery for ultra events. Suunto has something but the files are not readily comparable with Garmin Connect or Strava. That's bunk. Plus they get their 50-hour battery life by checking the location MUCH less often so it's correspondingly less accurate. Also bunk.

gingeristhebest said...

Hi, I'm using forerunner 410, did everything as you said it, but when I opened the file there were only letters around that dont make any sense for me..where did I go wrong?!

Martin Criminale said...

@gingeristhebest - Based on what you said I can only guess what the problem might be. It sounds like you either have a corrupted file in which case you should just export it again (being sure to select TCX when you do) and/or you are using a program that does understand the TCX file format (which results in the giberish you see when you open the file) in which case I would recommend that you use Notepad++.

Ham-planet said...

Why is this tagged 'edit FIT'? .fit files are not plaintext and cannot be edited in this way.

Martin Criminale said...

@Ham-planet - I guess you are right, I removed that tag. My mistake.

Tragic-Hero said...

This helped me too!

Thanks from Sweden :)

Martin Criminale said...

@Tragic-Hero - glad you found this useful!

Jarrod Honeycutt said...

I'm using a simple Forerunner 110.. if you have a Mac, TextEdit works fine.. and to make your life easier when you open the program click Edit>Find>Find...

Type 'lap' so it'll highlight everywhere a new lap starts.

Thanks for the info Martin.

James Blackburn said...

Excellent advice, thank you. Finished my first ride with my new 200 along Loch Ness from Fort William to Fort Augustus. Half way it moved moved me 15 miles west and up a few thousand feet onto a mountain so i thought the ride data was ruined. Read your post, dropped the data into textedit, deleted the erroneous data and uploaded back and all okay. Great, thanks.

Christopher Ruedy said...

Great way to edit activities- Is there a way to use this technique to merge 2 activities together? I pressed "stop" instead of "lap" in the middle of a ride that I really want one file for... any help appreciated

Martin Criminale said...

@Christopher - sure, instead of deleting the sections you don't want, just copy and paste the sections from the second file into the first. Also, not sure what model of GPS you have but on both of my Garmin units if I accidentally press "Stop", I can just press "Start" and it will continue logging in the same file. It's only after I press "Reset" that I start logging a new file.

??? said...

I have a run that I need to stop at 19:25 seconds. Its not bang on a lap but I am struggling. I have the tcx file and thought it would be as simple as removing between trackpoints however I must be deleting the end of to show that it has finished. Any ideas?

Martin Criminale said...

@??? - I think you are correct, you are probably deleting too much of your GPS file. If you only delete the unwanted segments I believe you can fix (or shorten in your case) this file.

??? said...

Thanks. I will give it a play and see what I can do!

Unknown said...

First of all, Great blog! I can spend lots and lots of time reading it!
Qucik one for you: I have left my garmin 510 on wiht GPS while recording a session on my home trainer. Now I need to keep the same session but deleting ONLY the GPS tracks. You know how to do that?
Thanks!
6co

Martin Criminale said...

@Unknown - I suspect you can but this is just a guess as I have never tried it. Test this and see what you get when you upload the 'corrected' track.

When you open your TCX file in a text editor every time the GPS checks in will be designated by a 'Trackpoint' and will look like this:


2014-08-18T20:40:20.000Z

47.65419015660882
-122.30795441195369

45.79999923706055
72.88999938964844


4.0879998207092285




I suspect to fix this file the way you want you will need to delete every tag.

Martin Criminale said...

@Unknown - My comment did not turn out the way I wanted because Blogger made some assumptions about my tags. :( In my last sentence I meant to say that you will need to delete every Trackpoint tag. Above that I tried to paste in one Trackpoint from my ride today.

Irith T. Bloom said...

I just tried this for an activity where I left the watch running as I drove home (glad to know I'm not the only one!). Thank you for the useful tip!

Martin Criminale said...

@Irith - glad this helped!

Ernie said...

Thanks!

Ernie said...

Guys,

Perhaps one more helpfull comment:
I found out that my version of TCX is using XML Schema where checkpoint are wraped within tags. And you can easily find where you have jumped in you car by searching for series of 0 (if you have Cadence meter). This is where you actually have stopped moving.
The only thing is that when I remove all tracks the total mileage and time of a training would not recalculate. You have to update it yourself either.

Good Luck!

Martin Criminale said...

@Ernie - thanks, that is helpful info.

Ernie said...
This comment has been removed by the author.
Ernie said...

Sorry the tag names where converted to emptiness in my comment. I meant "<\track" for the milestone and "<\cadence>" for the cadence.

Richard said...

Thanks - but any idea how to delete a lap marker itself (it's easy to press twice by accident when setting a course) without losing the actual time and distance etc?

Martin Criminale said...

@Richard - here is one of my recent files where I rode my bike to a run, stopped my bike GPS and then after the run started my bike GPS again and rode home.


2015-07-01T02:29:51.000Z

47.60797225870192
-122.30117755942047

8047.9599609375




4.251999855041504




507.485
3257.26
10.97599983215332
120
Active
Manual


2015-07-01T02:29:58.000Z

47.60798407718539
-122.3005803488195

8092.8798828125


I suspect that if you were to delete everything between the last tag in your first lap and the first tag in your second lap that it would remove the separator and Garmin Connect would think this was one continuous activity.

Of course you should test this as I have not. :)

Jan Mickos said...

I have an Garmin edge 500 unit that I forgot to press stop on after the 90km passage of an half ironmantriathlon.
I want to shorten the file (which became 14hours long) before the battery died. I have exported the tcx-file from Garmin Connect.
What do I put in, where and how much can I delete(eg. where must I stop deleting). I know the second I stopped the bike. (The reason is I have problems evaluating average power data etc because of this for the next race).
I failed using your original edit advice and reload garmin connect.
("Technorati Tags: Garmin Edge 500,edit TCX" links did not work when I opened them)
/Jan -reborn triathlete

Martin Criminale said...

@Jan - if you open up your file you will see that each time your GPS records something it is inside of the Trackpoint tag. If you delete all the Trackpoint tags from the moment your ride stopped all the way to end of the file then you should be good to go. Just be careful that you don't delete the Track tag at the end of the file.

Graham Dawson said...

Great help, thanks, Graham

Cindy Cooper said...

I've done this edit before, but on a newer activity, Garmin now says I down't have permission to download it. Any ideas on how to get past that?

Martin Criminale said...

@Cindy - no idea. I download all my activities from Garmin Connect. If you can't do that I would contact Garmin tech support here: http://www.garmin.com/us/support/

Hot Belgo said...

If you don't have a whole lap to remove but only some points, this tool could help you https://tcx-editor.herokuapp.com/

Kate said...

forgot to switch my 920 off, tried your method and it worked, thank you :)

Adrian Foulds said...

I think you are too modest saying you're not a tech savvy person, Seriously simple fix, Ta

Corinne said...

Hi hi, Thanks for the guidance here. I needed to crop 4h of surplus trackpoints where I left the garmin running at the end of a ride. I've done this (successfully) from following the comments above, but when uploading it again to GC, the graphs reflect the cropped data (i.e. no 4h of flat zeros at the end), but the metrics have not recalculated. Any suggestions? Thanks all.

Martin Criminale said...

@Connie - perhaps you did not trim some tags from your activity? It's been a while since I have edited anything but I believe there are some tags that surround the summary stats (distance, time, etc.) and if you left these in place the totals will probably not recalculate. Make sure you delete the totals and then upload again, see if that helps. If not I'm unfortunately out of ideas. :(