summaryrefslogtreecommitdiff
path: root/gr-noaa/grc/usrp_rx_hrpt.py
diff options
context:
space:
mode:
authorJohnathan Corgan2009-08-29 13:24:58 -0700
committerJohnathan Corgan2009-09-20 09:39:27 -0700
commit225d3141a7f4754eae5a1a041e1d18dc38131772 (patch)
tree348867ff2d6f832edf96df7db072c6590e7424b2 /gr-noaa/grc/usrp_rx_hrpt.py
parent6b6a5522e0b1d12ef5d697b1067a87dfe584cec6 (diff)
downloadgnuradio-225d3141a7f4754eae5a1a041e1d18dc38131772.tar.gz
gnuradio-225d3141a7f4754eae5a1a041e1d18dc38131772.tar.bz2
gnuradio-225d3141a7f4754eae5a1a041e1d18dc38131772.zip
Implemented crude timing recovery using zero crossings but no resampling
Diffstat (limited to 'gr-noaa/grc/usrp_rx_hrpt.py')
-rwxr-xr-xgr-noaa/grc/usrp_rx_hrpt.py35
1 files changed, 16 insertions, 19 deletions
diff --git a/gr-noaa/grc/usrp_rx_hrpt.py b/gr-noaa/grc/usrp_rx_hrpt.py
index ed6417335..5cfaf7842 100755
--- a/gr-noaa/grc/usrp_rx_hrpt.py
+++ b/gr-noaa/grc/usrp_rx_hrpt.py
@@ -2,7 +2,7 @@
##################################################
# Gnuradio Python Flow Graph
# Title: USRP HRPT Receiver
-# Generated: Sat Aug 29 11:48:57 2009
+# Generated: Sat Aug 29 13:16:19 2009
##################################################
from gnuradio import gr
@@ -28,8 +28,8 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
self.sym_rate = sym_rate = 600*1109
self.sample_rate = sample_rate = 64e6/decim
self.sps = sps = sample_rate/sym_rate
- self.sync_alpha = sync_alpha = 0.005
- self.pll_alpha = pll_alpha = 0.005
+ self.sync_alpha = sync_alpha = 0.001
+ self.pll_alpha = pll_alpha = 0.001
self.max_sync_offset = max_sync_offset = 0.01
self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate
self.hs = hs = int(sps/2.0)
@@ -97,7 +97,6 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
# Blocks
##################################################
self.agr = gr.agc_cc(1e-6, 1.0, 1.0, 1.0)
- self.gr_moving_average_xx_0 = gr.moving_average_cc(hs, 1.0/hs, 4000)
self.noaa_hrpt_pll_cc_0 = noaa.hrpt_pll_cc(pll_alpha, pll_alpha**2/4.0, max_carrier_offset)
self.rx_fftsink = fftsink2.fft_sink_c(
self.displays.GetPage(0).GetWin(),
@@ -153,9 +152,9 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
self.wxgui_scopesink2_0_0_0_0 = scopesink2.scope_sink_c(
self.displays.GetPage(2).GetWin(),
title="Post-SYNC",
- sample_rate=sample_rate,
+ sample_rate=sym_rate,
v_scale=0.5,
- t_scale=20.0/sample_rate,
+ t_scale=20.0/sym_rate,
ac_couple=False,
xy_mode=True,
num_inputs=1,
@@ -164,9 +163,9 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
self.wxgui_scopesink2_0_0_1 = scopesink2.scope_sink_c(
self.displays.GetPage(2).GetWin(),
title="Post-SYNC",
- sample_rate=sample_rate,
+ sample_rate=sym_rate,
v_scale=0.5,
- t_scale=20.0/sample_rate,
+ t_scale=20.0/sym_rate,
ac_couple=False,
xy_mode=False,
num_inputs=1,
@@ -178,15 +177,14 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
##################################################
self.connect((self.src, 0), (self.throttle, 0))
self.connect((self.throttle, 0), (self.agr, 0))
- self.connect((self.agr, 0), (self.gr_moving_average_xx_0, 0))
self.connect((self.agr, 0), (self.rx_fftsink, 0))
self.connect((self.agr, 0), (self.wxgui_scopesink2_0, 0))
- self.connect((self.gr_moving_average_xx_0, 0), (self.noaa_hrpt_pll_cc_0, 0))
self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0, 0))
self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0_0, 0))
self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.sync, 0))
self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_1, 0))
self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_0_0, 0))
+ self.connect((self.agr, 0), (self.noaa_hrpt_pll_cc_0, 0))
def set_decim(self, decim):
self.decim = decim
@@ -195,17 +193,17 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
def set_sym_rate(self, sym_rate):
self.sym_rate = sym_rate
self.set_sps(self.sample_rate/self.sym_rate)
+ self.wxgui_scopesink2_0_0_0_0.set_sample_rate(self.sym_rate)
+ self.wxgui_scopesink2_0_0_1.set_sample_rate(self.sym_rate)
def set_sample_rate(self, sample_rate):
self.sample_rate = sample_rate
self.set_sps(self.sample_rate/self.sym_rate)
- self.rx_fftsink.set_sample_rate(self.sample_rate)
- self.wxgui_scopesink2_0.set_sample_rate(self.sample_rate)
self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate)
self.wxgui_scopesink2_0_0.set_sample_rate(self.sample_rate)
- self.wxgui_scopesink2_0_0_1.set_sample_rate(self.sample_rate)
self.wxgui_scopesink2_0_0_0.set_sample_rate(self.sample_rate)
- self.wxgui_scopesink2_0_0_0_0.set_sample_rate(self.sample_rate)
+ self.rx_fftsink.set_sample_rate(self.sample_rate)
+ self.wxgui_scopesink2_0.set_sample_rate(self.sample_rate)
def set_sps(self, sps):
self.sps = sps
@@ -213,17 +211,17 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
def set_sync_alpha(self, sync_alpha):
self.sync_alpha = sync_alpha
- self._sync_alpha_slider.set_value(self.sync_alpha)
- self._sync_alpha_text_box.set_value(self.sync_alpha)
self.sync.set_alpha(self.sync_alpha)
self.sync.set_beta(self.sync_alpha**2/4.0)
+ self._sync_alpha_slider.set_value(self.sync_alpha)
+ self._sync_alpha_text_box.set_value(self.sync_alpha)
def set_pll_alpha(self, pll_alpha):
self.pll_alpha = pll_alpha
- self._pll_alpha_slider.set_value(self.pll_alpha)
- self._pll_alpha_text_box.set_value(self.pll_alpha)
self.noaa_hrpt_pll_cc_0.set_alpha(self.pll_alpha)
self.noaa_hrpt_pll_cc_0.set_beta(self.pll_alpha**2/4.0)
+ self._pll_alpha_slider.set_value(self.pll_alpha)
+ self._pll_alpha_text_box.set_value(self.pll_alpha)
def set_max_sync_offset(self, max_sync_offset):
self.max_sync_offset = max_sync_offset
@@ -235,7 +233,6 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui):
def set_hs(self, hs):
self.hs = hs
- self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")