[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Y2K Compliance with old W3IWI ORBIT program



Nick, W0CA asked me:

> Tom, you're the author of the great tracking program used by a 
> lotta Commodore C-64  guys (and I'm one of them) and am wondering 
> if we will have a problem with Y2K as everyone is talking about?  

My old ORBIT program is old enough to vote! I wrote it in the late
'70s and it still seems to be used. It was originally done in 8080
NorthStar disk BASIC and then others ported it to Micro$oft GW-BASIC,
Commode-Door 64s, etc. I'm amazed it is still in use.

Way back then, in the days of yore, memory and CPU cycles were very
precious, so I took a couple of shortcuts:
 1. You had to manually enter Keplerian elements by hand.
 2. It used very rudimentary calendar & sidereal time routines.

It is the second item that really has to be addressed. The "trick" I
used was that you had to manually enter the Greenwich Mean Sidereal
Time (GMST) for January 0.0 (really Dec.31 of the previous year), and
you had to enter a new GMST constant by hand each year. The internal
calendar routine figured out the elapsed day of the year (i.e. 32 =
Feb.1), added on the desired UTC expressed as a fraction of a day 
(i.e. 0.250 for 06:00 UTC), and multiplied the total (i.e. 32.25)
times the sidereal-to-solar ratio (1.002737909) in order to get the
current sidereal time. The simple calendar calculation assumed that
years evenly divisible by 4 are leap years with 366 days.

Given the utter simplicity of this scheme, it has no Y2K problem
since Year 2000 is a leap year. The Leap-year algorithm is:
 a. If a year is evenly divisible by 4, it IS a Leap Year (1996 yes);
 b.   Except: If it is divisible by 100 it is NOT a Leap Year (1900 no);
 c.   Except: If it is divisible by 400 it IS a Leap Year (2000 yes);
 d.   Except: If it is divisible by 1600 it is NOT a Leap Year (3200 no).

We lucked out and 2000 is a Leap Year, and the algorithm I used two
decades ago is Y2K compliant and is valid thru Feb. of 2100! I don't
think that there will be any C64s in use by then, so I don't feel very
worried about the problem!

This only leaves the need for GMST table entries for the new Millenium.
I did a quick hack on the "universal" calendar/time utility package I wrote
to produce the following table. If anyone wants my Y2K-compliant QBASIC/ 
GWBASIC source code that handles date/time conversions, computes sidereal 
times, Modified Julian Dates (MJD), GPS weeks, etc, please let me know and
I'll make it available.

73, Tom

    ----------------------------------------------------------------

 ---- DATE ----   =  Modified        -------- GMST at 00:00 UTC --------
                    Julian Date            fraction of day  = HH:MM:SS.SSS

Wed  0.0 Jan 1998 = MJD 50813.0:   GMST0 = 0.27627658358929 = 06:37:50.297
Thu  0.0 Jan 1999 = MJD 51178.0:   GMST0 = 0.27561349630588 = 06:36:53.006
Fri  0.0 Jan 2000 = MJD 51543.0:   GMST0 = 0.27495040923770 = 06:35:55.715
Sun  0.0 Jan 2001 = MJD 51909.0:   GMST0 = 0.27702523173612 = 06:38:54.980
Mon  0.0 Jan 2002 = MJD 52274.0:   GMST0 = 0.27636214509897 = 06:37:57.689
Tue  0.0 Jan 2003 = MJD 52639.0:   GMST0 = 0.27569905867704 = 06:37:00.399
Wed  0.0 Jan 2004 = MJD 53004.0:   GMST0 = 0.27503597247034 = 06:36:03.108
Fri  0.0 Jan 2005 = MJD 53370.0:   GMST0 = 0.27711079583261 = 06:39:02.373
Sat  0.0 Jan 2006 = MJD 53735.0:   GMST0 = 0.27644771005694 = 06:38:05.082
Sun  0.0 Jan 2007 = MJD 54100.0:   GMST0 = 0.27578462449650 = 06:37:07.792
Mon  0.0 Jan 2008 = MJD 54465.0:   GMST0 = 0.27512153915128 = 06:36:10.501
Wed  0.0 Jan 2009 = MJD 54831.0:   GMST0 = 0.27719636337739 = 06:39:09.766
Thu  0.0 Jan 2010 = MJD 55196.0:   GMST0 = 0.27653327846321 = 06:38:12.475
Fri  0.0 Jan 2011 = MJD 55561.0:   GMST0 = 0.27587019376425 = 06:37:15.185
Sat  0.0 Jan 2012 = MJD 55926.0:   GMST0 = 0.27520710928052 = 06:36:17.894
Mon  0.0 Jan 2013 = MJD 56292.0:   GMST0 = 0.27728193437047 = 06:39:17.159
Tue  0.0 Jan 2014 = MJD 56657.0:   GMST0 = 0.27661885031778 = 06:38:19.869
Wed  0.0 Jan 2015 = MJD 57022.0:   GMST0 = 0.27595576648030 = 06:37:22.578
Thu  0.0 Jan 2016 = MJD 57387.0:   GMST0 = 0.27529268285805 = 06:36:25.288
Sat  0.0 Jan 2017 = MJD 57753.0:   GMST0 = 0.27736750881185 = 06:39:24.553
Sun  0.0 Jan 2018 = MJD 58118.0:   GMST0 = 0.27670442562064 = 06:38:27.262
Mon  0.0 Jan 2019 = MJD 58483.0:   GMST0 = 0.27604134264465 = 06:37:29.972
Tue  0.0 Jan 2020 = MJD 58848.0:   GMST0 = 0.27537825988388 = 06:36:32.682
Thu  0.0 Jan 2021 = MJD 59214.0:   GMST0 = 0.27745308670152 = 06:39:31.947
Fri  0.0 Jan 2022 = MJD 59579.0:   GMST0 = 0.27679000437179 = 06:38:34.656
Sat  0.0 Jan 2023 = MJD 59944.0:   GMST0 = 0.27612692225729 = 06:37:37.366
Sun  0.0 Jan 2024 = MJD 60309.0:   GMST0 = 0.27546384035800 = 06:36:40.076
Tue  0.0 Jan 2025 = MJD 60675.0:   GMST0 = 0.27753866803949 = 06:39:39.341
Wed  0.0 Jan 2026 = MJD 61040.0:   GMST0 = 0.27687558657125 = 06:38:42.051
Thu  0.0 Jan 2027 = MJD 61405.0:   GMST0 = 0.27621250531822 = 06:37:44.760
Fri  0.0 Jan 2028 = MJD 61770.0:   GMST0 = 0.27554942428043 = 06:36:47.470
Sun  0.0 Jan 2029 = MJD 62136.0:   GMST0 = 0.27762425282576 = 06:39:46.735
Mon  0.0 Jan 2030 = MJD 62501.0:   GMST0 = 0.27696117221900 = 06:38:49.445

----
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home