Filtering GPS tracks

Introduction

I find that my new GPSr makes a reasonably good job of saving tracklogs even when it's carried in a pocket or bag. Thus it's handy for things like geotagging1. However, if you view the raw tracklogs in Google Earth you get spurious lines between, say, the last point taken on one trip and the first point on the next trip, or noisy data when the GPSr hasn't quite worked out where it is.

Happily the wonderful gpsbabel2 program will filter the data, removing these infelicities.

The runes

Given tracklogs a.gpx and b.gpx from the GPSr, this merges them, removes spurious edges, the saves the data to out.gpx