gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] gpsdate program, similar to 'ntpdate'


From: Ed W
Subject: Re: [gpsd-dev] gpsdate program, similar to 'ntpdate'
Date: Tue, 25 Jun 2013 22:28:31 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 21/06/2013 08:17, Harald Welte wrote:
Hi C.J.,

On Thu, Jun 20, 2013 at 03:56:00PM -0700, C.J. Adams-Collier wrote:
I hear ntpdate has been deprecated long time and obsoleted in new releases.

Try ntpd -q
I have tried this long ago, and would be happy if things would have been
that simple.

ntp_refclock:refclock_process_f() calls libntp:clocktime() and the
latter aboslutely cannot deal with the fact if e.g. your embedded
system without RTC boots up assuming it is January 1st 1970 and a GPS
reference time in the year 2013 has been received.

I looked into fixing the ntpd/libntp code some months ago, but gave up
as it seems to be written on the assumption that there simply are not 43
years of difference between two timestamps.

Having said that, I'm clearly not a ntpd expert and happy to try
whatever method people suggest here.  But after lots of debugging and
ntp source code reading I arrived at the conclusion that it is not
possible using the existing code, which prompted the implementation of
gpsdate.



I don't have this problem with Chrony when my board boots up with 2000 as the date... However, I haven't tested with wider than 13 year gap.

Also I use gentoo on these boards and the service "swclock" which implements a weak monotonic clock source by setting the initial clock to match some file on the filesystem. Touch this file as often as you wish to get the initial clock as for forward in time as you wish. The main goal is simply that the clock doesn't move (to far) backwards in time rather than it's accurate

Ed W



reply via email to

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