Re: [chrony-users] Automotive usage of chronyd

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



Thanks a lot, now it works !

Best regards,
Olivier

On Tue, Apr 7, 2015 at 12:56 PM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
On Tue, Apr 07, 2015 at 12:04:33PM +0200, Olivier Delbeke wrote:
> The tv values are what I send : it's the timestamp received from the GPS
> sensor, in local time (created using mktime()).
>
> My chrony.conf :
>    refclock SOCK /tmp/chrony.gps.sock
>    makestep 1000 10
>
> The code that fills the structure that I send to chronyd :
>    chronydata.tv.tv_sec  = mktime(...);
>    chronydata.tv.tv_usec = 0;

The tv field should be the system time as returned by gettimeofday()
when the reference sample was received. It's not the time from GPS.

>    chronydata.offset = 0.0;   // What should I store here ?

This should be the difference between the GPS reference time and the
system time in the previous field. I'm never sure what sign it should
be, try both and see which works correctly :).

>    chronydata.pulse = 0;   // What should I store here ?

It's not a PPS signal, so 0.

>    chronydata.leap = 0;   // What should I store here ?

0 normally, 1 when leap second will be inserted, 2 when deleted.

BTW, the gpsd daemon supports the chrony SOCK protocol if you are
looking for a working example.

--
Miroslav Lichvar

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




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