--- title: "OSC-10C" id: 55008 type: "computer_media" slug: "osc-10c" url: "http://localhost/computer_media/osc-10c/" markdown_url: "http://localhost/computer_media/osc-10c.md" published_at: "2024-06-10T07:03:30+00:00" modified_at: "2026-03-30T21:44:22+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/06/OSC-10C-screen-3.png" excerpt: "Track the OSCAR 10 amateur satellite in real time with this BASIC orbital propagator that plots world maps, computes azimuth and elevation, and displays phase and range data." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bob Howard (WA6DLI)" slug: "bob-howard" taxonomy: "indiv" url: "http://localhost/indiv/bob-howard/" media_contents: - id: 55021 title: "Long Island Sinclair Timex (LIST) User Group Library Tape #2" type: "computer_media" url: "http://localhost/computer_media/list-lib-2/" media_type: "Program" programmers: - name: "Bob Howard (WA6DLI)" slug: "bob-howard" taxonomy: "indiv" url: "http://localhost/indiv/bob-howard/" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/06/OSC-10C-screen-3.png" - url: "http://localhost/wp-content/uploads/2024/06/OSC-10C-screen-2.png" - url: "http://localhost/wp-content/uploads/2024/06/OSC-10C-screen-1.png" --- # OSC-10C 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: 1. **Mode 1 (line 5070):** OSCAR 10 world map with satellite position plotted 2. **Mode 2 (line 1550):** Instruction text display 3. **Mode 3 (line 2010):** List Keplerian elements for editing 4. **Mode 4 (line 9540):** Windows to DX cities (pass prediction) 5. **Mode 5 (line 9490):** Az/El, range, phase, and ground-track scrolling data 6. **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 matrix `C()` from inclination, RAAN, and argument of perigee - Lines 7230–7260: Compute mean anomaly `M` and AMSAT phase `M9` (scaled 0–256) - Lines 7270–7400: Iterate Kepler’s equation to solve for eccentric anomaly `E`; convergence criterion is `ABS(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 THEN` and `IF (T-T2)>.19 THEN` with 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 on `V/20=2` through `V/20=5` regardless of the value of `A`. ## 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.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 ```