December 08, 1997                                        by N6BV

         Operating Instructions for YT.EXE, Version 2.0
                     (Yagi Terrain Analysis)

   [YT Version 2.0 implements higher-resolution graphics than in 
previous versions, giving much smoother plots of elevation 
response. It also corrects several minor errors involving 
diffractions that result in subsequent diffractions. Thanks to 
John Stanley, K4ERO, for pointing out the anomalies.]

   YT is a ray-tracing program designed to evaluate the effect 
of foreground terrain on the elevation pattern of up to four HF 
Yagis in a stack. See Chapter 3 in the 18th Edition of The ARRL 
Antenna Book for details about YT.

   YT has a vastly improved operator interface compared to older 
versions of its predecessor program YTAD. YT also adds several 
more diffraction models to those in earlier YTAD versions (before 
3.3). This includes diffraction resulting in later diffractions. 
YT is demonstrably more "believable" than earlier versions 
because of these new models. In general, you will see that gains 
at very low elevation angles are less dramatic than in older YTAD 
versions, especially for extremely complex terrains such as 
K5ZD's. In general, the effect of diffraction is to "even-out" 
extremes in elevation response created by a reflection-only 
analysis.

   YT only models horizontally polarized Yagis. The effects of 
Fresnel horizontal ground reflection coefficients are taken into 
account, meaning that the ground conductivity and ground 
dielectric constant are inputs to the program through the Other 
submenu. You will find that these ground coefficients have only a 
minor effect on the elevation pattern at low angles, gradually 
becoming more significant at higher elevation angles. Please 
note: YT does not work with vertical polarization, only 
horizontal, and it only works with directive arrays such as Yagis 
or quads.

   YT's default internal antenna model is a four-element Yagi, 
similar to a HyGain 204BA, but scaled internally to any frequency 
of operation. Through the "Other" menu selection from the main 
menu, you may also choose other Yagis, ranging from a two-element 
design to a monster eight-element Yagi. 

   YT's output response is referenced to an isotropic radiator in 
free space; that is, in dBi. The free-space gain assumed for the 
internal four-element Yagi model is 8.5 dBi.

PREPARING A TERRAIN DATA FILE

   YT needs an ASCII input file with the terrain data in a 
particular azimuthal direction from the base of the tower. The 
terrain data file is entered in feet. Some sample data files are 
included with the program: for example, N6BV-EU.PRO and N6BV-
JA.PRO, standing for N6BV to Europe and to Japan. These files 
have "PRO" filename extensions, meaning "PROFILE." The data were 
taken from a topographic chart (the "7.5 minute series," 
published by the US Coast and Geodetic Survey; call 1-800-USA-
MAPS.) As a reference, a FLAT.PRO file is included as well, for 
flat ground.

   If you examine the contents of N6BV-EU.PRO using an ASCII word 
processor, you will find that the data is arranged in two 
columns, separated by a tab or comma; each line is terminated by 
a carriage-return/linefeed. Each line represents a single point. 
For N6BV-EU.PRO, I drew a line from the base of my tower at an 
azimuth of 45 degrees towards the center of Europe. Where this 
line crossed each contour on the topographic chart, I measured 
the distance from the tower and entered it into the disk file. 
Here is a sample of what is in N6BV-EU.PRO file.

0       430
200     420
500     410
700     400
800     380
900     360
1000    340
1550    360
2200    340
4800    340
5000    360
5200    380
5450    400
5700    420
7600    440

   The first line starts at the base of the tower, at 0 feet. The 
elevation height above mean sea level (also known as ASL, 
standing for Above Sea Level) at my tower base is 430 feet. The 
next line in the data files shows that 200 feet from the tower 
base the elevation is 420 feet; at 500 feet the elevation is 410 
feet, etc. I enter data at distances from the tower for more than 
6000 feet, because even at that distance the effect is noticeable 
on elevation pattern for low frequency Yagis, like 40-meter 
Yagis. 

   Make sure that you terminate data input to the file with a 
single blank line at the end. [Earlier versions of the program 
required that you enter a figure of 100,000 feet or further at 
the end of a file. This is no longer necessary, since the program 
takes care of that detail internally.] YT will accept input of up 
to 150 data points in an input file.

RUNNING YT

   Run the YT program by keying in YT, followed by <Enter>. The 
main menu will appear, showing the parameters chosen during the 
last YT session. These were saved to disk in the YT.DEF default 
file. 

   By the way, if you ever get in trouble with a corrupted YT.DEF 
