The height of the antenna above the ground and the terrain profile in the direction of operation are two factors that can decide a ten decibel difference in low-angle radiation - and therefore whether the signal reaches DX or not. Program hfta (HF Terrain Analysis), ktorý pre ARRL created by Richard Dean Straw, N6BV, was the standard tool for such analysis for decades. Since the original program was designed for 32-bit Windows and its development stopped, the OpenHFTA project was born - a faithful, reimplementation for modern systems.
In the article you will read
HFTA principle: elevation diagram as a function of terrain
The basic quantity that hfta What counts is the far-field elevation diagram of the antenna – not over an ideal flat ground, but over the actual terrain profile at the chosen azimuth. The result is a dependence of the relative gain on the elevation angle, typically in the range of 0.25° to 35°, with a resolution of 0.25°.
Terrain affects propagation by three mechanisms. The direct waves, which carry the phasor of the direct radiation of the antenna, are added coherently with the waves reflected from the earth's surface; the resulting diagram may have significant maxima or zeros at certain angles depending on how the phases of the individual paths are added or subtracted. At the edges of the terrain - ridges, slopes, hills - bending occurs according to the Uniform Theory of Diffraction (UTD), which introduces additional contributions to the elevation diagram, especially important in the shadow area behind the obstacle.
The reflection from the earth's surface is modeled by Fresnel coefficients for soil losses. The soil is described by a complex relative permittivity, in which the real component represents the capacitive properties and the imaginary component represents the conductive losses. For horizontally polarized antennas – dipoles, yagis, quads – the horizontal (TE) polarization coefficient is used. This corresponds to typical operation on HF contests and DX expeditions, where horizontal antennas dominate.
Terrain profile is represented in the program as a piecewise-linear polyline. Profile preprocessing involves simplifying the input points: only points whose elevation differs from the previously retained point by at least λ/8 are retained. Diffraction points are identified from the changes in slope of adjacent sections and further from the length conditions of adjacent segments.
The terrain profile is entered by the operator as distance–height pairs along a single azimuth, typically within a few kilometers of the station. This data can be obtained from topographic maps or digital elevation models available on the Internet.
UTD and Fresnel reflection: the core of the calculation
Diffraction at terrain edges is implemented using the Kouyoumjian-Pathak UTD coefficient for a directly conducting wedge. The coefficient is made up of four terms, each in the form of a product of the cotangent and the transition function F(X). It is this structure that ensures that the result is finite even exactly at the shadow and reflection boundary - where the cotangent would be singular, the transition function F(X) vanishes in exactly such a way that the product remains bounded.
The implementation distinguishes several families of rays: direct diffraction from the antenna to the edge, double diffraction through two consecutive edges (DIFFDIFF), and reflection–diffraction interaction when the ray passes through a reflecting surface in front of the diffractive edge. For each family, the corresponding distance parameter in wavelengths is calculated, which enters the normalization factor of the UTD coefficient.
The resulting elevation diagram is created by coherently summing the complex phasors of all contributions for each output angle. After summing, the absolute value is calculated, a moving average is applied over the five angle segments, and the result is converted to dB.
OpenHFTA: purpose and goals of the project

OpenHFTA is a Python CLI tool whose primary goal is to preserve the functionality of the original HFTA for today's users and systems. The project is dedicated to the memory of Richard Dean Straw, N6BV, the author of HFTA, a long-time ARRL employee, and editor of several editions of the ARRL Antenna Book. The ARRL states that HFTA, TLW, and Yagi for Windows were developed for 32-bit Windows and that no updates are planned, with HFTA remaining as a companion software to the ARRL Antenna Book.
OpenHFTA does not aim to replace the original program with a new terrain analysis model. The only compatible reference remains the behavior of the original HFTA. Pull requests that would intentionally improve the numerical core in a way that breaks compatibility with the original HFTA are not accepted by the project - users who want to experiment with new models are encouraged to fork.
Architecturally, OpenHFTA consists of a Python CLI layer and a Fortran numerical core, OpenYTWCore, accessed via ctypes. The Python layer reads terrain profiles, converts units (metric or imperial), prepares inputs for Fortran, and generates output plots using matplotlib. The Fortran core handles the calculation of the elevation diagram.
OpenHFTA Features

Antenna types and stack configuration

