Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.3 Release #889

Merged
merged 74 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
a96c60d
Restart always_on decoders after 6 hours of no packets. Give addition…
Nov 2, 2023
45a9a86
Merge pull request #833 from darksidelemm/testing
darksidelemm Nov 2, 2023
24b6835
Some intial tests of KA9Q-Radio support (no spectrum yet)
Nov 9, 2023
1d90d0c
bump testing version
Nov 9, 2023
2807232
Add Temp Block button on web controls
Dec 31, 2023
c65d7fc
Merge remote-tracking branch 'upstream/testing' into testing
Dec 31, 2023
9dcb784
Merge pull request #842 from darksidelemm/testing
darksidelemm Dec 31, 2023
5878ad4
Update meisei demod to handle 2024 year
Jan 5, 2024
78e1a55
Merge pull request #846 from darksidelemm/testing
darksidelemm Jan 5, 2024
5a2925d
Bump testing version
Jan 6, 2024
0020333
Merge pull request #848 from darksidelemm/testing
darksidelemm Jan 6, 2024
6c887ce
Fix imperial units on historical page
Jan 24, 2024
e20e7c1
Merge remote-tracking branch 'upstream/testing' into testing
Jan 24, 2024
3bc46f9
Merge pull request #852 from darksidelemm/testing
darksidelemm Jan 24, 2024
0e6af12
Some fixes to statistics generation
Jan 25, 2024
d59081a
Merge pull request #854 from darksidelemm/testing
darksidelemm Jan 25, 2024
96228c4
Write rtl_power log output to user-defined log directory
Jan 27, 2024
49d213e
Add spaces
Jan 27, 2024
1dfb06a
Merge pull request #856 from darksidelemm/testing
darksidelemm Jan 27, 2024
7226c31
Combine export_selected and export_all
argilo Jan 28, 2024
ecc092b
Merge pull request #857 from argilo/refactor-export-all
darksidelemm Jan 28, 2024
52135db
Fix code style
argilo Jan 28, 2024
54ba77e
Remove unused imports
argilo Jan 28, 2024
7d739ab
Replace fastkml & shapely with ElementTree
argilo Jan 29, 2024
6446070
Add "Generate KML" button to the "Historical" page
argilo Jan 29, 2024
2413762
Remove unused code
argilo Jan 30, 2024
65b1da7
Use autorx.log_files to read logs
argilo Jan 30, 2024
e227eea
Move KML generation into autorx.log_files
argilo Jan 30, 2024
209a78a
Replace print statements with logging
argilo Jan 30, 2024
0ea4558
Merge pull request #858 from argilo/web-generate-kml
darksidelemm Jan 30, 2024
58a183d
Generate live KML using ElementTree
argilo Jan 31, 2024
5e2c50c
Show recent sondes at the top of the list
argilo Jan 31, 2024
765947c
Remove unused Habitat code
argilo Jan 31, 2024
468712e
Merge pull request #859 from argilo/web-live-kml-refactor
darksidelemm Jan 31, 2024
8e20b72
Merge pull request #860 from argilo/remove-habitat
darksidelemm Jan 31, 2024
6cf4962
Add sample count to fsk demod stats output, bump testing beta count
Jan 31, 2024
dc367ca
Merge pull request #861 from darksidelemm/testing
darksidelemm Jan 31, 2024
2323ac5
Log the shutdown timeout if set
argilo Jan 31, 2024
a810948
Merge pull request #862 from argilo/log-timeout
darksidelemm Jan 31, 2024
ee54d30
Remove rm log_power line from autorx.sh
Feb 1, 2024
da27f99
Merge pull request #863 from darksidelemm/testing
darksidelemm Feb 1, 2024
74e362b
Rebase m20mod.c
Feb 11, 2024
3a04130
Merge pull request #864 from darksidelemm/testing
darksidelemm Feb 11, 2024
ab398f9
Replace deprecated utcnow() with now()
argilo Mar 27, 2024
51745e7
Merge pull request #867 from argilo/replace-utcnow
darksidelemm Mar 28, 2024
f2201b2
Bump beta version
Mar 29, 2024
a72bcfe
Restore the previous time format in Scan Results
argilo Mar 29, 2024
d784d83
Merge pull request #868 from argilo/time-format
darksidelemm Mar 29, 2024
a9fbe71
Don't update scan chart data until there's actual data
argilo Mar 29, 2024
2e04da0
Merge pull request #869 from argilo/scan-chart-threshold-fix
darksidelemm Mar 29, 2024
3fdea49
Rebase dfm demodulator for better DFM17 handling
May 18, 2024
53dcca3
Merge pull request #875 from darksidelemm/testing
darksidelemm May 18, 2024
111f03f
Rebase both DFM and MP3H1 demods
May 20, 2024
b5e132c
Merge pull request #876 from darksidelemm/testing
darksidelemm May 20, 2024
40b8cfa
auto_rx/build.sh: exit immediatelly on error
pinkavaj May 24, 2024
60f8474
Merge pull request #877 from pinkavaj/pi-ee
darksidelemm May 24, 2024
5809521
delete lms6mod - replaced by lms6Xmod
pinkavaj May 25, 2024
6834391
Merge pull request #879 from pinkavaj/pi-rm
darksidelemm May 25, 2024
bbb4322
Add support for WxR-301 PN9 variant
May 31, 2024
63b2257
Merge pull request #882 from darksidelemm/testing
darksidelemm May 31, 2024
9021501
Fix WXR301-PN9 baud rate
May 31, 2024
dd8a658
Merge pull request #883 from darksidelemm/testing
darksidelemm May 31, 2024
9cdc2cd
Change PN9 variant sonde type name to WxR-301D-5k so it fits on the t…
Jun 2, 2024
228910e
Merge pull request #885 from darksidelemm/testing
darksidelemm Jun 2, 2024
1b7b639
Narrow WXRPN9 mask estimator back to 50 khz
Jun 3, 2024
559b33d
Merge pull request #886 from darksidelemm/testing
darksidelemm Jun 3, 2024
967741d
Rebase dft_detect, bump beta version
Jun 6, 2024
3d9a115
Merge pull request #887 from darksidelemm/testing
darksidelemm Jun 6, 2024
bc2585c
Fix KA9Q support to work with latest commit (2024-06-11)
Jun 15, 2024
6c2a174
Make the test SSRC used for ka9q-radio testing more unique
Jun 16, 2024
07950ae
Merge pull request #890 from darksidelemm/testing
darksidelemm Jun 16, 2024
224eb6a
Prepare for 1.7.3 release
Jun 16, 2024
f42bf24
Merge pull request #891 from darksidelemm/testing
darksidelemm Jun 16, 2024
8a23b2d
Merge branch 'master' into testing
darksidelemm Jun 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ auto_rx/fsk_demod
auto_rx/imet1rs_dft
auto_rx/iq_dec
auto_rx/lms6Xmod
auto_rx/lms6mod
auto_rx/m10mod
auto_rx/m20mod
auto_rx/mk2a1680mod
Expand All @@ -61,7 +60,6 @@ mk2a_lms1680
demod/dfm09ecc
demod/mod/dfm09mod
demod/mod/lms6Xmod
demod/mod/lms6mod
demod/mod/meisei100mod
demod/mod/rs41mod
demod/mod/rs92mod
Expand Down
46 changes: 15 additions & 31 deletions auto_rx/auto_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from autorx.decode import SondeDecoder, VALID_SONDE_TYPES, DRIFTY_SONDE_TYPES
from autorx.logger import TelemetryLogger
from autorx.email_notification import EmailNotification
from autorx.habitat import HabitatUploader
from autorx.aprs import APRSUploader
from autorx.ozimux import OziUploader
from autorx.sondehub import SondehubUploader
Expand Down Expand Up @@ -244,7 +243,7 @@ def start_decoder(freq, sonde_type, continuous=False):
_exp_sonde_type = sonde_type

