KIWI - Precision Timestamp Utility




[Tone] A special SV6 version of KIWI is required because the Trimble SV6 module suffers from many limitations in the NMEA mode. The comments that follow apply to the SV6 module and any other Trimble GPS that uses the TAIP protocol. Anyone wanting to use the NMEA version of KIWI click here.

KIWI is a "freeware" DOS program that uses a PC and GPS (with 1PPS) to timestamp an event to millisecond accuracy to UTC. The program uses the GPS to firstly calibrate the PC timing and then every 5 seconds resynchs the PC timing to the GPS (to track thermal changes in the PC quartz crystal). This method enables any old PC to be used to timestamp an event over long periods (days or months even) and yet retain the 1 millisecond accuracy to UTC.

The event to be timestamped can trigger KIWI via a logic signal or by a manually operated switch connected to the PC printer port. For astronomical events using a camcorder, a LED (optional) is flashed for 50msec to ident the video at the time of the "trigger" for subsequent field/frame accuracy determination.

The PC timing acts as a "flywheel" to the GPS 1 pulse per second drumbeat. Even if the GPS briefly loses synch with the satellites, the software will retain its accuracy. One of the functions of the program shows how the PC timing compares to the 1PPS from the GPS - 5 microseconds RMS for most PC's common.


New Features:

KIWI now generates time signals (sound and sight) in a format similar to WWV. At the same time the software analyses the 1PPS and serial data for Integrity. Any change to the 1PPS is detected and an Integrity Fault report is made, giving the date, time, error, and various GPS status conditions. This gives traceability of all generated time signals to UTC. The current version of software will generate an Integrity Fault report if the 1PPS varies by more than 50 millionths of a second from UTC.

The Integrity Monitoring ability gives the user confidence of using the GPS "anywhere" as well as the ability to choose the best place to use a GPS to avoid multipath etc. Here is an example:

Integrity Fault @ UTC 18-09-2002 21:03:14, 1.00400 secs=Delta, SVs= 2 FIX=NN
Integrity Fault @ UTC 18-09-2002 21:08:07, 0.99600 secs=Delta, SVs= 3 FIX=YY

Integrity Fault Summary @ UTC 18-09-2002 23:13:40
Early = 1    Late = 1    Busy = 209    OK = 54905
The SV6 was sitting on an inside window sill, with a very poor view of the sky with many trees outside. It had been running for 15.2 hours (54905 / 3600), during this time there was only a single time period where the 1PPS was not aligned to UTC. At 21:03 the GPS was only tracking 2 satellites and did not have a "valid fix". Its internal 1PPS generation changed its "reference" back by 4 mS (as you can see above). For the next five minutes the 1PPS was aligned 4 milliseconds late to UTC, and then as another satellite popped into view, it was able to get a valid fix (YY) and so correct the 1PPS by moving its reference "forward" by 4 mS. Thereafter the 1PPS was aligned to UTC.

So although the GPS was not placed in an ideal reception position (but convenient to me), I could use the 1PPS reference with confidence by observing I had an equal count of early and lates (the 1PPS had got out of, and then back into, synch with UTC). The busy count, is not really a fault, but a quirk of the SV6 where "sometimes" it cannot reply within the current second. The software is designed to smoothly handle this condition.

Also new is a linear reduction function making it much easier to time pre-recorded events.

When exiting the program, the software will align the time on your PC to atomic accuracy from the GPS, allowing automatically for your timezone.

KIWI was initially designed for Astronomical Occultation timings. Occultation's occur when a celestial object passes in front of another (usually a star). The timing of this event can be used to obtain size and shapes of Asteroids and topography of our Moon. Many other applications, experiments and research may benefit from KIWI.

Requirements: KIWI was compiled as a 16bit DOS application, requiring DOS 3.0 or above. The PC does not have to be state of the art, any old pc/laptop AT and above is okay, even a 20 MHz '286' 15 year old AT can easily meet the 1 msec spec. KIWI can make that old "junk" PC suddenly have a purpose in life!

As a DIY hobby project it should take an "evening" to put together. A GPS (with 1PPS is required), these can now be purchased for as low as US$25. The program does require some electronic skill to connect the GPS and PC, so please read documentation first to see if you have the required skill.

The program should not be run from a W9x/ME dos window, the accuracy is "ruined" by the W9x/ME operating system not giving enough CPU cycles for the application to meet spec! To use the program from W9x, you must click on "Start" and "Shut Down" to "restart in MSDOS Mode".

