From 6db80ec51a30912f0b7f1a38cd3d3d34d5ad902f Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 25 Jul 2021 00:17:27 +0200 Subject: [PATCH] clarify s-meter interval calculations --- csdr/chain/demodulator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csdr/chain/demodulator.py b/csdr/chain/demodulator.py index 4214c4d..fd279ee 100644 --- a/csdr/chain/demodulator.py +++ b/csdr/chain/demodulator.py @@ -15,7 +15,10 @@ class DemodulatorChain(Chain): bp_transition = 320.0 / if_samp_rate self.bandpass = Bandpass(transition=bp_transition, use_fft=True) - self.squelch = Squelch(5, int(if_samp_rate / 6000)) + readings_per_second = 4 + # s-meter readings are available every 1024 samples + # the reporting interval is measured in those 1024-sample blocks + self.squelch = Squelch(5, int(if_samp_rate / (readings_per_second * 1024))) workers = [self.shift, self.decimation]