[Top][All Lists]

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

Re: [gpsd-users] Maybe beating a dead horse: Week number rollover

From: Adam Heller
Subject: Re: [gpsd-users] Maybe beating a dead horse: Week number rollover
Date: Sat, 10 Nov 2018 09:33:54 -0500


As far as the build, it may be oddities with our arm-linux toolchain / linux distro etc. I'm not at my work computer but there was a missing header for fd_set <sys/select.h> in one file, i had to explicitly pass -std=gnu99 to get around errors being thrown for the inline asm in one of the headers as well.  I can send you a patch on Monday if you're interested to see what I had to change to get this building. ... All that being said the only things I really needed to compile in were NMEA183 support, I'm wondering if my scons config was off....

Ah, as far as gpsd having a hint to the current year from the clock... That's an interesting one. Obviously we have a clock on the boards, however it's all pinned to a tiny watch cell RTC battery which likes to die if the units aren't hooked up to a power supply very often (they get trickle charged when the units powered). And these are all units that last saw production between 2010 and 2013. Even my 3 development units all had bad RTC batteries (and therefore system time showed as unix epoch on boot).

So I'm guessing I'll have to do the week number calculation manually? Hopefully time isn't going to be going backwards any time soon, maybe I can hard code in the current build year.  I think that's similar to the solution / example code Trimble supplies.


On Sat, Nov 10, 2018, 01:45 Gary E. Miller <address@hidden> wrote:
Yo Adam!

On Fri, 9 Nov 2018 20:50:16 -0500
Adam Heller <address@hidden> wrote:

> Yeah, I managed to reproduce the rollover today. Not sure what I was
> doing wrong yesterday but today the date jumped back as expected. 


> Spent the other half of the day getting the latest gpsd release
> compiling for our platform. 

Ouch again.  Anything we could do to make that easier?

> Am I correct in assuming that gpsd handles the rollover in the newer
> relases? 

Yeah, we assume that...

The code to handle week rollover is in timebase.c.  It needs your system
clock to be close before starting gpsd.

We look forward to the results of your tests.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
Adam Heller

reply via email to

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