Last edited · 10 revisions  


DRAWS™: Setup GPSD for Time and  Position


The DRAWS™ HAT has an integrated GPS/GLONASS receiver for receiving time and position data from up to 24 simultaneous satellites from the Global Positioning System (GPS) and the Globalnaya Navigazionnaya Sputnikovaya Sistema (GLONASS). It can provide a STRATUM 1 time source to your DRAWS™ workstation and additional network attached computers or other devices. It will also provide position data including latitude, longitude, and altitude with varying degrees of accuracy depending on the number of satellites visible to the receiver.

The GPS has a built-in real time clock (RTC). It is set and updated by the GPS to provide a time source when satellites are not visible.  The RTC is battery backed to keep the time for up to 40 days (cumulative), at which time the non-rechargeable battery must be replaced. The battery is a non-rechargeable CR1220 3V Lithium cell, which can be locally sourced.  Battery is not included.


Attach a GPS antenna such the GPS antenna with LNA from Northwest Digital Radio to the SMA connector on the DRAWS™ HAT and place it where it has a good view of the sky.

Operating System Considerations

Ensure that the device tree and driver have been installed on your Raspberry Pi image.  There should be a filename of /dev/ttySC0, which is the serial port for the GPS receiver and /dev/pps0, which is the pulse per second port from the receiver. If these files are not visible, then review your operating system (Compass Linux or Raspbian with updates) install.  Check the file /boot/config.txt and make sure the last line has been changed from dtoverlay=udrc to dtoverlay=draws (if you need to edit it, you will need to reboot for it to take effect(.

Support Programs

Install support programs. (These may already be installed but for good measure issue this command)
sudo apt-get install gpsd gpsd-clients python-gps pps-tools libgps-dev


Update, or create, the configuration file, /etc/default/gpsd, using a text editor, and set the following values:
DEVICES="/dev/ttySC0 /dev/pps0"

Start the Daemon

Issue these commands:
sudo systemctl enable gpsd && sudo systemctl restart gpsd

Check Status

sudo systemctl status gpsd

If the status shows "active (running)" then you have a properly installed gps sub-system.

In a terminal, run the command gpsmon to observe the values being reported.


Other programs you may wish to view are cgps and sudo ppstest /dev/pps0