Hardware Reference
In-Depth Information
Preparing a GPS beacon on the Pi
To get the GPS data into a remote Google Earth session for live tracking, we must
first massage the data into the Keyhole Markup Language ( KML ) format that
Google Earth expects and then serve the data over an HTTP link so that Google Earth
can request new GPS data at regular intervals.
First, we need to download a Python script called gegpsd.py written by Stephen
Youndt with the following command:
pi@raspberrypi ~ $ wget http://www.intestinate.com/gegpsd.py
This script will continuously fetch data from gpsd and write it, in the KML format,
to /tmp/nmea.kml . We'll also need an HTTP server to serve this file to Google Earth.
Python comes with a simple HTTP server that we can use for this purpose. Start the
Python script and HTTP server using the following command:
pi@raspberrypi ~ $ python ~/gegpsd.py & cd /tmp && python -m
SimpleHTTPServer
The KML data should now be generated and available from http://[IP
address]:8000/nmea.kml where [IP address] is the address of your Raspberry Pi.
Let's move on to Google Earth.
Setting up Google Earth
The setup procedure for Google Earth is very similar across all platforms:
1.
Visit http://www.google.com/earth/download/ge/agree.html to
download Google Earth for your platform.
2.
Install and start Google Earth.
3.
From the Add drop-down menu, select Network Link .
4.
Put a name for your GPS link in the Name field and add the http://[IP
address]:8000/nmea.kml KML data link to the Link field.
5.
Go to the Refresh tab and change the Time-Based Refresh to Periodically in
the drop-down menu.
6.
(Optional) Tick the Fly to View on Refresh checkbox to have the view
automatically centered on your GPS as it moves.
7.
Now click on the OK button and you should see your GPS link as an entry
under My Places in the sidebar on the left-hand side. Double-click on it to
zoom in on your GPS location.
 
Search WWH ::




Custom Search