Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Tom Van Baak
> Tom,
>
> In my TB monitor kit, I used your Julian date routines, adapted to the 8051
> (no variable greater than 32 bits since my compiler does not support them
> either) to apply the GPS offset correction. It was very helpful.
>
> Didier KO4BB

Right. There are many ways to address the 1024 week rollover. Mark uses JD and 
floating point because his program contains lots of astronomical features and 
JD is useful and popular in that context. I suspect the code you're using is 
from this demo -- http://leapsecond.com/tools/tbolt1.c -- which is based on MJD 
and integer only.

The code I mentioned today -- http://leapsecond.com/tools/gpsdn.c -- is similar 
except its based on GPSDN instead of MJD. I came up with GPSDN because it's 
easier to work with GPS cycles when the origin of GPS time is GPSDN = 0 instead 
of something like MJD = 44244, or JD = 2444244.5, or unix_time_t = 315964800, 
or Excel date 29226.

If you display GPSDN as hex or binary, GPS rollovers are a picture-worthy 
ripple-carry binary odometers:

1999-08-21 = GPSDN 7167 = 0x1BFF = 0b11011
1999-08-22 = GPSDN 7168 = 0x1C00 = 0b11100

2019-04-06 = GPSDN 14335 = 0x37FF = 0b110111
2019-04-07 = GPSDN 14336 = 0x3800 = 0b111000

2038-11-20 = GPSDN 21503 = 0x53FF = 0b1010011
2038-11-21 = GPSDN 21504 = 0x5400 = 0b1010100

2058-07-06 = GPSDN 28671 = 0x6FFF = 0b110
2058-07-07 = GPSDN 28672 = 0x7000 = 0b111

While I'm at it, and for newcomers to the group, note that GPS rollovers occur 
about every 19.6 years (1024 weeks) and occur in "GPS time", which is offset 
from "UTC time" by a particular number of leap seconds. That's why GPS 
rollovers do not occur at precisely midnight on the dates listed above. Also 
why it's not possible to list the exact time of future GPS rollovers as UTC 
date & time. Hint: stay well away from self-driving vehicles during leap 
seconds and GPS rollovers.

/tvb

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Mark Sims
Thanks,  excellent code to do the fixup on Arduinos, etc.   Heather already has 
Julian <-> Gregorian routines that use double precision numbers and allows 
date/time tweaks to millisecond levels, so I used those.

I am modifying the rollover adjustment code to not latch onto a specific 
rollover compensation value.  That was originally done for a couple of old 
receivers that did things rather bizarrely.   Subsequent improvements  to the 
code made that no longer necessary. So now Heather will be able to recover from 
date/time issues due to bogus dates that occur during receiver startup.



> Ah, more complicated math to solve a problem vs. simpler math to avoid a 
> problem in the first place.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Didier Juges
Tom,

In my TB monitor kit, I used your Julian date routines, adapted to the 8051
(no variable greater than 32 bits since my compiler does not support them
either) to apply the GPS offset correction.
It was very helpful.

Didier KO4BB

On Wed, Mar 28, 2018, 7:13 AM Tom Van Baak  wrote:

> Hi Mark,
>
> > Heather keeps all times as a double precision Julian date.  Using
> Heather's code can
> > be a problem on Arduinos since their "double" precision numbers are
> actually 32 bit
> > single precision,  so you would need to do some more complicated math.
>
> Ah, more complicated math to solve a problem vs. simpler math to avoid a
> problem in the first place.
>
> Here's a simple "GPS Day Number" example: www.leapsecond.com/tools/gpsdn.c
>
> To add 1024 weeks to a given date use:
>
> gpsdn = date_to_gpsdn(year, month, day);
> gpsdn += 1024 * 7;
> gpsdn_to_ymd(gpsdn, &year, &month, &day);
>
> That's it. It uses 32 bit integers; no floating point required; works on
> any OS, or Arduino.
>
> /tvb
>
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Bob kb8tq
Hi



