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…
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 🙂
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.
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 🙂