kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Enable TunerAGC and RTL AGC when gain=-2 at RTL-SDR
rodzic
fe8ee53bd6
commit
b2f303e6a7
|
@ -167,7 +167,6 @@ def start_scanner():
|
|||
rtl_fm_path=config["sdr_fm"],
|
||||
rtl_device_idx=_device_idx,
|
||||
gain=autorx.sdr_list[_device_idx]["gain"],
|
||||
agc=autorx.sdr_list[_device_idx]["agc"],
|
||||
ppm=autorx.sdr_list[_device_idx]["ppm"],
|
||||
bias=autorx.sdr_list[_device_idx]["bias"],
|
||||
save_detection_audio=config["save_detection_audio"],
|
||||
|
@ -251,7 +250,6 @@ def start_decoder(freq, sonde_type, continuous=False):
|
|||
rtl_fm_path=config["sdr_fm"],
|
||||
rtl_device_idx=_device_idx,
|
||||
gain=autorx.sdr_list[_device_idx]["gain"],
|
||||
agc=autorx.sdr_list[_device_idx]["agc"],
|
||||
ppm=autorx.sdr_list[_device_idx]["ppm"],
|
||||
bias=autorx.sdr_list[_device_idx]["bias"],
|
||||
# Other options
|
||||
|
|
|
@ -764,7 +764,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
|
|||
_device_idx = config.get(_section, "device_idx")
|
||||
_ppm = round(config.getfloat(_section, "ppm"))
|
||||
_gain = config.getfloat(_section, "gain")
|
||||
_agc = config.getint(_section, "agc")
|
||||
_bias = config.getboolean(_section, "bias")
|
||||
|
||||
if (auto_rx_config["sdr_quantity"] > 1) and (_device_idx == "0"):
|
||||
|
@ -779,7 +778,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
|
|||
auto_rx_config["sdr_settings"][_device_idx] = {
|
||||
"ppm": _ppm,
|
||||
"gain": _gain,
|
||||
"agc" : _agc,
|
||||
"bias": _bias,
|
||||
"in_use": False,
|
||||
"task": None,
|
||||
|
@ -816,7 +814,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
|
|||
"bias": 0,
|
||||
"in_use": False,
|
||||
"task": None,
|
||||
"agc": 0,
|
||||
}
|
||||
|
||||
elif auto_rx_config["sdr_type"] == "KA9Q":
|
||||
|
@ -839,7 +836,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
|
|||
"bias": 0,
|
||||
"in_use": False,
|
||||
"task": None,
|
||||
"agc": 0,
|
||||
}
|
||||
|
||||
logging.critical("Config - KA9Q SDR Support not implemented yet - exiting.")
|
||||
|
|
|
@ -133,7 +133,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx=0,
|
||||
ppm=0,
|
||||
gain=-1,
|
||||
agc=0,
|
||||
bias=False,
|
||||
save_decode_audio=False,
|
||||
save_decode_iq=False,
|
||||
|
@ -201,7 +200,6 @@ class SondeDecoder(object):
|
|||
self.rtl_device_idx = rtl_device_idx
|
||||
self.ppm = ppm
|
||||
self.gain = gain
|
||||
self.agc = agc
|
||||
self.bias = bias
|
||||
self.save_decode_audio = save_decode_audio
|
||||
self.save_decode_iq = save_decode_iq
|
||||
|
@ -378,7 +376,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
highpass = 20,
|
||||
lowpass = 2600
|
||||
|
@ -445,7 +442,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
highpass = 20,
|
||||
lowpass = 2500
|
||||
|
@ -479,7 +475,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
highpass = 20,
|
||||
lowpass = 2000
|
||||
|
@ -508,7 +503,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
highpass = 20
|
||||
)
|
||||
|
@ -535,7 +529,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias
|
||||
)
|
||||
|
||||
|
@ -561,7 +554,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias
|
||||
)
|
||||
|
||||
|
@ -589,7 +581,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias
|
||||
)
|
||||
|
||||
|
@ -626,7 +617,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
fast_filter = True
|
||||
)
|
||||
|
@ -663,7 +653,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
highpass = 20,
|
||||
lowpass = 2600
|
||||
|
@ -690,7 +679,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias
|
||||
)
|
||||
|
||||
|
@ -716,7 +704,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias
|
||||
)
|
||||
|
||||
|
@ -780,7 +767,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -856,7 +842,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -908,7 +893,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -961,7 +945,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -1004,7 +987,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -1045,7 +1027,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -1088,7 +1069,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -1130,7 +1110,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
@ -1177,7 +1156,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
fast_filter = True # Don't use -F9
|
||||
)
|
||||
|
@ -1219,7 +1197,6 @@ class SondeDecoder(object):
|
|||
rtl_device_idx = self.rtl_device_idx,
|
||||
ppm = self.ppm,
|
||||
gain = self.gain,
|
||||
agc = self.agc,
|
||||
bias = self.bias,
|
||||
dc_block = True
|
||||
)
|
||||
|
|
|
@ -236,7 +236,6 @@ def detect_sonde(
|
|||
rtl_device_idx=0,
|
||||
ppm=0,
|
||||
gain=-1,
|
||||
agc=0,
|
||||
bias=False,
|
||||
save_detection_audio=False,
|
||||
ngp_tweak=False,
|
||||
|
@ -325,7 +324,6 @@ def detect_sonde(
|
|||
rtl_fm_path = rtl_fm_path,
|
||||
ppm = ppm,
|
||||
gain = gain,
|
||||
agc = agc,
|
||||
bias = bias,
|
||||
sdr_hostname = sdr_hostname,
|
||||
sdr_port = sdr_port,
|
||||
|
@ -375,7 +373,6 @@ def detect_sonde(
|
|||
rtl_fm_path = rtl_fm_path,
|
||||
ppm = ppm,
|
||||
gain = gain,
|
||||
gac = agc,
|
||||
bias = bias,
|
||||
sdr_hostname = "",
|
||||
sdr_port = 1234,
|
||||
|
@ -645,7 +642,6 @@ class SondeScanner(object):
|
|||
rtl_fm_path="rtl_fm",
|
||||
rtl_device_idx=0,
|
||||
gain=-1,
|
||||
agc=0,
|
||||
ppm=0,
|
||||
bias=False,
|
||||
|
||||
|
@ -735,7 +731,6 @@ class SondeScanner(object):
|
|||
self.rtl_fm_path = rtl_fm_path
|
||||
self.rtl_device_idx = rtl_device_idx
|
||||
self.gain = gain
|
||||
self.agc = agc
|
||||
self.ppm = ppm
|
||||
self.bias = bias
|
||||
|
||||
|
@ -1093,7 +1088,6 @@ class SondeScanner(object):
|
|||
rtl_device_idx=self.rtl_device_idx,
|
||||
ppm=self.ppm,
|
||||
gain=self.gain,
|
||||
agc=self.agc,
|
||||
bias=self.bias,
|
||||
dwell_time=self.detect_dwell_time,
|
||||
save_detection_audio=self.save_detection_audio,
|
||||
|
|
|
@ -192,7 +192,6 @@ def get_sdr_iq_cmd(
|
|||
dc_block: bool = False,
|
||||
ppm = 0,
|
||||
gain = None,
|
||||
agc = None,
|
||||
bias = False,
|
||||
sdr_hostname = "",
|
||||
sdr_port = 5555,
|
||||
|
@ -236,13 +235,11 @@ def get_sdr_iq_cmd(
|
|||
|
||||
if sdr_type == "RTLSDR":
|
||||
_gain = ""
|
||||
_agc = ""
|
||||
if gain:
|
||||
if gain >= 0:
|
||||
_gain = f"-g {gain:.1f} "
|
||||
|
||||
_agc = ""
|
||||
if agc:
|
||||
if agc >= 1:
|
||||
elif gain == -2:
|
||||
_agc = f"-E agc "
|
||||
|
||||
_cmd = (
|
||||
|
|
Ładowanie…
Reference in New Issue