1. Setup GPS
2. Automatically Capture Data on Boot.
We will be using gpspipe to capture the NMEA sentence from the BerryGPS and storing these into a file. The command to use is;
-r = Output raw NMEA sentences.
-d = Causes gpspipe to run as a daemon.
-l = Causes gpspipe to sleep for ten seconds before attempting to connect to gpsd.
-o = Output to file.
The date the file is created is also added to the name.
Now we need to force the above command to run at boot. This can be done by editing the rc.local file.
Just before the last line, which will be 'exit 0', paste in the below line;
gpspipe -r -d -l -o /home/pi/`date +"%Y%m%d-%H-%M-%S"`.nmea
Reboot and confirm that you can see a .nmea file in the home directory.
Every time the Raspberry Pi is rebooted, a new file will be created.
3. Collect Some Data
Go and collect some data. For this post, I used a BerryGPS sitting on a Raspberry Pi Zero and I placed it on the dashboard of my car.
I was able to confirm that the GPS had a fix by the flashing fix LED.
4. Plot the Data
We will use www.gpsvisualizer.com to plot the route we collected.
www.gpsvisualizer.com will accept the raw NMEA file.
Its best to use this page as you will be able to configure a number of options before you upload;
Below is an example route I took;
5. Change Track Data
GPS Visualizer can colorize your tracks according to speed, elevation, or some other unit.
This can be done by selecting the value in the drop down box highlighted below;
Here are two examples, speed and number of satellites;
6. Display the Route in Google Earth
Upload you file, make sure GPX is selected and then click the convert bottom. Once converted, download the GPX file and open it in Google Earth.
To show the elevation and speed profile of your route within Google Earth, right click the track and select 'Show Elevation Profile'