diff options
author | Johnathan Corgan | 2009-09-20 19:10:10 -0700 |
---|---|---|
committer | Johnathan Corgan | 2009-09-20 19:10:10 -0700 |
commit | 789435387ab3a886cd33304f4f47d60456765b70 (patch) | |
tree | 19672be400bc4595fe41fa0e52a8a5eb563d0b3f /gr-noaa/apps | |
parent | 2628e9cddc43d57a3346e240c8f7e58722bc61f1 (diff) | |
download | gnuradio-789435387ab3a886cd33304f4f47d60456765b70.tar.gz gnuradio-789435387ab3a886cd33304f4f47d60456765b70.tar.bz2 gnuradio-789435387ab3a886cd33304f4f47d60456765b70.zip |
Updated HRPT receiver to read files recorded as shorts
Diffstat (limited to 'gr-noaa/apps')
-rw-r--r-- | gr-noaa/apps/usrp_rx_hrpt.grc | 718 | ||||
-rwxr-xr-x | gr-noaa/apps/usrp_rx_hrpt.py | 43 |
2 files changed, 488 insertions, 273 deletions
diff --git a/gr-noaa/apps/usrp_rx_hrpt.grc b/gr-noaa/apps/usrp_rx_hrpt.grc index c8e099611..8edc2b4ea 100644 --- a/gr-noaa/apps/usrp_rx_hrpt.grc +++ b/gr-noaa/apps/usrp_rx_hrpt.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Sun Sep 20 12:45:30 2009</timestamp> + <timestamp>Sun Sep 20 19:09:57 2009</timestamp> <block> <key>options</key> <param> @@ -76,22 +76,34 @@ </param> </block> <block> - <key>variable</key> + <key>notebook</key> <param> <key>id</key> - <value>decim</value> + <value>displays</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>16</value> + <key>style</key> + <value>wx.NB_TOP</value> + </param> + <param> + <key>labels</key> + <value>['RX','PLL/SYNC']</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 2</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(186, 10)</value> + <value>(9, 99)</value> </param> <param> <key>_rotation</key> @@ -99,22 +111,30 @@ </param> </block> <block> - <key>variable</key> + <key>gr_file_sink</key> <param> <key>id</key> - <value>hs</value> + <value>gr_file_sink_1</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>int(sps/2.0)</value> + <key>file</key> + <value>frames.dat</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(589, 13)</value> + <value>(1253, 805)</value> </param> <param> <key>_rotation</key> @@ -122,22 +142,18 @@ </param> </block> <block> - <key>variable</key> + <key>noaa_hrpt_deframer</key> <param> <key>id</key> - <value>sym_rate</value> + <value>noaa_hrpt_deframer_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>600*1109</value> - </param> - <param> <key>_coordinate</key> - <value>(383, 7)</value> + <value>(1063, 809)</value> </param> <param> <key>_rotation</key> @@ -145,45 +161,93 @@ </param> </block> <block> - <key>variable</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>sps</value> + <value>wxgui_scopesink2_0_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>sample_rate/sym_rate</value> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Post-PLL</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>t_scale</key> + <value>20.0/sample_rate</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> </param> <param> <key>_coordinate</key> - <value>(479, 11)</value> + <value>(597, 618)</value> </param> <param> <key>_rotation</key> - <value>0</value> + <value>180</value> </param> </block> <block> - <key>variable</key> + <key>gr_moving_average_xx</key> <param> <key>id</key> - <value>sample_rate</value> + <value>matched_filter</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>64e6/decim</value> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>length</key> + <value>hs</value> + </param> + <param> + <key>scale</key> + <value>1.0/hs</value> + </param> + <param> + <key>max_iter</key> + <value>4000</value> </param> <param> <key>_coordinate</key> - <value>(273, 9)</value> + <value>(429, 789)</value> </param> <param> <key>_rotation</key> @@ -191,54 +255,58 @@ </param> </block> <block> - <key>variable_slider</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>pll_alpha</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value>PLL Alpha</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>value</key> - <value>0.001</value> + <key>title</key> + <value>RX Waveform</value> </param> <param> - <key>min</key> - <value>0.0</value> + <key>samp_rate</key> + <value>sample_rate</value> </param> <param> - <key>max</key> - <value>0.5</value> + <key>v_scale</key> + <value>0</value> </param> <param> - <key>num_steps</key> - <value>500</value> + <key>t_scale</key> + <value>20.0/sample_rate</value> </param> <param> - <key>style</key> - <value>wx.SL_HORIZONTAL</value> + <key>ac_couple</key> + <value>False</value> </param> <param> - <key>converver</key> - <value>float_converter</value> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> </param> <param> <key>grid_pos</key> - <value>0, 0, 1, 1</value> + <value>1, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value></value> + <value>displays, 0</value> </param> <param> <key>_coordinate</key> - <value>(192, 100)</value> + <value>(430, 895)</value> </param> <param> <key>_rotation</key> @@ -246,80 +314,78 @@ </param> </block> <block> - <key>variable</key> + <key>wxgui_fftsink2</key> <param> <key>id</key> - <value>max_carrier_offset</value> + <value>rx_fftsink</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>2*math.pi*100e3/sample_rate</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>_coordinate</key> - <value>(671, 14)</value> + <key>title</key> + <value>RX Spectrum</value> </param> <param> - <key>_rotation</key> - <value>0</value> + <key>samp_rate</key> + <value>sample_rate</value> </param> - </block> - <block> - <key>variable</key> <param> - <key>id</key> - <value>max_sync_offset</value> + <key>baseband_freq</key> + <value>1698e6</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>y_per_div</key> + <value>5</value> </param> <param> - <key>value</key> - <value>0.01</value> + <key>y_divs</key> + <value>8</value> </param> <param> - <key>_coordinate</key> - <value>(805, 13)</value> + <key>ref_level</key> + <value>-5</value> </param> <param> - <key>_rotation</key> - <value>0</value> + <key>ref_scale</key> + <value>2.0</value> </param> - </block> - <block> - <key>notebook</key> <param> - <key>id</key> - <value>displays</value> + <key>fft_size</key> + <value>1024</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>fft_rate</key> + <value>30</value> </param> <param> - <key>style</key> - <value>wx.NB_TOP</value> + <key>peak_hold</key> + <value>False</value> </param> <param> - <key>labels</key> - <value>['RX','PLL/SYNC']</value> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0.1</value> </param> <param> <key>grid_pos</key> - <value>1, 0, 1, 2</value> + <value>0, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value></value> + <value>displays, 0</value> </param> <param> <key>_coordinate</key> - <value>(9, 99)</value> + <value>(430, 531)</value> </param> <param> <key>_rotation</key> @@ -327,18 +393,38 @@ </param> </block> <block> - <key>noaa_hrpt_deframer</key> + <key>gr_agc_xx</key> <param> <key>id</key> - <value>noaa_hrpt_deframer_0</value> + <value>agr</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>rate</key> + <value>1e-6</value> + </param> + <param> + <key>reference</key> + <value>1.0</value> + </param> + <param> + <key>gain</key> + <value>1.0</value> + </param> + <param> + <key>max_gain</key> + <value>1.0</value> + </param> + <param> <key>_coordinate</key> - <value>(1112, 649)</value> + <value>(258, 781)</value> </param> <param> <key>_rotation</key> @@ -346,89 +432,92 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>virtual_source</key> <param> <key>id</key> - <value>wxgui_scopesink2_0_0</value> + <value>virtual_source_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>title</key> - <value>Post-PLL</value> + <key>stream_id</key> + <value>samples</value> </param> <param> - <key>samp_rate</key> - <value>sample_rate</value> + <key>_coordinate</key> + <value>(62, 805)</value> </param> <param> - <key>v_scale</key> - <value>0.5</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>parameter</key> <param> - <key>t_scale</key> - <value>20.0/sample_rate</value> + <key>id</key> + <value>filename</value> </param> <param> - <key>ac_couple</key> - <value>False</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>xy_mode</key> - <value>False</value> + <key>label</key> + <value>Filename</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>value</key> + <value>""</value> </param> <param> - <key>grid_pos</key> - <value>0, 0, 1, 1</value> + <key>type</key> + <value>string</value> </param> <param> - <key>notebook</key> - <value>displays, 1</value> + <key>short_id</key> + <value>f</value> </param> <param> <key>_coordinate</key> - <value>(624, 462)</value> + <value>(200, 101)</value> </param> <param> <key>_rotation</key> - <value>180</value> + <value>0</value> </param> </block> <block> - <key>gr_throttle</key> + <key>parameter</key> <param> <key>id</key> - <value>throttle</value> + <value>decim</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>Decimation</value> </param> <param> - <key>samples_per_second</key> - <value>sample_rate</value> + <key>value</key> + <value>16</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>type</key> + <value>intx</value> + </param> + <param> + <key>short_id</key> + <value>d</value> </param> <param> <key>_coordinate</key> - <value>(85, 645)</value> + <value>(304, 101)</value> </param> <param> <key>_rotation</key> @@ -436,78 +525,68 @@ </param> </block> <block> - <key>wxgui_fftsink2</key> + <key>variable</key> <param> <key>id</key> - <value>rx_fftsink</value> + <value>max_sync_offset</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>title</key> - <value>RX Spectrum</value> - </param> - <param> - <key>samp_rate</key> - <value>sample_rate</value> + <key>value</key> + <value>0.01</value> </param> <param> - <key>baseband_freq</key> - <value>1698e6</value> + <key>_coordinate</key> + <value>(705, 19)</value> </param> <param> - <key>y_per_div</key> - <value>5</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <param> - <key>y_divs</key> - <value>8</value> + <key>id</key> + <value>max_carrier_offset</value> </param> <param> - <key>ref_level</key> - <value>-5</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>ref_scale</key> - <value>2.0</value> + <key>value</key> + <value>2*math.pi*100e3/sample_rate</value> </param> <param> - <key>fft_size</key> - <value>1024</value> + <key>_coordinate</key> + <value>(575, 19)</value> </param> <param> - <key>fft_rate</key> - <value>30</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <param> - <key>peak_hold</key> - <value>False</value> + <key>id</key> + <value>hs</value> </param> <param> - <key>average</key> + <key>_enabled</key> <value>True</value> </param> <param> - <key>avg_alpha</key> - <value>0.1</value> - </param> - <param> - <key>grid_pos</key> - <value>0, 0, 1, 1</value> - </param> - <param> - <key>notebook</key> - <value>displays, 0</value> + <key>value</key> + <value>int(sps/2.0)</value> </param> <param> <key>_coordinate</key> - <value>(439, 309)</value> + <value>(499, 19)</value> </param> <param> <key>_rotation</key> @@ -515,58 +594,68 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>variable</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>sps</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>value</key> + <value>sample_rate/sym_rate</value> </param> <param> - <key>title</key> - <value>RX Waveform</value> + <key>_coordinate</key> + <value>(397, 19)</value> </param> <param> - <key>samp_rate</key> - <value>sample_rate</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <param> - <key>v_scale</key> - <value>0</value> + <key>id</key> + <value>sym_rate</value> </param> <param> - <key>t_scale</key> - <value>20.0/sample_rate</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>ac_couple</key> - <value>False</value> + <key>value</key> + <value>600*1109</value> </param> <param> - <key>xy_mode</key> - <value>False</value> + <key>_coordinate</key> + <value>(301, 19)</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <param> - <key>grid_pos</key> - <value>1, 0, 1, 1</value> + <key>id</key> + <value>sample_rate</value> </param> <param> - <key>notebook</key> - <value>displays, 0</value> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>64e6/decim</value> </param> <param> <key>_coordinate</key> - <value>(440, 783)</value> + <value>(198, 17)</value> </param> <param> <key>_rotation</key> @@ -574,38 +663,54 @@ </param> </block> <block> - <key>gr_agc_xx</key> + <key>variable_slider</key> <param> <key>id</key> - <value>agr</value> + <value>pll_alpha</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>PLL Alpha</value> </param> <param> - <key>rate</key> - <value>1e-6</value> + <key>value</key> + <value>0.005</value> </param> <param> - <key>reference</key> - <value>1.0</value> + <key>min</key> + <value>0.0</value> </param> <param> - <key>gain</key> - <value>1.0</value> + <key>max</key> + <value>0.5</value> </param> <param> - <key>max_gain</key> - <value>1.0</value> + <key>num_steps</key> + <value>500</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, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(267, 621)</value> + <value>(447, 99)</value> </param> <param> <key>_rotation</key> @@ -636,7 +741,7 @@ </param> <param> <key>_coordinate</key> - <value>(645, 629)</value> + <value>(624, 789)</value> </param> <param> <key>_rotation</key> @@ -644,30 +749,34 @@ </param> </block> <block> - <key>gr_file_sink</key> + <key>noaa_hrpt_sync_fb</key> <param> <key>id</key> - <value>gr_file_sink_1</value> + <value>noaa_hrpt_sync_fb_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>file</key> - <value>frames.dat</value> + <key>alpha</key> + <value>sync_alpha</value> </param> <param> - <key>type</key> - <value>short</value> + <key>beta</key> + <value>sync_alpha**2/4.0</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>sps</key> + <value>sps</value> + </param> + <param> + <key>max_offset</key> + <value>max_sync_offset</value> </param> <param> <key>_coordinate</key> - <value>(1125, 758)</value> + <value>(832, 781)</value> </param> <param> <key>_rotation</key> @@ -675,34 +784,54 @@ </param> </block> <block> - <key>gr_moving_average_xx</key> + <key>variable_slider</key> <param> <key>id</key> - <value>matched_filter</value> + <value>sync_alpha</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>SYNC Alpha</value> </param> <param> - <key>length</key> - <value>hs</value> + <key>value</key> + <value>0.1</value> </param> <param> - <key>scale</key> - <value>1.0/hs</value> + <key>min</key> + <value>0.0</value> </param> <param> - <key>max_iter</key> - <value>4000</value> + <key>max</key> + <value>0.5</value> + </param> + <param> + <key>num_steps</key> + <value>500</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, 1, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(444, 629)</value> + <value>(593, 98)</value> </param> <param> <key>_rotation</key> @@ -713,7 +842,7 @@ <key>gr_file_source</key> <param> <key>id</key> - <value>src</value> + <value>gr_file_source_0</value> </param> <param> <key>_enabled</key> @@ -721,11 +850,11 @@ </param> <param> <key>file</key> - <value>poes-d16.dat</value> + <value>filename</value> </param> <param> <key>type</key> - <value>complex</value> + <value>short</value> </param> <param> <key>repeat</key> @@ -737,7 +866,7 @@ </param> <param> <key>_coordinate</key> - <value>(79, 541)</value> + <value>(102, 368)</value> </param> <param> <key>_rotation</key> @@ -745,34 +874,53 @@ </param> </block> <block> - <key>noaa_hrpt_sync_fb</key> + <key>virtual_sink</key> <param> <key>id</key> - <value>noaa_hrpt_sync_fb_0</value> + <value>virtual_sink_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>alpha</key> - <value>sync_alpha</value> + <key>stream_id</key> + <value>samples</value> </param> <param> - <key>beta</key> - <value>sync_alpha**2/4.0</value> + <key>_coordinate</key> + <value>(1076, 376)</value> </param> <param> - <key>sps</key> - <value>sps</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>gr_throttle</key> <param> - <key>max_offset</key> - <value>max_sync_offset</value> + <key>id</key> + <value>throttle</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samples_per_second</key> + <value>sample_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(862, 621)</value> + <value>(877, 376)</value> </param> <param> <key>_rotation</key> @@ -780,54 +928,72 @@ </param> </block> <block> - <key>variable_slider</key> + <key>gr_deinterleave</key> <param> <key>id</key> - <value>sync_alpha</value> + <value>gr_deinterleave_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value>SYNC Alpha</value> + <key>type</key> + <value>float</value> </param> <param> - <key>value</key> - <value>0.005</value> + <key>num_streams</key> + <value>2</value> </param> <param> - <key>min</key> - <value>0.0</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>max</key> - <value>0.5</value> + <key>_coordinate</key> + <value>(466, 363)</value> </param> <param> - <key>num_steps</key> - <value>500</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>gr_short_to_float</key> <param> - <key>style</key> - <value>wx.SL_HORIZONTAL</value> + <key>id</key> + <value>gr_short_to_float_0</value> </param> <param> - <key>converver</key> - <value>float_converter</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>grid_pos</key> - <value>0, 1, 1, 1</value> + <key>_coordinate</key> + <value>(278, 380)</value> </param> <param> - <key>notebook</key> - <value></value> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_float_to_complex</key> + <param> + <key>id</key> + <value>gr_float_to_complex_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(344, 101)</value> + <value>(653, 363)</value> </param> <param> <key>_rotation</key> @@ -835,6 +1001,12 @@ </param> </block> <connection> + <source_block_id>virtual_source_0</source_block_id> + <sink_block_id>agr</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> <source_block_id>noaa_hrpt_deframer_0</source_block_id> <sink_block_id>gr_file_sink_1</sink_block_id> <source_key>0</source_key> @@ -871,26 +1043,50 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>throttle</source_block_id> - <sink_block_id>agr</sink_block_id> + <source_block_id>agr</source_block_id> + <sink_block_id>matched_filter</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>matched_filter</source_block_id> + <sink_block_id>noaa_hrpt_pll_cf_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>src</source_block_id> + <source_block_id>gr_float_to_complex_0</source_block_id> <sink_block_id>throttle</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>agr</source_block_id> - <sink_block_id>matched_filter</sink_block_id> + <source_block_id>gr_short_to_float_0</source_block_id> + <sink_block_id>gr_deinterleave_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>matched_filter</source_block_id> - <sink_block_id>noaa_hrpt_pll_cf_0</sink_block_id> + <source_block_id>gr_deinterleave_0</source_block_id> + <sink_block_id>gr_float_to_complex_0</sink_block_id> + <source_key>1</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_deinterleave_0</source_block_id> + <sink_block_id>gr_float_to_complex_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_file_source_0</source_block_id> + <sink_block_id>gr_short_to_float_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>throttle</source_block_id> + <sink_block_id>virtual_sink_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-noaa/apps/usrp_rx_hrpt.py b/gr-noaa/apps/usrp_rx_hrpt.py index 032db315d..6c50a348a 100755 --- a/gr-noaa/apps/usrp_rx_hrpt.py +++ b/gr-noaa/apps/usrp_rx_hrpt.py @@ -2,7 +2,7 @@ ################################################## # Gnuradio Python Flow Graph # Title: USRP HRPT Receiver -# Generated: Sun Sep 20 12:45:30 2009 +# Generated: Sun Sep 20 19:09:57 2009 ################################################## from gnuradio import eng_notation @@ -20,18 +20,23 @@ import wx class usrp_rx_hrpt(grc_wxgui.top_block_gui): - def __init__(self): + def __init__(self, filename="", decim=16): grc_wxgui.top_block_gui.__init__(self, title="USRP HRPT Receiver") ################################################## + # Parameters + ################################################## + self.filename = filename + self.decim = decim + + ################################################## # Variables ################################################## - self.decim = decim = 16 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.001 + self.sync_alpha = sync_alpha = 0.1 + self.pll_alpha = pll_alpha = 0.005 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) @@ -98,7 +103,11 @@ 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_deinterleave_0 = gr.deinterleave(gr.sizeof_float*1) self.gr_file_sink_1 = gr.file_sink(gr.sizeof_short*1, "frames.dat") + self.gr_file_source_0 = gr.file_source(gr.sizeof_short*1, "filename", False) + self.gr_float_to_complex_0 = gr.float_to_complex(1) + self.gr_short_to_float_0 = gr.short_to_float() self.matched_filter = gr.moving_average_cc(hs, 1.0/hs, 4000) self.noaa_hrpt_deframer_0 = noaa.hrpt_deframer() self.noaa_hrpt_pll_cf_0 = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) @@ -119,7 +128,6 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui): peak_hold=False, ) self.displays.GetPage(0).GridAdd(self.rx_fftsink.win, 0, 0, 1, 1) - self.src = gr.file_source(gr.sizeof_gr_complex*1, "poes-d16.dat", False) self.throttle = gr.throttle(gr.sizeof_gr_complex*1, sample_rate) self.wxgui_scopesink2_0 = scopesink2.scope_sink_c( self.displays.GetPage(0).GetWin(), @@ -147,16 +155,23 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui): ################################################## # Connections ################################################## + self.connect((self.throttle, 0), (self.agr, 0)) self.connect((self.noaa_hrpt_deframer_0, 0), (self.gr_file_sink_1, 0)) self.connect((self.noaa_hrpt_sync_fb_0, 0), (self.noaa_hrpt_deframer_0, 0)) self.connect((self.noaa_hrpt_pll_cf_0, 0), (self.noaa_hrpt_sync_fb_0, 0)) self.connect((self.noaa_hrpt_pll_cf_0, 0), (self.wxgui_scopesink2_0_0, 0)) self.connect((self.agr, 0), (self.wxgui_scopesink2_0, 0)) self.connect((self.agr, 0), (self.rx_fftsink, 0)) - self.connect((self.throttle, 0), (self.agr, 0)) - self.connect((self.src, 0), (self.throttle, 0)) self.connect((self.agr, 0), (self.matched_filter, 0)) self.connect((self.matched_filter, 0), (self.noaa_hrpt_pll_cf_0, 0)) + self.connect((self.gr_float_to_complex_0, 0), (self.throttle, 0)) + self.connect((self.gr_short_to_float_0, 0), (self.gr_deinterleave_0, 0)) + self.connect((self.gr_deinterleave_0, 1), (self.gr_float_to_complex_0, 1)) + self.connect((self.gr_deinterleave_0, 0), (self.gr_float_to_complex_0, 0)) + self.connect((self.gr_file_source_0, 0), (self.gr_short_to_float_0, 0)) + + def set_filename(self, filename): + self.filename = filename def set_decim(self, decim): self.decim = decim @@ -168,11 +183,11 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui): def set_sample_rate(self, sample_rate): self.sample_rate = sample_rate - self.set_sps(self.sample_rate/self.sym_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.rx_fftsink.set_sample_rate(self.sample_rate) self.wxgui_scopesink2_0.set_sample_rate(self.sample_rate) + self.rx_fftsink.set_sample_rate(self.sample_rate) + self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) + self.set_sps(self.sample_rate/self.sym_rate) def set_sps(self, sps): self.sps = sps @@ -206,7 +221,11 @@ class usrp_rx_hrpt(grc_wxgui.top_block_gui): if __name__ == '__main__': parser = OptionParser(option_class=eng_option, usage="%prog: [options]") + parser.add_option("-f", "--filename", dest="filename", type="string", default="", + help="Set Filename [default=%default]") + parser.add_option("-d", "--decim", dest="decim", type="intx", default=16, + help="Set Decimation [default=%default]") (options, args) = parser.parse_args() - tb = usrp_rx_hrpt() + tb = usrp_rx_hrpt(filename=options.filename, decim=options.decim) tb.Run(True) |