diff --git a/CHANGELOG.md b/CHANGELOG.md index dabe34c..aee6b51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # CHANGELOG ## Unreleased +- Added aprs destination callsign as `dstcall` to aprs beacon keys +- Changed aprs parser to allow other destination calls than `APRS` ## 0.4.0 - 2016-03-29 - aprs client: Added the possibility of a timed callback diff --git a/README.md b/README.md index 380e401..2573d04 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,9 @@ def process_beacon(raw_message): if raw_message[0] == '#': print('Server Status: {}'.format(raw_message)) return - try: beacon = parse_aprs(raw_message) beacon.update(parse_ogn_beacon(beacon['comment'])) - print('Received {beacon_type} from {name}'.format(**beacon)) except ParseError as e: print('Error, {}'.format(e.message)) diff --git a/ogn/parser/parse.py b/ogn/parser/parse.py index 33c82b3..8800a05 100644 --- a/ogn/parser/parse.py +++ b/ogn/parser/parse.py @@ -14,6 +14,7 @@ def parse_aprs(message, reference_date=None): if match: return {'name': match.group('callsign'), 'receiver_name': match.group('receiver'), + 'dstcall': match.group('dstcall'), 'timestamp': createTimestamp(match.group('time'), reference_date), 'latitude': dmsToDeg(float(match.group('latitude')) / 100) * (-1 if match.group('latitude_sign') == 'S' else 1) + diff --git a/ogn/parser/pattern.py b/ogn/parser/pattern.py index 9cc04d2..02d6bed 100644 --- a/ogn/parser/pattern.py +++ b/ogn/parser/pattern.py @@ -1,7 +1,7 @@ import re -PATTERN_APRS = re.compile(r"^(?P.+?)>APRS,.+,(?P.+?):/(?P