# GPS Location fun. Tracking, logging, etc ## Inspiration / Further Reading - [https://github.com/wadda/gps3](https://github.com/wadda/gps3) - [https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi?view=all](https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi?view=all) - [https://learn.adafruit.com/assets/3715](https://learn.adafruit.com/assets/3715) - [https://learn.adafruit.com/adafruit-ultimate-gps?view=all](https://learn.adafruit.com/adafruit-ultimate-gps?view=all) - [https://stackoverflow.com/questions/16989153/saving-gps-data-as-gpx](https://stackoverflow.com/questions/16989153/saving-gps-data-as-gpx) - [http://www.catb.org/gpsd/gpspipe.html](http://www.catb.org/gpsd/gpspipe.html) - [http://www.catb.org/gpsd/gpsd-time-service-howto.html#_feeding_chrony_from_gpsd](http://www.catb.org/gpsd/gpsd-time-service-howto.html#_feeding_chrony_from_gpsd) - [http://thomasloughlin.com/gpspipe-gps-client/](http://thomasloughlin.com/gpspipe-gps-client/) ## Hardware The author chose the [Adafruit Ultimate GPS Breakout (link)](https://www.adafruit.com/product/746) for this guide. YMMV with other boards. ## Setup ``` bash armbian-config # enable hardware uarts apt install gpsd gpsd-clients python-gps gpsbabel # necessary software systemctl stop gpsd # stop gpsd to help with testin gpsd -n -N -D 2 /dev/ttyS2 # run gpsd by hand cgps -s # run a cli client to verify it works ``` Setup necessary ```gpsd``` defaults (daemon that provides location data to programs). Edit ```/etc/default/gpsd``` - Add ```/dev/ttyS2``` to ```DEVICES``` - Add ```-n``` to ```GPSD_OPTIONS``` ## Chrony Add GPS as a time source to chrony ``` bash cat >> /etc/chrony/chrony.conf < /etc/systemd/system/gps-logger.service < /etc/systemd/system/gpsconvert.service < /etc/systemd/system/gpsconvert.timer <