[time-nuts] L1 GPS timing signal(s) into local time on computer(s)

Hal Murray hmurray at megapathdsl.net
Sun Aug 19 06:09:30 UTC 2012

kuzetsa at gmail.com said:
> this is a no-name cheapo SIRF module

> 1) I need a computer with a serial port. The curent GPS module I'm using is
> INTERNALLY RS232 --> USB converter, and recognized by my windows 7 computer
> as: "Prolific USB-to-Serial Comm Port (COM3)" ... the latency and jitter is
> horrible, and both are seemingly random. 

The serial data stream basically doesn't work very well for timekeeping.  The 
problem is a software bug.  The info has a wander of roughly 100 ms.  I say 
wander rather than jitter because it is very low frequency.  You can't 
reasonably filter it out.  The time constant is hours.
It is easy to correct for a constant offset.

You also need a GPS unit that puts out a PPS signal.  I don't know of any low 
cost ready-to-go units.

A low cost unit is a demo board from Sure.
You need to add a wire or two.

You can also use the Garmin 18X LVC.  Google will find directions.

The other alternative is something like a Thunderbolt.  It will keep good 
time if the GPS signals fades out - holdover.

> 3) I'm clueless about mounting an antenna, running cable, grounding /
> lightning protection, etc... Really want an easy to install one. 

Modern GPS receivers are much more sensitive than older gear.  They may work 
well enough without an external antenna.  On the other hand, a TBolt only 
needs 1 satellite after the survey.

I'd suggest trying the Sure unit.  It's only $35 plus shipping, and that 
includes antenna and power supply.  You do have to add a wire or two.

If it works well enough, you are done.  If not, you will have learned a lot 
and can upgrade to a TBolt and/or try an external antenna.

> Also, trying to wrap my head around these:
> http://linuxpps.org/wiki/index.php/LinuxPPS_installation
> http://linuxpps.org/wiki/index.php/LinuxPPS_NTPD_support

They contain a lot of noise from ages ago when the PPS stuff wasn't included 
in the Linux kernel.  On a modern Linux system, the kernel is ready to go.  
You may want to install the pps-tools package.  I think you need 
pps-tools-devel if you want to recompile ntpd and have it support PPS.

You will have to do something like this before starting ntpd:

if [ ! -e /dev/gps10 ]; then  # GPS 18 LVC
  ln -s /dev/ttyS0 /dev/gps10
  setserial /dev/ttyS0 low_latency
  ldattach PPS /dev/gps10  # makes /dev/pps0
  ln -s /dev/pps0 /dev/gpspps10

You will also have to learn enough about general system administration to put 
that chunk of code in a reasonable place.  The details probably depend upon 
which distribution you are using.

On Fedora, I used to put it in /etc/sysconfig/ntpd but that broke when they 
switched to systemd.  (I haven't worked out a clean solution yet.  I just 
hacked it in to rc.local)

For FreeBSD, I think you have to recompile the kernel to include PPS support.

These are my opinions.  I hate spam.

More information about the Time-nuts_lists.febo.com mailing list