Calculating the Distance of a GPS log

Published: 2009-07-28 21:20 UTC. Tags: linux gis

Playing with my GPS logger, I wanted to know the distance travelled between all the points in a GPS log. For example, if I went for a bicycle trip and brought the logger, it would be nice to know how many kilometers I have travelled.

Trying to find a tool that did this without being cumbersome to use proved more difficult than I thought, so I did a quick hack with the help of the python bindings for gpsd. It's a very simple script:

$ ./distance.py promenad2.gpx
427.077378454

Given a GPX file, it will print out the number of meters travelled.

Fetch it in the fgpstools repository on github

←← previous blog entry next blog entry →→

Post a comment

Posting of comments have been disabled for now. Too much spam.