Re: [Ntp] Antw: [EXT] Re: The bump, or why NTP v5 must specify impulse response

Hal Murray <hmurray@megapathdsl.net> Fri, 24 April 2020 09:25 UTC

Return-Path: <hmurray@megapathdsl.net>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8BCE33A10F7 for <ntp@ietfa.amsl.com>; Fri, 24 Apr 2020 02:25:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.035
X-Spam-Level: *
X-Spam-Status: No, score=1.035 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_DYNAMIC_IPADDR=1.951, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dgmxH26cU1fY for <ntp@ietfa.amsl.com>; Fri, 24 Apr 2020 02:25:13 -0700 (PDT)
Received: from ip-64-139-1-69.sjc.megapath.net (ip-64-139-1-69.sjc.megapath.net [64.139.1.69]) by ietfa.amsl.com (Postfix) with ESMTP id CBB3B3A1195 for <ntp@ietf.org>; Fri, 24 Apr 2020 02:25:00 -0700 (PDT)
Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id B655040605C; Fri, 24 Apr 2020 02:24:59 -0700 (PDT)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
cc: ntp@ietf.org, hmurray@megapathdsl.net
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> of "Fri, 24 Apr 2020 10:29:07 +0200." <5EA2A353020000A100038855@gwsmtp.uni-regensburg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Fri, 24 Apr 2020 02:24:59 -0700
Message-Id: <20200424092459.B655040605C@ip-64-139-1-69.sjc.megapath.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/lrsn-wWs_JM8DQwxwqHNFXQqTxA>
Subject: Re: [Ntp] Antw: [EXT] Re: The bump, or why NTP v5 must specify impulse response
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Apr 2020 09:25:21 -0000

There are 2 parts to PPS.

The first is part of the normal refclock tangle.  The time accuracy of the 
serial text from a typical GPS is crappy.  Most OS-es provide a method of 
grabbing a time stamp at interrupt time from something like a PPS connected to 
a modem control signal.  That gets much better timing.  The complication in 
this area is that the PPS doesn't tell you which second it is associated with. 
 You need something like the typical NMEA sentences to tell you that.  So the 
PPS gives you the bits to the right of the decimal point and something else 
gives you the bits to the left of the decimal point.

The other part is that many kernels have an option to do-it-all in the kernel. 
 (It's probably not configured in the kernel shipped by your distro.  You have 
to build your own.)  ntpd (or whatever) sets a flag and the kernel does the 
rest.  Normally, ntpd would get the time close enough, turn on kernel PPS 
mode, then watch the serial stream and disable the kernel mode if the serial 
stream said that GPS stopped working.  This generally works much better than 
not using the kernel mode.

I'll come up with some graphs if people want real data.

I don't know why the kernel mode works better.  My guess is that the PLL 
parameters are tuned "better", but I don't see any reason why that code 
couldn't be move to user mode.  Trying that hasn't gotten to the top of my 
list.

------

To answer your question:  Yes, you should be able to distribute a PPS to 
multiple systems.  It's simpler if you distribute the serial signal with it.  
You can make a splitter.  It's just a couple of RS-232 level shifter chips.  I 
don't know of any commercial version.

Some GPS gear just sends the serial text every second once you get it 
configured correctly.  Some needs to be poked every second.  If you run the 
same software on 2 systems connected via a splitter, one of the pokes falls 
into the bit bucket.  That works fine as long as the system doing the poking 
is running but the non-poking system won't get any serial data if the other 
system crashes.

-- 
These are my opinions.  I hate spam.