[ntp:questions] Synchronize distributed PCs with GPS 1 PPS and NTPD for OWD measurements

Hal Murray hmurray at megapathdsl.net
Mon Sep 14 10:43:06 UTC 2015

sandip gangakhedkar said:
> Let me clarify that the two nodes *do not* have access to the internet, but
> only to each other, over an unreliable wireless link. So I did not consider
> the option of choosing NTP sync during the measurements. 

What sort of distance accuracy are you expecting?
What sort of distances will you be operating over?

I think your initial message said you wanted time to under 1 millisecond.

The speed of light is 1 foot per nanosecond.  1 ms is a million ns, so your 
error ballpark will be a million feet or 200 miles.  Is that interesting?  
(Did I scramble something?)

How unreliable is your link?

> No, I want to measure the flight times of UDP packets which are sent from
> one node to the other over the direct wireless link. 

I would ignore NTP and do everything yourself.

Do something like ping.  That takes 2 packets, but you don't need to know the 
time on the other end.  If both ends need to know the distance, you can make 
a measurement with 3 packets.

Or you can send a dozen packets and use the minimum time assuming the others 
had delays in the interrupt handler.  (and use the spread in the times as an 
indication of quality)

You will probably need to calibrate the response times of the CPUs and the 
delays through the radios so you can subtract it out.  The radio delays may 
may depend on signal strength which varies with distance, but will also 
change if you go behind mountains or trees or buildings.

Joachim Fabini said:
> - Re-compile your kernel for LinuxPPS support, following the instructions on
> http://linuxpps.org/wiki/index.php/LinuxPPS_installation .

That hasn't been necessary for a long long time.

What version of the kernel are you using?

Recent kernels need something like:
  ldattach 18 /dev/ttyS0
which creates /dev/pps0

These are my opinions.  I hate spam.

More information about the questions mailing list