> On Mar 28, 2018, at 12:10 AM, Mark Sims  wrote:
> 
> Lady Heather's automatic rollover fixer works by looking at the year in any 
> time message that it sees.  If it sees 10 consecutive year values less than 
> 2016,  it assumes the receiver has rollover issues and then adds 1024 weeks 
> worth of seconds to the Julian date/time calculated from the receiver 
> time/date message until the resulting year is past 2016.
> 
> One problem with this is when a receiver is first powered up... most of them 
> send dates in the 1980s to 1990s until they start tracking satellites.   Once 
> Heather detects a rollover condition, the code does not currently undo it if 
> the receiver starts sending good dates.
> 
> Heather keeps all times as a double precision Julian date.  Using Heather's 
> code can be a problem on Arduinos since their "double" precision numbers are 
> actually 32 bit single precision,  so you would need to do some more 
> complicated math.
> 
> Heather's rollover compensation value is actually in double precision 
> seconds.  You can manually specify a rollover correction to sub-second 
> resolution and tweak the displayed time/date to anything you want...  comes 
> in handy for testing calendar/eclipse/sunrise/sunset/etc code.
> 
> Speaking of rollovers,  the GPS system has a 1024 week rollover next year 
> (April 6th-7th).  A lot of older receivers had code that could handle the 
> first system rollover in 1999,  but might have issues this time.

There are a surprising number of GPS modules that really don’t handle the 
rollover very well. That includes a significant number of designs that came out 
after 1999. 

Bob


> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Tom Van Baak
Hi Mark,

> Heather keeps all times as a double precision Julian date.  Using Heather's 
> code can
> be a problem on Arduinos since their "double" precision numbers are actually 
> 32 bit
> single precision,  so you would need to do some more complicated math.

Ah, more complicated math to solve a problem vs. simpler math to avoid a 
problem in the first place.

Here's a simple "GPS Day Number" example: www.leapsecond.com/tools/gpsdn.c

To add 1024 weeks to a given date use:

gpsdn = date_to_gpsdn(year, month, day);
gpsdn += 1024 * 7;
gpsdn_to_ymd(gpsdn, &year, &month, &day);

That's it. It uses 32 bit integers; no floating point required; works on any 
OS, or Arduino.

/tvb

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-28 Thread Mark Sims
Lady Heather's automatic rollover fixer works by looking at the year in any 
time message that it sees.  If it sees 10 consecutive year values less than 
2016,  it assumes the receiver has rollover issues and then adds 1024 weeks 
worth of seconds to the Julian date/time calculated from the receiver time/date 
message until the resulting year is past 2016.

One problem with this is when a receiver is first powered up... most of them 
send dates in the 1980s to 1990s until they start tracking satellites.   Once 
Heather detects a rollover condition, the code does not currently undo it if 
the receiver starts sending good dates.

Heather keeps all times as a double precision Julian date.  Using Heather's 
code can be a problem on Arduinos since their "double" precision numbers are 
actually 32 bit single precision,  so you would need to do some more 
complicated math.

Heather's rollover compensation value is actually in double precision seconds.  
You can manually specify a rollover correction to sub-second resolution and 
tweak the displayed time/date to anything you want...  comes in handy for 
testing calendar/eclipse/sunrise/sunset/etc code.

Speaking of rollovers,  the GPS system has a 1024 week rollover next year 
(April 6th-7th).  A lot of older receivers had code that could handle the first 
system rollover in 1999,  but might have issues this time.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-27 Thread Nick Sayer via time-nuts
In general, I believe whether you can work around the 1024 week problem and if 
so, how, tends to be a receiver-by-receiver thing (or at least 
manufacturer-by-manufacturer).

I’m most familiar with the SkyTraq Venus838, and those have a sliding window 
system where you set a “reference date” and the receiver will always assume 
that date is inside the window. At least once every 1024 weeks, you’re supposed 
to set that to the current date (it’s a binary command and they have software 
that will do this for you), and then you’ll get another 1024 weeks without 
having to do anything.

My GPSDOs don’t have a TX path from the controller to the receiver, but you can 
talk to the receiver directly with the diagnostic connector and update the 
reference date that way. My GPS Clocks will set the reference date once a year 
(if the current year != the reference date year, then it is set, and this check 
is made once an hour. Having the date correct matters for DST decisions).

