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, 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.

> >>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.

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

-- 
Miroslav Lichvar

-- 
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/