Thursday, 1 October 2015

GPS Data Visualisation

I must admit that I haven't used my Garmin eTrex 10 GPS that much this year.

Now that the weather has improved, we tend to take our Pentax cameras out when wondering around this green and pleasant land. So have little time to fiddle with a gps, entering waypoints, looking for geochaches or whatever.

However, even with the eTrex just turned on, it records data every 10 seconds, including latitude, longitude and elevation.

So I decided to extract some of this data and see what I could do with it.

Data format

The Garmin eTrex 10 stores data in an XML file called current.gpx

For each Track (basically each time you run the eTrex) the system creates header information. So <trk> indicates the beginning of a Track, and the default name is always: Current Track followed by the start date/time:-

<trk><name>Current Track: 02 JAN 2015 15:00</name>

Track points are enclosed in <trkpt></trkpt> and include latitude, longitude, elevation and a time stamp in Zulu time:-

<trkpt lat="50.8887801692" lon="-0.5767880101"><ele>102.52</ele><time>2015-01-02T14:00:54Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:cad>0</gpxtpx:cad></gpxtpx:TrackPointExtension></extensions></trkpt>

Zulu time is basically GMT (or what the rest of the world insist on calling UTC).

I don't know what the bits between <extensions>...</extensions> are all about!

GPS Visulaizer

I found a great site called GPS Visualizer where you can upload your data and view your routes overlaid on maps or satellite images.

Just a screen shot of my active map including 2 "tracks"
You can even download and save the HTML file back to your computer and retain the active features, thanks to the embedded JavaScript. For example you can still zoom, change the image overlays, and select the current track.

I have a GPS page on this blog containing this link where you can try this out for two trips.

The basic steps to produce an HTML file:-
  1. From select MAKE A MAP
  2. Upload your file. e.g. File#1: select your current.gpx file
  3. Click on Draw A Map
  4. You should see your map with any tracks
  5. Click “Save your Google Map” from the text above map to download your HTML file


From what I've read on the net, measuring altitude using GPS is not brilliant, with potential errors of maybe 100m. But I decided to extract the altitude data anyway, and used a simple Gambas program to work through the current.gpx XML file.

My Gambas program just extracts the altitude and time stamp for each reading, and puts it into a CSV file. This is then opened in LibreOffice Calc and I plot a simple graph.

I can't tell you how representative this is of our journey from Sussex to Essex around the M25. However, the point where the graph appears to go slightly negative is, of course, the Dartford Tunnel, which took us under the river Thames, a few metres below sea level.

Before the Thames crossing we have the hilly terrain of the North Downs running through Surrey and Kent. While after the Thames we see the reasonably flat lands of southern Essex.

Here is another journey, this time on foot, which may be easier to evaluate.

This walk around an area known as the Manhood Peninsula, is at or around sea level all the way. The tide was out, so in places we were walking across areas that would have been under water at high tide.

If we ignore the 12m peak near the end of the walk, then the rest of the chart covers an altitude range of about 12m. We started this (recorded) walk on the sea wall at Selsey, and dropped down onto the beach to look at something before getting back on the wall.

Even if we assume an error of (say) 5m, these readings are not too shabby! I don't know what you would use them for, but that's another question.

Edit Nov 2015: I've since discovered that if you use Google Earth you can also display your tracks with elevation.

Milldale to Dovedale via the stepping stones
This illustration shows a walk in the English Peak District from Milldale to Dovedale and back again. When I slide the vertical marker on the elevation display, it automatically adjusts the main view to the new location on my track. Very nice!

So this is much better than my previous approach of creating a separate elevation chart.

My Beautiful Balloon

At this point I was hoping to report that we had taken a ride in a hot-air balloon, and recorded gps data via the eTrex.

Unfortunately, each of the days we had reserved for this little adventure turned out to be too windy. In fact, this has been the windiest summer in England for over 20 years.

The number of "calm days" each year since 1993 (2015 to Aug). Source: Met Office

Now that the evenings are turning cooler, we have stopped booking days, and will carry over our ticket to next year.

So let's hope that 2016 is less windy, and we get lift-off!

No comments:

Post a Comment