Add source filtering (RF vs APRS-IS) to map, station list, and packet log#9
Open
fromalexx wants to merge 15 commits into
Open
Add source filtering (RF vs APRS-IS) to map, station list, and packet log#9fromalexx wants to merge 15 commits into
fromalexx wants to merge 15 commits into
Conversation
added 15 commits
April 1, 2026 21:33
AudioBufferProcessor.java and PacketCallback.java were stored as plain-text path pointers (Unix symlinks) which break on Windows. Replaced with actual file contents from PacketDroid submodule.
Packets arriving via igate (TYPE_IG) were only parsed and added to the map if the unrelated 'send my position to APRS-IS' (p.positiontois) preference was also enabled. This meant stations heard over igate showed in the log but never on the map unless that option was on. Fix: parse all TYPE_IG packets unconditionally, same as TYPE_POST and TYPE_INCMG packets.
- New checkbox in IGate settings: 'Auto-prepend GPS range filter' - New field: GPS filter radius in km (default 100) - When enabled, prepends r/lat/lon/radius to the custom filter string on login, so APRS-IS starts sending nearby traffic immediately - While connected, re-sends #filter command over the live socket whenever position changes by more than 5km (no reconnect needed) - Custom filter field still works normally; GPS filter is prepended - Falls back gracefully if no GPS fix is available
APRS-IS protocol requires the #filter command to be sent AFTER the server confirms login with '# logresp'. Sending it before (as part of sendLogin()) caused the server to silently ignore it, resulting in '# filter active' never appearing in the log and no range-based traffic being delivered. Fix: sendLogin() now only sends the 'user' line. A new sendFilterCommand() is called from the message loop when '# logresp' is detected.
sendFilterUpdate() was firing on the very first incoming packet because lastFilterLat/Lon were still 0,0. After sendFilterCommand() sends the filter on logresp, immediately sync lastFilterLat/Lon from GPS so shouldUpdateGpsFilter() won't trigger again until we actually move 5km.
- Add filterJustSent flag to skip shouldUpdateGpsFilter() on the same loop iteration that sendFilterCommand() ran, eliminating the duplicate '# filter active' line in the log - Replace fixed 5km threshold with 5% of the user's configured radius (e.g. 200km radius -> update every 10km, 50km -> every 2.5km) - Uses getLastKnownLocation() only, no additional GPS polling/battery use
Added check: if lastFilterLat/Lon are still 0.0/0.0, return false. This prevents sendFilterUpdate() firing on the first server message (aprsc banner) before sendFilterCommand() has run and set the baseline coordinates, which was causing the duplicate filter send.
…contents" This reverts commit 78b5dc10212813b6b059c947a25194bc0b9f49d6.
- Store FLAG_IGATE (bit 3) in station flags when packet comes from APRS-IS - addPosition() accepts source type and sets flag accordingly - Two new checkable menu items under the overlays (eye) menu: 'Show RF stations' and 'Show APRS-IS stations', both default checked - load_stations() filters by flags based on current selection - Prefs keys: show_rf, show_is (both default true)
New 'Filter by source' menu item in the hub station list (same menu as Sort by). Shows a single-choice dialog with All / RF only / APRS-IS only. Uses FLAG_IGATE (bit 3) in station flags to filter. Pref key: station_source_filter (default: all).
Reuses station_source_filter pref (shared with station list filter) so changing the filter on one screen affects both. 'Filter source...' menu item now visible on both hub and log screens. Log hides RF or APRS-IS packet types while always showing info/status entries.
Station list uses 'station_source_filter', packet log uses 'log_source_filter'. Each view maintains its own independent setting.
Author
|
And I am sorry for the confusion.. This PR includes changes from PR #8 as well. I did the first PR on my |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add source filtering (RF vs APRS-IS) to map, station list, and packet log
Adds the ability to filter stations and packets by their source — RF (radio) or APRS-IS (internet) — across three views in the app.
Changes
Map overlay filter
Two new checkboxes in the map overlays menu (eye icon) under "APRS objects":
Both are checked by default. Stations received via APRS-IS are tagged with a new
FLAG_IGATEbit (value 8) in the station flags column at receive time.Station list filter
"Filter source..." option added to the ⋮ menu on the hub station list. Single-choice dialog with three options: All (default), RF only, APRS-IS only. Setting is persisted independently per view.
Packet log filter
Same "Filter source..." option added to the ⋮ menu on the packet log. When filtering to RF only, APRS-IS connection info messages are also hidden to keep the view clean. Uses a separate preference key from the station list so each view can be filtered independently.
AI Disclosure
This code change was written by AI. Again, if its low quality, feel free to reject the PR or make any edits needed.