Disable habitat uploader, add warning when uploading 4FSKTEST telemetry

pull/115/head
Mark Jessop 2022-12-18 17:14:22 +10:30
rodzic b3a4537551
commit 50d7e18bed
5 zmienionych plików z 28 dodań i 18 usunięć

Wyświetl plik

@ -1 +1 @@
__version__ = "0.3.9"
__version__ = "0.3.10"

Wyświetl plik

@ -170,6 +170,9 @@ class SondehubAmateurUploader(object):
self.log_error("Not uploading telemetry from unknown payload ID. Is your payload ID list old?")
return None
if '4FSKTEST' in telemetry['callsign']:
self.log_warning(f"Payload ID {telemetry['callsign']} is for testing purposes only, and should not be used on an actual flight. Refer here: https://github.com/projecthorus/horusdemodlib/wiki#how-do-i-transmit-it")
_output['payload_callsign'] = telemetry["callsign"]
# Frame Number
@ -456,6 +459,13 @@ class SondehubAmateurUploader(object):
"""
logging.error("Sondehub Amateur Uploader - %s" % line)
def log_warning(self, line):
""" Helper function to log a warning message with a descriptive heading.
Args:
line (str): Message to be logged.
"""
logging.warning("Sondehub Amateur Uploader - %s" % line)
if __name__ == "__main__":
# Test Script

Wyświetl plik

@ -121,14 +121,15 @@ def main():
else:
_listener_freq_str = ""
habitat_uploader = HabitatUploader(
user_callsign = user_config['user_call'],
listener_lat = user_config['station_lat'],
listener_lon = user_config['station_lon'],
listener_radio = user_config['radio_comment'] + _listener_freq_str,
listener_antenna = user_config['antenna_comment'],
inhibit=args.noupload
)
# Habitat uploader disabled as of 2022-12-18
# habitat_uploader = HabitatUploader(
# user_callsign = user_config['user_call'],
# listener_lat = user_config['station_lat'],
# listener_lon = user_config['station_lon'],
# listener_radio = user_config['radio_comment'] + _listener_freq_str,
# listener_antenna = user_config['antenna_comment'],
# inhibit=args.noupload
# )
if user_config['station_lat'] == 0.0 and user_config['station_lon'] == 0.0:
_sondehub_user_pos = None
@ -183,7 +184,7 @@ def main():
# Add in frequency estimate, if we have been supplied a receiver frequency.
if args.freq_hz:
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
habitat_uploader.last_freq_hz = _decoded['f_centre']
#habitat_uploader.last_freq_hz = _decoded['f_centre']
# Add in baud rate, if provided.
if args.baud_rate:
@ -193,8 +194,8 @@ def main():
send_payload_summary(_decoded, port=user_config['summary_port'])
# Upload the string to Habitat
_decoded_str = "$$" + data.split('$')[-1] + '\n'
habitat_uploader.add(_decoded_str)
#_decoded_str = "$$" + data.split('$')[-1] + '\n'
#habitat_uploader.add(_decoded_str)
# Upload the string to Sondehub Amateur
sondehub_uploader.add(_decoded)
@ -232,7 +233,7 @@ def main():
# Add in frequency estimate, if we have been supplied a receiver frequency.
if args.freq_hz:
_decoded['f_centre'] = int(demod_stats.fest_mean) + int(args.freq_hz)
habitat_uploader.last_freq_hz = _decoded['f_centre']
#habitat_uploader.last_freq_hz = _decoded['f_centre']
# Add in baud rate, if provided.
if args.baud_rate:
@ -258,7 +259,7 @@ def main():
except KeyboardInterrupt:
logging.info("Caught CTRL-C, exiting.")
habitat_uploader.close()
#habitat_uploader.close()
sondehub_uploader.close()
if __name__ == "__main__":

Wyświetl plik

@ -1,6 +1,6 @@
[tool.poetry]
name = "horusdemodlib"
version = "0.3.9"
version = "0.3.10"
description = "Project Horus HAB Telemetry Demodulators"
authors = ["Mark Jessop"]
license = "LGPL-2.1-or-later"

Wyświetl plik

@ -3,8 +3,7 @@
#
[user]
# Your callsign - used when uploading to the HabHub Tracker.
# Note that we now also upload to the experimental SondeHub Amateur DB as well by default.
# Your callsign - used when uploading to the SondeHub-Amateur Tracker
callsign = YOUR_CALL_HERE
# Your station latitude/longitude, which will show up on tracker.habhub.org.