home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
tb
/
distance
/
d8.bas
< prev
next >
Wrap
BASIC Source File
|
1991-05-22
|
4KB
|
134 lines
10 KEY OFF
20 COLOR 10,9,1
30 CLS
40 PRINT" --- Working , do not disturb. ---"
50 REM BY BARRY WATSON OCT 1986
60 DIM A(2), B(2)
70 OPEN "MNCITIES.DBF" AS #1 LEN=128
80 FIELD #1,128 AS A$
90 REM
100 REM
110 REM
120 IF T1=1 THEN T5=T5+M : GOTO 160
130 IF T2=1 THEN T6=T6+M : GOTO 160
140 IF T3=1 THEN T7=T7+M : GOTO 160
150 IF T4=1 THEN T8=T8+M
160 T1=0:T2=0:T3=0:T4=0
170 IF MID$(N$,1,13)="Zumbrota town" THEN 1030
180 GET #1
190 M=VAL(MID$(A$,90,6))
200 IF M=0 THEN 90
210 O=O+M
220 T = 0
230 N$=MID$(A$,8,28)
240 LONG$=MID$(A$,95,8)
250 L$=MID$(A$,103,7)
260 C$=MID$(A$,110,20)
270 IF MID$(N$,1,1)=" " THEN 90
280 B(1)=VAL(LONG$)
290 A(1)=VAL(L$)
300 A(1)=A(1)*.0174533:B(1)=B(1)*.0174533
310 REM
320 V=V+2
330 R=3953:P=3.14159
340 RESTORE
350 READ B$,I,K,L
360 K=K*-1:B(2)=K:A(2)=I
370 IF B$="END." GOTO 90
380 C=COS(A(2)):X=C*COS(B(2)):C=C*SIN(B(2)):D=SIN(A(2)):H=SIN(A(1)):G=COS(B(1)):J=SIN(B(1)):K=COS(A(1))
390 W=G*X+J*C:E=H*W-K*D:F=G*C-J*X:G=K*W+H*D
400 IF ABS(G)=1 THEN 460
410 W=1-G*G
420 IF W>0 THEN 440
430 GOTO 460
440 H=ATN(G/SQR(W))
450 GOTO 470
460 H=G*P/2
470 IF ABS(G)=1 THEN 620
480 IF W<=0 THEN 620
490 IF E>0 THEN 600
500 IF E<0 THEN 560
510 IF F>0 THEN 540
520 X= -.5*P
530 GOTO 640
540 X=P/2
550 GOTO 640
560 X=ATN(F/E)-P
570 IF F<0 THEN 640
580 X=X+2*P
590 GOTO 640
600 X=ATN(F/E)
610 GOTO 640
620 Q=999
630 GOTO 690
640 D=180*(P-X)/P
650 C=INT(D)
660 IF D-C < .5 THEN 680
670 C=C+1
680 Q=C
690 D=R*(.5*P-H)
700 C=INT(D)
710 IF D-C<.5 THEN 730
720 C=C+1
730 REM
740 IF C > (L*1.5) THEN T4=1: GOTO 350
750 V=V+1
760 IF C < (.6*L) THEN T1=1:GOTO 350
770 IF C < L THEN T2=1:GOTO 350
780 T3=1
790 GOTO 350
800 DATA "KSJN (91.1)",.78648,1.62559,54
810 DATA "K232AQ (94.3)",.7629,1.62275,2
820 DATA "KCRB (88.5)",.83254,1.64912,45
830 DATA "KLCD (89.5)",.75891,1.60201,5
840 DATA "WSCD (92.9)",.81662,1.60776,34
850 DATA "W269AC (101.7)",.83584,1.60337,2
860 DATA "KCCM (91.1)",.81611,1.68611,37
870 DATA "WGGL (91.1)",.82093,1.54802,47
880 DATA "K249BK (97.7)",.84808,1.63023,3
890 DATA "K269BK (101.7)",.76467,1.59193,1
900 DATA "K292CT (106.3)",.76876,1.59953,2
910 DATA "KGAC (90.5)",.77182,1.64266,40
920 DATA "K257AH (99.3)",.79687,1.67434,2
930 DATA "KLSE (91.7)",.76865,1.61166,44
940 DATA "KLSX (90.7)",.76868,1.61165,18
950 DATA "KSJR (90.1)",.79409,1.64999,44
960 DATA "KRSD (88.1)",.75969,1.68840,9
970 DATA "WIRR (90.9)",.82896,1.61940,29
980 DATA "KRSW (91.7)",.76591,1.67427,43
990 DATA "K239AA (93.5)",.76591,1.67427,2
1000 DATA "KFJM (89.3)",.83657,1.69420,21
1010 DATA "KAXE (91.7)",.82475,1.63074,36
1020 DATA "END.",9999,9999,0
1030 CLOSE 1 : PRINT" I have just closed your file heh heh..."
1040 FOR Q2=1 TO 1000: NEXT Q2
1050 LPRINT : LPRINT : LPRINT
1060 LPRINT"End of run. Information computed for all 2725 locations"
1070 LPRINT
1080 LPRINT"Category","","Population"," % of total Minnesota population"
1090 LPRINT"-------------","","----------","----------"
1100 LPRINT"Recommended","",T5,INT((T5/O)*1000)/10
1110 LPRINT"Fringe","",T6,INT((T6/O)*1000)/10
1120 LPRINT"Not Recommended",T7,INT((T7/O)*1000)/10
1130 LPRINT"Not Available","",T8,INT((T8/O)*1000)/10
1140 LPRINT"Total Minnesota population (1980 census) : ";O
1150 LPRINT:LPRINT:LPRINT
1160 LPRINT"Definitions:"
1170 LPRINT
1180 LPRINT"Recommended: Good signal should be present, antenna"
1190 LPRINT" on radio should suffice."
1200 LPRINT
1210 LPRINT"Fringe: Reception should be acceptable, an "
1220 LPRINT" external antenna might be needed"
1230 LPRINT
1240 LPRINT"Not Recommended: Signal reception might be possible with a substantal"
1250 LPRINT" outdoor antenna, and a favorable location"
1260 LPRINT
1270 LPRINT"Not Available: Signal probably can not be received except"
1280 LPRINT" in very rare cases."
1290 LPRINT
1300 LPRINT:LPRINT:LPRINT:LPRINT
1310 LPRINT"Program code written by Barry Watson 6/86 - 10/86 "
1320 LPRINT"Compiled using Microway's 87Bascom / supports 8087"
1330 STOP