A satellite dish calculator. Enter your latitude, longitude and local magnetic variation in degrees and hundredths, and the longitude of the satellite; the program prints the azimuth, the elevation and the compass heading, or says how far below the horizon the satellite is. It then asks for another satellite. It works in radians internally and converts the results back to degrees. Adapted from a program in Electronics magazine; the article says it runs on the TS2068 too.
As printed, line 280 reads LET E=E+180/PI where it should multiply, so the elevation comes out wrong (about 57 degrees too high); change the + to *. Line 380 also skips the results for a site south of the equator with the satellite to the east.
Published in Syntax March 1984 (Look Angles).
Source Code
5 REM PROGRAM TITLE "LOOK ANGLES"
10 REM - THIS PROGRAM COMPUTES ELEVATION ANGLE, AZIMUTH, AND COMPASS HEADING TO SYNCHRONOUS ORBITING SATELITES.
20 PRINT "ENTER LATITUDE, LONGITUDE, AND VARIATION IN DEGREES AND HUNDREDTHS OF DEGREES."
30 PRINT
40 PRINT "MY LATITUDE IS ";
50 INPUT B
60 PRINT B
65 PRINT
70 PRINT "MY LONGITUDE IS ";
80 INPUT C
90 PRINT C
95 PRINT
100 PRINT "THE MAGNETIC VARIATION AT MY LOCATION IS ";
110 INPUT M
120 PRINT M
125 PRINT
130 PRINT "THE SATELLITE LONGITUDE IS ";
140 INPUT S
150 PRINT S
155 PRINT
160 REM -Y IS SAT ALT IN KMS
170 REM - R IS EARTH RADIUS IN KMS
180 LET R=6370
190 LET Y=35800
200 LET G=S-C
210 REM LINES 220 AND 230 CONVERT DEGREES TO RADIANS.
220 LET G=PI*G/180
230 LET L=PI*B/180
240 LET Q=(COS G)*(COS L)
250 IF ABS (Q)=1 THEN LET E=90*Q
260 IF ABS (Q)=1 THEN GOTO 300
270 LET E=ATN ((Q-R/(Y+R))/SQR (1-Q**2))
280 LET E=E+180/PI
290 REM LINE 280 CONVERTS RADIANS TO DEGREES.
300 IF E<0 THEN GOTO 460
310 IF (SIN L)<>0 THEN GOTO 340
320 LET A=90*SGN (SIN G)+180
330 GOTO 390
340 LET A=ATN (TAN G/SIN L)
350 LET A=(A*180/PI)+180
360 IF (SIN L)>0 THEN GOTO 400
370 LET A=A-180
380 IF (SIN G)>0 THEN GOTO 450
390 LET A=A+360
400 LET H=A+M
410 LET H=H-360*INT (H/360)
420 PRINT "AZIMUTH IS ";A
425 PRINT
430 PRINT "ELEVATION IS ";E
435 PRINT
440 PRINT "HEADING IS ";H
445 PRINT
450 GOTO 130
460 LET D=-E
470 PRINT "ELEVATION IS BELOW HORIZON BY ";D ;"DEGREES."
475 PRINT
480 GOTO 130Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
