#3671 feat(aprs): add Maidenhead grid locator field to APRS position row#3672
Conversation
Adds a GRID QLineEdit to the APRS config row of the HF packet decode dialog. On editingFinished it converts the locator via the existing MaidenheadLocator::toLatLon() and fills the manual LAT/LON fields with the grid-square center, then applies/persists the APRS config. Invalid locators are flagged in red and leave LAT/LON untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The GRID field auto-fills LAT/LON but was write-only: it rendered blank on the next launch even though the beacon position itself persists via AprsSettings manualLat/manualLon. Rather than persist the grid string separately (a second source of truth that can diverge from LAT/LON), derive it from the stored coordinates when the panel opens. Adds MaidenheadLocator::toMaidenhead() — the inverse of toLatLon() — which encodes a lat/lon to a 6-char mixed-case locator and round-trips cleanly (IM99sc -> 39.1042/-0.4583 -> IM99sc), with edge clamping at the poles/antimeridian. buildAprsUi() populates the grid box from the loaded manual position on open. No new setting is stored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks @ea5wa — nice, self-contained feature, and reusing the existing I pushed one follow-up commit (7884c15) before merging: Make the GRID box round-trip on open. As written the field was write-only — it fills LAT/LON but rendered blank on the next launch. The beacon position does persist (via Rather than store the grid string separately (a second source of truth that can silently diverge from LAT/LON if the operator hand-edits them), I derived it from the persisted coordinates:
Round-trip checked: Merging once CI is green. |
jensenpat
left a comment
There was a problem hiding this comment.
Approved. Verified the conversion math, reuse of the existing MaidenheadLocator, and the Option B round-trip follow-up. build / macOS / Windows / accessibility all green.
Fixes #3671
Summary
Adds a GRID QLineEdit to the AetherModem APRS Beacon panel. Entering a
valid Maidenhead locator (4- or 6-character) automatically computes and
populates the MANUAL LAT and LON fields with the center coordinates of
the grid square.
Changes
dependency).
AprsBeaconGrid).Screenshots
Before — no GRID field; coordinates must be entered manually:

After — GRID field

IM99scauto-fills LAT 39.1042 / LON −0.4583;POSITION label updates accordingly:
Testing
Tested against a FLEX-6600 with callsign EA5WA-7, grid IM99sc:
IM99sc→ LAT 39.1042, LON −0.4583 ✓IM99→ center of square ✓Principle
Honors Principle III (radio-persistable settings) — grid locator
stored via AppSettings, not radio-authoritative state.