[time-nuts] Sidereal time
Magnus Danielson
magnus at rubidium.dyndns.org
Sat Jan 16 04:27:27 UTC 2010
Bill Hawkins wrote:
> Magnus,
>
> I learned a technique for adjusting time that doesn't require floating
> point calculations, back when a FP Package significantly slowed micro
> processing, circa 1980.
I still remember those times, even if I did not do any computing then.
> Use a preset counter to count incoming pulses, perhaps 1 PPS. Set it
> for the number of pulses that will make a one pulse adjustment, up
> or down. When it rolls over, double or cancel the next pulse on its
> way to the clock counter. The maximum clock display error is one pulse.
>
> To carry it out to several decimal places, you need successively larger
> counters to add or subtract a pulse.
>
> I know this is heresy, but you don't need any programming skills, or
> micros and compiler packages and endian calculations and debug tools
> and training time to do this simple pulse manipulation in hardware.
True, while programming isn't prohibiting me from doing fun,
back-of-the-envelope design sketches can reduce complexity regardless of
implementation form. If you have the fullblown 64-bit (or better)
IEEE-754 float to fool around with, then this is less of a problem.
> If a person has programming skills, it is possible to implement the
> counters and adjustments in a micro that doesn't have FP math.
Certainly, that was my aim.
> Ah, I don't think "or -1,211 arcmin per day or -0,44 arcmin per year"
> is correct. More change per day than per year? What have I missed?
I missed a e-3 exponent on the first number... so it is -0,07266 arcsec
per dayor -26,6 arcsec a year. Thus, that's the approximate error of the
method of mapping 365,25 days onto 366,25 sidreal days rather than using
more accurate numbers. I still used approximate numbers (Gregorian
correction) to get the rough value rather than a tabulated value from an
athorative source rather than the back of my head.
The main point was to show that even an very coarse approximate approach
may be good enought for simpler cases, and the simplified and reduced
math may allow for relativly simple calculations. The ,25 part just begs
for a x4 to transform into integer numbers. So its 365,25 = 1461/4 and
366,25 = 1465/4.
AS = 15*H + H*60/1461 + DI*360*4/1461 mod 360
H = HI + MI/60 + SI/3600
Using the above H formula with integer second indications (SI) will form
a limit of resolution, but then again, I would not point a larger scope
using this approximation anyway.
AS = 15*HI + MI/4 + SI/900 + HI*60/1461 + MI/1461 + SI/60/1461 +
DI*360*4/1461 mod 360
Scale appropriatly, add position and correction values as needed before
breaking down into output form. It might be helpfull to reduce further
by realizing that 1461 = 3*487 and 3 is used for several of the
multiplicative constants, so /487 can be used for all but MI.
Cheers,
Magnus
More information about the time-nuts
mailing list