### Trimble Palisade Receiver

#### Synopsis

Address: 127.127.29.u
Reference ID: GPS
Driver ID: GPS_PALISADE
Serial Port: `/dev/palisadeu`
Serial I/O: 9600 baud, 8-bits, 1-stop, odd parity

#### Description

The refclock_palisade driver interfaces NTP with Trimble Navigation's Palisade Smart Antenna GPS receiver. The driver reports its ID as "GPS_PALISADE'' to indicate the Trimble Palisade GPS as precision time source.

This documentation describes version V2.43 (May 11, 1999) of the source.

Driver code for the Palisade receiver is being maintained by:
Sven Dietrich
Trimble Navigation Ltd.
645 North Mary Ave.
Sunnyvale, CA 94088-3642

Introduction

The following information should answer most questions regarding driver installation, deployment and debugging.

#### Receiver

The Palisade GPS receiver is an 8-channel smart antenna based on SierraTM GPS technology. It is designed for static timing applications.

Palisade generates a PPS synchronized to UTC within +/- 100 ns. This level of precision is achieved using an over-determined time solution, a 40 ns pulse steering resolution and a T-RAIM (Time-Receiver Autonomous Integrity Monitor) algorithm. An external event input with 40 nanosecond resolution, is available for asynchronous time transfer applications.

Palisade self-surveys at power-up using TRAIM. No initialization of the receiver is required by the driver. It is recommended that Palisade be allowed to complete self-survey before starting NTP.

#### Compatibility

The driver has been tested on the following platforms:

Platform | Operating System | NTP Sources
i386 (PC) | Linux 2.x | NTP Distribution
i386 (PC) | Windows NT | ftp://ftp.trimble.com/pub/ntp
SUN | Solaris 2.5x, 2.6, 7.0 | NTP Distribution
Hewlett-Packard | HPUX 9, 10, 11 | http://us-support.external.hp.com

If you are compiling NTP from a software distribution, you can obtain latest software source, documentation, and compatibility information from:

ftp://ftp.trimble.com/pub/ntp

A proprietary port of NTP for Windows NT is also posted on the above ftp site.
Windows NT support is available from Trimble on a no-support, beta-evaluation basis only.

This driver is compatible with the following versions of Palisade:

Version | External Event | Trimble Part Number
7.02 | No | 26664-00
7.02E | Yes | 26664-10
7.12 | Yes | 38158-00

Note: If you are using Palisade 26664-00, you must set fudge flag2 to 1 in your ntp.conf file. See the configuration section below.

#### Installation

The Palisade receiver is delivered in a smart antenna form factor, housing the GPS receiver, antenna and interface in a single unit, and is designed for rooftop deployment.

A location with unobstructed view of the horizon is recommended. Palisade is designed to be securely mounted atop standard 3/4 inch threaded pipe.

The 12 conductor (dia. 10 mm) power and I/O cable must be routed from the rooftop site to the NTP server.

#### Connection

The Palisade is equipped with dual (A & B) RS-422 serial interfaces and a differential TTL PPS output. Port A must be connected to the NTP time server. An RS-232 / RS-422 signal converter is supplied with the Palisade NTP Synchronization Kit, to allow cable lengths up to 500 meters.

The following connections are required when connecting Palisade with a host:

Description | Host |  |  |  | Palisade |
Port A | DB-9 | DB-25 |  | RS-232 | RS-422 | Palisade Pinout
Receive Data | 2 | 3 | <-- | Green | Green / Blue | 8 (T-) & 10 (T+)
Transmit Data | 3 | 2 | <-- | N/C | N/C |
Request to Send | 7 | 4 | <-- | Gray | Gray / White | 6 (R-) & 7 (R+)
Signal Ground | 5 | 7 | <-- | Black | Black | 9 (GND)
Port B |  |  |  |  |  |
Receive Data | 2 | 3 | <-- | Brown | Brown / Yellow | 4 (T-) & 5 (T+)
Transmit Data | 3 | 2 | <-- | Violet | Orange/ Violet | 2 (R-) & 3 (R+)
Request to Send | 7 | 4 | <-- | N/C | N/C |
Signal Ground | 5 | 7 | <-- | Black | Black | 9 (GND)

Note: Driving the RS-422 inputs on the Palisade single ended, i.e. using the Green and Gray connections,
does not work on all serial ports, and is deprecated. Use of the Palisade NTP host adapter is recommended.

