Adjust SNR averaging settings to avoid weird SNR readings from fading. Stop false landing reports for iMets (temporary solution)

pull/441/head
Mark Jessop 2021-04-10 20:00:55 +09:30
rodzic f22ad78837
commit 92f7d6fae0
5 zmienionych plików z 19 dodań i 11 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ except ImportError:
# 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.5.1"
__version__ = "1.5.2-beta1"
# Global Variables

Wyświetl plik

@ -736,7 +736,7 @@ class SondeDecoder(object):
)
# RS92s transmit continuously - average over the last 2 frames, and use a mean
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=False)
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=True)
self.rx_frequency = _freq
elif self.sonde_type == "DFM":
@ -778,8 +778,8 @@ class SondeDecoder(object):
"./dfm09mod -vv --ecc --json --dist --auto --softin -i 2>/dev/null"
)
# DFM sondes transmit continuously - average over the last 2 frames, and use a mean
demod_stats = FSKDemodStats(averaging_time=1.0, peak_hold=False)
# DFM sondes transmit continuously - average over the last 2 frames, and peak hold
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=True)
self.rx_frequency = _freq
elif self.sonde_type == "M10":
@ -894,8 +894,8 @@ class SondeDecoder(object):
decode_cmd = "./lms6Xmod --json --softin --vit2 -i 2>/dev/null"
# LMS sondes transmit continuously - average over the last 2 frames, and use a mean
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=False)
# LMS sondes transmit continuously - average over the last 2 frames, and use a peak hold
demod_stats = FSKDemodStats(averaging_time=2.0, peak_hold=True)
self.rx_frequency = _freq
elif self.sonde_type == "IMET5":
@ -974,8 +974,8 @@ class SondeDecoder(object):
# MRZ decoder
decode_cmd = "./mp3h1mod --auto --json --softin --ptu 2>/dev/null"
# MRZ sondes transmit continuously - average over the last frame, and use a mean
demod_stats = FSKDemodStats(averaging_time=1.0, peak_hold=False)
# MRZ sondes transmit continuously - average over the last frame, and use a peak hold
demod_stats = FSKDemodStats(averaging_time=1.0, peak_hold=True)
self.rx_frequency = _freq
else:

Wyświetl plik

@ -180,7 +180,7 @@ class EmailNotification(object):
self.sondes[_id]["descent_notified"] == False
):
# If the sonde is below our threshold altitude, *and* is descending at a reasonable rate, increment.
if (telemetry["alt"] < self.landing_altitude_threshold) and (
if (telemetry["alt"] < self.landing_altitude_threshold) and (telemetry["vel_v"] != -9999.0) and (
telemetry["vel_v"] < -2.0
):
self.sondes[_id]["descending_trip"] += 1

Wyświetl plik

@ -125,17 +125,19 @@ class GenericTrack(object):
The track history can be exported to a LineString using the to_line_string method.
"""
def __init__(self, ascent_averaging=6, landing_rate=5.0):
def __init__(self, ascent_averaging=6, landing_rate=5.0, max_elements=None):
""" Create a GenericTrack Object. """
# Averaging rate.
self.ASCENT_AVERAGING = ascent_averaging
# Payload state.
self.landing_rate = landing_rate
self.max_elements = max_elements
self.ascent_rate = 0.0
self.heading = 0.0
self.speed = 0.0
self.is_descending = False
# Internal store of track history data.
# Data is stored as a list-of-lists, with elements of [datetime, lat, lon, alt, comment]
@ -158,6 +160,12 @@ class GenericTrack(object):
_comment = ""
self.track_history.append([_datetime, _lat, _lon, _alt, _comment])
# Clip size of track history if a maximum number of elements is set.
if self.max_elements:
if len(self.track_history) > self.max_elements:
self.track_history = self.track_history[1:]
self.update_states()
return self.get_latest_state()
except ValueError:

Wyświetl plik

@ -468,7 +468,7 @@ def detect_sonde(
_sonde_type = "M10"
elif "M20" in _type:
logging.debug(
"Scanner #%s - Detected a M20 Sonde! (Not yet supported...) (Score: %.2f, Offset: %.1f Hz)"
"Scanner #%s - Detected a M20 Sonde! (Score: %.2f, Offset: %.1f Hz)"
% (str(device_idx), _score, _offset_est)
)
_sonde_type = "M20"