Analyzing stops on a bike ride

April 8, 2017

When I return home from a long ride, one of the first things I do is to upload my ride data, for analysis. A large part of it I suppose is for the satisfaction of being able to see the ride visualized, but it also provides really valuable information about the ride conditions.  One of the biggest challenges in doing a long bike ride is designing the course itself; when done successfully, it will result in a smooth and enjoyable ride, but mistakes in course design could mean that you end up in places where you should not be, like expressways or restricted roads, or places where you don't want to be, like an unpaved dirt road, when you are on a road bike.  While the GPS records all of the points which we traverse on, sites like strava might be a bit hard to use, to find a particular point in your ride, from memory alone. If there were places on the course where the GPS had incorrect information, or indicated that I needed to use roads which were forbidden, I certainly would have stopped and used my GPS to reroute me. If the precise location of that stop were to be available to me, it would be easier for me to modify the route, to avoid that stretch in the future.

To be able to do this, I only needed to parse the GPS data for places where the speed went to 0, and stayed there. I would also need to be able to specify length of stoppage, as a means to help reduce too much information. I wrote just such a tool, and it's now available on github, for free download: https://github.com/pchengi/rideutils

The program outputs the latitude-longitude pair, stoppage duration and time, and the lat-long pair can easily be entered into google maps, for instance, and if streetview is available for the region, one can actually see the location, which really helps to remember better. I may not remember what I did for 7 minutes between 1732 hrs and 1739 hrs, but if I see the location, it'll probably jog my memory! This can also help in sharing pictures of places where you've stopped, with family and friends, even if you haven't been able to capture anything on a phone or camera!

The program output looks like this (I'm asking for details of stops longer than a minute)

(57.912605339, 14.390282544) 1.28 Apr 06 2017 18:41:13
(57.953358152, 14.415196913) 4.37 Apr 06 2017 18:54:06
(57.953964834, 14.415673509) 1.23 Apr 06 2017 18:58:53
(57.996646659, 14.441156003) 1.48 Apr 06 2017 19:18:02
(57.9959922, 14.442642114) 14.27 Apr 06 2017 19:21:04
(58.060207804, 14.499054167) 5.58 Apr 06 2017 19:56:45
(58.125722352, 14.553510973) 5.07 Apr 06 2017 20:23:23
(58.226573243, 14.649779729) 19.22 Apr 06 2017 21:06:24
(58.240560963, 14.710248455) 18.82 Apr 06 2017 21:45:36
(58.405833234, 15.55983573) 8.58 Apr 07 2017 00:44:47
Cumulative stoppage time in minutes: 84.48

Here are some places I stopped, on my recent ride from Copenhagen to Linköping.

Here's my first 'stop'. It was the ferry, at Helsingor! http://bit.ly/2oN1CSt

A place where I stopped to eat my sandwiches, and get into warmer gear. http://bit.ly/2nO4cmi

Slept for a bit here: http://bit.ly/2pdekpL