Combining GPS Data Logger with Google Earth

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…

GPS Logger Waypoint Data with Googl Earth Street View

GPS Logger Waypoint Data with Google Earth Street View: Riding through Schwyz towards the Mythen Mountain peaks

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 🙂

Lunchbox and Data Logger

Lunchbox and Data Logger

The battery is stored under the board. Everything fits perfectly into the box:

Perfect Fit into Lunch Box

Perfect Fit into Lunch Box

On the side there are transparent areas, as if that box would have been designed for my project 🙂

Board enclosed in Lunch Box

Board enclosed in Lunch Box

Then the box gets mounted to the motor bike cockpit with cable ties:

GPS Data Logger attached to Motor Bike

GPS Data Logger attached to Motor Bike

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:

Data in Excel

Data in Excel

With Excel I can easily visualize the accelerometer data (that was a very soft cruise!):

Accelerometer data

Accelerometer data

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:

Coordinates in Google Earth

Coordinates in Google Earth

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:

Creating KML File

Creating KML File

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!

Data shown in Google Earth

Data shown in Google Earth

On the other side, I know I was 100% sober my curve technique is *not* that bad 😉

This was not me!

This was not me!

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 🙂

6 thoughts on “Combining GPS Data Logger with Google Earth

  1. 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.)

    Like

  2. Pingback: Swiss Mountain Seven-Pass-Tour: Brünig – Grimsel – Furka – Gotthard – Nufenen – Grimsel – Susten | MCU on Eclipse

  3. 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.

    Like

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.