Editing a Garmin ac...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Editing a Garmin activity

11 Posts
6 Users
0 Reactions
91 Views
Posts: 24531
Free Member
Topic starter
 

I mapped a route today but forgot to hit stop when I finished the circuit, hence have half a mile of pointless road back to the car. Is there a way to edit the activity in garmin connect to snip off the hanging end?


 
Posted : 27/11/2011 4:44 pm
Posts: 0
Free Member
 

Save the file to your computer.
Open it in a text editor (e.g. Notepad)
Delete the trackpoints you don't want.
Save it.
Import it to Garmin Connect


 
Posted : 27/11/2011 4:48 pm
Posts: 24531
Free Member
Topic starter
 

OK, sounds easy enough but -

where is the Garmin file - I can't find anything relevant viewing the Garmin as a drive.

And secondly, how do I know which trackpoints refer to what in a text file?


 
Posted : 27/11/2011 5:07 pm
Posts: 24531
Free Member
Topic starter
 

OK, found the first bit and now have a massive text doc open, how do i know where to cut?


 
Posted : 27/11/2011 5:19 pm
Posts: 2
Free Member
 

are the points not timestamped?


 
Posted : 27/11/2011 5:48 pm
Posts: 24531
Free Member
Topic starter
 

Yes, there is a timestamp for each point but I'm still not sure if that's where to cut. I get a stream of code like this (random c&p) - clearly there is a periodicity to it but how do i know what is the start and what the end? If i could be arrised I'd print it out and try to work it out but I'm sure someone on here knows.

11-11-27T08:56:59.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>136</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7075979188084602" lat="51.291701942682266">
<ele>102.5999984741211</ele>
<time>2011-11-27T08:57:06.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>133</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7076619565486908" lat="51.29171292297542">
<ele>102.4000015258789</ele>
<time>2011-11-27T08:57:07.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>132</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7077459432184696" lat="51.29184393212199">
<ele>102.0</ele>
<time>2011-11-27T08:57:11.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>133</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7077159360051155" lat="51.29190495237708">
<ele>102.0</ele>
<time>2011-11-27T08:57:13.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>133</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7077479548752308" lat="51.291955998167396">
<ele>102.4000015258789</ele>
<time>2011-11-27T08:57:16.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>133</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7079469412565231" lat="51.291996985673904">
<ele>103.5999984741211</ele>
<time>2011-11-27T08:57:21.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>134</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7080679759383202" lat="51.2920939642936">
<ele>103.5999984741211</ele>
<time>2011-11-27T08:57:25.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>135</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7080919481813908" lat="51.29210092127323">
<ele>103.5999984741211</ele>
<time>2011-11-27T08:57:26.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>135</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7083759270608425" lat="51.29218993708491">
<ele>103.80000305175781</ele>
<time>2011-11-27T08:57:32.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>138</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7084139809012413" lat="51.292216926813126">
<ele>103.5999984741211</ele>
<time>2011-11-27T08:57:33.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>138</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7084899209439754" lat="51.29239697009325">
<ele>103.4000015258789</ele>
<time>2011-11-27T08:57:38.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>139</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.708447927609086" lat="51.29241993650794">
<ele>103.80000305175781</ele>
<time>2011-11-27T08:57:40.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>139</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7082749251276255" lat="51.292471988126636">
<ele>105.0</ele>
<time>2011-11-27T08:57:45.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>141</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.708272997289896" lat="51.29258598200977">
<ele>106.0</ele>
<time>2011-11-27T08:57:49.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>143</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7082029245793819" lat="51.292598973959684">
<ele>106.5999984741211</ele>
<time>2011-11-27T08:57:53.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>145</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7080759387463331" lat="51.29254692234099">
<ele>107.19999694824219</ele>
<time>2011-11-27T08:57:58.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>149</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
<trkpt lon="-0.7080629467964172" lat="51.292554968968034">
<ele>107.4000015258789</ele>
<time>2011-11-27T08:57:59.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>149</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>


 
Posted : 27/11/2011 5:53 pm
Posts: 0
Free Member
 

<trkpt lon="-0.7082029245793819" lat="51.292598973959684">
<ele>106.5999984741211</ele>
<time>2011-11-27T08:57:53.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>145</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>

That's the "code" for one trackpoint. You need to delete every one of these you don't want. Start at the end of the file and work your way back to the grid ref or timestamp of the end of the ride you want to keep.

Grid ref format: lon="-0.7082029245793819" lat="51.292598973959684"
Timestamp format = 2011-11-27T08:57:59.000Z


 
Posted : 27/11/2011 5:58 pm
Posts: 24531
Free Member
Topic starter
 

I didn't mean it to take up that much space but now it's like that I can see better, and I can also see there's a non-recurring string at the end of the file, from which i deduce the repeating chunk is

<trkpt lon="-0.708272997289896" lat="51.29258598200977">
<ele>106.0</ele>
<time>2011-11-27T08:57:49.000Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>143</gpxtpx:hr>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>

and the end string is

</trkseg>
</trk>
</gpx>


 
Posted : 27/11/2011 5:58 pm
Posts: 24531
Free Member
Topic starter
 

cheers both, once I saw the long string I worked it out. Sunday evening brain until then, i knew how to solve it but couldn't get enough neurons connected at the same time to actually do it :rolls eyes:


 
Posted : 27/11/2011 6:00 pm
 Drac
Posts: 50466
 

Or just make it easy but downloading this.

http://sourceforge.net/projects/gpxeditor/


 
Posted : 27/11/2011 6:01 pm
Posts: 0
Free Member
 

That method above looks too complicated. I edit my garmin track logs using mapsource which is made by garmin for that purpose. You can cut paste join whatever track you want with this and it's a piece of piss to use.


 
Posted : 27/11/2011 6:06 pm
Posts: 0
Free Member
 

Or get Garmin Basecamp. Its free to download.
You can then import your GPX file into it. It shows the track on a map, and you can delete the bits you don't want, or split the track etc. Then export as GPX, and upload to Garmin Connect if you want.

You can do a similar thing in Garmin Mapsource. Though note it will lose the heart rate data when you save the track.


 
Posted : 27/11/2011 6:23 pm