Pinouts for the Palisade NTP host adapter (Trimble PN 37070) DB-25 M connector are as follows:

DB-25M | Conductor | Palisade | Description
1 | Red | 1 | Power
7 | Black | 9 | Ground
9 | Black/White | 12 | PPS -
10 | Green | 8 | Transmit Port A (T-)
11 | Brown | 4 | Transmit Port B (T-)
12 | Gray | 7 | Receive Port A (R+)
13 | Orange | 3 | Receive Port B (R+)
21 | Orange/White | 11 | PPS +
22 | Blue | 10 | Transmit Port A (T+)
23 | Yellow | 5 | Transmit Port B (T+)
24 | White | 6 | Receive Port A (R-)
25 | Violet | 2 | Receive Port B (R-)

The Palisade's secondary port, Port B, provides a TSIP (Trimble Standard Interface Protocol), control and command interface for diagnostics, configuration, and monitoring.
Port B and the PPS output are not currently used by the Palisade NTP reference clock driver.

#### O/S Serial Port Configuration

The driver attempts to open the device `/dev/palisade`uwhere u is the NTP refclock unit number as defined by the LSB of the refclock address. Valid refclock unit numbers are 0 - 3.

The user is expected to provide a symbolic link to an available serial port device. This is typically performed by a command such as:

> `ln -s /dev/ttyS0 /dev/palisade0`

Windows NT does not support symbolic links to device files. COMx: is used by the driver, derived from the refclock unit number, where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:

#### Time Transfer and Polling

Time transfer to the NTP host is performed via the Palisade's comprehensive time packet output. This packet is output once per second, and whenever an event timestamp is requested.

The driver requests an event time stamp at the end of each polling interval, by pulsing the RTS (request to send) line on the serial port. The Palisade receiver responds with a time stamped event packet.

Time stamps are reported by the Palisade with respect to UTC time.

#### Data Format

Palisade port A can output two synchronous time packets. The NTP driver can use either packet for synchronization. Packets are formatted as follows:

Packet 8F-AD (Primary NTP Packet)

Byte | Item | Type | Meaning
0 | Sub-Packet ID | BYTE | Subcode 0xAD
1 - 2 | Event Count | INTEGER | External event count recorded (0 = PPS)
3 - 10 | Fractional Second | DOUBLE | Time elapsed in current second
11 | Hour | BYTE | Hour
12 | Minute | BYTE | Minute
13 | Second | BYTE | Second (0 - 59; 60 = leap)
14 | Day | BYTE | Date (1 - 31)
15 | Month | BYTE | Month (1 - 12)
15 - 17 | Year | INTEGER | Year (4 digit)
18 | Receiver Status | BYTE | Tracking Status
19 | UTC Flags | BYTE | Leap Second Flags
20 | Reserved | BYTE | Contains 0xFF
21 | Reserved | BYTE | Contains 0xFF

Leap Second Flag Definition:
Bit 0: (1) UTC Time is available
Bits 1 - 3: Undefined
Bit 4: (1) Leap Scheduled: Leap second pending asserted by GPS control segment.
Bit 5: (1) Leap Pending: set 24 hours before, until beginning of leap second.
Bit 6: (1) GPS Leap Warning: 6 hours before until 6 hours after leap event
Bit 7: (1) Leap In Progress. Only set during the leap second.

Tracking Status Flag Definitions:

0 | Receiver is Navigating
1 | 1 Sat. Timing Mode
2 | Approximate Time (20 - 50 ms)
3 | Startup
4 | Startup (N/A)
5 | Dilution of Position too High (only applies during survey)
6 | 1 Sat. Timing Mode: SV is not usable
7 | No Satellites Usable
8 | Only 1 Satellite Usable
9 | Only 2 Satellite Usable
10 | Only 3 Satellites Usable
11 | Invalid Solution (Serious Error Cond.)
12 | Differential Corrections (N/A)
13 | Overdetermined Fixes

Packet 8F-0B (Comprehensive Timing Packet)

