440 ' Correct look Azimuth for North/South Hemisphere
450 '
460 ZF = 360
470 IF L1 < 0 THEN GOTO 510
480 YA = 360 + YA
490 Y = FN MUD(YA)
500 RETURN
510 Y = INT(180 + YA)
520 RETURN
521 '
530 ' ******
540 '
550 ' Module to get city Name,Latitude and Longitude.
560 '
570 ' ******
571 '
580 SCREEN 0,0:CLS:LOCATE 3,1
590 INPUT "What is the name of the city ? ",NC$
600 LOCATE 7,1
610 INPUT "Enter the CITY Latitude using SPACES to seperate DEGREES, MINUTES, and N(orth) or S(outh). ",DL$
620 '
630 ' Now decompose DL$ into degrees,minutes and N or S
640 ' Do degrees first
650 '
660 LE = LEN(DL$)
670 I = 1
680 IF MID$(DL$,I,1) = CHR$(32) THEN GOTO 800
690 IF (I = LE) THEN GOTO 750
700 I = I + 1:GOTO 680
710 '
720 ' Data is not in proper format
730 ' Send error message and do again
740 '
750 LOCATE 20,1:PRINT "When you enter the Latitude, be sure to use spaces to seperate the entries. ":LOCATE 24,27:INPUT"Press any key to continue!",KB$
760 LOCATE 7,1:CLS:GOTO 610
770 '
780 ' Get degrees
790 '
800 J = I - 1
810 DG = VAL(MID$(DL$,1,J))
820 '
830 ' Now look for minutes
840 '
850 MN = 0:KK = 0
860 I = I + 1
870 IF MID$(DL$,I,1) = CHR$(32) THEN GOTO 930
880 IF (I = LE) THEN GOTO 750
890 I = I + 1:KK = 1:GOTO 870
900 '
910 ' Get minutes
920 '
930 JK = I - 1
940 IF KK <> 0 THEN MN = VAL(MID$(DL$,J + 1,JK))
950 '
960 ' Degrees between 0-90 and minutes between 0-60?
970 '
980 IF NOT (DG > 90 OR DG < 0 OR MN > 60 OR MN < 0) THEN GOTO 1070
990 '
1000 ' Deg,min between correct limits
1010 '
1020 LOCATE 20,1:PRINT "Degrees are between 0 and 90 and Minutes are between 0 and 60.":INPUT "Any key to continue ";K$
1030 CLS:LOCATE 7,1:GOTO 610
1040 '
1050 ' Convert to decimal
1060 '
1070 L1 = DG + (MN / 60)
1080 '
1090 ' N or S?
1100 '
1110 I = I + 1
1120 NS$ = MID$(DL$,I,1)
1130 IF NS$ = "N" OR NS$ = "n" OR NS$ = "S" OR NS$ = "s" THEN GOTO 1220
1140 '
1150 ' Must be North or South
1160 '
1170 LOCATE 20,1:INPUT "Enter either N for North or S for South. Any key to continue. ";K$
1180 CLS:LOCATE 7,1:GOTO 610
1190 '
1200 ' Put in correct sigh for latitude
1210 '
1220 IF NS$ = "S" OR NS$ = "s" THEN L1 = -L1
1240 '
1250 ' Now get city longitude
1270 '
1280 LOCATE 11,1
1290 INPUT "Enter the city longitude using SPACES to seperate DEGREES, MINUTES, and E(ast) or W(est). ",DL$
1300 '
1310 ' Now decompose Dl$ into degrees, minutes and E or W
1320 ' Do degrees first
1330 '
1340 LE = LEN(DL$)
1350 I = 1
1360 IF MID$(DL$,I,1) = CHR$(32) THEN GOTO 1480
1370 IF (I = LE) THEN GOTO 1430
1380 I = I + 1:GOTO 1360
1390 '
1400 ' Data is not in proper format
1410 ' Send error message and do again
1420 '
1430 LOCATE 20,1:PRINT"When you enter the longitude, be sure to use spaces to seperate the entries. ":LOCATE 24,27:INPUT"Press any key to continue!",KB$
1440 CLS;LOCATE 11,1:GOTO 1280
1450 '
1460 ' Get degrees
1470 '
1480 J = I - 1
1490 DG = VAL(MID$(DL$,1,J))
1500 '
1510 ' Now look for minutes
1520 '
1530 MN = 0:KK = 0
1540 I = I + 1
1550 IF MID$(DL$,I,1) = CHR$(32) THEN GOTO 1610
1560 IF (I = LE) THEN GOTO 1430
1570 I = I + 1:KK = 1:GOTO 1550
1580 '
1590 ' Get minutes
1600 '
1610 JK = I - 1
1620 IF KK <> 0 THEN MN = VAL(MID$(DL$,J + 1,JK))
1630 '
1640 ' Degrees between 0-180 and minutes between 0-60?
1650 '
1660 IF NOT (DG > 180 OR DG < 0 OR MN > 60 OR MN < 0) THEN GOTO 1750
1670 '
1680 ' Deg,min between correct limits
1690 '
1700 LOCATE 20,1:PRINT"Degrees are between 0 and 180 and Minutes are between 0 and 60.";:INPUT K$
1710 CLS:LOCATE 11,1:GOTO 1280
1720 '
1730 ' Convert to decimal
1740 '
1750 M1 = DG + (MN / 60)
1760 '
1770 ' E or W
1780 '
1790 I = I + 1
1800 EW$ = MID$(DL$,I,1)
1810 IF EW$ = "E" OR EW$ = "e" OR EW$ = "W" OR EW$ = "w" THEN GOTO 1900
1820 '
1830 ' Must be East or West
1840 '
1850 LOCATE 20,1:PRINT"Enter either E(ast) or W(est). ":INPUT"Any key to continue ";K$
1860 CLS:LOCATE 11,1:GOTO 1280
1870 '
1880 ' Put in correct sign for longitude
1890 '
1900 IF EW$ = "W" OR EW$ = "w" THEN M1 = -M1
1910 RETURN
1911 '
1920 ' ******
1930 '
1940 ' Module to get satellite name and longitude.
1950 '
1960 ' ******
1961 '
1970 CLS:LOCATE 3,1
1980 INPUT"What is the name of the satellite ? ",NS$
1990 LOCATE 5,1
2000 INPUT "Enter the Satellite longitude using SPACES to seperate DEGREES, MINUTES, and E(ast) or W(est). ",SL$
2010 '
2020 ' Now decompose SL$ into degrees, minutes and E or W
2030 ' Do degrees first
2040 '
2050 LE = LEN(SL$)
2060 I = 1
2070 IF MID$(SL$,I,1) = CHR$(32) THEN GOTO 2190
2080 IF (I = LE) THEN GOTO 2140
2090 I = I + 1:GOTO 2070
2100 '
2110 ' Data is not in proper format
2120 ' Give error message and do again
2130 '
2140 LOCATE 20,1:PRINT"When you enter the longitude, be sure to use SPACES to seperate the entries. ":LOCATE 24,27:INPUT"Press Any key to continue!",KB$
2150 CLS:LOCATE 11,1:GOTO 1280
2160 '
2170 ' Get degrees
2180 '
2190 J = I - 1
2200 DG = VAL(MID$(SL$,1,J))
2210 '
2220 ' Now look for minutes
2230 '
2240 MN = 0:KK = 0
2250 I = I + 1
2260 IF MID$(SL$,I,1) = CHR$(32) THEN GOTO 2320
2270 IF (I = LE) THEN GOTO 2010
2280 I = I + 1:KK = 1:GOTO 2260
2290 '
2300 ' Get minutes
2310 '
2320 JK = I - 1
2330 IF KK <> 0 THEN MN = VAL(MID$(SL$,J + 1,JK))
2340 '
2350 ' Degrees between 0-180 and minutes between 0-60?
2360 '
2370 IF NOT (DG > 180 OR DG < 0 OR MN > 60 OR MN < 0) THEN GOTO 2460
2380 '
2390 ' Deg,min between correct limits
2400 '
2410 LOCATE 20,1:PRINT "Degrees are between 0 and 180 and minutes are between 0 and 60. ":INPUT "any key to continue ";K$
2420 CLS:LOCATE 5,1:GOTO 2000
2430 '
2440 ' Convert to decimal
2450 '
2460 M2 = DG + (MN / 60)
2470 '
2480 ' E or W
2490 '
2500 I = I + 1
2510 EW$ = MID$(SL$,I,1)
2520 IF EW$ = "E" OR EW$ = "e" OR EW$ = "W" OR EW$ = "w" THEN GOTO 2610
2530 '
2540 ' Must be east or west
2550 '
2560 LOCATE 20,1:PRINT "Enter either E(ast) or W(est). ":INPUT "Any key to continue ";K$
2570 CLS:LOCATE 11,1:GOTO 1280
2580 '
2590 ' Put in correct sign for longitude
2600 '
2610 IF EW$ = "W" OR EW$ = "w" THEN M2 = -M2
2620 RETURN
2621 '
2630 ' ******
2640 '
2650 ' Header module
2660 '
2670 ' ******
2671 '
2680 ' This module does the header and gives instructions as needed