[time-nuts] GPS clock to RT-Linux for pulsar machine

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jul 1 16:49:09 EDT 2005

In message <42C5AB50.9090709 at dakotacom.net>, David Forbes writes:

>My question is: What's a good way to synchronize the RT-Linux OS clock 
>to the GPS clock? I am considering the use of the A/D card's interrupt 
>with the 1PPS from GPS. I expect to use NTP to get the correct second.

Don't do it that way, you will get in trouble with the interrupt

Get an A/D card which registers a couple of digital bits along with
the analog sample, something like a Nudaq 9812/10 for instance.

Sync the machine to UTC with NTP and feed a precise PPS signal
(ie: from GPS) to the digital pin.

When you store your samples on disk, store a timestamp for every
block of data.

That way you can use the timestamp to decide which UTC second
and the digital bit to decide when the second starts.

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the time-nuts mailing list