if continuous:
_timeout = 0
_timeout = 3600*6 # 6 hours before a 'continuous' decoder gets restarted automatically.
else:
_timeout = config["rx_timeout"]

Expand Down Expand Up @@ -445,7 +444,8 @@ def clean_task_list():

else:
# Shutdown the SDR, if required for the particular SDR type.
shutdown_sdr(config["sdr_type"], _task_sdr)
if _key != 'SCAN':
shutdown_sdr(config["sdr_type"], _task_sdr, sdr_hostname=config["sdr_hostname"], frequency=_key)
# Release its associated SDR.
autorx.sdr_list[_task_sdr]["in_use"] = False
autorx.sdr_list[_task_sdr]["task"] = None
Expand Down Expand Up @@ -505,6 +505,12 @@ def stop_all():
for _task in autorx.task_list.keys():
try:
autorx.task_list[_task]["task"].stop()

# Release the SDR channel if necessary
_task_sdr = autorx.task_list[_task]["device_idx"]
if _task != 'SCAN':
shutdown_sdr(config["sdr_type"], _task_sdr, sdr_hostname=config["sdr_hostname"], frequency=_task)

except Exception as e:
logging.error("Error stopping task - %s" % str(e))

Expand Down Expand Up @@ -759,9 +765,6 @@ def main():
)
args = parser.parse_args()

