Re: [chrony-dev] [GIT] chrony/chrony.git annotated tag, 1.27-pre1, created. 1.27-pre1

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Mon, 12 Mar 2012, Miroslav Lichvar wrote:

On Mon, Mar 12, 2012 at 09:14:21AM -0700, Bill Unruh wrote:
The PPS refclock driver sets the offset passed to the common refclock
routine to ts.tv_nsec / 1e9 where ts is the timestamp fetched from
kernel via PPSAPI. But it's not really an offset as it doesn't know
yet from which timestamp it should be substracted.

The code which prints the offset could shift it according to the PPS
rate though.

Yes, and if it does that, it could also just as well round off rather than
truncate
offset -(long)(offset*rate+1/(2*rate))/(double)rate

Or perhaps the PPS driver could round it to +-0.5 as only rates 1 Hz
or higher are supported. The question is if the refclock log should
show already aligned offset, e.g. for a 5Hz PPS 0.04, -0.01, 0.02
instead of 0.04, 0.19, 0.42.

I would say so. The timestamp on the log entry line already gives the time to
micro seconds, so it is not as if that looses anything. The log would then
give the offset rounded to the nearest 1/rate with a common accuracy ( as it
is, positive offsets are to the nearest ns, while negative are to the nearest
100ns or so-- it seems to be a bit inconsistant-- because of all the
superfluous 9s.



Note that this is the way it used to be AFAIK (chrony 1.24 with the shm
driver)-- you would get both pos and neg offsets in the raw time.

The SHM refclock is not a PPS refclock, the offset value coming from the
driver is a real offset.

Not sure what this means. Both simply hand chrony a timestamp, not an offset.

PPS gives only one timestamp, SHM gives two. The common refclock code
in chrony works with offsets not timestamps, so the driver has to
convert them somehow to offset.

OK.


If SHM samples are from PPS that conversion has to be done before
sending them over SHM, i.e. in shmpps or gpsd.



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/