180 REM ------------LOAD ELEMENT SPACING DATA---------------
190 DATA .240,.075,.180,.215,.250,.280,.300,.315,.330,.345,.360,.375,.385,.390,.395,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400,.400
200 FOR X=1 TO 40
210 READ SP(X)
220 NEXT
230 REM ------------LOAD REFLECTOR MULTIPLIER---------------
240 DATA .4905,.4900,.4885,.4875,.4865,.4855,.4845,.4835,.4825,.4820,.4810,.4875,.4770,.4765,.4750,.4740
250 DIM RE(17)
260 FOR X=1 TO 16:READ RE(X):NEXT
270 REM ------------LOAD RADIATOR MULTIPLIER----------------
280 DIM DR(17)
290 DATA .4675,.4665,.4640,.4620,.4601,.4585,.4575,.4550,.4530,.4515,.4500,.4460,.4435,.4430,.4400,.4385
300 FOR X=1 TO 16:READ DR(X):NEXT
310 REM ------------SELECT ELEMENT MATERIAL SIZE------------
320 DATA .003,.0035,.0042,.005,.0056,.0063,.007,.0078,.0088,.01,.01145,.0131,.015,.0165,.0182,.02
330 DIM EL(16):FOR X=1 TO 16:READ EL(X):NEXT
340 REM ------------INPUT DESIRED PARAMETERS----------------
350 CLS:SOUND 1000,5:INPUT "WHAT IS THE CENTRE FREQUENCY OF THE ANTENNA IN MHZ.";F
360 SOUND 1000,5:PRINT:INPUT"HOW MANY ELEMENTS DOES THE ANTENNA REQUIRE.";N
370 PRINT:IF N<9 OR N>40 THEN COLOR 0,15:PRINT "NUMBER OF ELEMENTS MUST BE BETWEEN 9 AND 40":COLOR 7,0:SOUND 90,10:GOTO 360
380 PRINT:SOUND 1000,5:INPUT"WHAT IS THE DIAMETER OF THE BOOM IN MILLIMETERS.";BD
390 PRINT:SOUND 1000,5:PRINT"ARE THE ELEMENTS TO BE INSULATED FROM THE BOOM Y=YES N=NO ";
400 IN$=INKEY$:IF LEN(IN$)=0 THEN 400
410 IF IN$="Y" OR IN$="y" THEN I=1:GOTO 450
420 IF IN$="N" OR IN$="n" THEN I=0:GOTO 450
430 GOTO 400
440 REM ------------DISPLAY SPECIFICATIONS------------------
450 CLS:PRINT "SPECIFICATIONS FOR THE ANTENNA TO DESIGN ":PRINT:PRINT:PRINT"1. DESIGN FREQUENCY :- ";F;" MHZ"
460 PRINT"2. DIAMETER OF BOOM :- ";BD;" MILLIMETERS."
470 PRINT"3. NUMBER OF ELEMENTS :- ";N
480 IF I=1 THEN PRINT"4. ELEMENTS ARE TO BE INSULATED FROM THE BOOM"ELSE PRINT"4. ELEMENTS ARE TO BE NON INSULATED AND THROUGH THE BOOM"
490 IF (BD/1000)/(299.792/F)>.065 THEN PRINT:PRINT:PRINT:PRINT"BOOM DIAMETER IS TOO LARGE FOR THIS FREQUENCY":PRINT:PRINT:PRINT"ENTER A SMALLER DIAMETER ":INPUT BD:GOTO 440
500 REM ------------CHECK SPECIFICATIONS--------------------
510 PRINT:PRINT:PRINT:PRINT"ARE ALL THE ENTRIES CORRECT Y=YES N=NO ";
520 IN$=INKEY$:IF LEN(IN$)=0 THEN 520
530 IF IN$="Y" OR IN$="y" THEN 650
540 IF IN$="N" OR IN$="n" THEN 560
550 SOUND 90,10:GOTO 520
560 PRINT:INPUT"WHAT IS THE NUMBER OF THE INCORRECT ENTRY ";X
570 IF X<>4 THEN 600
580 IF I=0 THEN I=1:GOTO 440
590 IF I=1 THEN I=0:GOTO 440
600 INPUT"WHAT IS THE CORRECT VALUE ";CV
610 IF X=1 THEN F=CV
620 IF X=2 THEN BD=CV
630 IF X=3 THEN N=CV
640 GOTO 450
650 REM ------------CALCULATE BOOM DIAMETER WAVELENGTHS----
660 W=299.792/F
670 BW=BD/1000/W
680 BC=3.3*(BD/(W*1000))^1.5:BC=BC*(W*1000)
685 IF (BD/(W*1000))>.01 AND (BD/(W*1000))<.039 THEN BC=BC-(W*.6)
690 REM ------------CALCULATE BOOM LENGTH------------------
700 TL=0
710 W=299.792/F
720 FOR X=1 TO N-1
730 DS(X)=SP(X)*W*1000
740 TL=TL+DS(X)
750 NEXT
760 PG=(TL/1000)/W
770 REM ---CALCULATE BEAM WIDTHS AND STACKING DISTANCES---
890 PRINT "MAXIMUM PRACTICAL GAIN ";:PRINT USING Q$(1);7.8*(LOG(PG)/LOG(10))+9.2;:PRINT" dBD"
900 PRINT "HORIZONTAL BEAM WIDTH ";:PRINT USING Q$(3);BH;:PRINT" DEGREES"
910 PRINT "VERTICAL BEAM WIDTH ";:PRINT USING Q$(3);BV;:PRINT" DEGREES"
920 PRINT " STACKING DISTANCES"
930 PRINT " HORIZONTAL:- ";:PRINT USING Q$(2);SH;:PRINT " METERS"
940 PRINT " VERTICAL :- ";:PRINT USING Q$(2);SV;:PRINT " METERS"
950 PRINT:PRINT:PRINT "DO YOU WISH TO CONTINUE WITH THIS DESIGN Y=YES N=NO ";
960 IN$=INKEY$:IF LEN(IN$)=0 THEN 960
970 IF IN$="Y" OR IN$="y" THEN 1000
980 IF IN$="N" OR IN$="n" THEN 440
990 SOUND 90,10:GOTO 960
1000 CLS:NU=0
1010 PRINT:PRINT"YOU MAY USE ANY OF THE FOLLOWING TUBING SIZES FOR THE ELEMENTS"
1020 PRINT:PRINT"SELECT THE CLOSEST TO THE COMMERCIAL TUBE SIZE"
1030 FOR X=1 TO 16
1040 NU=NU+1
1050 PRINT "# ";X;". ";:PRINT USING Q$(3);(EL(X)*W)*1000;:PRINT " MM":IF (EL(X)*W)*1000>12 THEN X=16
1060 NEXT
1070 PRINT:PRINT:PRINT:PRINT"ENTER THE # OF THE TUBING SIZE YOU WISH TO USE";
1080 INPUT TS$
1090 IF VAL(TS$)>NU THEN SOUND 90,10:GOTO 1000
1100 TS=VAL(TS$):TT=EL(TS):TD(1)=TT*W*1000
1110 CLS:INPUT "HOW MANY MILLIMETERS ARE THERE FROM THE END OF THE BOOM TO THE CENTER OF THE REFLECTOR. ";DI:CLS:PRINT "STAND BY THIS WILL TAKE A FEW SECONDS"
1120 REM ----------------LOAD TUBING SIZE TABLES-----------------
1130 N$="CURVE":N2$=N$+TS$+".DAT"
1140 OPEN N2$ FOR INPUT AS #1
1150 FOR X=1 TO 38
1160 LINE INPUT #1,O$
1170 TS(X)=VAL(O$)
1180 NEXT
1190 CLOSE
1200 REM -----------------CALCULATE ELEMENT LENGTHS-------------
1210 FOR X=3 TO 42
1220 IF I=1 THEN LE(X)=W*TS(X-2)*1000 ELSE LE(X)=(W*TS(X-2))*1000+BC
1230 NEXT
1240 LE(1)=W*RE(TS)*1000
1250 IF I=0 THEN LE(1)=LE(1)+BC
1260 LE(2)=W*DR(TS)*1000
1270 IF I=0 THEN LE(2)=LE(2)+BC
1280 CLS
1290 PRINT"PRESS ANY KEY WHEN THE PRINTER IS READY":SOUND 1000,5
1300 IN$=INKEY$:IF LEN(IN$) =0 GOTO 1300
1310 LPRINT " YAGI DESIGN DETAILS :- VERSION 2.2B"
1510 LPRINT "REFLECTOR";:LPRINT TAB(18);:LPRINT USING Q$(3);LE(1);:LPRINT TAB(33) ;:LPRINT USING Q$(3);LE(1)/2;:LPRINT TAB(55);:LPRINT " 0";:LPRINT TAB(72);:LPRINT DI
1520 LPRINT "DRIVEN";:LPRINT TAB(18);:LPRINT USING Q$(3);LE(2);:LPRINT TAB(33);:LPRINT USING Q$(3);LE(2)/2;:LPRINT TAB(55);:LPRINT USING Q$(3); SP(1)*W*1000;:LPRINT TAB(72);:LPRINT USING Q$(3);SP(1)*W*1000+DI
1530 PS=SP(1)*W*1000
1540 FOR X=3 TO N
1550 PS=PS+SP(X-1)*W*1000
1560 LPRINT "DIRECTOR #";X-2;:LPRINT TAB(18);:LPRINT USING Q$(3);LE(X);:LPRINT TAB(33);: LPRINT USING Q$(3);LE(X)/2;:LPRINT TAB(55);:LPRINT USING Q$(3);PS;:LPRINT TAB(72);:LPRINT USING Q$(3);PS+DI