# Copy out timeout value, and convert to seconds,
_timeout = args.timeout * 60

# Copy out RS92 ephemeris value, if provided.
if args.ephemeris != "None":
rs92_ephemeris = args.ephemeris
Expand All @@ -784,7 +787,7 @@ def main():
autorx.logging_path = logging_path

# Configure logging
_log_suffix = datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S_system.log")
_log_suffix = datetime.datetime.now(datetime.timezone.utc).strftime("%Y%m%d-%H%M%S_system.log")
_log_path = os.path.join(logging_path, _log_suffix)

system_log_enabled = False
Expand Down Expand Up @@ -820,6 +823,11 @@ def main():
logging.getLogger("engineio").setLevel(logging.ERROR)
logging.getLogger("geventwebsocket").setLevel(logging.ERROR)

# Copy out timeout value, and convert to seconds.
if args.timeout > 0:
logging.info(f"Will shut down automatically after {args.timeout} minutes.")
_timeout = args.timeout * 60

# Check all the RS utilities exist.
logging.debug("Checking if required binaries exist")
if not check_rs_utils(config):
Expand Down Expand Up @@ -926,30 +934,6 @@ def main():
exporter_objects.append(_email_notification)
exporter_functions.append(_email_notification.add)

# Habitat Uploader - DEPRECATED - Sondehub DB now in use (>1.5.0)
# if config["habitat_enabled"]:

# if config["habitat_upload_listener_position"] is False:
# _habitat_station_position = None
# else:
# _habitat_station_position = (
# config["station_lat"],
# config["station_lon"],
# config["station_alt"],
# )

# _habitat = HabitatUploader(
# user_callsign=config["habitat_uploader_callsign"],
# user_antenna=config["habitat_uploader_antenna"],
# station_position=_habitat_station_position,
# synchronous_upload_time=config["habitat_upload_rate"],
# callsign_validity_threshold=config["payload_id_valid"],
# url=config["habitat_url"],
# )

# exporter_objects.append(_habitat)
# exporter_functions.append(_habitat.add)

# APRS Uploader
if config["aprs_enabled"]:

Expand Down
3 changes: 0 additions & 3 deletions auto_rx/auto_rx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@
# change into appropriate directory
cd $(dirname $0)

# Clean up old files
rm log_power*.csv

python3 auto_rx.py -t 180
3 changes: 1 addition & 2 deletions auto_rx/autorx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
# PATCH - Small changes, or minor feature additions.

__version__ = "1.7.2"

