You need to enable JavaScript to fully utilise this page.

Setting up GPS

Table of Contents

GPS Documentation

Acutime 2000 user guide

PPS Kernel Support

Add PPS_SYNC in config file when recompiling kernel

options PPS_SYNC

Compiling NTP

Version required ...

./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/sbin 
	--enable-clockctl --enable-linuxcaps --enable-ATOM --enable-NMEA --enable-PALISADE
	--enable-parse-clocks --enable-TRIMTAIP --enable-TRIMTSIP --enable-accurate-adjtime

Check the configuration in config.h

+ Add PPS_SYNC support in config.h

Create a script: /etc/rc.d/create_stratum

#!/bin/sh
#
# PROVIDE: create_stratum
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

create_stratum_enable="YES"

. /etc/rc.subr

name="create_stratum"
rcvar=`set_rcvar`
command="ln -s /dev/cuaa0 /dev/pps0; ln -s /dev/cuaa0 /dev/palisade0"
load_rc_config $name

start_cmd="echo \"Starting ${name}.\"; /usr/bin/nice -5 ${command}"

run_rc_command "$1"

Configuring NTP

# This configuration file should be working for ntpd >= 4.2.2
# It may not be parsed correctly by previous versions

# disable ntp

# -- Drift file for expedient re-synchronization after downtime or reboot.
driftfile /etc/ntp/drift

#------------------------------------------------------------------------------
# -- Configuration for the Trimble Acutime 2000 GPS antenna
# -- Configuration WITHOUT event polling (TDS-2 -> no uplink communication)
#------------------------------------------------------------------------------
# -- Reminder: needs a sym link /dev/palisade0 to the serial port
# -- Reminder: needs a sym link /dev/pps0 to the serial port
#------------------------------------------------------------------------------

# -- Kernel
# We want this: kernel has to be compiled with PPS_SYNC support
enable kernel

# -- Mitigation
# This is ESSENTIAL for stability reasons
# Default value is 1ms (see D.Mills webpages)
# Because of the TDS and cable splitters, need to increase the minimum otherwise
# ntpd misses a lot of PPS pulses provoking clock hopping
tos mindist 0.025

# -- Primary source
# This is our non-ambiguous source, the one that tells which second is which, for
# this reason this source MUST be selected as 'prefer'
# It uses the serial packets with the GPS Acutime 2000 driver
server 127.127.29.0 prefer
# Define the stratum ... redondant but to be sure
fudge  127.127.29.0 stratum 0
# Reference ID
fudge  127.127.29.0 refid GPS0
# Correction due to the latency acquired through a long cable
# Default value : 0.020 seconds
fudge  127.127.29.0 time1 0.050  # Increase value to handle potoroo as well
# Disable polling, not compatible with TDS-2.
fudge 127.127.29.0 flag2 1


# -- The more accurate PPS source
# We want higher accuracy than a simple GPS time packet, so we use the ATOM
# driver to process the PPS output from the Acutime receiver
# For stability reasons, we decrease the period of PPS polling to 2^4 (16 seconds)
server 127.127.22.0 minpoll 4 maxpoll 6
fudge 127.127.22.0 refid PPS0
# Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear
#   assert|clear : Using assert or clear specifies if the high going or low going
#                                  edge of the signal must be used. The default is assert.
fudge 127.127.22.0 flag2 1
# Controls the kernel PPS discipline (PPSAPI): 0 for disable (default), 1 for enable.
fudge 127.127.22.0 flag3 1

Diagnosing normal behavior

The value displayed in column reach is a bit-shift register representing in octal the last 8 polls received (or not). The initial value of the register is 0. Every poll shift the register by one position. The rightmost bit is set to 1 if the time source send a valid response, and set to 0 otherwise. After startup you should observe the following suite of values: 0, 1, 3, 7, 17, 37, 77, 177, 377. A reach value of 363 corresponds then to 11110011, indicating two responses have been missed or were not valid, but the last two ones are fine.

Loosing time reference, clock hopping and mitigation parameters.