88positions = {}
99server_timestamp = None
1010
11- mapping = {
11+ dstcall_beacontype_mapping = {
1212 'OGCAPT' : 'capturs' ,
1313 'OGNFNT' : 'fanet' ,
1414 'OGFLR' : 'flarm' ,
@@ -49,7 +49,7 @@ def parse(aprs_message, reference_timestamp=None, calculate_relations=False, use
4949 elif aprs_packet := rust_message .get ('aprs_packet' ):
5050 message .update ({
5151 'aprs_type' : 'position' ,
52- 'beacon_type' : mapping .get (aprs_packet ['to' ], 'unknown' ),
52+ 'beacon_type' : dstcall_beacontype_mapping .get (aprs_packet ['to' ], 'unknown' ),
5353 'name' : aprs_packet ['from' ],
5454 'dstcall' : aprs_packet ['to' ],
5555 })
@@ -129,7 +129,7 @@ def parse(aprs_message, reference_timestamp=None, calculate_relations=False, use
129129
130130 if 'unparsed' in status : message ["user_comment" ] = status ['unparsed' ]
131131 else :
132- raise ValueError ("WTF " )
132+ raise ValueError ("Raised unreachable exception " )
133133 elif server_comment := rust_message .get ('server_comment' ):
134134 message .update ({
135135 'version' : server_comment ['version' ],
@@ -144,7 +144,7 @@ def parse(aprs_message, reference_timestamp=None, calculate_relations=False, use
144144 'comment' : comment ['comment' ],
145145 'aprs_type' : 'comment' })
146146 else :
147- raise ValueError ("WTF " )
147+ raise ValueError ("Raised unreachable exception " )
148148
149149 if message ['aprs_type' ].startswith ('position' ) and calculate_relations is True :
150150 positions [message ['name' ]] = (message ['longitude' ], message ['latitude' ])
0 commit comments