summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorPiotr Krysik <perper@o2.pl>2009-05-06 13:54:03 +0200
committerPiotr Krysik <perper@o2.pl>2009-05-06 13:54:03 +0200
commitb464d0b7e16abe2e1a2ff9aad73409c2b42228dd (patch)
tree2c226720fd44636ab9a26b79328e2d6208bee31a /src/python
parent5027749b23b0b4a49d166aee6712b7de01a3d54c (diff)
resampler causes that frequency estimate is getting lower for higher osr
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/gsm_findfcch.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/python/gsm_findfcch.py b/src/python/gsm_findfcch.py
index 7ab9c18..5f85dc2 100755
--- a/src/python/gsm_findfcch.py
+++ b/src/python/gsm_findfcch.py
@@ -16,12 +16,11 @@ class tune(gr.feval_dd):
def __init__(self, top_block):
gr.feval_dd.__init__(self)
self.top_block = top_block
- self.center_freq = 0
+ # self.center_freq = 0
def eval(self, freq_offet):
- self.center_freq = self.center_freq - freq_offet
- self.top_block.set_frequency(self.center_freq)
- return self.center_freq
-
+ # self.center_freq = self.center_freq - freq_offet
+ self.top_block.set_frequency(freq_offet)
+ return freq_offet
class gsm_receiver_first_blood(gr.top_block):
def __init__(self):
@@ -57,13 +56,13 @@ class gsm_receiver_first_blood(gr.top_block):
self.clock_rate = clock_rate
self.input_rate = clock_rate / options.decim
self.gsm_symb_rate = 1625000.0 / 6.0
- self.sps = self.input_rate / self.gsm_symb_rate
+ self.sps = self.input_rate / self.gsm_symb_rate / self.options.osr
def _ustaw_filtr(self):
filter_cutoff = 145e3
filter_t_width = 10e3
offset = 0
- print "input_rate:", self.input_rate, "sample rate:", self.sps, " filter_cutoff:", filter_cutoff, " filter_t_width:", filter_t_width
+ #print "input_rate:", self.input_rate, "sample rate:", self.sps, " filter_cutoff:", filter_cutoff, " filter_t_width:", filter_t_width
filter_taps = gr.firdes.low_pass(1.0, self.input_rate, filter_cutoff, filter_t_width, gr.firdes.WIN_HAMMING)
filtr = gr.freq_xlating_fir_filter_ccf(1, filter_taps, offset, self.input_rate)
return filtr
personal git repositories of Harald Welte. Your mileage may vary