file, simply go back to DOS and delete the file YT.DEF. YT will 
then create a new file when it first boots up. Similarly, if you 
find yourself hopelessly lost in the program for some reason, hit 
the key combination <Ctrl> Break. This will take you back to DOS, 
but the white border generated by YT will still remain on screen. 
Type MODE CO80 [Enter] to bring back your normal screen. 

   YT can overlay up to three different elevation patterns on a 
single graph. I regularly compare any patterns I generate to a 
reference Yagi over flat ground, usually at a height of 60 feet 
on 21 or 28 MHz, or 100 feet for 14 or 7 MHz. (These are also 
the reference antenna heights I specify when using the IONCAP or 
VOACAP propagation-prediction programs.)

   The following is a typical main menu screen-shot in YT.

----------------------------------------------------------------

                    YT, Yagi Terrain Analysis
      Ver. 2.0, Dec 8, 1997, Copyright 1995-1997 ARRL, by N6BV

Present antenna: Four-element Yagi, 8.5 dBi free-space gain

    Terrain Files:      Antennas:      
A = BV-EU.PRO            90/ 60/ 30 ft 
B = K1ZZ-EU.PRO         120/ 80/ 40 ft 
C = FLAT.PRO            100 ft         

E = Elevation-statistics file: W1-MA-EU.PRN
Frequency: 14.0 MHz
G = GO
O = Other                      Diffraction is ON
P = Plot profile of terrain
Q = Quit to DOS
T = Terrain file and stack height(s)

Select:
----------------------------------------------------------------


Selections: A, B or C = Terrain file and stack height(s)
--------------------------------------------------------

   If YT detects no YT.DEF file on bootup, it will automatically 
create a new one, using FLAT.PRO for its choice of terrain A, 
together with a single four-element Yagi, 100 feet high. Terrains 
B and C will be blank.

   If you wish to change the terrain file at either "A," "B" or 
"C," touch the key for the letter you want. You may enter either 
an upper-case or lower-case letter. Keep in mind that you MUST 
have a terrain filename showing in at least the A position, 
followed by blanks in B and C, if you wish. Further, you cannot 
specify a filename in A and then one in C, with a blank in the B 
position; you must specify first A, then B, then a blank in C.

   When prompting you for a filename, YT will show you within 
square brackets the default filename for A, B or C, if one has 
already been specified in YT. To retain the present selection, 
hit [Enter]. Otherwise, type in the name of one of the terrain 
files showing on the screen directory. You needn't type in the 
"PRO" filename extension because YT does that automatically for 
you. However, if you type the wrong name or if the file you want 
doesn't exist, YT will complain and make you do it all over 
again.

   Once you've selected a profile name, YT will prompt you to 
enter the number of antennas in a stack. The default is one 
antenna, at 100 feet height -- you choose this by hitting "D" 
[Enter]. To retain the same antenna heights already chosen, hit 
"S" or just simply [Enter]. Note that you may use either upper-
case or lower-case letters from the keyboard.

   For any other choice of number and heights of antennas, enter 
first the number of antennas you want in a stack. Enter 1 for a 
single antenna, or up to 4 for a stack of 4 four-element Yagis. 
YT will next ask for the height of each antenna in the stack, 
specified in feet. Note that the present values, if any, for each 
antenna in a stack are listed on the prompt line in square 
brackets. If you want to keep the present value, hit [Enter]. 
Once you've specified the height(s) for a terrain, YT will put 
you back to the main menu. 

   The internal Yagi model in YT is simple and does not compute 
interactions between individual Yagis in a stack -- YT assumes 
that each antenna is a point source. For antennas stacked more 
than about a half wavelength apart this is not a problem. 
For example, you should be cautious specifying spacings less than 
about 20 feet on 20 meters (and proportionately scaled on other 
bands) because of mutual-coupling effects between real antennas.


E = Elevation-statistical file:
-------------------------------

   Hitting "E" (or lower-case "e") takes you into a function 
where you may specify the name of an elevation-angle statistical 
file. Again, you needn't enter the "PRN" filename extension. The 
statistical elevation-angle data will be plotted along with the 
computed elevation-pattern response(s) for the terrain(s) you 
wish to evaluate. 

   For example, the main screen above shows the elevation-
statistics filename W1-MA-EU.PRN, meaning "W1 in the state of 
Massachusetts, pointing towards Europe." For each amateur HF band 
from 80 to 10 meters, this file shows the percentage of time each 
elevation angle is effective. These statistics were computed for 
all the times over the 11-year solar cycle when each band is 
actually open. (If you run this example, you will find that the 
peak percentage for the 20-meter band is 18%, occurring at an 
elevation angle of 11 degrees from Boston to all of Europe.)

   As usual, you may simply hit the [Enter] key to retain the 
