This program is an orbital tracking system for OSCAR 10 (Phase III-B amateur radio satellite), computing azimuth, elevation, range, phase, and ground-track coordinates from Keplerian elements. It displays a text-mode world map built from block graphics, plots the satellite position using PLOT commands, and shows an orbital diagram with the satellite’s position around a CIRCLE. The Keplerian propagator implements an iterative Kepler’s equation solver (lines 7310–7400) using mean motion, eccentricity, and argument of perigee to compute geocentric coordinates, which are then rotated into a topocentric frame for the observer’s location. Five predefined QTH locations (West Covina CA, Auckland NZ, Tokyo, London, New York) can be selected, and a user-defined UDG character (\a) is used to mark satellite position in the orbital diagram. Machine code is invoked via RANDOMIZE USR 10243 for tape I/O operations, with memory POKEs at 16390 and 16451 controlling device parameters.
Program Analysis
Program Structure
The program is organized around a central menu (lines 30–170) with six selectable modes. Execution begins at line 2 with a GO TO 200 that performs tape-load initialization via machine code before jumping to the main setup at line 25. The six menu branches are:
- Mode 1 (line 5070): OSCAR 10 world map with satellite position plotted
- Mode 2 (line 1550): Instruction text display
- Mode 3 (line 2010): List Keplerian elements for editing
- Mode 4 (line 9540): Windows to DX cities (pass prediction)
- Mode 5 (line 9490): Az/El, range, phase, and ground-track scrolling data
- Mode 6 (line 9994): Save program to tape
All orbital computation modes converge at line 6200 for date/time/QTH input, then proceed through the Keplerian propagator starting at line 7010. The variable A acts as a mode flag (1=windows, 2=full data, 3=map) that steers output branching throughout the shared computation loop.
Orbital Propagator
The Keplerian elements for OSCAR 10 (NASA Set 108, epoch 7/12/84) are stored directly in the program at lines 6520–6660. The propagator pipeline is:
- Lines 7010–7220: Compute nodal regression (
K2) and build a 3×2 rotation matrixC()from inclination, RAAN, and argument of perigee - Lines 7230–7260: Compute mean anomaly
Mand AMSAT phaseM9(scaled 0–256) - Lines 7270–7400: Iterate Kepler’s equation to solve for eccentric anomaly
E; convergence criterion isABS(M5) < 1E-6 - Lines 7410–7460: Convert to geocentric ECI rectangular coordinates via the rotation matrix
- Lines 7660–7750: Rotate from inertial to Earth-fixed frame using Greenwich Hour Angle (
G7) - Lines 7760–7950: Compute observer’s ECEF position accounting for Earth’s oblateness (
F=1/298.25) and station altitude - Lines 7960–8260: Derive elevation (
E9), azimuth (A9), sub-satellite longitude (W5) and latitude (L5), and slant range (R5)
Menu Dispatch Technique
Line 170 uses a computed GO TO with a Boolean arithmetic expression to branch on the selected digit without a chain of IF statements:
GO TO (B$="1")*5070+(B$="2")*1550+(B$="3")*2000+(B$="4")*9540+(B$="5")*9490+(B$="6")*9994
Each Boolean evaluates to 1 (true) or 0 (false), so exactly one term is non-zero, giving the target line number directly. This is a well-known BASIC optimization for multi-way dispatch.
Machine Code Usage
Two machine code entry points are used via RANDOMIZE USR 10243. The POKEs at 16390 and 16451 configure stream/device parameters before invocation:
| Routine | Lines | POKE 16390 | POKE 16451 | Purpose |
|---|---|---|---|---|
| Load (READ) | 200–260 | 4 | 8 | Tape load + memory allocation |
| Save (WRITE) | 9700–9740 | 4 | 6 | Tape save |
Line 240 allocates a 3900-byte string array Q$(3900) before the USR call at line 250, suggesting the machine code operates on this buffer during the load sequence.
World Map Display
Lines 3030–3160 render a full-screen world map using block graphic characters with per-segment INK color changes (INK 2–6) to distinguish continental regions. The map is drawn entirely with PRINT statements using ZX Spectrum block graphic escape sequences. Satellite position is overlaid using PLOT at coordinates derived from W5 (longitude) and L5 (latitude) via linear scaling in lines 3510–3530.
UDG Satellite Symbol
Lines 81–85 define UDG character \a (character 144) as a satellite icon using eight binary DATA values, loaded via POKE USR "\a"+N, X. The bitmap pattern represents a stylized satellite shape. This UDG is then used in lines 4010–4023 to show the satellite’s orbital position around a CIRCLE diagram, with 23 conditional branches mapping phase angle ranges to screen coordinates.
Scrolling Banner
Lines 4–20 implement a horizontal scrolling marquee for the credit string J$. The string is 40 characters long (matching the screen width). On each iteration, the first character is moved to the end with J$(B TO B+31)=J$(B+1 TO B+31)+J$(B), and the updated string is printed at row 13. The counter I is reset at 33 via GO TO 6416, which re-enters the date/time input sequence — this effectively restarts the whole setup when the banner completes a cycle.
Time and Date Handling
The Julian day number D6 is computed at line 6440 using a compact formula incorporating month, day, and year, with a special case for months before March (line 6450). UTC time is input as a four-digit string (e.g., "1400"), stored in S$, and decoded at line 6416. The subroutine at lines 6030–6090 formats computed decimal time back to HHMM format stored in T$ for display. Day rollover at midnight is handled at lines 9040–9105 with separate branches for months of different lengths.
DX City Window Prediction
Lines 5260–6020 define 19 cities with hardcoded latitude/longitude pairs. For each city, subroutine 5120 computes the great-circle angle between the sub-satellite point and the city location using the spherical law of cosines, comparing it to the satellite’s Earth-shadow horizon angle DZ. An “IN” indicator (flashing, INK 2) is printed if the satellite is above the horizon from that city; “–” otherwise.
Notable Anomalies
- Lines 9010 and 9015 contain
IF (T-T2)>.18 THENandIF (T-T2)>.19 THENwith no consequent statement — these are no-ops as written and appear to be incomplete stubs. - Line 6815 is referenced by QTH selection GOTOs (lines 9121, 9132, 9137, 9142) but does not appear in the listing; execution would fall through from wherever line 6810 ends, which happens to continue correctly into line 6820 — this is intentional fall-through rather than a true bug.
- The longitude convention is mixed: the program uses West-positive internally for the observer (
W9) but the GHA display is labeled “0-360 WEST” in the menu instructions. - Line 9002–9003 use operator precedence ambiguity:
IF A=2 AND V/20=1 OR V/20=2 ...will not behave as intended due to OR having lower precedence than AND, causing the pause to trigger onV/20=2throughV/20=5regardless of the value ofA.
Content
Source Code
2 GO TO 200
3 GO TO 30
4 LET I=1
5 DIM J$(40)
6 INK 4: LET J$=" IDEA BY W6WNK FOR AMSAT OSC-10"
7 PRINT AT 13,0;J$
9 FOR B=1 TO 6 STEP 32
10 LET I=I+1
12 LET J$(B TO B+31)=J$(B+1 TO B+31)+J$(B)
15 IF I=33 THEN GO TO 6416
18 NEXT B
20 GO TO 7
25 POKE 23658,8
26 PAPER 1: BORDER 1: BRIGHT 0: INK 7: CLS
27 LET V=0
30 CLS
32 PRINT "THIS PROGRAM DISPLAYS THE WORLD MAP AND PLOTS THE LOCATION OF THE AMATEUR RADIO SATELLITE ""OSCAR 10"""''"UTC MEANS SAME AS GREENWICH MEAN TIME"'"GHA IS LONGITUDE ON 0-360 WEST"'"EDIT PROGRAM TO PUT YOUR LAT & LONG IN PLACE OF 34 & 118"'"STUDY THE MENU AND SELECT CHOICE"
38 PAUSE 600: CLS
40 PRINT " MENU FOR VR-85 BY W6WNK:-"
50 PRINT " \''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''"
60 PRINT
65 PRINT
70 PRINT " 1 OSCAR 10 WORLD MAP"
79 RESTORE
80 REM SATELLITE UDG
81 FOR N=0 TO 7
82 READ X
83 POKE USR "\a"+N,X
84 NEXT N
85 DATA BIN 01000001,BIN 00100010,BIN 00011010,BIN 00111110,BIN 00111110,BIN 00011010,BIN 00100001,BIN 01000000
95 PRINT
100 PRINT " 2 IMPORTANT INSTRUCTIONS"
110 PRINT
120 PRINT " 3 CHANGE KEPLERIANS"
125 PRINT
130 PRINT " 4 WINDOWS TO DX CITIES"
131 PRINT
132 PRINT " 5 AZ/EL,RANGE,PHASE,ETC."
133 PRINT
134 PRINT " 6 SAVE TO TAPE"
135 PRINT
140 PRINT AT 17,5;"SELECT DESIRED MODE";AT 19,6;"TYPE INPUT NUMBER"
150 GO SUB 1240
155 LET B$=INKEY$
160 IF B$<"1" OR B$>"6" THEN GO TO 150
170 GO TO (B$="1")*5070+(B$="2")*1550+(B$="3")*2000+(B$="4")*9540+(B$="5")*9490+(B$="6")*9994
180 GO TO 1250
200 REM READ
210 POKE 16390,4
220 POKE 16451,8
230 CLEAR
240 DIM Q$(3900)
250 RANDOMIZE USR 10243
260 GO TO 25
1250 IF INKEY$<>"" THEN GO TO 1250
1255 IF INKEY$="" THEN GO TO 1255
1256 LET A=3
1265 RETURN
1550 CLS
1555 PRINT AT 0,9;"INSTRUCTIONS"
1556 PRINT
1557 PRINT "THE VR-85 HAS 4 PGM SELECTIONS."
1558 PRINT
1560 PRINT "1-MAP- SAT MOVES IN 15 MIN STEPS. PRESS BREAK TO STOP AND -C- TOCONT(ENTER ANY DATE AND TIME UTC. IF SAT NOT IN VIEW,EL WILL READ 0)"
1561 PRINT
1562 PRINT "3-LIST TO EDIT KEPLERIANS"
1563 PRINT
1565 PRINT "4-WINDOWS F0R DX CITIES COVERS 4HOURS FROM THE SELECTED TIME."
1566 PRINT
1567 PRINT "5-RANGE,GROUND PATH DATA,USED ONOSCAR-10,DATA WILL SCROLL UPWARD"
1568 PRINT
1569 PRINT "NOTE START ALL TIMES AT AN EVEN HOUR(EG 1100) AND USE FOUR DIGITS AS(HHMM)"
1665 PRINT AT 20,5;"PRESS ENTER TO RETURN"
1670 GO SUB 1250
1680 GO TO 30
2010 LIST 6515
2260 PRINT " PRESS ENTER TO RETURN"
2270 GO SUB 1240
2280 GO TO 30
3010 CLS : BRIGHT 0
3015 PRINT INK 4;"BREAK TO STOP,CONT OR GOTO 25"
3016 PRINT INVERSE 1;AT 1,4;"QTH IS WEST COVINA"
3017 IF CA=2 THEN PRINT INVERSE 1;AT 1,4;"QTH IS AUCKLAND,NZ"
3018 IF CA=3 THEN PRINT INVERSE 1;AT 1,4;"QTH IS TOKYO, JAPAN"
3019 IF CA=4 THEN PRINT INVERSE 1;AT 1,4;"QTH IS LONDON, U.K."
3020 IF CA=5 THEN PRINT INVERSE 1;AT 1,4;"QTH IS NEW YORK, US"
3021 PRINT
3030 PRINT INK 3;" \..\..\.. "; INK 4;" \':\::\::\:' "; INK 6;" \..\::\::\..\..\. "
3040 PRINT INK 6;"\::"; INK 3;"\ :\::\::\::\::\::\: "; INK 4;" \::\' "; INK 2;" \:'\::\::\::"; INK 6;"\::\::\::\::\::\::\::\::\::\::\::"
3050 PRINT INK 3;" \.: \''\::\::\::\:.\..\::\:. "; INK 2;" \ '\:'\..\::\::\::"; INK 6;"\::\::\::\::\::\::\::\:'\ :"
3060 PRINT INK 3;" \ :\::\::\::\::\::\'' "; INK 2;" \..\::\::\::\::\::"; INK 6;"\::\::\::\::\::\::\:'"
3070 PRINT INK 2;" \::\::\::\::\' "; INK 2;" \''\ '\ '\::"; INK 5;"\::\::"; INK 6;"\::\::\::\::\::\::\: \: "
3080 PRINT INK 2;" \. \ '\::\:'\': "; INK 3;" \.:\::\::\::"; INK 5;"\::\::"; INK 6;"\::\::\::\::\::\::\::"
3090 PRINT INK 2;" \ ' "; INK 5;" \ '\::\. "; INK 3;" \::\::\::\::\::"; INK 5;"\::"; INK 6;"\''\''\::\:'\':\: "
3100 PRINT INK 6;" \''\::\::\.. "; INK 3;" \ '\''\':\::\::\:: "; INK 6;" \ ' \' \:'"
3110 PRINT INK 6;" \ :\::\::\::\:: "; INK 3;" \::\::\: "; INK 6;" \ '\. \' \.."
3120 PRINT INK 6;" \ :\::\::\::\:: "; INK 3;" \::\::\: "; INK 4;" \:'\..\.."
3130 PRINT INK 6;" \':\::\::\' "; INK 3;" \::\:: "; INK 2;"\: "; INK 4;" \ :\::\::\::\. "
3140 PRINT INK 6;" \ :\::\: "; INK 3;" \ '\' "; INK 4;" \ '\''\::\::\' "; INK 2;" \:'"
3150 PRINT INK 6;" \ :\: "; INK 2;" \' "
3160 PRINT INK 6;" \ :"
3163 INK 7
3165 PRINT AT 17,0;"SAT:OSCAR-10 DATE: ";INT MO;"/";INT DM;"/";INT YR;
3166 PRINT AT 18,0; INK 4;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
3170 PRINT AT 19,0;"UTC ";TAB 6;"AZ ";TAB 10;"EL";TAB 13;"RANGE";TAB 20;"LON";TAB 24;"LAT";TAB 29;"PHS";
3175 PRINT AT 20,5; INK 4;"COMPUTING SATELLITE COORD."
3176 PAUSE 60
3178 PRINT AT 20,5; INK 1;"COMPUTING SATELLITE COORD."
3180 GO TO 7010
3510 IF W5<=180 THEN LET LO=W5/-5.62+31
3520 IF W5>180 THEN LET LO=W5/-5.62+95
3530 LET LA=L5/5+23
3545 LET I=1
3550 FOR S=1 TO 9999
3555 INK 7: BRIGHT 1: BEEP .03,50
3560 PLOT 4*LO,4*LA
3590 PLOT OVER 1;4*LO,4*LA
3595 LET I=I+1
3600 PLOT 4*LO,4*LA
3610 INK 4: BRIGHT 0
3620 IF I=17 THEN GO TO 3660
3625 NEXT S
3662 LET T=T+1/96
3664 LET TA=VAL T$
3665 IF TA=2345 THEN GO TO 9040
3666 GO SUB 4000
3800 GO TO 3010
4000 PAPER 1: CLS : INK 7: BRIGHT 0: CIRCLE 195,95,42: PLOT 153,95: DRAW 84,0: PRINT AT 4,24;"I";AT 15,24;"I": PRINT AT 18,3;"OSCAR-10 ORBIT AND SATELLITE POSITION AT ";T$;" UTC: RANGE ",INT R5;" KM TO QTH: PHS=";M9;" GHA=";INT W5
4005 INK 2: BRIGHT 1
4010 IF INT M9>=0 AND INT M9<16 THEN PRINT INK 2;AT 13,30;"\a"
4011 IF INT M9>=16 AND INT M9<32 THEN PRINT INK 2;AT 13,27;"\a"
4012 IF INT M9>=32 AND INT M9<48 THEN PRINT INK 2;AT 12,24;"\a"
4013 IF INT M9>=48 AND INT M9<64 THEN PRINT INK 2;AT 11,20;"\a"
4014 IF INT M9>=64 AND INT M9<80 THEN PRINT INK 2;AT 9,16;"\a"
4015 IF INT M9>=80 AND INT M9<96 THEN PRINT INK 2;AT 8,13;"\a"
4016 IF INT M9>=96 AND INT M9<112 THEN PRINT INK 2;AT 6,9;"\a"
4017 IF INT M9>=112 AND INT M9<128 THEN PRINT INK 2;AT 4,6;"\a"
4018 IF INT M9>=128 AND INT M9<134 THEN PRINT INK 2;AT 1,4;"\a"
4019 IF INT M9>=134 AND INT M9<160 THEN PRINT INK 2;AT 1,8;"\a"
4020 IF INT M9>=160 AND INT M9<176 THEN PRINT INK 2;AT 2,11;"\a"
4021 IF INT M9>=176 AND INT M9<192 THEN PRINT INK 2;AT 3,15;"\a"
4022 IF INT M9>=192 AND INT M9<208 THEN PRINT INK 2;AT 4,18;"\a"
4024 BRIGHT 0: IF INT M9>=208 AND INT M9<245 THEN PRINT INK 0;AT 16,2;"SATELLITE BEHIND EARTH FROM"'"THIS VIEW"
4025 INK 2: BRIGHT 1: PLOT 40,155: PLOT 45,150: PLOT 50,145: PLOT 57,140: PLOT 65,135: PLOT 73,130: PLOT 80,126: PLOT 85,123: PLOT 90,121: PLOT 95,118: PLOT 100,115: PLOT 110,111: PLOT 120,105: PLOT 135,99: PLOT 140,97: PLOT 150,93
4030 INK 2: BRIGHT 1: PLOT 155,135: PLOT 140,140: PLOT 135,143: PLOT 120,147: PLOT 110,152: PLOT 100,155: PLOT 95,157: PLOT 90,158: PLOT 85,159: PLOT 80,160: PLOT 75,161: PLOT 65,164: PLOT 57,164: PLOT 50,165: PLOT 45,164: PLOT 40,160
4040 INK 2: BRIGHT 1: PLOT 235,68: PLOT 240,70: PLOT 242,72: PLOT 240,75: PLOT 235,78
4050 PAUSE 500
4060 BRIGHT 0: INK 7: CLS
4990 RETURN
5070 CLS
5080 LET A=3
5110 GO TO 6200
5120 LET DIF=ABS (W5-LO)
5130 IF DIF>180 THEN LET DIF=360-DIF
5140 LET DZ1=((SIN (LA*PO))*(SIN (L5*PO))+(COS (LA*PO))*(COS (L5*PO))*(COS (DIF*PO)))
5150 LET DZ1=57.3*(-ATN (DZ1/SQR (-DZ1*DZ1+1))+PI/2)
5160 IF DZ>DZ1 THEN PRINT TAB 30; INK 2; BRIGHT 1; FLASH 1;"IN"
5165 BRIGHT 0
5170 IF DZ<DZ1 THEN PRINT TAB 30;"--"
5180 RETURN
5260 LET LA=13.75
5265 LET LO=-100.52
5268 PRINT AT 3,19;"BANGKOK";
5270 GO SUB 5120
5271 LET LA=18.97
5274 LET LO=-72.83
5275 PRINT AT 4,19;"BOMBAY";
5280 GO SUB 5120
5290 LET LA=30.05
5300 LET LO=-31.25
5305 PRINT AT 5,19;"CAIRO";
5310 GO SUB 5120
5320 LET LA=-33.92
5330 LET LO=-18.37
5340 PRINT AT 6,19;"CAPE TOWN";
5350 GO SUB 5120
5360 LET LA=34.17
5370 LET LO=117.97
5410 PRINT AT 7,19;"W.COVINA,CA";
5420 GO SUB 5120
5430 LET LA=28.67
5440 LET LO=-77.22
5450 PRINT AT 8,19;"DELHI";
5460 GO SUB 5120
5470 LET LA=64.83
5480 LET LO=147.72
5490 PRINT AT 9,19;"FAIRBANKS";
5495 GO SUB 5120
5500 LET LA=22.28
5510 LET LO=-114.02
5520 PRINT AT 10,19;"HONG KONG";
5530 GO SUB 5120
5540 LET LA=21.32
5550 LET LO=157.87
5560 PRINT AT 11,19;"HONOLULU";
5565 GO SUB 5120
5570 LET LA=51.5
5580 LET LO=-.17
5590 PRINT AT 12,19;"LONDON";
5600 GO SUB 5120
5610 LET LA=40.72
5620 LET LO=74.02
5630 PRINT AT 13,19;"NEW YORK";
5640 GO SUB 5120
5650 LET LA=59.92
5660 LET LO=-10.75
5665 PRINT AT 14,19;"OSLO";
5667 GO SUB 5120
5670 LET LA=-17.55
5680 LET LO=149.6
5685 PRINT AT 15,19;"PAPEETE";
5710 GO SUB 5120
5720 LET LA=-31.93
5730 LET LO=-115.83
5740 PRINT AT 16,19;"PERTH";
5750 GO SUB 5120
5760 LET LA=-22.9
5800 LET LO=45.25
5810 PRINT AT 17,19;"RIO";
5820 GO SUB 5120
5830 LET LA=1.28
5840 LET LO=-103.85
5850 PRINT AT 18,19;"SINGAPORE";
5860 GO SUB 5120
5900 LET LA=-33.87
5910 LET LO=-151.22
5920 PRINT AT 19,19;"SYDNEY";
5930 GO SUB 5120
5940 LET LA=35.7
5950 LET LO=-139.77
5960 PRINT AT 20,19;"TOKYO";
5970 GO SUB 5120
5980 LET LA=-41.3
5990 LET LO=-174.77
6000 PRINT AT 21,19;"WELLINGTON";
6010 GO SUB 5120
6012 IF A=1 THEN PRINT INK 2; FLASH 1;AT 1,6;"HIT ANY KEY FOR MENU"
6015 PAUSE 4E4
6018 IF A=1 THEN GO TO 25
6020 RETURN
6030 LET D$=STR$ (T4)
6040 DIM E$(4)
6050 LET E$="0000"
6060 DIM T$(4)
6070 LET U=4-LEN D$
6080 LET T$=E$(1. TO U)+D$
6090 RETURN
6231 PRINT AT 1,4;"TYPE DAY OF MONTH: ";
6235 INPUT DM
6240 PRINT DM
6245 PRINT AT 2,4;"TYPE NUMBER OF MONTH: ";
6250 INPUT MO
6255 PRINT MO
6260 PRINT AT 3,4;"TYPE YEAR (E.G.: 84): ";
6265 INPUT YR
6270 PRINT YR
6271 PRINT AT 4,4;"UTC START AS(1400):-";
6272 INPUT S$
6273 PRINT S$
6275 PRINT AT 6,1;"PICK QTH DESIRED:--"
6280 PRINT AT 7,4;"TYPE 1 HOME-- TYPE 2 FOR AUCKLAND (ZL) TYPE 3 FOR TOKYO (JA) TYPE 4 FOR LONDON (G) TYPE 5 FOR NEW YORK.....";
6281 INPUT CA
6282 PRINT CA
6290 PRINT INK 0;AT 15,3;"\:'\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\':"
6295 PRINT INK 0;TAB 3;"\: ";TAB 28;"\ :"
6300 PRINT INK 0;TAB 3;"\: ";TAB 28;"\ :"
6305 PRINT INK 0;TAB 3;"\: ";TAB 28;"\ :"
6310 PRINT INK 0;TAB 3;"\:.\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\.:"
6315 PRINT INK 5;AT 16,4;"THIS 2068 PROGRAM WAS"
6320 PRINT INK 5;AT 17,4;"TRANSLATED BY WA6DLI "
6325 PRINT INK 3; INVERSE 1;AT 18,7;" PLEASE STANDBY "
6415 GO TO 4
6416 LET T1=VAL S$
6435
6440 LET D6=INT (YR/4)-INT ((YR-1)/4)+212 +DM+(SGN (MO-8)*(INT (.5+(ABS ((MO-8)*30.5)))))
6450 IF MO<3 THEN LET D6=DM+(MO-1)*31
6460 CLS
6515 REM START KEPLERIANS
6516 REM 6810 FOR NEW HOME LAT/LNG
6518 REM NASA SET-108 7/12/84
6519 CLS
6520 LET Y2=84
6530 LET JD=195.94119483
6540 LET IO=25.6129
6560 LET RAAN=189.0754
6600 LET EO=0.6080442
6610 LET WO=288.4692
6620 LET MA=17.039
6630 LET MM=2.05846092
6640 LET GO=7.5369793E13
6650 LET G1=1.0027379093
6660 LET G2=.2759328721
6710 IF YR=84 THEN LET G2=.2746066342
6720 IF YR=85 THEN LET G2=.2766814244
6730 LET D6=D6+365*(YR-Y2)
6740 LET PI=3.14159265
6750 LET P2=2*PI
6760 LET PO=PI/180
6770 LET T2=(INT (T1/100))/24+D6
6780 LET T=T2
6790 IF CA=2 THEN GO TO 9120
6791 IF CA=3 THEN GO TO 9130
6792 IF CA=4 THEN GO TO 9135
6793 IF CA=5 THEN GO TO 9140
6800 LET L9=34.17
6810 LET W9=117.97
6820 LET H9=120
6830 LET RO=6378.16
6840 LET F=1/298.25
6850 IF MM>.1 THEN LET AO=((GO/(MM^2))^(1/3))
6860 IF MM<=.1 THEN LET MM=SQR (GO/(AO^3))
6900 LET E2=1-EO^2
6910 LET E1=SQR (E2)
6920 LET FA=0
6930 LET QO=MA/360
6937 IF A=3 THEN GO TO 3010
6940 PRINT ;TAB 3;"W6WNK OSCAR-10 ON ";MO;"/";DM;"/";YR,,,
6941 PRINT INVERSE 1;AT 0,0;"FROM W6 "
6942 IF CA=2 THEN PRINT INVERSE 1;AT 0,0;"FROM ZL "
6943 IF CA=3 THEN PRINT INVERSE 1;AT 0,0;"FROM JA "
6944 IF CA=4 THEN PRINT INVERSE 1;AT 0,0;"FROM G "
6945 IF CA=5 THEN PRINT INVERSE 1;AT 0,0;"FROM W2 "
6946 IF A=2 THEN GO TO 6955
6950 PRINT INVERSE 1;AT 2,0;"UTC ";TAB 6;"AZ ";TAB 10;"EL";TAB 14;"PHS";
6951 IF A=1 THEN GO TO 7000
6955 PRINT "UTC ";TAB 6;"AZ ";TAB 10;"EL";TAB 13;"RANGE";TAB 20;"LON";TAB 24;"LAT";TAB 28;"PHS";
7010 LET K2=9.95*((RO/AO)^3.5)/(E2^2)
7020 LET S1=SIN (IO*PO)
7030 LET C1=COS (IO*PO)
7040 LET O=RAAN-(T-JD)*K2*C1
7050 LET SO=SIN (O*PO)
7060 LET CO=COS (O*PO)
7100 LET W=WO+(T-JD)*K2*(2.5*(C1^2)-.5)
7110 LET S2=SIN (W*PO)
7120 LET C2=COS (W*PO)
7130 DIM C(3,2)
7140 LET C(1,1)=(C2*CO)-(S2*SO*C1)
7150 LET C(1,2)=-(S2*CO)-(C2*SO*C1)
7160 LET C(2,1)=(C2*SO)+(S2*CO*C1)
7200 LET C(2,2)=-(S2*SO)+(C2*CO*C1)
7210 LET C(3,1)=(S2*S1)
7220 LET C(3,2)=(C2*S1)
7230 LET Q=MM*(T-JD)+QO
7240 LET K=INT Q
7250 LET M9=INT ((Q-K)*256)
7260 LET M=(Q-K)*P2
7270 LET E=M+EO*SIN M+.5*(EO^2)*SIN (2*M)
7310 LET S3=SIN E
7320 LET C3=COS E
7330 LET R3=1-EO*C3
7340 LET M1=E-EO*S3
7350 LET M5=M1-M
7360 IF ABS (M5)<1E-6 THEN GO TO 7410
7370 LET E=E-M5/R3
7400 GO TO 7310
7410 LET XO=AO*(C3-EO)
7420 LET YO=AO*E1*S3
7430 LET R=AO*R3
7440 LET X1=XO*C(1,1)+YO*C(1,2)
7450 LET Y1=XO*C(2,1)+YO*C(2,2)
7460 LET Z1=XO*C(3,1)+YO*C(3,2)
7660 LET G7=T*G1+G2
7670 LET G7=(G7-(INT G7))*P2
7680 LET S7=-SIN G7
7690 LET C7=COS G7
7700 LET X=(X1*C7)-(Y1*S7)
7740 LET Y=(X1*S7)+(Y1*C7)
7750 LET Z=Z1
7760 LET L8=L9*PO
7770 LET S9=SIN (L8)
7780 LET C9=COS (L8)
7790 LET S8=SIN (-W9*PO)
7800 LET C8=COS (W9*PO)
7840 LET R9=RO*(1-(F/2)+(F/2)*COS (2*L8))+H9/1000
7850 LET L8=ATN ((1-F)^2*S9/C9)
7860 LET Z9=R9*SIN (L8)
7870 LET X9=R9*COS (L8)*C8
7880 LET Y9=R9*COS (L8)*S8
7890 LET X5=(X-X9)
7900 LET Y5=(Y-Y9)
7940 LET Z5=(Z-Z9)
7950 LET R5=SQR (X5*X5+Y5*Y5+Z5*Z5)
7960 LET DZ=6378/R
7970 LET DZ=57.3*(-ATN (DZ/SQR (-DZ*DZ+1))+PI/2)
7980 LET Z8=(X5*C8*C9)+(Y5*S8*C9)+(Z5*S9)
7990 LET X8=-(X5*C8*S9)-(Y5*S8*S9)+(Z5*C9)
8000 LET Y8=(Y5*C8)-(X5*S8)
8040 LET S5=Z8/R5
8050 LET C5=SQR (1-S5*S5)
8060 LET E9=(ATN (S5/C5))/PO
8062 IF E9<=-1 THEN LET E9=0
8080 LET A9=(ATN (Y8/X8))/PO
8090 LET B5=Z/R
8100 LET L5=(ATN (B5/(SQR (1-B5*B5))))*57.3
8140 LET W5=(ATN (Y/X))*57.3
8150 IF X<0 THEN LET W5=180-W5
8160 IF X>0 AND Y<0 THEN LET W5=-W5
8170 IF X>0 AND Y>0 THEN LET W5=360-W5
8180 IF X=0 AND Y>=0 THEN LET W5=270
8190 IF X=0 AND Y<0 THEN LET W5=90
8200 IF X8<0 THEN LET A9=A9+180
8240 IF X8>0 AND Y8<0 THEN LET A9=360+A9
8250 IF X8=0 AND Y8>=0 THEN LET A9=90
8260 IF X8=0 AND Y8<0 THEN LET A9=270
8270 LET T4=(INT ((T-INT T)*2400+.5))/100
8280 LET T4=100*((T4-INT T4)*.6+INT T4)
8290 GO SUB 6030
8292 IF A=2 THEN GO TO 9000
8295 IF A=3 THEN GO TO 9000
8300 IF FA=1 THEN GO TO 8460
8340 PRINT TAB 0;T$;TAB 6;INT A9;TAB 10;INT E9;TAB 14;INT M9;
8350 LET T=T+1/96
8360 IF (T-T2)>.19 THEN GO TO 8375
8370 GO TO 7040
8375 IF A=1 THEN GO TO 8380
8377 IF A=2 THEN GO TO 9000
8380 LET FA=1
8390 LET T=T2
8450 GO TO 7040
8460 PRINT INVERSE 1;AT 2,19;"CITY AT-";T$
8480 GO SUB 5250
8580 LET T=T+1/96
8590 IF (T-T2)>.19 THEN GO TO 8380
8600 GO TO 7040
8680 IF A=3 THEN GO TO 9000
9000 PRINT ;TAB 0;T$;TAB 6;INT A9;TAB 10;INT E9;TAB 13;INT R5;TAB 20;INT W5;TAB 24;INT L5;TAB 29;INT M9;
9001 LET V=V+1
9002 IF A=2 AND V/20=1 OR V/20=2 OR V/20=3 OR V/20=4 OR V/20=5 THEN PAUSE 300: CLS
9003 IF A=2 AND V/20=1 OR V/20=2 OR V/20=3 OR V/20=4 OR V/20=5 THEN PRINT INVERSE 1; INK 5;"UTC";TAB 6;"AZ";TAB 10;"EL";TAB 13;"RANGE";TAB 20;"LON";TAB 24;"LAT";TAB 28;"PHS";
9004 IF A=3 THEN GO TO 9038
9005 LET T=T+1/96
9006 IF V/20=6 THEN GO TO 25
9010 IF (T-T2)>.18 THEN
9015 IF (T-T2)>.19 THEN
9030 IF A=2 THEN GO TO 7040
9038 IF INT M9>=236 OR INT M9<=40 THEN PRINT AT 16,15; INK 2;"TRANSPONDER OFF"
9039 GO TO 3185
9040 LET DM=DM+1
9050 IF MO=1 OR MO=3 OR MO=5 OR MO=7 OR MO=8 OR MO=10 OR MO=12 THEN GO TO 9600
9051 IF MO=4 OR MO=6 OR MO=9 OR MO=11 THEN GO TO 9650
9103 IF DM=1 THEN LET MO=MO+1
9105 GO TO 3010
9120 LET L9=-35
9121 LET W9=185
9125 GO TO 6815
9130 LET L9=35.48
9131 LET W9=-139.51
9132 GO TO 6815
9135 LET L9=53.0
9136 LET W9=-.17
9137 GO TO 6815
9140 LET L9=40.72
9141 LET W9=74.02
9142 GO TO 6815
9490 CLS
9491 LET A=2
9500 GO TO 6200
9540 CLS
9550 LET A=1
9560 GO TO 6200
9600 IF DM>=32 THEN LET DM=1
9601 IF DM=1 THEN LET MO=MO+1
9602 GO TO 9105
9650 IF DM>=31 THEN LET DM=1
9651 IF DM=1 THEN LET MO=MO+1
9652 GO TO 9105
9700 REM WRITE
9710 POKE 16390,4
9720 POKE 16451,6
9730 RANDOMIZE USR 10243
9740 GO TO 25
9994 CLS : PRINT AT 12,4;"IS YOUR RECORDER READY? Y/N": INPUT V$
9996 IF V$(1)<>"Y" THEN GO TO 25
9998 SAVE "OSC-10C" LINE 25
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


