home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1985-08-23 | 2.4 KB | 60 lines |
- 100 'This program calculates the demensions of a VHF Yagi antenna.
- 110 '
- 120 'Design assumptions are:
- 130 ' 1. Driven element length in inches is 5600/frequency in MHZ.
- 140 ' 2. The reflector is 5% longer than the driven element.
- 150 ' 3. Reflector and first director spacing is 0.2 wavelengths from driven.
- 160 ' 4. The first director is 5% shorter than the driven element.
- 170 ' Subsequent director lengths are calculated by adding 1% to
- 180 ' the shortening factor of the previous director. For example,
- 190 ' the 2nd director is 6% shorter than the driven element,
- 200 ' the 3rd is 7% shorter, the 4th, 8% shorter, etc.
- 210 ' 5. Director spacing is 110% of previous spacing. Spacing starts
- 220 ' at 0.2 wavelengths.
- 230 '
- 240 ' The program is well documented via remarks, so any of the above
- 250 ' assumptions may be easily changed.
- 260 '
- 270 '-------------------- PROGRAM BEGINS --------------------------------------
- 280 '
- 290 CLS
- 300 DEFINT I
- 302 PRINT "THE OUTPUT OF THIS PROGRAM IS TO A PRINTER."
- 304 PRINT "TURN PRINTER ON AND ALIGN PAPER BEFORE PROCEEDING."
- 306 PRINT
- 310 INPUT"WHAT FREQUENCY (MHZ) ";FREQ
- 320 INPUT"HOW MANY ELEMENTS (3 MINIMUM) ";ELNO
- 330 WL = 11808/FREQ 'wavelength in free space (inches)
- 340 DR = 5600/FREQ 'driven element length (inches)
- 350 RF = DR * 1.05 'reflector length
- 360 SPR = WL * 0.2 'reflector spacing
- 370 PL(1) = DR * 0.95'first director length
- 380 SPP(1) = WL * 0.2 'first director spacing
- 390 FOR I = 2 TO (ELNO -2)
- 396 PRINT
- 400 SPP(I) = SPP(I-1) * 1.1 'each director spacing 10% greater than previous
- 410 PL(I) = DR * (100 - (4 + I))*0.01 'director length
- 420 LN1 = LN1 + SPP(I) 'keep track of overall length
- 430 NEXT
- 440 DEF FNX(X) = INT(X*100+0.5)*0.01 'function to round off printing to 2 dec.
- 450 LNT = SPR + SPP(1) + LN1 'total beam length
- 460 LPRINT"DESIGN DATA FOR VHF YAGI BEAM ANTENNA: "
- 470 LPRINT
- 480 LPRINT"---- DESIGN FREQUENCY IS";FREQ;" MHZ"
- 490 LPRINT"---- TOTAL NUMBER OF ELEMENTS IS";ELNO
- 500 LPRINT
- 510 LPRINT
- 520 LPRINT TAB(35);"LENGTH IN INCHES"
- 530 LPRINT "REFLECTOR";TAB(40);FNX(RF)
- 540 LPRINT "REFLECTOR TO DRIVEN";TAB(41);FNX(SPR)
- 550 LPRINT "DRIVEN";TAB(40);FNX(DR)
- 560 LPRINT "DRIVEN TO 1st DIRECTOR";TAB(41);FNX(SPP(1))
- 570 LPRINT "1st DIRECTOR LENGTH";TAB(40);FNX(PL(1))
- 580 LPRINT
- 590 FOR I = 2 TO (ELNO -2)
- 600 LPRINT"DIRECTOR No.";I;" LENGTH IS";FNX(PL(I));" INCHES"
- 610 LPRINT "SPACED";FNX(SPP(I));" INCHES FROM DIRECTOR No.";I-1
- 620 LPRINT
- 630 NEXT
- 640 LPRINT "------ OVERALL BEAM LENGTH IS";FNX(LNT);" INCHES ------"
-