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

parse_weather_data may corrupt comment #71

Closed powturns closed 2 years ago

powturns commented 2 years ago

Given the packet:

CW0315>APRS,TCPXX*,qAX,CWOP-4:@112148z4845.15N/01349.13E_045/002g014t035L000r000P000p000h14b10179.PCWS2.99.8E31

When parse_weather_data strips out the weather data via

# strip weather data
body = re.sub(r"([cSgtrpPlLs#][0-9\-\. ]{3}|h[0-9\. ]{2}|b[0-9\. ]{5})", '', body)

it also strips out part of the comment.

Actual body after returning from parse_weather_data:

.PCW9.8E31

Expected:

.PCWS2.99.8E31

https://aprs.fi/weather/?call=CW0315

aprslib ~= 0.7.0