Datasheet
Use 'gpsd'
You can always just read that raw data, but its much nicer if you can have some Linux software prettify it. We'll try out
gpsd which is a GPS-handling Daemon (background-helper)
Installing a GPS Daemon (gpsd)
The first step is installing some software on your Raspberry Pi that understands the serial data that your GPS module is
providing via /dev/ttyAMA0.
Thankfully other people have already done all the hard work for you of properly parsing the raw GPS data, and we can
use (amongst other options) a nice little package named 'gpsd', which essentially acts as a layer between your
applications and the actual GPS hardware, gracefully handling parsing errors, and providing a common, well-defined
interfaces to any GPS module.
To install gpsd, make sure your Pi has an Internet connection and run the following commands from the console:
And install the software as it prompts you to do.
Raspbian Jessie systemd service fix
Note if you're using the Raspbian Jessie or later release you'll need to disable a systemd service that gpsd installs.
This service has systemd listen on a local socket and run gpsd when clients connect to it, however it will also interfere
with other gpsd instances that are manually run (like in this guide). You will need to disable the gpsd systemd service
by running the following commands:
Should you ever want to enable the default gpsd systemd service you can run these commands to restore it (but
remember the rest of the steps in this guide won't work!):
Try out 'gpsd'
After installing gpsd and disabling the gpsd systemd service as mentioned above you're ready to start using gpsd
yourself.
Start gpsd and direct it to use HW UART. Simply entering the following command:
... which will point the gps daemon to our GPS device on the /dev/ttyAMA0 console
Try running gpsmon to get a live-streaming update of GPS data!
sudo apt-get update
sudo apt-get install gpsd gpsd-clients python-gps
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo systemctl enable gpsd.socket
sudo systemctl start gpsd.socket
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
© Adafruit Industries https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi Page 12 of 18