__version__ = "1.7.3"

# Global Variables

Expand Down
18 changes: 9 additions & 9 deletions auto_rx/autorx/aprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def generate_station_object(
_datum = "!w%s%s!" % (_lat_prec, _lon_prec)

# Generate timestamp using current UTC time
_aprs_timestamp = datetime.datetime.utcnow().strftime("%H%M%S")
_aprs_timestamp = datetime.datetime.now(datetime.timezone.utc).strftime("%H%M%S")

# Add version string to position comment, if requested.
_aprs_comment = comment
Expand Down Expand Up @@ -807,10 +807,10 @@ def log_warning(self, line):
# ['frame', 'id', 'datetime', 'lat', 'lon', 'alt', 'temp', 'type', 'freq', 'freq_float', 'datetime_dt']
test_telem = [
# These types of DFM serial IDs are deprecated
# {'id':'DFM06-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.utcnow()},
# {'id':'DFM09-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.utcnow()},
# {'id':'DFM15-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.utcnow()},
# {'id':'DFM17-12345678', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.utcnow()},
# {'id':'DFM06-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.now(datetime.timezone.utc)},
# {'id':'DFM09-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.now(datetime.timezone.utc)},
# {'id':'DFM15-123456', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.now(datetime.timezone.utc)},
# {'id':'DFM17-12345678', 'frame':10, 'lat':-10.0, 'lon':10.0, 'alt':10000, 'temp':1.0, 'type':'DFM', 'freq':'401.520 MHz', 'freq_float':401.52, 'heading':0.0, 'vel_h':5.1, 'vel_v':-5.0, 'datetime_dt':datetime.datetime.now(datetime.timezone.utc)},
{
"id": "DFM-19123456",
"frame": 10,
Expand All @@ -827,7 +827,7 @@ def log_warning(self, line):
"heading": 0.0,
"vel_h": 5.1,
"vel_v": -5.0,
"datetime_dt": datetime.datetime.utcnow(),
"datetime_dt": datetime.datetime.now(datetime.timezone.utc),
},
{
"id": "DFM-123456",
Expand All @@ -845,7 +845,7 @@ def log_warning(self, line):
"heading": 0.0,
"vel_h": 5.1,
"vel_v": -5.0,
"datetime_dt": datetime.datetime.utcnow(),
"datetime_dt": datetime.datetime.now(datetime.timezone.utc),
},
{
"id": "N1234567",
Expand All @@ -863,7 +863,7 @@ def log_warning(self, line):
"heading": 0.0,
"vel_h": 5.1,
"vel_v": -5.0,
"datetime_dt": datetime.datetime.utcnow(),
"datetime_dt": datetime.datetime.now(datetime.timezone.utc),
},
{
"id": "M1234567",
Expand All @@ -881,7 +881,7 @@ def log_warning(self, line):
"heading": 0.0,
"vel_h": 5.1,
"vel_v": -5.0,
"datetime_dt": datetime.datetime.utcnow(),
"datetime_dt": datetime.datetime.now(datetime.timezone.utc),
},
]

Expand Down
44 changes: 7 additions & 37 deletions auto_rx/autorx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
# Web interface credentials
web_password = "none"

# Fixed minimum update rates for APRS & Habitat
# These are set to avoid congestion on the APRS-IS network, and on the Habitat server
# Please respect other users of these networks and leave these settings as they are.
# Fixed minimum update rate for APRS
# This is set to avoid congestion on the APRS-IS network
# Please respect other users of the network and leave this setting as it is.
MINIMUM_APRS_UPDATE_RATE = 30
MINIMUM_HABITAT_UPDATE_RATE = 30


def read_auto_rx_config(filename, no_sdr_test=False):
Expand Down Expand Up @@ -98,12 +97,9 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"radius_temporary_block": False,
# "sonde_time_threshold": 3, # Commented out to ensure warning message is shown.
# Habitat Settings
"habitat_enabled": False,
"habitat_upload_rate": 30,
"habitat_uploader_callsign": "SONDE_AUTO_RX",
"habitat_uploader_antenna": "1/4-wave",
"habitat_upload_listener_position": False,
"habitat_payload_callsign": "<id>",
# APRS Settings
"aprs_enabled": False,
"aprs_upload_rate": 30,
Expand Down Expand Up @@ -166,12 +162,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"save_system_log": False,
"enable_debug_logging": False,
"save_cal_data": False,
# URL for the Habitat DB Server.
# As of July 2018 we send via sondehub.org, which will allow us to eventually transition away
# from using the habhub.org tracker, and leave it for use by High-Altitude Balloon Hobbyists.
# For now, sondehub.org just acts as a proxy to habhub.org.
# This setting is not exposed to users as it's only used for unit/int testing
"habitat_url": "https://habitat.sondehub.org/",
# New Sondehub DB Settings
"sondehub_enabled": True,
"sondehub_upload_rate": 30,
Expand Down Expand Up @@ -298,12 +288,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
auto_rx_config["max_altitude"] = config.getint("filtering", "max_altitude")
auto_rx_config["max_radius_km"] = config.getint("filtering", "max_radius_km")

# Habitat Settings
# Deprecated from v1.5.0
# auto_rx_config["habitat_enabled"] = config.getboolean(
# "habitat", "habitat_enabled"
# )
# auto_rx_config["habitat_upload_rate"] = config.getint("habitat", "upload_rate")
auto_rx_config["habitat_uploader_callsign"] = config.get(
"habitat", "uploader_callsign"
)
Expand All @@ -314,19 +298,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"habitat", "uploader_antenna"
).strip()