present data file, rather than retyping the name. You may also 
select no data file at all by entering "0" [Enter] -- that's the 
number zero. YT will display "none" on the screen.

   Each elevation-angle statistic file is named in the generic 
format "W?-*.PRN," and comes from the disk shipped with the 18th 
edition of The ARRL Antenna Book (in the \ELEVAT subdirectory). 
The Antenna Book's disk contains files for all regions of the USA 
to Europe, the Far East, South America, South Asia, Southern 
Africa, and the South Pacific, plus data files for a wide variety 
of transmitting sites throughout the world. 

   Before running YT, copy the files from the Antenna Book disk 
applicable to your QTH (i.e., W3, or W4, etc.) into the 
subdirectory on your hard disk containing the rest of the YT 
files. 


Selection: F = Frequency
------------------------

   Hitting "F" will bring up a prompt to enter the frequency, in 
MHz. The elevation-angle statistical data is automatically 
updated when you enter a different frequency. 


Selection: G = GO
-----------------

   Hitting "G" will compute and display a graph of the elevation 
response(s) for all the data you have specified on the main 
screen. Hitting any key will erase the graph and take you back to 
the main menu. [Those of you who have become accustomed to 
earlier YTAD versions will find YT's operator interface much 
easier to use!] 

   YT then computes the elevation pattern by shooting rays from 
+35 degrees to -45 degrees at the terrain model in 0.25-degree 
increments. It vectorially combines all the outputs due to 
reflection and diffraction in the far field. The computation will 
be lengthy if a stack of four Yagis is modeled over complex 
terrain. If your computer doesn't have a numeric coprocessor, the 
computations will be excruciatingly long...I highly recommend 
that you use a computer with a built-in numeric coprocessor, such 
as a Pentium. 


Selection: O = Other
--------------------

   Pressing the letter "O" will take you to a submenu with three 
choices: 

A: Antenna type
D: Diffraction, toggle on/off
G: Ground constants

   Pressing "A" will take you to another submenu, where you may 
choose the type of Yagi used by YT as its internal model. The 
default Yagi YT uses when it boots up is a four-element model 
that is similar to a HyGain 204BA. However, you may choose from 
among two, three, four, five, six or eight-element designs, with 
free-space gains ranging from 5.5 to 12 dBi. 

   Pressing "D" will toggle the diffraction mechanism on and off. 
When diffraction is off you will find that only a reflection-
analysis is run. In general, diffractions "fills in the holes" 
and "knocks down the peaks" in an elevation pattern. This 
"fuzzing up" of the computed response is what happens in the real 
world, where things are rarely very peaky or full of holes. 

   Pressing "G" allows you to choose the conductivity and 
dielectric constant of the ground in the foreground of the 
antenna. See the Ground chapter in The ARRL Antenna Book for 
typical values. YT's default values are a ground conductivity of 
5 mS/m and a dielectric constant of 13, typical of average to 
better-than-average ground. You will find that changing the 
ground constants for a horizontally polarized antenna like that 
used in YT changes the elevation pattern only a small amount.


Selection: P = Plot profile of terrain
--------------------------------------

   Hitting "P" will take you to a submenu that shows which 
terrain files and antenna height(s) are already in use. Hitting 
"A" or "B" or "C" will then generate a plot of terrain height 
versus distance from the tower base. The position of the antennas 
selected for that terrain will be shown as blue arrows, with the 
base of the tower shown as a red "x" symbol.

   The Y-axis (maximum and minimum height) values on-screen are 
computed by YT to show the maximum possible detail. They will 
change automatically when the file is changed, so be careful when 
making assumptions about a steepness of a terrain! The maximum 
resolution is 25 feet between marker lines, and the minimum is 
1000 feet, but the maximum distance from the tower remains fixed 
at 10,000 feet. (The program uses data beyond 10,000 feet to 
make its internal computations, but the Plot display only shows 
the terrain out to 10,000 feet from the tower base.) To return to 
the main menu after looking at a plot of the terrain, hit any 
key, including [esc] or the spacebar.


Selection: Q = Quit to DOS
--------------------------

   Hitting "Q" will immediately save the present data stored in 
YT to YT.DEF and then go to DOS.


YT OUTPUT

   The on-screen graph shows the elevation response (calibrated 
in dB below the peak dBi level) from 1 to 30 degrees above the 
horizon, in one-degree increments. YT will also write data to a 
disk file called OUT.PRN. This file is used by the utility 
program MAKEVOA.EXE to create a custom antenna file for VOACAP, 
the sophisticated propagation-prediction program.

   OUT.PRN contains the elevation data for each angle used to 
create the on-screen graphs in YT. This data is delimited with 
commas. Character labels are delimited with double quotation 
marks. This sort of data can be imported easily into a 
spreadsheet or database management software for other types of 
manipulation, if you like. 

   If you want to print the on-screen graph using the [Shift]-
