Anyone know how to edit a GPX file?

We’ve all done it.  The first two hours of your hike average about 4 miles per hour, and the last 20 minutes are considerably quicker, more like 40 mph.  It doesn’t matter if you are logging on FitBit, AllTrails, Strava, Wahoo, or <insert tracker here>, at some time you’ve changed out of your muddy boots, switched t shirt, had one last long drink and a granola bar, jumped in the car and driven off with the tracker still running.

My first question is “how could I forget?”, my second is, “how super human does my tracker think I am?”  A good old fashioned FitBit (Ultra, One) only records your walking, so it would know that you are not taking steps, whether you be on bike or in a car, it stops counting; Now it’s coupled to my cellphone, and I’ve asked the phone to “start activity”, because the tracker no longer does that, it sees on my GPS that I am still moving when I start heading home in the car.

Screenshot 2018-01-13 at 16.22.41

One day these app developers will get enough people grumble at them about this user error, and realize they can filter it on our behalf, but for now what recourse do we have?  I know the FitBit app and Wahoo allow me to delete the recording, but that’s a bit harsh.  I really want to just go in and see where the GPS matches the point of origin (assuming that you started recording at the beginning, and not 100 yards, or when GPS locks down the trail) and truncate the file there.  I know it’s not as easy as that, the file might actually have a footer which includes the user action time for shut off, and at that point calculate overall results for any un-closed segments.  I also know that GPX is a common interchange format, but might not be the actual format used for that particular device.  I remember talking about how you could pack eight seven bit values into a seven byte package during an interview with a tracker company, so the data might not be obvious at all.

I guess the method is to export the track into hopefully GPX.  Use some viewer software that can decode fields. You might be a wiz with Java or Python, I would be more likely to use something like Neo Hex edit with its packer viewer plugin.  Take out the unwanted samples. Recompute the footer, including check sums and sample counts if needed. Finally import back to where you care.  For me, that currently is out of Wahoo, which only records on my phone, then import to AllTrails for a Hike, and Strava for everything else including a copy of my hike.

I am hoping one day tracker apps would offer “split activities” using some smarts, like paying attention to the phones “driving mode” flag.  Yes, here I’m talking about Google Fit, who mistook my being caught in slow traffic on the freeway as being a bicycle ride across the San Mateo Bridge.

Now excuse me while I go fix my log.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s