If KIWI is now placed on a "bootable" DOS floppy disk, then it does not matter what the operating system on the Hard Disk is (Windows, LINUX, UNIX etc). KIWI will not save any data to the floppy OR hard disk. If KIWI is run on a hard disk system, it will save its timing data to the hard disk. The reason it will not save data to the floppy disk is because it shuts down all interrupts and the floppy motor would keep running. The program detects whether it is running on a floppy and advises on the screen (in appropriate functions) that it will not save data to disk.

Why KIWI? (pronounced "key we") It is the native bird of New Zealand, where this freeware was written.

To use a SV6 there are several steps involved:

The 1PPS signal must be brought out of the module, this is best understood by observing the great surgery photos by George Silvis.

The 1PPS signal needs to be inverted and stretched, a circuit is provided at the end of this page on how to do that with one chip. Many designs use the serial converter to connect the 1PPS to the PC, this can add many microseconds delay to the 1PPS.

Conversion of the SV6 serial format (TTL/CMOS) to RS232 is required. Suggestions on how to do this are in "wiring.txt".

The SV6 must be placed in default TAIP protocol mode for the KIWI software to be used.

Photos of how I wired up my $25 Trimble SV6 receiver and Motorola GT+.

KIWI is a software program only, it is up to the user to obtain a SV6 GPS module and wire it up. What features and how complex the wiring, is left as a hobby project for the user. However Don Oliver has kindly provided his construction notes which may be useful for those needing a little guidance on how to put it all together.


Installation

Copy KIWI (sv6.zip) (Version 0.985) to a new (any name) directory on your PC. Unzip contents (produces 4 files) and read the file README.TXT for further information.

Support and Additional Information

KIWI written by Geoff Hitchcox, Christchurch, New Zealand, South Pacific.


Here are the Menu options of KIWI

 1 = Show the Logic Level of 1PPS and Switch
 2 = Show raw TAIP serial data from GPS
 3 = Your reaction time to an object    Appearance
 4 = Your reaction time to an object DISappearance
 5 = Measure PC timing Accuracy
 6 = Position Averaging and Satellite Tracking Info
 7 = Timestamp Function
 8 = Generate Time Signals (sound and sight)
 9 = Linear Time Reduction (of pre-recorded events)
 0 = Quit Program (also ESC Key)

An example of option 7 (Timestamp Function) follows:

I coupled to the manual switch an open collector transistor
connected to an AM radio. The 143 ms "delay" of the 6 time pips
is due to the PCM digital system used to connect the radio
network!

The following data is what is presented on the screen and also
saved to a TEXT file on the PC.


Started Timing @ 08:55:15 HH:MM:SS 18-09-2002 DD-MM-YYYY UTC 43 31' 11.0" S 172 42' 8.2" E 08:59:55.143 UTC 08:59:56.143 UTC 08:59:57.143 UTC 08:59:58.143 UTC 08:59:59.143 UTC 09:00:00.143 UTC Finished Timing @ 09:05:16 HH:MM:SS 18-09-2002 DD-MM-YYYY UTC 43 31' 11.0" S 172 42' 8.2" E
Protocol of the Audio Pips. Pip = Seconds marker Hi Pip = 10 second marker Short Pip = 55,56,57,58 second marker Double Pip = Minutes Triple Pip = Hours (24HR), lower tone if Hr = Min Silent Pip = 59th second "P" Key to Toggle Pips, to gather stats quietly!
Explanation of the Hour and Minute Coding. Let's assume the time is 12:09 (HH:MM) During the minute starting at 12:09 The pip at the 9th second will be replaced by a "double" pip The pip at the 12th second will be replaced by a "triple" pip Thus: On the HOUR the first pip is a double (because minute = 0). Thereafter each Minute starts with a long pip (like WWV). If the hour and minute are the same (08:08) then a much lower frequency triple pip is given. Midnight UTC is marked by a low freq triple pip (because HR = Min = 0). No indication is given of the 59th minute, because the 59th second is ALWAYS silent. An added Leap second will give 2 triple pips.

This circuit inverts and stretches the 1PPS from the SV6 suitable for connection to the PC. This provides the correct phasing of the 1PPS with respect to UTC for the KIWI software. [SV6 to KIWI Interface Circuit]
Many thanks to:
Don Oliver (Houston, Texas, USA) for the Linear Time Reduction algorithm, and many hours of testing.
Brian Loader and Dave Gault for being the first in New Zealand and Australia (respectively) for implementing KIWI timing.
Alfred Kruijshoop, for testing and many fine suggestions.
KIWI homepage.