summaryrefslogtreecommitdiff
path: root/gr-pager
diff options
context:
space:
mode:
Diffstat (limited to 'gr-pager')
-rw-r--r--gr-pager/apps/usrp_rx_flex.grc445
-rwxr-xr-xgr-pager/apps/usrp_rx_flex.py30
2 files changed, 301 insertions, 174 deletions
diff --git a/gr-pager/apps/usrp_rx_flex.grc b/gr-pager/apps/usrp_rx_flex.grc
index 2d16e1cd6..bf3d9abce 100644
--- a/gr-pager/apps/usrp_rx_flex.grc
+++ b/gr-pager/apps/usrp_rx_flex.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Sat Oct 17 11:46:38 2009</timestamp>
+ <timestamp>Thu Oct 29 08:08:45 2009</timestamp>
<block>
<key>options</key>
<param>
@@ -188,6 +188,10 @@
<value>0</value>
</param>
<param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
<key>win_size</key>
<value></value>
</param>
@@ -326,29 +330,6 @@
</param>
</block>
<block>
- <key>gr_quadrature_demod_cf</key>
- <param>
- <key>id</key>
- <value>fm_demod</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>gain</key>
- <value>demod_k</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(599, 774)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_freq_xlating_fir_filter_xxx</key>
<param>
<key>id</key>
@@ -414,6 +395,10 @@
<value>8e3</value>
</param>
<param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
<key>t_scale</key>
<value>20.0/channel_rate</value>
</param>
@@ -513,6 +498,10 @@
<value>0</value>
</param>
<param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
<key>win_size</key>
<value></value>
</param>
@@ -557,64 +546,6 @@
</param>
</block>
<block>
- <key>gr_moving_average_xx</key>
- <param>
- <key>id</key>
- <value>gr_moving_average_xx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>length</key>
- <value>8</value>
- </param>
- <param>
- <key>scale</key>
- <value>1.0/8.0</value>
- </param>
- <param>
- <key>max_iter</key>
- <value>4000</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(831, 758)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable</key>
- <param>
- <key>id</key>
- <value>ma_ntaps</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>value</key>
- <value>channel_rate/symbol_rate</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(833, 851)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>variable</key>
<param>
<key>id</key>
@@ -641,29 +572,6 @@
<key>variable</key>
<param>
<key>id</key>
- <value>nchan_taps</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>value</key>
- <value>len(channel_taps)</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(328, 1009)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable</key>
- <param>
- <key>id</key>
<value>channel_decim</value>
</param>
<param>
@@ -991,61 +899,6 @@
</param>
</block>
<block>
- <key>variable_slider</key>
- <param>
- <key>id</key>
- <value>offset</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Freq. Offset</value>
- </param>
- <param>
- <key>value</key>
- <value>saved_offset</value>
- </param>
- <param>
- <key>min</key>
- <value>-10e3</value>
- </param>
- <param>
- <key>max</key>
- <value>10e3</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>100</value>
- </param>
- <param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
- </param>
- <param>
- <key>converver</key>
- <value>float_converter</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value>0, 3, 1, 1</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(518, 118)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>variable_static_text</key>
<param>
<key>id</key>
@@ -1245,6 +1098,84 @@
</param>
</block>
<block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Freq. Offset</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>saved_offset</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-12.5e3</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>12.5e3</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 3, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(518, 118)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>ma_ntaps</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>channel_rate/symbol_rate</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(833, 851)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
@@ -1264,15 +1195,19 @@
</param>
<param>
<key>samp_rate</key>
- <value>channel_rate</value>
+ <value>16e3</value>
</param>
<param>
<key>v_scale</key>
<value>1</value>
</param>
<param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
<key>t_scale</key>
- <value>40.0/channel_rate</value>
+ <value>40.0/16e3</value>
</param>
<param>
<key>ac_couple</key>
@@ -1300,13 +1235,179 @@
</param>
<param>
<key>_coordinate</key>
- <value>(797, 601)</value>
+ <value>(1029, 586)</value>
</param>
<param>
<key>_rotation</key>
<value>180</value>
</param>
</block>
+ <block>
+ <key>gr_quadrature_demod_cf</key>
+ <param>
+ <key>id</key>
+ <value>fm_demod</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>gain</key>
+ <value>demod_k</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(599, 774)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_moving_average_xx</key>
+ <param>
+ <key>id</key>
+ <value>gr_moving_average_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>length</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1.0/8.0</value>
+ </param>
+ <param>
+ <key>max_iter</key>
+ <value>4000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(815, 676)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blks2_rational_resampler_xxx</key>
+ <param>
+ <key>id</key>
+ <value>blks2_rational_resampler_xxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fff</value>
+ </param>
+ <param>
+ <key>decim</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>interp</key>
+ <value>5</value>
+ </param>
+ <param>
+ <key>taps</key>
+ <value>[1.0/8.0,]*40</value>
+ </param>
+ <param>
+ <key>fractional_bw</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1029, 750)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
+ <param>
+ <key>id</key>
+ <value>virtual_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>baseband</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1260, 774)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>baseband_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>16000</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1019, 17)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>nchan_taps</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>len(channel_taps)</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(412, 931)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>gr_freq_xlating_fir_filter_xxx_0</source_block_id>
<sink_block_id>wxgui_fftsink2_1</sink_block_id>
@@ -1345,8 +1446,26 @@
</connection>
<connection>
<source_block_id>gr_moving_average_xx_0</source_block_id>
+ <sink_block_id>blks2_rational_resampler_xxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_rational_resampler_xxx_0</source_block_id>
<sink_block_id>wxgui_scopesink2_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
+ <connection>
+ <source_block_id>fm_demod</source_block_id>
+ <sink_block_id>blks2_rational_resampler_xxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blks2_rational_resampler_xxx_0</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-pager/apps/usrp_rx_flex.py b/gr-pager/apps/usrp_rx_flex.py
index 73b11f90c..cdc5da200 100755
--- a/gr-pager/apps/usrp_rx_flex.py
+++ b/gr-pager/apps/usrp_rx_flex.py
@@ -2,11 +2,13 @@
##################################################
# Gnuradio Python Flow Graph
# Title: USRP FLEX Pager Receiver (Single Channel)
-# Generated: Sat Oct 17 11:46:38 2009
+# Generated: Thu Oct 29 08:04:51 2009
##################################################
+from gnuradio import blks2
from gnuradio import eng_notation
from gnuradio import gr
+from gnuradio import window
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from gnuradio.wxgui import fftsink2
@@ -147,8 +149,8 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
sizer=_offset_sizer,
value=self.offset,
callback=self.set_offset,
- minimum=-10e3,
- maximum=10e3,
+ minimum=-12.5e3,
+ maximum=12.5e3,
num_steps=100,
style=wx.SL_HORIZONTAL,
cast=float,
@@ -167,9 +169,14 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
##################################################
# Blocks
##################################################
+ self.blks2_rational_resampler_xxx_0 = blks2.rational_resampler_fff(
+ interpolation=5,
+ decimation=8,
+ taps=([1.0/8.0,]*40),
+ fractional_bw=None,
+ )
self.fm_demod = gr.quadrature_demod_cf(demod_k)
self.gr_freq_xlating_fir_filter_xxx_0 = gr.freq_xlating_fir_filter_ccc(channel_decim, (channel_taps), band_freq-freq+offset, sample_rate)
- self.gr_moving_average_xx_0 = gr.moving_average_ff(8, 1.0/8.0, 4000)
self.usrp_source = grc_usrp.simple_source_c(which=0, side="A", rx_ant="RXA")
self.usrp_source.set_decim_rate(decim)
self.usrp_source.set_frequency(band_freq, verbose=True)
@@ -211,6 +218,7 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
title="Channel Waveform",
sample_rate=channel_rate,
v_scale=8e3,
+ v_offset=0,
t_scale=20.0/channel_rate,
ac_couple=False,
xy_mode=False,
@@ -220,9 +228,10 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
self.wxgui_scopesink2_0_0 = scopesink2.scope_sink_f(
self.displays.GetPage(1).GetWin(),
title="Baseband",
- sample_rate=channel_rate,
+ sample_rate=16e3,
v_scale=1,
- t_scale=40.0/channel_rate,
+ v_offset=0,
+ t_scale=40.0/16e3,
ac_couple=False,
xy_mode=False,
num_inputs=1,
@@ -237,8 +246,8 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
self.connect((self.usrp_source, 0), (self.wxgui_fftsink2_0, 0))
self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.wxgui_scopesink2_0, 0))
self.connect((self.gr_freq_xlating_fir_filter_xxx_0, 0), (self.fm_demod, 0))
- self.connect((self.fm_demod, 0), (self.gr_moving_average_xx_0, 0))
- self.connect((self.gr_moving_average_xx_0, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.blks2_rational_resampler_xxx_0, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.fm_demod, 0), (self.blks2_rational_resampler_xxx_0, 0))
def set_config_filename(self, config_filename):
self.config_filename = config_filename
@@ -269,8 +278,8 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
def set_symbol_rate(self, symbol_rate):
self.symbol_rate = symbol_rate
- self.set_ma_ntaps(self.channel_rate/self.symbol_rate)
self.set_passband(2*(self.deviation+self.symbol_rate))
+ self.set_ma_ntaps(self.channel_rate/self.symbol_rate)
def set_saved_channel(self, saved_channel):
self.saved_channel = saved_channel
@@ -308,11 +317,10 @@ class usrp_rx_flex(grc_wxgui.top_block_gui):
self.channel_rate = channel_rate
self.wxgui_scopesink2_0.set_sample_rate(self.channel_rate)
self.wxgui_fftsink2_1.set_sample_rate(self.channel_rate)
- self.set_ma_ntaps(self.channel_rate/self.symbol_rate)
self.set_channel_decim(int(self.sample_rate/self.channel_rate))
self.set_demod_k(3*self.channel_rate/(2*math.pi*self.deviation))
self.set_channel_taps(firdes.low_pass(10, self.sample_rate, self.passband/2.0, (self.channel_rate-self.passband)/2.0))
- self.wxgui_scopesink2_0_0.set_sample_rate(self.channel_rate)
+ self.set_ma_ntaps(self.channel_rate/self.symbol_rate)
def set_channel(self, channel):
self.channel = channel