jon black

"I am in a charming state of confusion"

How to distribute GPS points evenly

In How to compare GPS tracks I showed how the Needleman-Wunsch algorithm, originally designed for aligning DNA and protein sequences, can be used to compare GPS tracks.

The method I introduced relies on pre-processing the GPS file so that all points are evenly distributed to reduce noise in the data set, but I didn't cover how that's done.

Trace the path

Starting from the first point, the path is followed and the great-circle distance between each point is accumulated until it exceeds the desired distribution distance.

When the distance has been exceeded, a new point is interpolated between the current point and the previous point.

gpxpy has a function for moving points when given an angle and a distance in meters. The distance is the accumulated distance minus the required distance. gpxpy doesn't have a function for calculating the angle, otherwise known as initial bearing, between two points. Using the

How to compare GPS tracks

Every now and then I get a crazy idea. Most of the time I'm smart enough to ignore it, but sometimes, in a moment of insanity, I convince myself the idea is the best one I've ever had. Two months ago, that idea was to try and run 5km in under 20 minutes.

Unless you're an experienced runner, you don't just put on your running shoes, hop out the door, and run 5km in under 20 minutes. It takes time to train and condition your body to put up with the unfamiliar stress. Since the insanity took over, I've been training three times a week, gradually building up speed and stamina. I'm a very long way off, but my time is already down to 25 minutes.

I've been using my Garmin Forerunner 210 to record my progress. Like many gadgets it has a built in GPS receiver, allowing the watch