> On Mar 26, 2018, at 5:03 PM, David C. Partridge 
>  wrote:
> 
> AFAIK you can't set the correct date any more - this is the 1024 week 
> rollover problem.
> 
> Lady Heather does correct the displayed date, as it knows that the reported 
> date is wrong..
> 
> David
> 
> -Original Message-
> From: time-nuts [mailto:time-nuts-boun...@febo.com] On Behalf Of 
> donandarl...@gmail.com
> Sent: 26 March 2018 22:18
> To: time-nuts@febo.com
> Subject: [time-nuts] Setting correct date on Trimble Thunderbolt receiver
> 
> Hello all,
> I am new to the board and have just received a Trimble Thunderbolt GPS 
> receiver today.
> All is working correctly except the date shows Aug 10 1998.
> How do set the proper date on this?
> I am running TBoltMon to access the unit.
> Any help would be appreciated.
> Thanks,
> Don W9BHI
> ___
> time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to 
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
> 
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-27 Thread Chris Caudle
On Mon, March 26, 2018 6:49 pm, Tom Van Baak wrote:
> The bad news is that if you use the Trimble TSIP RS232 interface and if
> you want the correct date & time then the software needs to be aware of
> the 1024 week (19.6 year) epoch. This "GPS 1024 week rollover" issue

Many people do not use the date directly, it is served to other machines
via other software such as ntpd.  You should be able to configure ntpd to
add an appropriate offset such that the correct date is served.
If using directly (e.g. a machine is logging data and communicating
directly with the Tbolt to get date stamps) you would have to add the
equivalent offset yourself.

-- 
Chris Caudle


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-26 Thread David C. Partridge
AFAIK you can't set the correct date any more - this is the 1024 week rollover 
problem.

Lady Heather does correct the displayed date, as it knows that the reported 
date is wrong..

David

-Original Message-
From: time-nuts [mailto:time-nuts-boun...@febo.com] On Behalf Of 
donandarl...@gmail.com
Sent: 26 March 2018 22:18
To: time-nuts@febo.com
Subject: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

Hello all,
I am new to the board and have just received a Trimble Thunderbolt GPS receiver 
today.
All is working correctly except the date shows Aug 10 1998.
How do set the proper date on this?
I am running TBoltMon to access the unit.
Any help would be appreciated.
Thanks,
Don W9BHI
___
time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to 
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-26 Thread Tom Van Baak
Don,

The primary purpose of a Thunderbolt GPSDO is ultra-precise time (1PPS) and 
frequency (10 MHz), locked to each other, and to UTC. The good news is these 
two BNC outputs are unaffected by the date issue that you describe. The TBolt 
is designed to run fine on its own; you typically don't need a PC or control 
program to operate it.

The bad news is that if you use the Trimble TSIP RS232 interface and if you 
want the correct date & time then the software needs to be aware of the 1024 
week (19.6 year) epoch. This "GPS 1024 week rollover" issue eventually affects 
many receivers, including the TBolt, but the good news is that simple 
work-arounds are often available to address the problem.

AFAIK, the Tboltmon.exe program has *not* been updated. I still use it (when 
you're dealing with nanoseconds, calendar dates are less important).

Mark's LH program *has* been updated. See: 
http://www.ke5fx.com/heather/readme.htm

Didier's LCD date/time display *has* been updated: 
http://www.ko4bb.com/Timing/GPSMonitor/kit.php

/tvb

- Original Message - 
From: 
To: 
Sent: Monday, March 26, 2018 2:17 PM
Subject: [time-nuts] Setting correct date on Trimble Thunderbolt receiver


> Hello all,
> I am new to the board and have just received a Trimble Thunderbolt GPS 
> receiver today.
> All is working correctly except the date shows Aug 10 1998.
> How do set the proper date on this?
> I am running TBoltMon to access the unit.
> Any help would be appreciated.
> Thanks,
> Don W9BHI
> ___
> time-nuts mailing list -- time-nuts@febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Setting correct date on Trimble Thunderbolt receiver

2018-03-26 Thread donandarline
Hello all,
I am new to the board and have just received a Trimble Thunderbolt GPS receiver 
today.
All is working correctly except the date shows Aug 10 1998.
How do set the proper date on this?
I am running TBoltMon to access the unit.
Any help would be appreciated.
Thanks,
Don W9BHI
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.