home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG041.ARK
/
MOONLOC2.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
3KB
|
119 lines
100 DATA 37,34,122,18
110 DATA 15
120 REM THIS PROGRAM CALCULATES MOON AIMING DATA FROM A SPECIFIED
130 REM QTH AT SELECTED TIME INTERVALS DURING THE HOUR.
140 REM
150 REM DATA REQUIREMENTS ARE AS FOLLOWS:
160 REM
170 REM LINE 100 - LATITUDE DEGREES, LATITUDE MINUTES,
180 REM LONGITUDE DEGREES, LONGITUDE MINUTES
190 REM
200 REM LINE 110 - TIME INTERVAL FOR CALCULATIONS IN MINUTES
210 REM
220 REM LINE 1270--ALMANAC DATA CONSISTING OF THE TIME, GHA DEGREES
230 REM GHA MINUTES, DECLINATION DEGREES AND DECLINATION
240 REM MINUTES
250 REM
260 REM DATA MUST BE GIVEN FOR BOTH THE BEGINNING AND
270 REM END OF THE HOUR. THAT IS, IF AIMING DATA IS
280 REM DESIRED FOR HOURS BEGINNING 0900,1000, AND 1100
290 REM YOU MUST SHOW DATA FOR 0900,1000,1100 AND 1200
300 REM
310 REM TO INDICATE THE END OF THE HOURLY DATA INCLUDE A SINGLE
320 REM DATA LINE WITH A ONE, A TWO FOR FINISHED MONTH
330 REM WITH THIS METHOD A MONTH AT A TIME CAN BE DONE
340 REM
350 LET R=1.74533E-02
360 LET P1=180*R
370 LET P3=360*R
380 READ L3,L4
390 LET L1=(L3+L4/60)*R
400 READ L3,L4
410 LET L2=(L3+L4/60)*R
420 LET L3=SIN(L1)
430 LET L4=COS(L1)
440 READ J1
450 LET J=60/J1
460 PRINT
470 PRINT
480 PRINT
490 PRINT "MOON AIMING DATA SPECIFICALLY PREPARED FOR W6PO"
500 PRINT
510 PRINT "MINIMUM AZIMUTH";
520 INPUT Z1
530 PRINT "MAXIMUM AZIMUTH";
540 INPUT Z2
550 PRINT "MINIMUM ELEVATION";
560 INPUT M
570 PRINT "MAXIMUM ELEVATION";
580 INPUT N
590 PRINT
600 PRINT
610 PRINT "DATE";
620 INPUT X
630 PRINT
640 PRINT
650 PRINT "GMT","AZIMUTH","ELEVATION"
660 PRINT
670 READ B
680 READ B1,B2,B3,B4
690 LET G1=(B1+B2/60)*R
700 LET D1=(B3+B4/60)*R
710 READ B5
720 IF B5=1 THEN 590
730 IF B5=2 THEN 2000
740 IF B5=3 THEN 660
750 READ B1,B2,B3,B4
760 LET G2=(B1+B2/60)*R
770 LET D2=(B3+B4/60)*R
780 LET G0=(G2-G1)/J
790 IF G0>0 THEN 810
800 LET G0=(G2+P3-G1)/J
810 LET D0=D2-D1/J
820 LET G=G1
830 LET D=D1
840 FOR I=0 TO 59 STEP J1
850 LET D3=SIN(D)
860 LET D4=COS(D)
870 LET H=L2-G
880 IF H-P1<0 THEN 920
890 IF H-P1=0 THEN 940
900 LET H=P3-H
910 GOTO 940
920 IF H+P1 >= 0 THEN 940
930 LET H=P3+H
940 LET A=0
950 LET E=0
960 LET E3=L3*D3+L4*D4*COS(H)
970 IF E3<0 THEN 1110
980 LET E4=SQR(1-E3^2)
990 LET A3=SIN(H)*D4/E4
1000 LET A4=SQR(1-A3^2)
1010 LET A=ATN(A3/A4)
1020 LET E0=E3/E4-4/(240*E4)
1030 IF E0 <= 0 THEN 1170
1040 LET E=ATN(E0)/R
1050 LET E=INT(10*E+.5)/10
1060 IF L3*E3-D3>0 THEN 1100
1070 IF A >= 0 THEN 1110
1080 LET A=P3+A
1090 GOTO 1110
1100 LET A=P1-A
1110 LET A=INT(10*A/R+.5)/10
1120 IF E=0 THEN 1200
1130 IF A>Z1 THEN 1140 ELSE 1200
1140 IF A<Z2 THEN 1150 ELSE 1200
1150 IF E>M THEN 1160 ELSE 1200
1160 IF E<N THEN 1170 ELSE 1200
1170 PRINT IN FORM "4D";(B+1)
1180 PRINT IN IMAGE " %%%.% %%.%";A,E
1190 IF I=45 THEN PRINT
1200 LET G=G+G0
1210 LET D=D+D0
1220 NEXT I
1230 LET G1=G2
1240 LET D1=D2
1250 LET B=B5
1260 GOTO 710
2000 END