aboutsummaryrefslogtreecommitdiffstats
path: root/python/receiver
diff options
context:
space:
mode:
authorSteve Glass <smdg@hush.com>2016-03-03 07:39:57 +1000
committerSteve Glass <smdg@hush.com>2016-03-03 18:58:56 +1000
commitd3b40496e87422532187809c3ba6d56d45150706 (patch)
tree8e93a385e6a68239a3c9618c30505293c62d2900 /python/receiver
parent6965a3369978eeeee36847f8f18c30927107cce2 (diff)
Minor fixup of channelizing messages
Diffstat (limited to 'python/receiver')
-rw-r--r--python/receiver/gsm_wideband_input.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/receiver/gsm_wideband_input.py b/python/receiver/gsm_wideband_input.py
index bff7cb7..962d7b0 100644
--- a/python/receiver/gsm_wideband_input.py
+++ b/python/receiver/gsm_wideband_input.py
@@ -54,8 +54,9 @@ class gsm_wideband_input(grgsm.hier_block):
samp_rate_in=samp_rate_in,
)
- c0_arfcn = arfcn.downlink2arfcn(fc, band)
- print("Extracting channels %s, given that the center frequency is at ARFCN %d (%s)" % (str(ca), c0_arfcn, eng_notation.num_to_str(fc)))
+ center_arfcn = arfcn.downlink2arfcn(fc, band)
+ fc_str = eng_notation.num_to_str(fc)
+ print("Extracting channels %s, given center frequency at %sHz (ARFCN %d)" % (str(ca), fc_str, center_arfcn))
self.connect((self, 0), (self.gsm_clock_offset_corrector_0, 0))
@@ -66,7 +67,9 @@ class gsm_wideband_input(grgsm.hier_block):
print("Warning: invalid ARFCN %d for band %s" % (channel, band))
continue
freq_diff = channel_freq - fc
- print("ARFCN %d is at C0 %+d KHz" % (channel, int(freq_diff / 1000.0)))
+ freq_diff_str = "+" if 0 <= freq_diff else ""
+ freq_diff_str += eng_notation.num_to_str(freq_diff)
+ print("ARFCN %d is at %sHz %sHz" % (channel, fc_str, freq_diff_str))
self.blocks_resamplers[channel] = filter.fractional_resampler_cc(0, samp_rate_in/samp_rate_out)
self.blocks_fir_filters[channel] = filter.freq_xlating_fir_filter_ccc(1, self.lpf, freq_diff, samp_rate_in)