From bcfda5489795398cbc39ee0252f88c85c7065116 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 12 Apr 2026 17:11:49 -0500 Subject: [PATCH] Assume 10 ft AGL antennas on contact detail path analysis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TerrainAnalysis.analyse was being called with default 0 m antenna heights on both ends of a QSO's path, which makes the knife-edge diffraction math pretend the radios are sitting directly on the terrain surface. Pass 3.048 m (10 ft) for both ant_ht_a and ant_ht_b, and shift the forward/reverse elevation angles to match. This is only a display assumption on /contacts/:id — terrain worker paths computed elsewhere are unaffected. --- lib/microwaveprop_web/live/contact_live/show.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/microwaveprop_web/live/contact_live/show.ex b/lib/microwaveprop_web/live/contact_live/show.ex index dbe20ccb..2202217d 100644 --- a/lib/microwaveprop_web/live/contact_live/show.ex +++ b/lib/microwaveprop_web/live/contact_live/show.ex @@ -1403,13 +1403,16 @@ defmodule MicrowavepropWeb.ContactLive.Show do {:ok, profile} <- safe_fetch_elevation(lat1, lon1, lat2, lon2) do freq_ghz = band_to_ghz(contact.band) dist_km = haversine_km(lat1, lon1, lat2, lon2) - analysis = TerrainAnalysis.analyse(profile, dist_km, freq_ghz) + # Assume both stations are at 10 ft (3.048 m) AGL so the path + # analysis doesn't pretend the antennas are sitting on the dirt. + ant_ht_m = 3.048 + analysis = TerrainAnalysis.analyse(profile, dist_km, freq_ghz, ant_ht_a: ant_ht_m, ant_ht_b: ant_ht_m) fwd_az = initial_bearing(lat1, lon1, lat2, lon2) rev_az = initial_bearing(lat2, lon2, lat1, lon1) - tx_elev = hd(profile).elev - rx_elev = List.last(profile).elev + tx_elev = hd(profile).elev + ant_ht_m + rx_elev = List.last(profile).elev + ant_ht_m fwd_el = elevation_angle(tx_elev, rx_elev, dist_km * 1000) rev_el = elevation_angle(rx_elev, tx_elev, dist_km * 1000)