Byte | Item | Type | Meaning
0 | Sub-Packet ID | BYTE | Subcode 0x0B
1 - 2 | Event Count | INTEGER | External event count recorded (0 = PPS)
3 - 10 | UTC / GPS TOW | DOUBLE | UTC / GPS time of week (seconds)
11 | Date | BYTE | Day of Month
12 | Month | BYTE | Month of Event
13 - 14 | Year | INT | Year of event
15 | Receiver Mode | BYTE | Receiver operating dimensions: 0: Horizontal (2D) 1: Full Position (3D) 2: Single Satellite (0D) 3: Automatic (2D / 3D) 4: DGPS reference 5: Clock hold (2D) 6: Over determined Clock
15 - 17 | UTC Offset | INTEGER | UTC Offset value (seconds)
18 - 25 | Oscillator Bias | DOUBLE | Oscillator BIAS (meters)
26 - 33 | Oscillator Drift Rate | DOUBLE | Oscillator Drift (meters / second)
34 - 37 | Bias Uncertainty | SINGLE | Oscillator bias uncertainty (meters)
38 - 41 | Drift Uncertainty | SINGLE | Oscillator bias rate uncertainty (m / sec)
42 - 49 | Latitude | DOUBLE | Latitude in radians
50 - 57 | Longitude | DOUBLE | Longitude in radians
58 - 65 | Altitude | DOUBLE | Altitude above mean sea level, in meters
66 - 73 | Satellite ID | BYTE | SV Id No. of tracked satellites

####

#### Configuration

A typical `ntp.conf` configuration file for this driver and a Palisade with event polling:
`#------------------------------------------------------------------------------`
`# The Primary reference`
`server 127.127.29.0 # Trimble Palisade GPS (Stratum 1).`

`peer terrapin.csc.ncsu.edu # internet server`

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

A typical `ntp.conf` configuration file for this driver and a Palisade without event polling:

`#------------------------------------------------------------------------------`
`# The Primary reference`
`server 127.127.29.0 # Trimble Palisade GPS (Stratum 1).`

`# Set packet delay`
`fudge 127.127.29.0 time1 0.020`

`# and set flag2 to turn off event polling.`
`fudge 127.127.29.0 flag2 1`

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

#### Logging

Syslog entries generated by the palisade reference clock will be of the form:

    Nov 14 16:16:21 terrapin ntpd[1127]: Palisade #0: message

#### Debugging

The following procedure is recommended for installing and testing a Palisade NTP driver:

1. Place the Palisade GPS receiver outdoors; with clear view of the sky.
2. Allow the receiver 5 minutes to acquire satellite lock and position.
3. Verify presence of timing packets by observing the 1 Hz (PPS) led on the NTP interface. It should flash once per second.
4. Connect Palisade port A to the NTP host.
5. Configure NTP and the serial I/O port on the host system.
6. Initially use fudge flag2 in ntp.conf, to disable event polling (see configuration).
7. Run NTP in debug mode (-d -d), to observe Palisade_receive events.
8. The driver reports the tracking status of the receiver. A minumum of 4 sats. are required for self-survey to complete.
9. Remove fudge flag2 and restart ntpd in debug mode to observe event polling receive events.

#### #DEFINEs

The following constants are defined and used by the driver. These defines may be modified to improve performance or adapt to new operating systems.

Label | Definition | Default Value
DEVICE | The serial port device to be used by the driver. | /dev/palisadeu
PRECISION | Estimate of the accuracy of timestamps when using event poll. | 10 microseconds
CURRENT_UTC | Valid GPS - UTC offset | 13
SPEED232 | Host RS-232 baud rate | B9600
TRMB_MINPOLL | Minimum polling interval | 5 (32 seconds)
TRMB_MAXPOLL | Maximum interval between polls | 7 (128 seconds)

#### Fudge Factors

`time1 time`
  Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.

When event capture is not being used, time1 should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.

`time2 time`
  Not currently used by this driver.
`stratum number`
  Specifies the driver stratum, in decimal from 0 to 15, with default 0.
`refid string`
  Specifies the driver reference identifier, `GPS`.
`flag1 0 | 1`
  Not currently used by this driver.
`flag2 0 | 1`
  When set to 1, driver does not use hardware event polling. Instead, the synchronous packets output at the start of each second by the Palisade receiver are used. If the ioctl() call triggering the event capture fails, the driver falls back to this mode automatically.
`flag3 0 | 1`
  Not currently used by this driver.
`flag4 0 | 1`
  Not currently used by this driver.

#### Additional Information

Reference Clock Drivers
Trimble Navigation Ltd.

(last updated May 13, 1999)