kopia lustrzana https://github.com/projecthorus/horusdemodlib
Send all custom fields via UDP broadcast, add baud rate and modulation details to sondehub uploader
rodzic
a377c0a2c2
commit
84ad11e310
|
@ -1 +1 @@
|
|||
__version__ = "0.3.7"
|
||||
__version__ = "0.3.9"
|
||||
|
|
|
@ -53,6 +53,11 @@ def send_payload_summary(telemetry, port=55672, comment="HorusDemodLib"):
|
|||
if 'speed' in telemetry:
|
||||
packet['speed'] = telemetry['speed']
|
||||
|
||||
# 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"]:
|
||||
if _custom_field_name in telemetry:
|
||||
packet[_custom_field_name] = telemetry[_custom_field_name]
|
||||
|
||||
# Set up our UDP socket
|
||||
_s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
|
|
@ -213,6 +213,12 @@ class SondehubAmateurUploader(object):
|
|||
if "modulation" in telemetry:
|
||||
_output["modulation"] = telemetry["modulation"]
|
||||
|
||||
if "modulation_detail" in telemetry:
|
||||
_output["modulation_detail"] = telemetry["modulation_detail"]
|
||||
|
||||
if "baud_rate" in telemetry:
|
||||
_output["baud_rate"] = telemetry["baud_rate"]
|
||||
|
||||
# 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"]:
|
||||
|
|
|
@ -72,6 +72,7 @@ def main():
|
|||
# parser.add_argument("--summary", type=int, default=-1, help="Override user.cfg UDP Summary output port. (NOT IMPLEMENTED)")
|
||||
parser.add_argument("--freq_hz", type=float, default=None, help="Receiver IQ centre frequency in Hz, used in determine the absolute frequency of a telemetry burst.")
|
||||
parser.add_argument("--freq_target_hz", type=float, default=None, help="Receiver 'target' frequency in Hz, used to add metadata to station position info.")
|
||||
parser.add_argument("--baud_rate", type=int, default=None, help="Modulation baud rate (Hz), used to add additional metadata info.")
|
||||
parser.add_argument("-v", "--verbose", action="store_true", default=False, help="Verbose output (set logging level to DEBUG)")
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -184,6 +185,10 @@ def main():
|
|||
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
|
||||
habitat_uploader.last_freq_hz = _decoded['f_centre']
|
||||
|
||||
# Add in baud rate, if provided.
|
||||
if args.baud_rate:
|
||||
_decoded['baud_rate'] = int(args.baud_rate)
|
||||
|
||||
# Send via UDP
|
||||
send_payload_summary(_decoded, port=user_config['summary_port'])
|
||||
|
||||
|
@ -229,11 +234,15 @@ def main():
|
|||
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
|
||||
habitat_uploader.last_freq_hz = _decoded['f_centre']
|
||||
|
||||
# Add in baud rate, if provided.
|
||||
if args.baud_rate:
|
||||
_decoded['baud_rate'] = int(args.baud_rate)
|
||||
|
||||
# Send via UDP
|
||||
send_payload_summary(_decoded, port=user_config['summary_port'])
|
||||
|
||||
# Upload to Habitat
|
||||
habitat_uploader.add(_decoded['ukhas_str']+'\n')
|
||||
# Do not upload Horus Binary packets to the Habitat endpoint.
|
||||
# habitat_uploader.add(_decoded['ukhas_str']+'\n')
|
||||
|
||||
# Upload the string to Sondehub Amateur
|
||||
sondehub_uploader.add(_decoded)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "horusdemodlib"
|
||||
version = "0.3.7"
|
||||
version = "0.3.9"
|
||||
description = "Project Horus HAB Telemetry Demodulators"
|
||||
authors = ["Mark Jessop"]
|
||||
license = "LGPL-2.1-or-later"
|
||||
|
|
Ładowanie…
Reference in New Issue