[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Time autonomy
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] Time autonomy |
Date: |
Tue, 24 Feb 2015 13:32:10 -0800 |
Yo Terje!
On Tue, 24 Feb 2015 22:13:56 +0100
Terje Mathisen <address@hidden> wrote:
> > Not the case on a RasPi. No battery back clock, and often a lot
> > of downtime.
>
> Including downtime caused by simply pulling the power cable/battery,
> right?
Be careful, I resemble that remark! :-)
> >> 6. If you had to increment saved_epoch in step 3, write it
> >> /var/run/gps-epoch at shutdown time.
> > But only if you knwo the gps-epoch to save is good.
> If you have no cmos clock and no network connection, the best you can
> possibly do is to update the epoch file every time something
> interesting happens, i.e. leap second or week counter rollover. To
> guard against sudden power loss, this should be done asap and not
> wait for a regular shutdown event.
>
> If the device is left without power for so long that you miss one of
> the edges, then you'll need some manual method to get it back in sync.
I guess if gpsd saved a copy of the GPS week every time it rolled over
we could detect an epoch roll over. Then gpsd only needs a good GPS
lock, and write, every epoch.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
address@hidden Tel:+1(541)382-8588