Hi Miroslav,
My Implementation is as below:
- We have external RTC, which is used to sync system time on initialization based on 1PPS from external RTC
- And on receiving GNSS 3D fix, the GPS UTC time is sent to chrony over Unix Domain Socket.
- And we sync RTC for every 10 seconds on GNSS 1PPS (so that RTC is close to the UTC time in seconds)
So Reading from RTC on initialization may have a worst case drift of 10ms. And writing to RTC on GNSS 1PPS may have a drift of another 10ms. Assuming the another drift of 5ms on writing and reading from RTC, a total of approximately 30ms should be the offset detected by chrony right. But I see more than 30ms.
> If you see the offset again after chronyd restart, it means there is
> something else touching the clock. Maybe chronyd is started with the
> -s option to set the clock from RTC?
Yes if I restart chrony, I still see offset. Chrony is not started with RTC. Chrony starts syncing when it starts receiving the GPS UTC time on Unix Domain Socket.
Can you please support on debugging what can be the issue.
Thanks & Regards
Sarveshwar.K