weather message

Pattern for weather message.

Target message example:
XUDN>WX,TCPIP,qAS,R8LAY-13:;XUDN     *131019z5657.96N/04104.25E_236/007c236s007g013t029h89b10270Weather:overcast clouds; Cloudiness:99%; Wind:236° 3.1 m/s (5.8 m/s); Temp:-1.6°C; Humidity:89%; Dew point:-3.2°C; Pressure:1027 hPa; Visibility:10 km; Daylight:[11:38][06:36-18:14]
pull/122/head
Valery 2024-03-14 08:36:46 +03:00 zatwierdzone przez GitHub
rodzic 471840f657
commit a19209b3d8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -4,6 +4,30 @@ PATTERN_APRS = re.compile(r"^(?P<callsign>.+?)>(?P<dstcall>[A-Z0-9]+),((?P<relay
PATTERN_APRS_POSITION = re.compile(r"^(?P<time>(([0-1]\d|2[0-3])[0-5]\d[0-5]\dh|([0-2]\d|3[0-1])([0-1]\d|2[0-3])[0-5]\dz))(?P<latitude>9000\.00|[0-8]\d{3}\.\d{2})(?P<latitude_sign>N|S)(?P<symbol_table>.)(?P<longitude>18000\.00|1[0-7]\d{3}\.\d{2}|0\d{4}\.\d{2})(?P<longitude_sign>E|W)(?P<symbol>.)(?P<course_extension>(?P<course>\d{3})/(?P<ground_speed>\d{3}))?(/A=(?P<altitude>(-\d{5}|\d{6})))?(?P<pos_extension>\s!W((?P<latitude_enhancement>\d)(?P<longitude_enhancement>\d))!)?(?:\s(?P<comment>.*))?$")
PATTERN_APRS_POSITION_WEATHER = re.compile(r"^(?P<time>(([0-1]\d|2[0-3])[0-5]\d[0-5]\dh|([0-2]\d|3[0-1])([0-1]\d|2[0-3])[0-5]\dz))(?P<latitude>9000\.00|[0-8]\d{3}\.\d{2})(?P<latitude_sign>N|S)(?P<symbol_table>.)(?P<longitude>18000\.00|1[0-7]\d{3}\.\d{2}|0\d{4}\.\d{2})(?P<longitude_sign>E|W)(?P<symbol>.)(?P<wind_direction>(\d{3}|\.{3}))/(?P<wind_speed>(\d{3}|\.{3}))g(?P<wind_speed_peak>(\d{3}|\.{3}))t(?P<temperature>(\d{3}|\.{3}))(r(?P<rainfall_1h>\d{3}))?(p(?P<rainfall_24h>\d{3}))?(h(?P<humidity>\d{2}))?(b(?P<barometric_pressure>\d{5}))?(?:\s(?P<comment>.*))?$")
PATTERN_APRS_STATUS = re.compile(r"^(?P<time>(([0-1]\d|2[0-3])[0-5]\d[0-5]\dh|([0-2]\d|3[0-1])([0-1]\d|2[0-3])[0-5]\dz))\s(?P<comment>.*)$")
PATTERN_APRS_POSITION_WEATHER_WX = re.compile(r"""
^(?P<callsign>.+?)\*
(?P<time>(([0-1]\d|2[0-3])[0-5]\d[0-5]\dh|([0-2]\d|3[0-1])([0-1]\d|2[0-3])[0-5]\dz))
(?P<latitude>9000\.00|[0-8]\d{3}\.\d{2})
(?P<latitude_sign>N|S)
(?P<symbol_table>.)
(?P<longitude>18000\.00|1[0-7]\d{3}\.\d{2}|0\d{4}\.\d{2})
(?P<longitude_sign>E|W)
(?P<symbol>_)
(?P<wind_direction>(\d{3}|\.{3}))/
(?P<wind_speed>(\d{3}|\.{3}))
(?:c(?P<wind_direction1>[\d]+)?)?
(?:s(?P<wind_speed2>[\d]+)?)?
(?:g(?P<wind_speed_peak>[\d]+)?)?
(?:r(?P<rainfall_1h>[\d]+)?)?
(?:p(?P<rainfall_24h>[\d]+)?)?
(?:l(?P<luminosity>[\d]+)?)?
(?:L(?P<luminosity2>[\d]+)?)?
(?:P(?P<rain_since_midnight>[\d]+)?)?
(?:t(?P<temperature>[\d]+)?)?
(?:h(?P<humidity>[\d]+)?)?
(?:b(?P<barometric_pressure>[\d]+)?)?
(?P<comment>.*)
$""", re.VERBOSE | re.MULTILINE)
PATTERN_SERVER = re.compile(r"^# aprsc (?P<version>[a-z0-9\.\-]+) (?P<timestamp>\d+ [A-Za-z]+ \d+ \d{2}:\d{2}:\d{2} GMT) (?P<server>[A-Z0-9]+) (?P<ip_address>\d+\.\d+\.\d+\.\d+):(?P<port>\d+)$")