# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
# include this ntp.conf file in /mnt/local to enable the d-tacq serving ntp to the linux host
# must edit last line with local network subnet numbers
# hack by peter go wide
tos mindist 0.115

driftfile /var/lib/ntp/ntp.drift

# Leap seconds definition provided by tzdata
leapfile /usr/share/zoneinfo/leap-seconds.list

# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# pps-gpio on /dev/pps0
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 refid PPS
fudge 127.127.22.0 flag3 1  # enable kernel PLL/FLL clock discipline

# gpsd shared memory clock
server 127.127.28.0 minpoll 4 maxpoll 4 prefer  # PPS requires at least one preferred peer
fudge 127.127.28.0 flag1 1 refid GPS
fudge 127.127.28.0 time1 +0.130  # coarse offset due to the UART delay

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

# to provide time to local subnet and linnux host, change the last line.
# subnet needs to match /mnt/local/network
broadcast 192.168.83.255