[Print Screen] command, you will need to load GRAPHICS.COM before 
you run YT. I use a Hewlett Packard LaserJet IIP printer, and I
load GRAPHICS LASERJETII in my AUTOEXEC.BAT file. Check your DOS 
manual or HELP GRAPHICS for the setup parameters for your 
printer. The DOS GRAPHICS.COM program automatically turns the 
background color from the on-screen black color to white on the 
printed paper.

   If you are operating YT in a DOS window under Windows or 
Windows 95, you may hit the [Print Screen] key by itself to put a 
copy of the YT graph onto the Clipboard. This can then be used by 
another Windows program, such as Word for Windows or Paint Shop 
Pro. Paint Shop Pro is particularly useful because by selecting 
Color, Negative, I can print the pattern with a white background.


CAVEATS

   The YT program is still under development. For validation of 
its results, there is precious little experimental data available 
showing careful measurements of HF elevation angles versus 
terrain contours. Very few radio amateurs have access to a
helicopter to really measure their elevation patterns!

   Further, the terrain data itself from topographic maps is 
often "sparse." Irregularities that can be seen with the naked 
eye from the base of the tower are often not shown on the maps. 
The terrain model used by YT assumes that the terrain is 
represented by flat "plates" connecting the elevation points in 
the *.PRO file with straight lines. The model is two dimensional, 
meaning that range and elevation are the only data for a 
particular azimuth. 

   Obviously, the real world is three dimensional. To get a true 
picture of the full effects of terrain, a terrain model that 
shows azimuth along with range and elevation point by point would 
be necessary. The computational requirements for such a 3-D 
model, even if the detailed terrain data were readily available, 
would be pretty horrendous. After you have struggled to create a 
terrain file by hand for a single azimuth, you will begin to 
appreciate the data-entry problems involved in trying to come up 
with a real 3-D terrain map! 

   You can get a feel for how your terrain affects signals 
launched in various azimuthal directions by creating separate 
data files for these directions. For example, from my QTH in New 
Hampshire, my coverage to central Europe goes from about 30 
degrees to 60 degrees. I have thus evaluated azimuth shots for 
30, 45 and 60 degrees. The overall effect for the three azimuths 
for a single antenna height can be plotted together on one screen 
to visualize the effect of azimuth as well as terrain shape.

   Some of you may have access to digitized terrain databases. I 
have examined the data output from one such database, and I find 
that the data is relatively coarse, with rather large range steps, 
and elevation data which doesn't match very well a file created 
manually from a paper topo map. I suppose that the digitized data 
is good enough for many military and commercial purposes, but it 
doesn't seem adequate for elevation predictions using YT.  


ACCURACY AND TESTING THE RESULTS

   What would I estimate as the "accuracy" of YT elevation 
predictions? I would say that I would trust the results within 
plus/minus 3 dB. In other words, take YT results with a grain 
of salt. Don't obsess with changing the height of your antenna by 
fractions of a foot to see what happens!! 

   Having said that, now I must state that it IS a good idea to 
compare elevation patterns in intervals of perhaps 1 feet to 
assess whether YT is generating reasonably smooth results. 
Often, the 0.25-degree steps used in the program don't align 
exactly and artificial "spikes" (or "holes") can be created. This 
is inherent in any ray-tracing program and can only be eliminated 
by using extremely small angular step increments -- and doing so 
would slow down execution even more. 

   After I do an evaluation for a particular antenna height, I 
will often specify an overlay of three heights separated by one 
foot each. For example, if you are interested in a single antenna at 
a height of 80 feet on 14.0 MHz for the N1MM-EU terrain, you might 
first compare three heights of 83, 82 and 81 feet. The three 
curves overlaid on each other look smooth compared with one 
another. Then run three heights of 80, 79 and 78 feet. Now, 
the curves for 80 and 79 feet look smooth, but the 78-foot curve 
has obvious spikes and holes. This means that spurious artifacts 
of the ray-tracing process are occurring at 78 feet in the 
program -- but these would not occur in the real world. The 
solution: don't use the 78 foot point in the computer analysis, 
but you could mount your real antenna at that height if you like 
the response at 79 or 80 feet!


FEEDBACK, PLEASE

   I would greatly appreciate feedback from you about this 
program. If you have access to validation data, I'd surely like 
to hear about it!

GL and 73,

R. Dean Straw, N6BV
Senior Assistant Technical Editor, ARRL

e-mail: n6bv@arrl.org

regular mail: ARRL
              225 Main Street
              Newington, CT 06111
              U.S.A.
