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

KD0GLS kd0gls at mninter.net
Sun Aug 19 15:18:34 UTC 2012


In my experience (which is admittedly less than that of many others here) the time reported is that of the PPS pulse that just happened, and the documentation usually bears that out. There's a real-time clock running inside the receiver that is synchronized to the PPS. At the top of the second, the PPS is output and the RTC increments. Some number of milliseconds later, that RTC time value is output, which is the "current" time, not that of the next pulse. That's certainly the way the Motorola M12+ Timing receiver (Motorola binary mode) and all of the SiRFstar-based NMEA navigation receivers I've used work.

Beware of the situation where a cold-started receiver hasn't yet acquired the UTC offset portion of the almanac and will report time some number of seconds different than UTC. The SiRF receivers are especially misleading, as they can be off by just one or two seconds depending on when their firmware was built. They are programmed with default offset values that were valid at the time of their manufacture. In one case I had, it was sometimes off by one second, sometimes not. After June 30, 2012, it was now sometimes off by two seconds, and then I knew what was going on. The M12+ has a default offset of zero, which I find much more sane. It reports GPS time (a whopping 16 seconds different) until the UTC offset is received. 

Sent from my iPod

On Aug 19, 2012, at 9:42, Sarah White <kuzetsa at gmail.com> wrote:

> Ken:
> 
> From what I've read, most GPS modules which output PPS, the NMEA
> sentence has the timestamp of the next, upcoming pulse. Regardless of
> how the NMEA or other time data is, the PPS itself is only a guarantee
> "this is the boundary for a second" and NTP documentation typically
> recommends a second reference clock to "number the seconds" anyway.
> 
> Everyone:
> 
> Thanks everyone. I got many responses which confirm my initial
> conclusions. I had trouble locating a GPS thunderbolt on ebay because
> there is an HTC phone with "thunderbolt" in the name. (I got a few hits
> for the GPS module, but there is no way to filter out "phones" or I
> might just be bad at operating ebay)
> 
> uhm... yeah. As someone pointed out. It is a total nightmare to figure
> out which direction my GPS time is wandering, and finding the correct
> offset. I'm just gonna give up on this USB module, and get a real one
> with PPS
> 
> Also, I really hate google's new "shopping" experience. They started
> listing less content, and now push content from stores which charge 2-3
> times as much.
> 
> As far as existing hardware goes, I don't have any slots free in my
> desktop for a serial board...
> 
> Despite the new "google shopping" headache, I was able to determine that
> many "older" computers from the windows XP era which still have serial
> ports, and are available refurbished from walmart of all the crazy
> places. (most of the time, better price than the ones being pushed by
> google shopping, and even have XP installed and a 1 year warranty)
> 
> So no problem. I can source a suitable machine to run NTP, and for less
> than $200, guaranteed.
> 
> Will probably be using gentoo linux, as the default configuration does
> NOT expect you to run any specific kernel. I can easily recompile
> anything I need without breaking unusual, unforeseen dependencies.
> (doesn't hurt that I've been using gentoo since the stage1 install was
> preferred, all the way back to the GCC 2.x era)
> 
> I'm really aiming to run a server which ONLY runs NTP, and at most 1 or
> two other daemons (light duty on those)
> 
> Thanks so much everyone.
> 
> On 8/19/2012 7:11 AM, Ken Duffill wrote:
>> Just one further question.
>> 
>> When the pps input triggers, so my linux box knows a second has just
>> ticked; is the time of that second the one the NMEA sentence has just
>> sent, or will send next?
>> 
>> Or to put it another way, when I receive an NMEA sentence is this the
>> current time (as was when the sentence was constructed) or the time at
>> the next PPS 'tick'?
>> 
>> Thanks in advance.
>> 
>> KenD
>> 
>> On 19/08/12 11:23, Bill Dailey wrote:
>>> I will jump in a bit.  I, and many have been right where you are.  You
>>> are correct...USB is a no go for accurate time.  Same on windows.  So
>>> you need a Linux box with serial port.  Anything from a Beaglebone,
>>> pandabox...or pc will work.  You certainly need a gps with a pulse per
>>> second output (most have) and you can wire that up to the appropriate
>>> line on the serial cable or send to the target computer via gpio pin. 
>>> The pps thing is fairly simple really.   If you are receiving gps data
>>> via serial connection it takes a variable amount of time to get each
>>> status report from the gps...list time etc etc in text format and
>>> sends it repeatedly.  This gets ntp to within a second or some
>>> fraction thereof...the pps part refines that..no text or anything...
>>> Just a one pulse per second separate from the gps info that acts as a
>>> exclamation point to tell ntp "right here is the actual start of the
>>> second!" alone the pps wouldn't be useful for time but with the time
>>> info ntp already has from the nmea sentences it is priceless for
>>> really precise time.   That's about it.  Once you have gps and pps
>>> configured on Linux you should be in the sub 5 microsecond range.  It
>>> gets tricky getting better than that and you have to Ntpns and really
>>> worry about hardware issues that affect precision (system clock
>>> stability etc) but it can be done.
>>> 
>>> Doc
>>> KX0O
>>> 
>>> Sent from my iPad
>>> 
>>> On Aug 18, 2012, at 11:25 PM, Sarah White <kuzetsa at gmail.com> wrote:
>>> 
>>>> Hi, this is my first post.
>>>> 
>>>> First off. Windows 7 USB connection to the GPS (no serial ports / modern
>>>> computer) and I'm pretty sure that is my main problem.
>>>> 
>>>> Past few months, I've been trying to figure out my timing issues. Lots
>>>> of reading & trying to figure out how to best configure everything. I'm
>>>> typically still off (randomly) by 20-100 miliseconds. I'd like to at
>>>> least get to within 50 microseconds (nanoseconds would be wonderful)
>>>> 
>>>> 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.
>>>> 
>>>> 2) I need to run my stratum 1 clock (connected to the stratum 0 time
>>>> source via old-school RS232 serial) on linux or a form of BSD with
>>>> support for kernel timestamps, and a version of NTP with a driver to
>>>> supports my reference clock... points 1 and 2 seem fine.
>>>> 
>>>> 3) I'm clueless about mounting an antenna, running cable, grounding /
>>>> lightning protection, etc... Really want an easy to install one.
>>>> 
>>>> For software, I've used 4.2.6 (stable / production) as well as 4.2.7
>>>> (dev version) NTP and haven't been able to tell any difference.
>>>> Just using the generic NMEA driver / this is a no-name cheapo SIRF
>>>> module.
>>>> 
>>>> 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
>>>> 
>>>> And here is where I give up. As the subject line suggests:
>>>> 
>>>> HELP!!! I'd like to convert L1 GPS timing signal(s) into local time on
>>>> computer(s)
>>>> 
>>>> _______________________________________________
>>>> time-nuts mailing list -- time-nuts at febo.com
>>>> To unsubscribe, go to
>>>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>>>> and follow the instructions there.
>>> _______________________________________________
>>> time-nuts mailing list -- time-nuts at febo.com
>>> To unsubscribe, go to
>>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>>> and follow the instructions there.
>>> 
>> 
>> 
>> 
>> _______________________________________________
>> time-nuts mailing list -- time-nuts at febo.com
>> To unsubscribe, go to
>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
> 
> 
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.



More information about the time-nuts mailing list