Support DFM serials directly

This commit is contained in:
Luke Prior 2022-01-28 17:34:03 +11:00 committed by GitHub
parent 5de89a2462
commit 0a96d2dec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,10 @@ def processReports(data):
# Use the reported serial number for RS41/RS92
if "RS41" in recovery["radiosonde"]["type"] or "RS92" in recovery["radiosonde"]["type"]:
serial = recovery["radiosonde"]["number"]
# Remove D prefix for DFM
elif "DFM" in recovery["radiosonde"]["type"]:
serial = recovery["radiosonde"]["number"][1:]
print(serial)
# Try to find serial in SondeHub database for others
else:
serial = findSonde(recovery, lat, lon)