OpenHFTA supports dipól, 2-prvkový až 6-prvkový a 8-prvkový Yagi. Sedem-prvkový Yagi nie je dostupný; 8-prvkový sa mapuje na interný typ 7 Fortran jadra. Naraz je možné analyzovať až štyri anténne prvky na rôznych výškach. Fázovanie prvkov sa zadáva hviezdičkovou notáciou: napríklad 30* denotes an element at a height of 30 m with a phase reversal of 180°. In this way, phased stacks can be modeled.
Soil parameters
The reflective properties of the Earth's surface are parameterized by relative permittivity and conductivity in S/m. OpenHFTA provides a table of preset values corresponding to the original HFTA GUI, from very poor soil (σ = 0.001 S/m, εr = 5) to average soil (σ = 0.005 S/m, εr = 13) to salt water (σ = 5.000 S/m, εr = 80). The original HFTA GUI displayed conductivity in mS/m; the OpenHFTA CLI expects values in S/m.
Comparing multiple terrain profiles
One of the practically valuable features is the ability to simultaneously analyze and compare multiple terrain profiles at once. Each profile has its own antenna, height, and mast offset settings. The result is elevation diagrams of all profiles on one graph, allowing direct comparison of different azimuths or different antenna configurations on the same terrain.
Angle of Arrival and Figure of Merit
OpenHFTA supports input AoA (Angle of Arrival) files in ARRL format, which contain percentage probabilities of signal arrival at various elevation angles for different bands. Based on the calculated elevation diagram and AoA data, the Python layer calculates a Figure of Merit – a number representing the overall suitability of the antenna for operation in a given target area. The band is automatically determined from the frequency.
Mast movement and terrain visualization
The Move Tower function allows you to move the antenna position along the terrain profile without having to edit the input file. In addition to the elevation diagram, you can switch the display to terrain mode, where the program will draw the terrain profile itself. Output graphs can be saved in PNG, SVG and PDF formats.
Diffraction and its control
Diffraction is enabled by default in OpenHFTA, which corresponds to a more physically accurate result for KV frequencies. It can be disabled with the parameter --no-diffraction, for example to verify the influence of diffraction by comparing both calculations. The elevation diagram is calculated in 140 angular bins from 0.25° to 35.0° in 0.25° steps, which corresponds to the specification of the original HFTA.
Numerical fidelity and porting of the Fortran kernel
Achieving numerical consistency with the original HFTA required an in-depth analysis of the difference between the original Compaq Visual Fortran (CVF) compiler and the modern GNU gfortran. The original HFTA binary exhibits features of compilation for the x87 FPU, where intermediate results of expressions can be stored in 80-bit FPU registers, but are truncated to 32-bit REAL*4 precision when written to memory. It is this alternation of precisions within calculations that was the key source of the differences.
The most critical point from the point of view of numerical stability is the calculation of the UTD transition function in the WD and FFCT routines. The UTD coefficient involves the product of the cotangent term, which approaches the singularity at the shadow boundary, and the transition function F(X), whose argument also approaches zero. Their product must remain bounded, which requires exact mutual zeroing. In one documented case from the test set, the argument of the TAN function, which was only a femto-unit away from the pole, caused a deviation of the result by more than 10 dB from the original HFTA.
A second source of sensitivity is the line of sight (LOS) tracking in the REFL routine and in the directly embedded controls in YTWCore1. The iterative calculation of the beam height above the terrain profile is prone to cumulative rounding errors for beams that are almost touching the terrain (grazing paths). Inverting the result of a single-bit comparison condition can lead to the exclusion of the entire physical contribution from the resulting sum and thus to an error of several dB in the resulting diagram.
The solution is a specific set of compiler switches for gfortran that force the compiler to use the x87 FPU instead of SSE registers and adjust the processing of intermediate results to approximate the behavior of CVF as closely as possible. The resulting binary is more mathematically accurate than the original HFTA binary, while maintaining output compatibility.
Installation and use
OpenHFTA is available on GitHub under the 0BSD license. Installation on Debian/Ubuntu systems involves installing Python dependencies (python3-numpy, python3-matplotlib) and compiling the Fortran kernel with the command make && sudo make installAfter installation, the tool is available as a command HFTAFor local development without installation, just run ./HFTA.py directly from the repository.
Typical use for analyzing a 20m antenna over a terrain profile:
HFTA –profile terrain.pro –freq 14.2 –heights 20 40 –antenna-type 2-Ele
Terrain profiles are stored in .PRO files, which contain distance-height pairs with a header specifying the units (meters or feet). The units in the terrain file and the units specified on the command line are independent – CLI parameter --units it only affects antenna heights and tower offset, not profile interpretation.
Summary
OpenHFTA fills the practical gap left by the original HFTA after the ham community moved to 64-bit systems. It is a faithful, open, and auditable port of the original algorithm - not a replacement for it with a new model. For the contestman, DXman, or station builder who wants to know whether a hill behind the QTH helps or hurts him on 14 MHz in low-angle radiation, this is the only functional and freely available tool today with direct numerical continuity to the original HFTA N6BV.
The project remains open for contributions aimed at documentation, tests, and clarification of code comments. Numerical changes are accepted only as compatibility fixes, with comparative tests against the original HFTA behavior.
Project link: https://github.com/RioDXGroup/OpenHFTA
