Skip to content

Comprehensive APRS parsing overhaul β€” near-parity with perl-aprs-fap (FAP.pm) - #97

Open
hemna wants to merge 1 commit into
rossengeorgiev:masterfrom
hemna:feature/new-parsing
Open

Comprehensive APRS parsing overhaul β€” near-parity with perl-aprs-fap (FAP.pm)#97
hemna wants to merge 1 commit into
rossengeorgiev:masterfrom
hemna:feature/new-parsing

Conversation

@hemna

@hemna hemna commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Comprehensive APRS protocol parsing overhaul achieving near-parity with perl-aprs-fap (FAP.pm), the gold standard parser used by aprs.fi. All 397 tests pass.

FAP.pm Gap Analysis β€” 14 Features Implemented

A line-by-line gap analysis against perl-aprs-fap identified 14 missing features. All are now implemented with unit tests.

# Gap Module Description
1 KISS ↔ TNC-2 aprslib/kiss.py Binary AX.25 KISS frame to/from TNC-2 text format conversion
2 Duplicate Detection aprslib/dedup.py dedup_key field + DuplicateFilter class (marks, never drops)
3 DX Spot Parsing aprslib/parsing/dx.py Parse "DX de CALL: freq call info" β†’ structured fields
4 Symbol from Destination aprslib/parsing/dstsymbol.py GPSxyz/SPCxyz destination β†’ symbol table/code + overlay
5 Object Construction aprslib/packets/object.py ObjectReport and ItemReport packet builders
6 NMEA Checksum aprslib/parsing/misc.py XOR validation, sets nmea_checksum_ok flag
7 Messaging Flag (already existed) messagecapable field on = and @ DTI
8 Distance/Direction aprslib/geo.py Great circle distance (km) and bearing (degrees) via Haversine
9 Position Resolution aprslib/geo.py Meters of uncertainty from position ambiguity spaces
10 Peet Bros !! Frame aprslib/parsing/peetbros.py !! logging frame with indoor temp/humidity
11 $ULTW Full 13 Fields aprslib/parsing/peetbros.py Extended weather: humidity, indoor temp, rain override
12 GPGLL Extraction aprslib/parsing/misc.py Full lat/lon/time/status parse for GLL sentences
13 Broken Mic-E Fixup aprslib/parsing/mice.py accept_broken option repairs corrupted IGate packets
14 Comment Cleanup + WX ID common.py + weather.py Strip control chars, extract weather software ID

Additional Parsers (earlier commits on this branch)

Feature DTI/Type File
Query packets ? aprslib/parsing/query.py
NWS weather alerts Object comment aprslib/parsing/nws.py
Area objects (circle/line/ellipse/triangle/rect) \l symbol aprslib/parsing/common.py
Signpost objects \m symbol aprslib/parsing/common.py
DF Reports DFSshgd aprslib/parsing/common.py
Frequency/Tone/Offset Position comment APRS 1.2 freq spec extraction
Mic-E device type Suffix detection Kenwood, Yaesu, Anytone, Byonics
Item-in-Message Message body Embedded item detection
Telemetry config PARM/UNIT/EQNS/BITS Message-based telemetry config
Comment telemetry Inline Sequence/analog/digital in comments
Station capabilities < Station capability parsing
Third-party } Recursive unwrap of relayed packets
Maidenhead locator [ Grid square beacon parsing

Design Principles

  • parse() never drops packets β€” enriches with new fields, apps decide what to act on
  • Backward compatible β€” no existing field names changed, only additions
  • Stateless core β€” stateful helpers (DuplicateFilter, TelemetryStore) are opt-in

Test Coverage

  • 397 tests pass
  • Every new feature has dedicated unit tests
  • Zero regressions on existing test suite

@hemna
hemna force-pushed the feature/new-parsing branch 5 times, most recently from 334d410 to 0ad3c9f Compare August 4, 2026 17:00
Gap analysis against perl-aprs-fap (FAP.pm), the gold standard APRS parser
used by aprs.fi, identified 14 missing features. All are now implemented
with full unit test coverage (397 tests pass).

New modules:
- aprslib/kiss.py: KISS <-> TNC-2 frame conversion
- aprslib/dedup.py: Duplicate detection (dedup_key + DuplicateFilter)
- aprslib/parsing/dx.py: DX spot parsing
- aprslib/parsing/dstsymbol.py: Symbol from GPSxyz/SPCxyz destination
- aprslib/packets/object.py: Object/Item packet construction
- aprslib/geo.py: Great circle distance/direction + position resolution
- aprslib/parsing/query.py: Query packet parsing
- aprslib/parsing/nws.py: NWS weather alert parsing

Enhanced modules:
- parsing/__init__.py: DX spot + Peet Bros !! dispatch
- parsing/misc.py: NMEA checksum validation, GPGLL coordinates
- parsing/peetbros.py: Full 13-field $ULTW + !! logging frame
- parsing/mice.py: Broken Mic-E fixup, device type detection
- parsing/common.py: Comment cleanup, DF reports, area objects,
  signpost objects, frequency/tone/offset, data extensions
- parsing/weather.py: Weather software ID extraction
- parsing/position.py: Compressed/uncompressed with messagecapable
- parsing/telemetry.py: Telemetry data + config message parsing
- packets/base.py: Third-party unwrap, station capabilities

Design: parse() never drops packets β€” enriches with new fields only.
Stateful helpers (DuplicateFilter, TelemetryStore) are opt-in.
@hemna
hemna force-pushed the feature/new-parsing branch from 0ad3c9f to ab9f911 Compare August 4, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant