[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Meaning of negative PPS offset?

From: Eric S. Raymond
Subject: [gpsd-dev] Meaning of negative PPS offset?
Date: Tue, 26 Aug 2014 07:39:52 -0400 (EDT)

There is a comment in ppsthread.c that reads:

             * FIXME! The GR-601W at 38,400 or faster can send the
             * serial fix before PPS by about 10 mSec!

And, indeed, when I run gosmon live at 9600 on a GR-601W I observe a 
small negative offset. At the moment I write it is -0.003518431.

This puzzles me.  It makes me fear we may have a design or
implementation bug.

The offset is the delta in fractional seconds between the clock time
of the last PPS and the second part of the last GPS timestamp seen, minus
one second.

The assumption here is that the GPS reporting cycle looks like this:

1. GPS top of second occurs.  GPS asserts PPS.

2. gpsd fields the PPS interrupt and records the clock time it arrived
to microsecond precision.

3. When doing 2, gpsd looks at the last timestamp received in the
GPS datastream, assumes it went with the *previous* reporting cycle,
and increments the second part by one second.  This is assumed to be the
base clock second for the *current* reporting cycle.

3. GPS computes a fix. 

4. GPS ships the fix and a timestamp for this cycle.

5.  Return to step 1.

What I don't understand is how, under these assumptions, the
offset value can ever be negative.

Can someone explain this, and what it means when it happens?  I
want to document this in the Time Service HOWTO.
                <a href="";>Eric S. Raymond</a>

This would be the best of all possible worlds, if there were
no religion in it.      -- John Adams, in a letter to Thomas Jefferson.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]