rossengeorgiev / aprs-python

📡 Python module for working with APRS
http://aprs-python.readthedocs.io/en/latest/
GNU General Public License v2.0
114 stars 37 forks source link

merged packets, 3rd party branches, and added support for phg parsing #60

Closed stef closed 2 years ago

stef commented 3 years ago

i cherry picked and tested some of the branches.i run this in production.

hemna commented 3 years ago

aprslib should remove py 2.7 tests as python 2 is dead.

TheCranston commented 2 years ago

Please consider pulling in wsmitchell3 PR# 48 to properly parse PHG message. Current regex in parse_data_extensions for PHG match = re.findall(r"^(PHG(\d[\x30-\x7e]\d\d[0-9A-Z]?))", body) will consume the first char of the comment field if present. Possible fix would be match = re.findall(r"^(PHG(\d[\x30-\x7e]\d\d?))", body) i believe. thanks.

TheCranston commented 2 years ago

From #62 I've updated the feedback. The PHG is supposed to be 4 decimals and the 1.2 spec allows for extension into PHGR of 5 decimals but is terminated by a "/" as to maintain backwards compatibility. So no "/" means only grab four decimals from the string and the rest is freeform data including comments, etc. Presence of a "/" at position 6 after PHG indicates PHGR and should be parsed differently.

rossengeorgiev commented 2 years ago

This PR is too busy. I'm going to close it favor of individual PR for fixes and enhancements.