josephxsxn

GPS Dongle Config

Jun 24th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Install GPS Python Clients, and NTP for proper syncing

Install Software

sudo apt-get install gpsd gpsd-clients python-gps

sudo apt-get install ntp

Setup GPSD Defaults

sudo vi /etc/default/gpsd

START_DAEMON="true"
GPSD_OPTIONS="n"
DEVICES="/dev/ttyUSB0"
USBAUTO="false"
GPSD_SOCET="/var/run/gpsd.sock"

Test GPS

sudo service gpsd restart
cgps -s

Setup NTP to Sync from GPS Time

sudo vi /etc/ntp.conf

# gps ntp
server 127.127.28.0 minpoll 4
fudge  127.127.28.0 time1 0.183 refid NMEA
server 127.127.28.1 minpoll 4 prefer
fudge  127.127.28.1 refid PPS

GPS Serial data reference

server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 refid GPS
fudge 127.127.28.0 time1 +0.140 # coarse processing delay offset

GPS PPS reference

server 127.127.22.0 minpoll 4 maxpoll 4 prefer
fudge 127.127.22.0 refid PPS
fudge 127.127.22.0 flag3 1 # enable kernel PLL/FLL clock discipline
sudo service gpsd restart
sudo service ntp restart
ntpq -p

Add Comment
Please, Sign In to add comment