From 5dfd6821425b9c1e9feeeeeb577cf7dbae6cf690 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 7 Oct 2025 16:57:21 -0500 Subject: [PATCH] fix: exclude APRS-IS paths from RF path visualization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, packets sent via APRS-IS (Internet) would incorrectly show RF path lines to the uploader's callsign. This fix filters out paths containing TCPIP, NOGATE, or qA* indicators, which indicate Internet-only transmission rather than actual RF digipeating. For example, AE5PL-S packets posted by AE5PL via Internet will no longer show a misleading RF path line between them. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- lib/aprsme_web/live/map_live/rf_path.ex | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/aprsme_web/live/map_live/rf_path.ex b/lib/aprsme_web/live/map_live/rf_path.ex index cba1ad7..b5c5337 100644 --- a/lib/aprsme_web/live/map_live/rf_path.ex +++ b/lib/aprsme_web/live/map_live/rf_path.ex @@ -8,15 +8,28 @@ defmodule AprsmeWeb.MapLive.RfPath do @doc """ Parse RF path string to extract digipeater/igate stations. + Excludes APRS-IS (Internet) paths that contain TCPIP. + + APRS-IS path indicators: + - TCPIP: Packet came via Internet connection + - NOGATE: Should not be gated to RF + - qA*: Various APRS-IS q-constructs (qAC, qAS, qAR, etc.) + + These are not actual RF digipeaters, so we don't show path lines for them. """ @spec parse_rf_path(binary()) :: list(binary()) def parse_rf_path(path) when is_binary(path) do - path - |> String.split(",") - |> Enum.map(&String.trim/1) - |> Enum.map(&extract_callsign_from_path_element/1) - |> Enum.filter(&(&1 != "")) - |> Enum.uniq() + # Skip APRS-IS paths - these are Internet-only, not RF + if String.contains?(path, "TCPIP") or String.contains?(path, "NOGATE") or String.contains?(path, "qA") do + [] + else + path + |> String.split(",") + |> Enum.map(&String.trim/1) + |> Enum.map(&extract_callsign_from_path_element/1) + |> Enum.filter(&(&1 != "")) + |> Enum.uniq() + end end def parse_rf_path(_), do: []