kopia lustrzana https://github.com/projecthorus/horusdemodlib
Report modulation type
rodzic
9f94677067
commit
41e297e4f1
|
@ -1 +1 @@
|
|||
__version__ = "0.3.5"
|
||||
__version__ = "0.3.6"
|
||||
|
|
|
@ -99,9 +99,17 @@ def decode_packet(data:bytes, packet_format:dict = None, ignore_crc:bool = False
|
|||
'packet_format': packet_format,
|
||||
'crc_ok': False,
|
||||
'payload_id': 0,
|
||||
'raw': codecs.encode(data, 'hex').decode().upper()
|
||||
'raw': codecs.encode(data, 'hex').decode().upper(),
|
||||
}
|
||||
|
||||
# Report the modulation type
|
||||
if 'v1' in packet_format['name']:
|
||||
_output['modulation'] = 'Horus Binary v1'
|
||||
elif 'v2' in packet_format['name']:
|
||||
_output['modulation'] = 'Horus Binary v2'
|
||||
else:
|
||||
_output['modulation'] = 'Horus Binary'
|
||||
|
||||
# Check the length provided in the packet format matches up with the length defined by the struct.
|
||||
_struct_length = struct.calcsize(packet_format['struct'])
|
||||
if _struct_length != packet_format['length']:
|
||||
|
@ -261,6 +269,7 @@ def parse_ukhas_string(sentence:str) -> dict:
|
|||
# Produce a dict output which is compatible with the output of the binary decoder.
|
||||
_telem = {
|
||||
'raw': _raw,
|
||||
'modulation': 'RTTY',
|
||||
'callsign': _callsign,
|
||||
'sequence_number': _sequence_number,
|
||||
'time': _time,
|
||||
|
|
|
@ -165,7 +165,11 @@ class SondehubAmateurUploader(object):
|
|||
self.log_debug("Offending datetime_dt: %s" % str(telemetry["time"]))
|
||||
return None
|
||||
|
||||
# Callsign
|
||||
# Callsign - Break if this is an unknown payload ID.
|
||||
if telemetry["callsign"] == "UNKNOWN_PAYLOAD_ID":
|
||||
self.log_error("Not uploading telemetry from unknown payload ID. Is your payload ID list old?")
|
||||
return None
|
||||
|
||||
_output['payload_callsign'] = telemetry["callsign"]
|
||||
|
||||
# Frame Number
|
||||
|
@ -198,6 +202,9 @@ class SondehubAmateurUploader(object):
|
|||
if "raw" in telemetry:
|
||||
_output["raw"] = telemetry["raw"]
|
||||
|
||||
if "modulation" in telemetry:
|
||||
_output["modulation"] = telemetry["modulation"]
|
||||
|
||||
# Add in any field names from the custom field section
|
||||
if "custom_field_names" in telemetry:
|
||||
for _custom_field_name in telemetry["custom_field_names"]:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "horusdemodlib"
|
||||
version = "0.3.5"
|
||||
version = "0.3.6"
|
||||
description = "Project Horus HAB Telemetry Demodulators"
|
||||
authors = ["Mark Jessop"]
|
||||
license = "LGPL-2.1-or-later"
|
||||
|
|
Ładowanie…
Reference in New Issue