# try: # Use the default configuration if not found
# auto_rx_config["habitat_url"] = config.get("habitat", "url")
# except:
# pass

# Deprecated from v1.5.0
# if auto_rx_config["habitat_upload_rate"] < MINIMUM_HABITAT_UPDATE_RATE:
# logging.warning(
# "Config - Habitat Update Rate clipped to minimum of %d seconds. Please be respectful of other users of Habitat."
# % MINIMUM_HABITAT_UPDATE_RATE
# )
# auto_rx_config["habitat_upload_rate"] = MINIMUM_HABITAT_UPDATE_RATE

# APRS Settings
auto_rx_config["aprs_enabled"] = config.getboolean("aprs", "aprs_enabled")
auto_rx_config["aprs_upload_rate"] = config.getint("aprs", "upload_rate")
Expand Down Expand Up @@ -457,7 +428,8 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"MEISEI": True,
"MTS01": False, # Until we test it
"MRZ": False, # .... except for the MRZ, until we know it works.
"WXR301": True, # No fsk_demod chain for this yet.
"WXR301": True,
"WXRPN9": True,
"UDP": False,
}

Expand Down Expand Up @@ -564,7 +536,7 @@ def read_auto_rx_config(filename, no_sdr_test=False):
logging.warning(
"Config - Did not find kml_refresh_rate setting, using default (10 seconds)."
)
auto_rx_config["kml_refresh_rate"] = 11
auto_rx_config["kml_refresh_rate"] = 10

# New Sondehub db Settings
try:
Expand Down Expand Up @@ -867,7 +839,7 @@ def read_auto_rx_config(filename, no_sdr_test=False):
return None

for _n in range(1, auto_rx_config["sdr_quantity"] + 1):
_sdr_name = f"KA9Q{_n:02d}"
_sdr_name = f"KA9Q-{_n:02d}"
auto_rx_config["sdr_settings"][_sdr_name] = {
"ppm": 0,
"gain": 0,
Expand All @@ -876,8 +848,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"task": None,
}

logging.critical("Config - KA9Q SDR Support not implemented yet - exiting.")
return None

else:
logging.critical(f"Config - Unknown SDR Type {auto_rx_config['sdr_type']} - exiting.")
Expand Down
Loading
Loading