Dish Aimer is a satellite dish pointing calculator that computes azimuth and elevation angles for 22 geostationary satellites visible from North America, using the observer’s latitude and longitude as inputs. The program stores satellite names and orbital longitudes in parallel string arrays, then applies spherical trigonometry — including arctangent, cosine, and square-root operations — to derive look angles. A default location (Frontenac, Kansas) is provided via subroutine, or the user may enter a custom address and coordinates. The program can output results to a printer via LPRINT, including a footer with a business address. A visual sky map is drawn on screen using PLOT to render two ellipses representing the geostationary arc, with satellite abbreviations positioned around it using PRINT AT.
Program Structure
The program is organized into clearly delineated sections. Lines 10–118 handle initialization: declaring arrays and populating satellite name (S$) and orbital longitude (O$) tables for 22 satellites. Lines 200–580 form the main interactive loop, prompting the user for location and output preferences. The calculation engine lives in the subroutine at lines 3000–3220. The LPRINT-based report generator is at lines 4000–4360. A default location subroutine is at 5000–5040, and the sky map display routine occupies lines 5100–5230.
Data Storage
Satellite data is stored in two parallel string arrays. S$(30,14) holds the satellite name and a two-character abbreviation, while O$(30,5) holds the orbital longitude as a fixed-width string (e.g., " 69.0" or "103.0"). The program uses VAL O$(I) to convert the string to a numeric value for calculation. Only 22 of the 30 allocated rows are populated, leaving room for expansion. Arrays U$ and W$ are dimensioned at line 20 but never used.
Azimuth and Elevation Calculation
The subroutine at lines 3000–3220 implements standard geostationary satellite pointing math in BASIC. All angles are converted to radians for trigonometric functions. Key steps are:
- Convert satellite orbital longitude, observer longitude, and observer latitude to radians (
W,H,A). - Compute the central angle
Dbetween the observer and the subsatellite point usingCOS A * COS L. - Derive azimuth
CviaATNapproximation of arccos, then adjust for hemisphere by checking the sign ofL. - Compute elevation angle
ELusing the ratio involving the Clarke orbit radius factorK=6.61(the ratio of geostationary orbit radius to Earth radius). - Compute slant range
RGusingRS=22766(approximate geostationary altitude in miles) as a scaling constant.
Satellites with negative elevation (below the horizon) cause an early RETURN at line 3140, skipping output for that entry. The magnetic declination offset is hardcoded at OFFSET=-7.5 degrees (line 450), applied only when the user selects magnetic north mode.
Notable Techniques
- The program uses the identity
-ATN(x/SQR(1-x*x))+PI/2to computeACOS(x), since BASIC lacks a native arccosine function. - String formatting of numeric output is done manually:
STR$converts the result to a string, thenLENchecks are used to pad short strings with"00"at lines 3190 and 3210, ensuring consistent column widths in the printed report. - The sky-map subroutine (lines 5138–5220) draws two ellipses using
PLOTin a polar loop. The outer ellipse (semi-axes 115×75) represents the sky arc; the inner (35×25) is a decorative second ring. Satellite labels are placed withPRINT ATat computed screen positions. VAL O$\\{16}\\{0}(I)at line 3160 (and 4160) uses a character-code slice to trim leading/trailing whitespace from the orbital longitude string before converting it — a pragmatic workaround for the fixed-width string format.
Bugs and Anomalies
LET SL = INT(VAL O$\\{16}\\{0}(I)*100)/100at line 3160 computes a rounded satellite longitude value but assigns it toSL, which is never subsequently used.- The arrays
U$(10,32)andW$(10,32)declared at line 20 are never referenced anywhere in the program, wasting memory. - The sky map at line 5114 displays
"T1"for Telstar 301, but the satellite table uses the abbreviation"T4"— an inconsistency between the visual display and the data. - Line 5130 prints
"G1"and line 5132 prints"F1", but the loop at line 5126 also prints"F3R"; theF2Rlabel at line 5100 does not correspond to any entry in the satellite table with that exact abbreviation (Satcom 2R is stored as"F2"). - The default location subroutine at line 5000 sets
N$to a personal name, butN$is only used in the LPRINT report, so running the program without a printout silently disregards this data.
Source Code
10 REM "DISH AIMER" 7/12/84
20 DIM U$(10,32):DIM W$(10,32):DIM O$(30,5):DIM S$(30,14)
30 LET K=6.61:LET RS=22766:LET FL=0:LET F=0
32 LET S$(1)="Spacenet 2 S2"
34 LET o$(1)=" 69.0"
36 LET s$(2)="Satcom 2R F2"
38 LET o$(2)=" 72.0"
40 LET s$(3)="Galaxy 2 G2"
42 LET o$(3)=" 74.0"
44 LET s$(4)="Comstar D1 D1"
46 LET o$(4)=" 76.0"
48 LET s$(5)="Westar 2 W2"
50 LET o$(5)=" 79.0"
52 LET s$(6)="Satcom F4 F4"
54 LET o$(6)=" 83.0"
56 LET s$(7)="Comstar D3 D3"
58 LET o$(7)=" 87.0"
60 LET s$(8)="Westar 3 W3"
62 LET o$(8)=" 91.0"
64 LET s$(9)="Galaxy 3 G3"
66 LET o$(9)=" 93.5"
68 LET s$(10)="Telstar 301 T4"
70 LET o$(10)=" 96.0"
72 LET s$(11)="Westar 4 W4"
74 LET o$(11)=" 99.0"
76 LET s$(12)="GStar 2 GS2"
78 LET o$(12)="103.0"
80 LET s$(13)="Anik D1 AD"
82 LET o$(13)="104.5"
84 LET s$(14)="GStar 1 GS1"
86 LET o$(14)="106.0"
88 LET s$(15)="Anik B AB"
90 LET o$(15)="109.0"
92 LET s$(16)="Spacenet 1 S1"
94 LET o$(16)="120.0"
96 LET s$(17)="Westar 5 W5"
98 LET o$(17)="123.0"
100 LET s$(18)="Comstar D4 D4"
102 LET o$(18)="127.0"
104 LET s$(19)="Satcom F3R F3"
106 LET o$(19)="131.0"
108 LET s$(20)="Galaxy 1 G1"
110 LET o$(20)="134.0"
112 LET s$(21)="Satcom F1R F1"
114 LET o$(21)="139.0"
116 LET s$(22)="Aurora F5"
118 LET o$(22)="143.0"
200 CLS
210 PRINT AT 6,3;"Do you want to calculate"
220 PRINT AT 7,2;"For a custom location? Y,N"
230 INPUT p$
240 IF p$="n" OR p$="N" THEN GO SUB 5000
250 IF p$="n" OR p$="N" THEN GO TO 370
260 CLS
270 PRINT AT 6,3;"Type name"
280 INPUT n$
300 CLS
310 PRINT AT 6,3;"Type address"
320 INPUT l$
330 PRINT AT 6,3;"Type Latitude"
340 INPUT LA
350 PRINT AT 6,3;"Type Longitude"
360 INPUT LO
370 CLS
390 PRINT '"Do you want to print Magnetic or True North azimuth? M/T"
400 INPUT p$
410 IF p$="M" OR p$="m" THEN GO TO 440
420 IF p$="T" OR p$="t" THEN GO TO 470
430 GO TO 390
440 LET FL=1
450 LET OFFSET=-7.5
470 CLS
500 GO SUB 5100
510 PRINT AT 20,6;"A LOOK AT THE BIRDS"
520 PRINT AT 21,1;"Do you want a printout? Y,N"
530 INPUT p$
540 IF p$="n" OR p$="N" THEN GO TO 2990
550 PRINT AT 21,0;" "
560 COPY
570 GO SUB 4000
580 GO TO 520
2990 STOP
3000 LET W=(VAL O$(I))* PI/180
3010 LET H=LO* PI/180
3020 LET A=LA* PI/180
3030 LET L=H-W
3040 LET DF= COS A* COS L
3050 LET D=- ATN (DF/ SQR (-DF*DF+1))+ PI/2
3060 LET CF=- TAN (A)/ TAN (D)
3070 LET C=- ATN (CF/ SQR (-CF*CF+1))+ PI/2
3080 IF L<0 THEN LET C=2* PI-C
3090 LET CD=C*180/ PI
3100 IF FL=1 THEN LET CD=CD+OFFSET
3110 LET X=(COS (D)-(1/K))/ SQR (1- COS (D)* COS (D))
3120 LET EL= ATN (X)
3130 LET Y=EL*180/ PI
3140 IF Y<0 THEN RETURN
3150 LET RG=RS* SQR (1-(2/K)* COS (D)+(1/(K*K)))
3160 LET SL= INT (VAL O$\{16}\{0}(I)*100)/100
3170 LET C$= STR$ CD
3180 LET Y= INT (Y*100)/100
3190 IF LEN C$<3 THEN LET C$=C$+"00"
3200 LET Y$= STR$ Y
3210 IF LEN Y$<3 THEN LET Y$=Y$+"00"
3220 RETURN
4000 REM LPRINT ENTIRE LIST
4010 LPRINT
4020 LPRINT
4030 LPRINT
4040 LPRINT TAB 3;"SATELLITE LOCATOR FOR:"
4050 LPRINT N$
4060 LPRINT L$
4070 LET Q$= STR$ LA
4080 LET R$= STR$ LO
4090 LPRINT TAB 3;"LAT. ";Q$( TO 5);" LONG. ";R$( TO 5)
4100 LPRINT
4110 LPRINT " Satellite Loc az el"
4120 FOR I=1 TO 22
4130 GO SUB 3000
4160 LPRINT S$(I);" ";O$(I);" ";C$\{16}\{0}( TO 3);" ";Y$( TO 4)
4170 NEXT I
4220 LPRINT
4230 IF FL=0 THEN LPRINT " \{20}\{0}Azimuth is from True North"
4240 IF FL=1 THEN LPRINT " \{20}\{0}Azimuth is from Mag. North"
4250 LPRINT
4270 LPRINT TAB 4;"Listing courtesy of"
4280 LPRINT TAB 2;"Pittsburg Refrigeration"
4290 LPRINT TAB 2;"2507 N. Broadway"
4300 LPRINT TAB 2;"Pittsburg, Kansas 66762"
4310 LPRINT
4320 LPRINT TAB 2;"Telephone (316) 231-7620"
4330 LPRINT
4340 LPRINT
4350 LPRINT
4360 RETURN
5000 LET N$="Ronald Ginardi"
5010 LET L$="Frontenac, Kansas"
5020 LET LA=37.3367391
5030 LET LO=94.6686232
5040 RETURN
5100 PRINT AT 6,1;"F2R"
5102 PRINT AT 5,2;"G3"
5104 PRINT AT 4,3;"D1"
5106 PRINT AT 3,4;"W2"
5108 PRINT AT 2,6;"F4"
5110 PRINT AT 1,8;"D3"
5112 PRINT AT 0,11;"W3"
5114 PRINT AT 0,14;"T1"
5116 PRINT AT 0,17;"W4"
5118 PRINT AT 0,20;"AD"
5120 PRINT AT 1,23;"AB"
5121 PRINT AT 2,25;"S1"
5122 PRINT AT 3,26;"W5"
5124 PRINT AT 4,27;"D4"
5126 PRINT AT 5,28;"F3R"
5128 PRINT AT 6,29;"G1"
5130 PRINT AT 7,29;"F1"
5132 PRINT AT 8,30;"F5"
5138 FOR a=0 TO 360 STEP .7
5140 LET x=115* SIN (a* PI/180)
5150 LET y=75* COS (a* PI/180)
5160 PLOT x+127,y+97
5170 NEXT a
5180 FOR A=0 TO 360 STEP 2
5190 LET X=35* SIN (A* PI/180)
5200 LET y=25* COS (A* PI/180)
5210 PLOT x+127,y+87
5220 NEXT a
5230 RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
