Fw: [ntp:hackers] u-blox reference clock driver

Gary E. Miller gem at rellim.com
Sat Aug 11 19:46:11 UTC 2018


Yo All!

The message below was posted to ntp.org.  This guy did what some
have proposed for a long time.  

He added a u-blox driver to ntpd, and modifed the kernel to reflect the
PPS pulse back to the u-blox.  The u-blox measures the round trip time
and provides a correction back to the driver.

The results are an average PPS jitter of 222 ns!

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin


Begin forwarded message:

Date: Fri, 10 Aug 2018 13:03:19 +0200
From: Lukas Senger <lukas at fridolin.com>
To: hackers at lists.ntp.org
Subject: [ntp:hackers] u-blox reference clock driver


Hi,

I've been writing a reference driver for u-blox GPS receivers as part
of my master's thesis and thought ntp hackers might be interested in it.
Additionally to normal PPS operation this driver can make use of the
u-blox's "Timemark" functionality.

It does this by enabling the PPSAPI echo, which generates an echo pulse
right after receiving a PPS pulse. This echo is connected to EXTINT0 on
the u-blox, where it is timestamped. So now I have the PPS timestamp as
a local time and the timemark as the receiver time to calculate an
offset. The cool thing about this is, that the offset does not include
the local interrupt latency anymore, which leads to less jitter.

Here's the driver:
https://gitlab.cs.fau.de/luksen/ntp-ubx/blob/ubx/ntpd/refclock_ubx.c

The echo/timemark feature requires kernel patches on Linux (with gpio
pins) and FreeBSD (parallel port). It's probably easiest to test on a
Raspberry Pi with the Linux patch and via GPIO pins.

Linux patch: https://gitlab.cs.fau.de/snippets/28
FreeBSD patch: https://gitlab.cs.fau.de/snippets/29

I originally tried to send this message some time ago but it seems like
there were some problems with the mailing list. By now the thesis is
finished and you can find it here:
https://wwwcip.informatik.uni-erlangen.de/~in18otin/thesis.pdf

--Lukas
_______________________________________________
hackers mailing list
hackers at lists.ntp.org
http://lists.ntp.org/listinfo/hackers




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20180811/620e65d6/attachment.bin>


More information about the devel mailing list