So I have now a portable GPS data logger (see “Tutorial: Freedom Board with Adafruit Ultimate GPS Data Logger Shield“). What to do with it? It would be cool to see the data and tracks in Google Earth? Yes, that’s doable in a few steps…
Lunch Boxing
I was looking for a good enclosure for my data logger, and found a very inexpensive solution: a small plastic lunch box from the local grocery store 🙂
The battery is stored under the board. Everything fits perfectly into the box:
On the side there are transparent areas, as if that box would have been designed for my project 🙂
Then the box gets mounted to the motor bike cockpit with cable ties:
Ready to log data 🙂
Data Collection
With my data logger I collect longitude and latitude position information (see my project on GitHub: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/Eclipse/FRDM-KL25Z/FRDM-KL25Z_Adafruit_GPS
The data is TAB separated, and I can easily import it e.g. into Excel:
With Excel I can easily visualize the accelerometer data (that was a very soft cruise!):
The above data shows the samples over three hours, with a longer lunch break in the middle. There is an offset between x and y (the logger was slightly tilted).
Position in Google Earth
The coordinates I can enter it in Google Earth to show me the location:
Converting Data for Google Earth
Unfortunately it is not possible to directly import CSV or textual data into Google Earth. Google accepts a format like KML (Keyhole Markup Language). Luckily, there is a free service at http://www.gpsvisualizer.com/map_input?form=googleearth which offers to transform a CSV file into the KML format.
It needs a CSV format of the data. At the least something like this is needed:
name,latitude,longitude -, +47° 02.2806', +008° 37.1101' -, +47° 02.2907', +008° 37.1101' -, +47° 02.3008', +008° 37.1101'
Instead of commas (,), semicolons (;) can be used instead.
💡 Check the documentation on http://www.gpsvisualizer.com as there are many options to enrich the data with labels, links/etc.
I save the data in that format as text file. Then I create the KML file on http://www.gpsvisualizer.com:
The generated KML file is then loaded into Google Earth. This gives me a good idea how good the position logging is. Here I was driving on the road and a waypoint was logged every second. The data is in the +/- 1 meter range which is excellent!
On the other side, I know I was 100% sober my curve technique is *not* that bad 😉
The GPS still reports some artifacts I’m not sure about. But overall it looks good.
Summary
I can now visualize my data logger data in Google Earth :-). Tomorrow we will do a motor bike tour through the alps, and I plan to collect more data. This will be fun, in any case!
Happy Earthing 🙂
Some fun tools you may enjoy now you’re capturing your GPS tracks:
GpsBabel to convert between data formats.
gpsanimator.com/StarTraX to replay your tracks in GE (using gpx format.)
LikeLike
Thanks, I have seen GpsBabel several times on my search for tools, but not used yet. Thanks for the tip!
LikeLike
Pingback: Swiss Mountain Seven-Pass-Tour: Brünig – Grimsel – Furka – Gotthard – Nufenen – Grimsel – Susten | MCU on Eclipse
Hello, I found this free online tool http://gpx2kml.com/ to be helpful for converting gpx files to Google Earth kml format every time you need. It can also make kml to gpx format and installation isn’t needed. Maybe it’s a good alternative to GPS Babel program.
LikeLike
Nice post, Eric.
I didn’t know about GPSVisualizer, which is oddingly nice!
LikeLike
Yes, is stumbled over the GPSVisualizer too, and it is indeed pretty nice.
LikeLike