From ca35e5e8d84c71dc38e244c9d36cb3b64a1624d1 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Tue, 18 Jun 2024 11:06:53 +0930 Subject: [PATCH] More fixes for PS15 sondes. --- auto_rx/autorx/utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/auto_rx/autorx/utils.py b/auto_rx/autorx/utils.py index ac5f3c5..3dd5a44 100644 --- a/auto_rx/autorx/utils.py +++ b/auto_rx/autorx/utils.py @@ -186,6 +186,8 @@ def short_type_lookup(type_name): return "Vaisala " + type_name elif type_name.startswith("DFM"): return "Graw " + type_name + elif type_name == "PS15": + return "Graw PS15" elif type_name.startswith("M10"): return "Meteomodem M10" elif type_name.startswith("M20"): @@ -260,6 +262,8 @@ def short_short_type_lookup(type_name): return "WXR301" elif type_name == "WXRPN9": return "WXR301(PN9)" + elif type_name == "PS15": + return "PS15" else: return "Unknown" @@ -273,7 +277,7 @@ def generate_aprs_id(sonde_data): if ("RS92" in sonde_data["type"]) or ("RS41" in sonde_data["type"]): # We can use the Vaisala sonde ID directly. _object_name = sonde_data["id"].strip() - elif "DFM" in sonde_data["type"]: + elif "DFM" in sonde_data["type"] or "PS15" in sonde_data["type"]: # As per agreement with other radiosonde decoding software developers, we will now # use the DFM serial number verbatim in the APRS ID, prefixed with 'D'. # For recent DFM sondes, this will result in a object ID of: Dyynnnnnn @@ -288,9 +292,6 @@ def generate_aprs_id(sonde_data): # Create the object name _object_name = "D%d" % _dfm_id - # Convert to upper-case hex, and take the last 5 nibbles. - _id_suffix = hex(_dfm_id).upper()[-5:] - elif "M10" in sonde_data["type"]: # Use the generated id same as dxlAPRS _object_name = sonde_data["aprsid"]