clock synchronization

I am working on a system that needs to run a process closely synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control line) as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.

You might want to check out http://www.ntp.org.


Previously, Michael Nunan wrote in qdn.public.qnxrtp.os:

I am working on a system that needs to run a process closely synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control line) as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.
\


Mitchell Schoenbrun --------- maschoen@pobox.com

I cannot access a time server from this app. I need to correct the PC time
from the local GPS feed and 1PPS.

I have quickly put something together but would be interested if there is
someone who has also done this sort of thing.

“Mitchell Schoenbrun” <maschoen@pobox.com> wrote in message
news:Voyager.020505133429.639D@schoenbrun.com

You might want to check out > http://www.ntp.org> .


Previously, Michael Nunan wrote in qdn.public.qnxrtp.os:
I am working on a system that needs to run a process closely
synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control line)
as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.



\

Mitchell Schoenbrun --------- > maschoen@pobox.com

We do this type of sync QNX.

For our system using the GPS 1pps hooked to an interrupt and read the time
from the serial stream and correlate. The code is very simple.

What is your application?

Greg Orvets
President
Lambda Tech
orvets@lambdatech.com
www.lambdatech.com


“Michael Nunan” <m.nunan@ieee.ca> wrote in message
news:ab8nvc$jkm$1@inn.qnx.com

I cannot access a time server from this app. I need to correct the PC time
from the local GPS feed and 1PPS.

I have quickly put something together but would be interested if there is
someone who has also done this sort of thing.

“Mitchell Schoenbrun” <> maschoen@pobox.com> > wrote in message
news:> Voyager.020505133429.639D@schoenbrun.com> …
You might want to check out > http://www.ntp.org> .


Previously, Michael Nunan wrote in qdn.public.qnxrtp.os:
I am working on a system that needs to run a process closely
synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control
line)
as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.



\

Mitchell Schoenbrun --------- > maschoen@pobox.com

\

Michael Nunan <m.nunan@ieee.ca> wrote:

I am working on a system that needs to run a process closely synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control line) as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.

Take a look at the ClockAdjust() call.

Essentially what you need to do:

periodically get the system time and the GPS time
compare them
if different, use ClockAjust() to speed up or slowdown the system
clock to catch up/wait for the real world time

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

The ntp server source code includes examples of.synching
it with GPS.

Michael Nunan wrote:

I cannot access a time server from this app. I need to correct the PC time
from the local GPS feed and 1PPS.

I have quickly put something together but would be interested if there is
someone who has also done this sort of thing.

“Mitchell Schoenbrun” <> maschoen@pobox.com> > wrote in message
news:> Voyager.020505133429.639D@schoenbrun.com> …
You might want to check out > http://www.ntp.org> .


Previously, Michael Nunan wrote in qdn.public.qnxrtp.os:
I am working on a system that needs to run a process closely
synchronized to
GPS time. I have a GPS 1PPS signal available (serial port control line)
as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.



\

Mitchell Schoenbrun --------- > maschoen@pobox.com

Hi Michael,
we wrote such a process reading NMEA1083 sentence using $GPGLL,… info to
adjust the clock
with qnx_adj_clock(). Asume that the GPS provides Zulu time. If you are
interested to get the source, send me a mail.
cheers, Peter pw@dolphin.de

“Michael Nunan” <m.nunan@ieee.ca> schrieb im Newsbeitrag
news:ab1prt$ivh$1@inn.qnx.com

I am working on a system that needs to run a process closely synchronized
to
GPS time. I have a GPS 1PPS signal available (serial port control line) as
well as the GPS serial data stream.

Does anyone know of sample code for keeping the computer’s clock
synchronized to the GPS clock.