Closed TheCranston closed 2 years ago
Mea culpa.
After a bunch of reading on the specs, the 1.2 addendum includes the PHGR options. So I see how it is correct to consume 5 characters from the PHG string. However I still believe the parser is in error. by example:
!DDMM.mmN/DDDMM.mmW#PHG5360
<-- Standard PHG message
!DDMM.mmN/DDDMM.mmW#PHGabcdr/A Comment
<-- PHGR 1.2 spec. notice "/" requirement before the free text
So the parser should only do PHGR if and only if there is a "/" in the proper place. Otherwise this is pre 1.2 PHG with only 4 chars to be interpreted.
This was addressed with changes merged from #64
https://github.com/rossengeorgiev/aprs-python/blob/f5776bf2f7c4279e60dc957ac1684bdf5b18c44c/tests/test_parse_common.py#L315
From http://www.aprs.org/APRS-docs/PROTOCOL.TXT the PHG symbol is allowed for 4 decimals after the "PHG" symbol. The first unit test pulls in an extraneous "A" from the next field.
See #48 and #60 Not sure why #48 was closed but it's correct compared to the spec published above.