diff options
author | Johnathan Corgan | 2009-12-16 09:50:54 -0800 |
---|---|---|
committer | Johnathan Corgan | 2010-01-09 09:40:36 -0800 |
commit | 5928825be7a4f887b27877418ad8c017863c21fc (patch) | |
tree | 340b17e31716b1d8fa83da14a51d3e9cce814f9f /gr-noaa/apps | |
parent | ecbbd26e4ed6181f1e49a330e9039b76b79e7264 (diff) | |
download | gnuradio-5928825be7a4f887b27877418ad8c017863c21fc.tar.gz gnuradio-5928825be7a4f887b27877418ad8c017863c21fc.tar.bz2 gnuradio-5928825be7a4f887b27877418ad8c017863c21fc.zip |
gr-noaa: work-in-progress for LRIT reception
Reworked usrp_rx_lrit to get to constellation
Added file_rx_lrit to read from capture file
Diffstat (limited to 'gr-noaa/apps')
-rw-r--r-- | gr-noaa/apps/Makefile.am | 2 | ||||
-rw-r--r-- | gr-noaa/apps/file_rx_lrit.grc | 1372 | ||||
-rwxr-xr-x | gr-noaa/apps/file_rx_lrit.py | 337 | ||||
-rw-r--r-- | gr-noaa/apps/usrp_rx_lrit.grc | 1312 | ||||
-rwxr-xr-x | gr-noaa/apps/usrp_rx_lrit.py | 426 |
5 files changed, 2816 insertions, 633 deletions
diff --git a/gr-noaa/apps/Makefile.am b/gr-noaa/apps/Makefile.am index e246ba76a..8fb6fbef8 100644 --- a/gr-noaa/apps/Makefile.am +++ b/gr-noaa/apps/Makefile.am @@ -27,6 +27,7 @@ dist_bin_SCRIPTS = \ hrpt_decode.py \ hrpt_demod.py \ file_rx_hrpt.py \ + file_rx_lrit.py \ usrp_rx_hrpt.py \ usrp_rx_hrpt_nogui.py \ usrp_rx_lrit.py @@ -35,6 +36,7 @@ EXTRA_DIST = \ hrpt_decode.grc \ hrpt_demod.grc \ file_rx_hrpt.grc \ + file_rx_lrit.grc \ usrp_rx_hrpt.grc \ usrp_rx_hrpt_nogui.grc \ usrp_rx_lrit.grc diff --git a/gr-noaa/apps/file_rx_lrit.grc b/gr-noaa/apps/file_rx_lrit.grc new file mode 100644 index 000000000..ee6da2a31 --- /dev/null +++ b/gr-noaa/apps/file_rx_lrit.grc @@ -0,0 +1,1372 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Wed Dec 16 09:14:28 2009</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>file_rx_lrit</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>LRIT Receiver (from capture file)</value> + </param> + <param> + <key>author</key> + <value></value> + </param> + <param> + <key>description</key> + <value></value> + </param> + <param> + <key>window_size</key> + <value>4095, 4095</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>symbol_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>293e3</value> + </param> + <param> + <key>_coordinate</key> + <value>(347, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>sps</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>sample_rate/symbol_rate</value> + </param> + <param> + <key>_coordinate</key> + <value>(445, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>config_filename</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>os.environ['HOME']+'/.gnuradio/config.conf'</value> + </param> + <param> + <key>_coordinate</key> + <value>(11, 136)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>import</key> + <param> + <key>id</key> + <value>import_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>import</key> + <value>import os</value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 82)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>sample_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>64e6/decim</value> + </param> + <param> + <key>_coordinate</key> + <value>(249, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>rx_spectrum</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Baseband Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>5</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>50</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 0</value> + </param> + <param> + <key>_coordinate</key> + <value>(267, 556)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_file_source</key> + <param> + <key>id</key> + <value>gr_file_source_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>file</key> + <value>lrit.dat</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>repeat</key> + <value>False</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(79, 729)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</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>(60, 824)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>rx_waveform</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Baseband Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</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>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 0</value> + </param> + <param> + <key>_coordinate</key> + <value>(267, 915)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>gain_mu</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Gain Mu</value> + </param> + <param> + <key>value</key> + <value>saved_gain_mu</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>0.5</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, 1, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(478, 91)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>costas_spectrum</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>PLL Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>-15</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>window.hanning</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 2</value> + </param> + <param> + <key>_coordinate</key> + <value>(916, 535)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_clock_recovery_mm_xx</key> + <param> + <key>id</key> + <value>gr_clock_recovery_mm_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>omega</key> + <value>sps</value> + </param> + <param> + <key>gain_omega</key> + <value>(gain_mu**2)/4.0</value> + </param> + <param> + <key>mu</key> + <value>0.5</value> + </param> + <param> + <key>gain_mu</key> + <value>gain_mu</value> + </param> + <param> + <key>omega_relative_limit</key> + <value>50e-6</value> + </param> + <param> + <key>_coordinate</key> + <value>(915, 789)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>costas_spectrum_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Bit Sync Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>symbol_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>-15</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>window.hanning</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 3</value> + </param> + <param> + <key>_coordinate</key> + <value>(1160, 539)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>notebook</key> + <param> + <key>id</key> + <value>displays</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>style</key> + <value>wx.NB_TOP</value> + </param> + <param> + <key>labels</key> + <value>['USRP RX', 'RRC Filter', 'PLL', 'MM']</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>(15, 206)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>costas_alpha</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Costas Alpha</value> + </param> + <param> + <key>value</key> + <value>saved_costas_alpha</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>0.5</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, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(338, 90)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>costas_waveform</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>PLL Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>v_offset</key> + <value>0</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>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 2</value> + </param> + <param> + <key>_coordinate</key> + <value>(915, 928)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>mm_waveform</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Constellation</value> + </param> + <param> + <key>samp_rate</key> + <value>symbol_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>20.0/symbol_rate</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 3</value> + </param> + <param> + <key>_coordinate</key> + <value>(1160, 922)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_config</key> + <param> + <key>id</key> + <value>saved_costas_alpha</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>0.2</value> + </param> + <param> + <key>type</key> + <value>real</value> + </param> + <param> + <key>config_file</key> + <value>config_filename</value> + </param> + <param> + <key>section</key> + <value>'usrp_rx_lrit'</value> + </param> + <param> + <key>option</key> + <value>'costas_alpha'</value> + </param> + <param> + <key>writeback</key> + <value>costas_alpha</value> + </param> + <param> + <key>_coordinate</key> + <value>(251, 244)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_config</key> + <param> + <key>id</key> + <value>saved_gain_mu</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>0.2</value> + </param> + <param> + <key>type</key> + <value>real</value> + </param> + <param> + <key>config_file</key> + <value>config_filename</value> + </param> + <param> + <key>section</key> + <value>'usrp_rx_lrit'</value> + </param> + <param> + <key>option</key> + <value>'gain_mu'</value> + </param> + <param> + <key>writeback</key> + <value>gain_mu</value> + </param> + <param> + <key>_coordinate</key> + <value>(411, 242)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>parameter</key> + <param> + <key>id</key> + <value>decim</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>Decim</value> + </param> + <param> + <key>value</key> + <value>160</value> + </param> + <param> + <key>type</key> + <value>intx</value> + </param> + <param> + <key>short_id</key> + <value>d</value> + </param> + <param> + <key>_coordinate</key> + <value>(249, 90)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>rrc_spectrum</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>RRC Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>-15</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>window.hanning</value> + </param> + <param> + <key>win_size</key> + <value></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>(705, 534)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_agc_xx</key> + <param> + <key>id</key> + <value>gr_agc_xx_0</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/32767.0</value> + </param> + <param> + <key>max_gain</key> + <value>1.0</value> + </param> + <param> + <key>_coordinate</key> + <value>(273, 800)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>rx_waveform_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>RRC Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>v_offset</key> + <value>0</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>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> + </param> + <param> + <key>_coordinate</key> + <value>(706, 927)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_costas_loop_cc</key> + <param> + <key>id</key> + <value>costas</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>alpha</key> + <value>costas_alpha</value> + </param> + <param> + <key>beta</key> + <value>(costas_alpha**2)/4.0</value> + </param> + <param> + <key>max_freq</key> + <value>50e-6*sps</value> + </param> + <param> + <key>min_freq</key> + <value>-50e-6*sps</value> + </param> + <param> + <key>order</key> + <value>2</value> + </param> + <param> + <key>_coordinate</key> + <value>(706, 792)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>root_raised_cosine_filter</key> + <param> + <key>id</key> + <value>rrc</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>fir_filter_ccf</value> + </param> + <param> + <key>decim</key> + <value>1</value> + </param> + <param> + <key>interp</key> + <value>1</value> + </param> + <param> + <key>gain</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>sym_rate</key> + <value>symbol_rate</value> + </param> + <param> + <key>alpha</key> + <value>0.25</value> + </param> + <param> + <key>ntaps</key> + <value>int(11*sample_rate/symbol_rate)</value> + </param> + <param> + <key>_coordinate</key> + <value>(448, 784)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>rrc</source_block_id> + <sink_block_id>rx_waveform_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>rrc</source_block_id> + <sink_block_id>rrc_spectrum</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_agc_xx_0</source_block_id> + <sink_block_id>rrc</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>rx_waveform</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>rx_spectrum</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_agc_xx_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_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>rrc</source_block_id> + <sink_block_id>costas</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>costas</source_block_id> + <sink_block_id>costas_spectrum</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>costas</source_block_id> + <sink_block_id>costas_waveform</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>costas</source_block_id> + <sink_block_id>gr_clock_recovery_mm_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_clock_recovery_mm_xx_0</source_block_id> + <sink_block_id>costas_spectrum_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_clock_recovery_mm_xx_0</source_block_id> + <sink_block_id>mm_waveform</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/gr-noaa/apps/file_rx_lrit.py b/gr-noaa/apps/file_rx_lrit.py new file mode 100755 index 000000000..9a50631f7 --- /dev/null +++ b/gr-noaa/apps/file_rx_lrit.py @@ -0,0 +1,337 @@ +#!/usr/bin/env python +################################################## +# Gnuradio Python Flow Graph +# Title: LRIT Receiver (from capture file) +# Generated: Wed Dec 16 09:16:13 2009 +################################################## + +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 +from gnuradio.wxgui import forms +from gnuradio.wxgui import scopesink2 +from grc_gnuradio import wxgui as grc_wxgui +from optparse import OptionParser +import ConfigParser +import os +import wx + +class file_rx_lrit(grc_wxgui.top_block_gui): + + def __init__(self, decim=160): + grc_wxgui.top_block_gui.__init__(self, title="LRIT Receiver (from capture file)") + + ################################################## + # Parameters + ################################################## + self.decim = decim + + ################################################## + # Variables + ################################################## + self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' + self.symbol_rate = symbol_rate = 293e3 + self._saved_gain_mu_config = ConfigParser.ConfigParser() + self._saved_gain_mu_config.read(config_filename) + try: saved_gain_mu = self._saved_gain_mu_config.getfloat('usrp_rx_lrit', 'gain_mu') + except: saved_gain_mu = 0.2 + self.saved_gain_mu = saved_gain_mu + self._saved_costas_alpha_config = ConfigParser.ConfigParser() + self._saved_costas_alpha_config.read(config_filename) + try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat('usrp_rx_lrit', 'costas_alpha') + except: saved_costas_alpha = 0.2 + self.saved_costas_alpha = saved_costas_alpha + self.sample_rate = sample_rate = 64e6/decim + self.sps = sps = sample_rate/symbol_rate + self.gain_mu = gain_mu = saved_gain_mu + self.costas_alpha = costas_alpha = saved_costas_alpha + + ################################################## + # Notebooks + ################################################## + self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP) + self.displays.AddPage(grc_wxgui.Panel(self.displays), "USRP RX") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "RRC Filter") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "MM") + self.GridAdd(self.displays, 1, 0, 1, 2) + + ################################################## + # Controls + ################################################## + _gain_mu_sizer = wx.BoxSizer(wx.VERTICAL) + self._gain_mu_text_box = forms.text_box( + parent=self.GetWin(), + sizer=_gain_mu_sizer, + value=self.gain_mu, + callback=self.set_gain_mu, + label="Gain Mu", + converter=forms.float_converter(), + proportion=0, + ) + self._gain_mu_slider = forms.slider( + parent=self.GetWin(), + sizer=_gain_mu_sizer, + value=self.gain_mu, + callback=self.set_gain_mu, + minimum=0, + maximum=0.5, + num_steps=100, + style=wx.SL_HORIZONTAL, + cast=float, + proportion=1, + ) + self.GridAdd(_gain_mu_sizer, 0, 1, 1, 1) + _costas_alpha_sizer = wx.BoxSizer(wx.VERTICAL) + self._costas_alpha_text_box = forms.text_box( + parent=self.GetWin(), + sizer=_costas_alpha_sizer, + value=self.costas_alpha, + callback=self.set_costas_alpha, + label="Costas Alpha", + converter=forms.float_converter(), + proportion=0, + ) + self._costas_alpha_slider = forms.slider( + parent=self.GetWin(), + sizer=_costas_alpha_sizer, + value=self.costas_alpha, + callback=self.set_costas_alpha, + minimum=0, + maximum=0.5, + num_steps=100, + style=wx.SL_HORIZONTAL, + cast=float, + proportion=1, + ) + self.GridAdd(_costas_alpha_sizer, 0, 0, 1, 1) + + ################################################## + # Blocks + ################################################## + self.costas = gr.costas_loop_cc(costas_alpha, (costas_alpha**2)/4.0, 50e-6*sps, -50e-6*sps, 2) + self.costas_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(2).GetWin(), + baseband_freq=0, + y_per_div=10, + y_divs=10, + ref_level=-15, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=30, + average=True, + avg_alpha=None, + title="PLL Spectrum", + peak_hold=False, + win=window.hanning, + ) + self.displays.GetPage(2).GridAdd(self.costas_spectrum.win, 0, 0, 1, 1) + self.costas_spectrum_0 = fftsink2.fft_sink_c( + self.displays.GetPage(3).GetWin(), + baseband_freq=0, + y_per_div=10, + y_divs=10, + ref_level=-15, + ref_scale=2.0, + sample_rate=symbol_rate, + fft_size=1024, + fft_rate=30, + average=True, + avg_alpha=None, + title="Bit Sync Spectrum", + peak_hold=False, + win=window.hanning, + ) + self.displays.GetPage(3).GridAdd(self.costas_spectrum_0.win, 0, 0, 1, 1) + self.costas_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(2).GetWin(), + title="PLL Waveform", + sample_rate=sample_rate, + v_scale=0.5, + v_offset=0, + t_scale=20.0/sample_rate, + ac_couple=False, + xy_mode=False, + num_inputs=1, + ) + self.displays.GetPage(2).GridAdd(self.costas_waveform.win, 1, 0, 1, 1) + self.gr_agc_xx_0 = gr.agc_cc(1e-6, 1.0, 1.0/32767.0, 1.0) + self.gr_clock_recovery_mm_xx_0 = gr.clock_recovery_mm_cc(sps, (gain_mu**2)/4.0, 0.5, gain_mu, 50e-6) + self.gr_file_source_0 = gr.file_source(gr.sizeof_gr_complex*1, "lrit.dat", False) + self.gr_throttle_0 = gr.throttle(gr.sizeof_gr_complex*1, sample_rate) + self.mm_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(3).GetWin(), + title="Constellation", + sample_rate=symbol_rate, + v_scale=0.5, + v_offset=0, + t_scale=20.0/symbol_rate, + ac_couple=False, + xy_mode=True, + num_inputs=1, + ) + self.displays.GetPage(3).GridAdd(self.mm_waveform.win, 1, 0, 1, 1) + self.rrc = gr.fir_filter_ccf(1, firdes.root_raised_cosine( + 1, sample_rate, symbol_rate, 0.25, int(11*sample_rate/symbol_rate))) + self.rrc_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(1).GetWin(), + baseband_freq=0, + y_per_div=10, + y_divs=10, + ref_level=-15, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=30, + average=True, + avg_alpha=None, + title="RRC Spectrum", + peak_hold=False, + win=window.hanning, + ) + self.displays.GetPage(1).GridAdd(self.rrc_spectrum.win, 0, 0, 1, 1) + self.rx_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(0).GetWin(), + baseband_freq=0, + y_per_div=5, + y_divs=10, + ref_level=50, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=15, + average=True, + avg_alpha=None, + title="Baseband Spectrum", + peak_hold=False, + ) + self.displays.GetPage(0).GridAdd(self.rx_spectrum.win, 0, 0, 1, 1) + self.rx_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(0).GetWin(), + title="Baseband Waveform", + sample_rate=sample_rate, + v_scale=0, + v_offset=0, + t_scale=20.0/sample_rate, + ac_couple=False, + xy_mode=False, + num_inputs=1, + ) + self.displays.GetPage(0).GridAdd(self.rx_waveform.win, 1, 0, 1, 1) + self.rx_waveform_0 = scopesink2.scope_sink_c( + self.displays.GetPage(1).GetWin(), + title="RRC Waveform", + sample_rate=sample_rate, + v_scale=0.5, + v_offset=0, + t_scale=20.0/sample_rate, + ac_couple=False, + xy_mode=False, + num_inputs=1, + ) + self.displays.GetPage(1).GridAdd(self.rx_waveform_0.win, 1, 0, 1, 1) + + ################################################## + # Connections + ################################################## + self.connect((self.rrc, 0), (self.rx_waveform_0, 0)) + self.connect((self.rrc, 0), (self.rrc_spectrum, 0)) + self.connect((self.gr_agc_xx_0, 0), (self.rrc, 0)) + self.connect((self.gr_throttle_0, 0), (self.rx_waveform, 0)) + self.connect((self.gr_throttle_0, 0), (self.rx_spectrum, 0)) + self.connect((self.gr_throttle_0, 0), (self.gr_agc_xx_0, 0)) + self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 0)) + self.connect((self.rrc, 0), (self.costas, 0)) + self.connect((self.costas, 0), (self.costas_spectrum, 0)) + self.connect((self.costas, 0), (self.costas_waveform, 0)) + self.connect((self.costas, 0), (self.gr_clock_recovery_mm_xx_0, 0)) + self.connect((self.gr_clock_recovery_mm_xx_0, 0), (self.costas_spectrum_0, 0)) + self.connect((self.gr_clock_recovery_mm_xx_0, 0), (self.mm_waveform, 0)) + + def set_decim(self, decim): + self.decim = decim + self.set_sample_rate(64e6/self.decim) + + def set_config_filename(self, config_filename): + self.config_filename = config_filename + self._saved_costas_alpha_config = ConfigParser.ConfigParser() + self._saved_costas_alpha_config.read(self.config_filename) + if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'): + self._saved_costas_alpha_config.add_section('usrp_rx_lrit') + self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha)) + self._saved_costas_alpha_config.write(open(self.config_filename, 'w')) + self._saved_gain_mu_config = ConfigParser.ConfigParser() + self._saved_gain_mu_config.read(self.config_filename) + if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'): + self._saved_gain_mu_config.add_section('usrp_rx_lrit') + self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu)) + self._saved_gain_mu_config.write(open(self.config_filename, 'w')) + + def set_symbol_rate(self, symbol_rate): + self.symbol_rate = symbol_rate + self.set_sps(self.sample_rate/self.symbol_rate) + self.costas_spectrum_0.set_sample_rate(self.symbol_rate) + self.mm_waveform.set_sample_rate(self.symbol_rate) + self.rrc.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate))) + + def set_saved_gain_mu(self, saved_gain_mu): + self.saved_gain_mu = saved_gain_mu + self.set_gain_mu(self.saved_gain_mu) + + def set_saved_costas_alpha(self, saved_costas_alpha): + self.saved_costas_alpha = saved_costas_alpha + self.set_costas_alpha(self.saved_costas_alpha) + + def set_sample_rate(self, sample_rate): + self.sample_rate = sample_rate + self.set_sps(self.sample_rate/self.symbol_rate) + self.rx_spectrum.set_sample_rate(self.sample_rate) + self.rx_waveform.set_sample_rate(self.sample_rate) + self.costas_spectrum.set_sample_rate(self.sample_rate) + self.costas_waveform.set_sample_rate(self.sample_rate) + self.rrc_spectrum.set_sample_rate(self.sample_rate) + self.rx_waveform_0.set_sample_rate(self.sample_rate) + self.rrc.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate))) + + def set_sps(self, sps): + self.sps = sps + self.gr_clock_recovery_mm_xx_0.set_omega(self.sps) + + def set_gain_mu(self, gain_mu): + self.gain_mu = gain_mu + self._gain_mu_slider.set_value(self.gain_mu) + self._gain_mu_text_box.set_value(self.gain_mu) + self.gr_clock_recovery_mm_xx_0.set_gain_omega((self.gain_mu**2)/4.0) + self.gr_clock_recovery_mm_xx_0.set_gain_mu(self.gain_mu) + self._saved_gain_mu_config = ConfigParser.ConfigParser() + self._saved_gain_mu_config.read(self.config_filename) + if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'): + self._saved_gain_mu_config.add_section('usrp_rx_lrit') + self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu)) + self._saved_gain_mu_config.write(open(self.config_filename, 'w')) + + def set_costas_alpha(self, costas_alpha): + self.costas_alpha = costas_alpha + self._costas_alpha_slider.set_value(self.costas_alpha) + self._costas_alpha_text_box.set_value(self.costas_alpha) + self._saved_costas_alpha_config = ConfigParser.ConfigParser() + self._saved_costas_alpha_config.read(self.config_filename) + if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'): + self._saved_costas_alpha_config.add_section('usrp_rx_lrit') + self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha)) + self._saved_costas_alpha_config.write(open(self.config_filename, 'w')) + self.costas.set_alpha(self.costas_alpha) + self.costas.set_beta((self.costas_alpha**2)/4.0) + +if __name__ == '__main__': + parser = OptionParser(option_class=eng_option, usage="%prog: [options]") + parser.add_option("-d", "--decim", dest="decim", type="intx", default=160, + help="Set Decim [default=%default]") + (options, args) = parser.parse_args() + tb = file_rx_lrit(decim=options.decim) + tb.Run(True) + diff --git a/gr-noaa/apps/usrp_rx_lrit.grc b/gr-noaa/apps/usrp_rx_lrit.grc index 55fe39787..aca10039a 100644 --- a/gr-noaa/apps/usrp_rx_lrit.grc +++ b/gr-noaa/apps/usrp_rx_lrit.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Sat Aug 29 11:26:03 2009</timestamp> + <timestamp>Wed Dec 16 09:47:16 2009</timestamp> <block> <key>options</key> <param> @@ -36,6 +36,10 @@ <value>Custom</value> </param> <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> <key>run</key> <value>True</value> </param> @@ -56,7 +60,7 @@ <key>variable</key> <param> <key>id</key> - <value>samp_rate</value> + <value>sample_rate</value> </param> <param> <key>_enabled</key> @@ -68,7 +72,7 @@ </param> <param> <key>_coordinate</key> - <value>(10, 81)</value> + <value>(245, 9)</value> </param> <param> <key>_rotation</key> @@ -91,7 +95,7 @@ </param> <param> <key>_coordinate</key> - <value>(11, 148)</value> + <value>(351, 9)</value> </param> <param> <key>_rotation</key> @@ -110,11 +114,57 @@ </param> <param> <key>value</key> - <value>samp_rate/symbol_rate</value> + <value>sample_rate/symbol_rate</value> + </param> + <param> + <key>_coordinate</key> + <value>(456, 9)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>import</key> + <param> + <key>id</key> + <value>import_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>import</key> + <value>import os</value> + </param> + <param> + <key>_coordinate</key> + <value>(9, 83)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>config_filename</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>os.environ['HOME']+'/.gnuradio/config.conf'</value> </param> <param> <key>_coordinate</key> - <value>(12, 214)</value> + <value>(10, 142)</value> </param> <param> <key>_rotation</key> @@ -125,7 +175,7 @@ <key>variable_text_box</key> <param> <key>id</key> - <value>decim</value> + <value>freq</value> </param> <param> <key>_enabled</key> @@ -133,15 +183,15 @@ </param> <param> <key>label</key> - <value>Decim</value> + <value>Frequency</value> </param> <param> <key>value</key> - <value>saved_decim</value> + <value>saved_freq</value> </param> <param> <key>converver</key> - <value>int_converter</value> + <value>float_converter</value> </param> <param> <key>formatter</key> @@ -157,7 +207,7 @@ </param> <param> <key>_coordinate</key> - <value>(243, 13)</value> + <value>(247, 149)</value> </param> <param> <key>_rotation</key> @@ -165,58 +215,85 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>variable_config</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>saved_freq</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>value</key> + <value>1691e6</value> + </param> + <param> <key>type</key> - <value>complex</value> + <value>real</value> </param> <param> - <key>title</key> - <value>Waveform</value> + <key>config_file</key> + <value>config_filename</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>section</key> + <value>'usrp_rx_lrit'</value> </param> <param> - <key>v_scale</key> - <value>0.5</value> + <key>option</key> + <value>'freq'</value> </param> <param> - <key>t_scale</key> - <value>20.0/samp_rate</value> + <key>writeback</key> + <value>freq</value> </param> <param> - <key>ac_couple</key> - <value>False</value> + <key>_coordinate</key> + <value>(246, 299)</value> </param> <param> - <key>xy_mode</key> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_config</key> + <param> + <key>id</key> + <value>saved_offset</value> + </param> + <param> + <key>_enabled</key> <value>True</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>value</key> + <value>0</value> </param> <param> - <key>grid_pos</key> - <value>1, 0, 1, 1</value> + <key>type</key> + <value>real</value> </param> <param> - <key>notebook</key> - <value>displays, 0</value> + <key>config_file</key> + <value>config_filename</value> + </param> + <param> + <key>section</key> + <value>'usrp_rx_lrit'</value> + </param> + <param> + <key>option</key> + <value>'offset'</value> + </param> + <param> + <key>writeback</key> + <value>offset</value> </param> <param> <key>_coordinate</key> - <value>(434, 551)</value> + <value>(406, 300)</value> </param> <param> <key>_rotation</key> @@ -224,38 +301,54 @@ </param> </block> <block> - <key>gr_agc_xx</key> + <key>variable_slider</key> <param> <key>id</key> - <value>gr_agc_xx_0</value> + <value>offset</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>Offset</value> </param> <param> - <key>rate</key> - <value>1e-6</value> + <key>value</key> + <value>saved_offset</value> </param> <param> - <key>reference</key> - <value>1.0</value> + <key>min</key> + <value>-50e3</value> </param> <param> - <key>gain</key> - <value>1.0/32767.0</value> + <key>max</key> + <value>50e3</value> </param> <param> - <key>max_gain</key> - <value>1.0</value> + <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, 1, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(261, 493)</value> + <value>(390, 149)</value> </param> <param> <key>_rotation</key> @@ -263,50 +356,54 @@ </param> </block> <block> - <key>root_raised_cosine_filter</key> + <key>variable_slider</key> <param> <key>id</key> - <value>root_raised_cosine_filter_0</value> + <value>costas_alpha</value> </param> <param> <key>_enabled</key> - <value>False</value> + <value>True</value> </param> <param> - <key>type</key> - <value>fir_filter_ccf</value> + <key>label</key> + <value>Costas Alpha</value> </param> <param> - <key>decim</key> - <value>1</value> + <key>value</key> + <value>saved_costas_alpha</value> </param> <param> - <key>interp</key> - <value>1</value> + <key>min</key> + <value>0</value> </param> <param> - <key>gain</key> - <value>1</value> + <key>max</key> + <value>0.5</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>num_steps</key> + <value>100</value> </param> <param> - <key>sym_rate</key> - <value>symbol_rate</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>alpha</key> - <value>0.5</value> + <key>converver</key> + <value>float_converter</value> </param> <param> - <key>ntaps</key> - <value>50</value> + <key>grid_pos</key> + <value>1, 1, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(618, 373)</value> + <value>(813, 152)</value> </param> <param> <key>_rotation</key> @@ -314,58 +411,54 @@ </param> </block> <block> - <key>usrp_simple_source_x</key> + <key>variable_slider</key> <param> <key>id</key> - <value>usrp_simple_source_x_0</value> + <value>gain_mu</value> </param> <param> <key>_enabled</key> - <value>False</value> + <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>Gain Mu</value> </param> <param> - <key>format</key> - <value></value> + <key>value</key> + <value>saved_gain_mu</value> </param> <param> - <key>which</key> + <key>min</key> <value>0</value> </param> <param> - <key>decimation</key> - <value>decim</value> - </param> - <param> - <key>frequency</key> - <value>freq</value> + <key>max</key> + <value>0.5</value> </param> <param> - <key>lo_offset</key> - <value>float('inf')</value> + <key>num_steps</key> + <value>100</value> </param> <param> - <key>gain</key> - <value>gain</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>side</key> - <value>B</value> + <key>converver</key> + <value>float_converter</value> </param> <param> - <key>rx_ant</key> - <value>RXA</value> + <key>grid_pos</key> + <value>1, 2, 1, 1</value> </param> <param> - <key>hb_filters</key> + <key>notebook</key> <value></value> </param> <param> <key>_coordinate</key> - <value>(11, 477)</value> + <value>(957, 151)</value> </param> <param> <key>_rotation</key> @@ -373,74 +466,85 @@ </param> </block> <block> - <key>wxgui_fftsink2</key> + <key>variable_config</key> <param> <key>id</key> - <value>wxgui_fftsink2_0</value> + <value>saved_gain</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>value</key> + <value>33</value> + </param> + <param> <key>type</key> - <value>complex</value> + <value>real</value> </param> <param> - <key>title</key> - <value>Spectrum</value> + <key>config_file</key> + <value>config_filename</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>section</key> + <value>'usrp_rx_lrit'</value> </param> <param> - <key>baseband_freq</key> - <value>freq</value> + <key>option</key> + <value>'gain'</value> </param> <param> - <key>y_per_div</key> - <value>10</value> + <key>writeback</key> + <value>gain</value> </param> <param> - <key>y_divs</key> - <value>10</value> + <key>_coordinate</key> + <value>(565, 300)</value> </param> <param> - <key>ref_level</key> - <value>50</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable_config</key> <param> - <key>fft_size</key> - <value>1024</value> + <key>id</key> + <value>saved_decim</value> </param> <param> - <key>fft_rate</key> - <value>30</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>peak_hold</key> - <value>False</value> + <key>value</key> + <value>160</value> </param> <param> - <key>average</key> - <value>False</value> + <key>type</key> + <value>int</value> </param> <param> - <key>avg_alpha</key> - <value>0</value> + <key>config_file</key> + <value>config_filename</value> </param> <param> - <key>grid_pos</key> - <value>0, 0, 1, 1</value> + <key>section</key> + <value>'usrp_rx_lrit'</value> </param> <param> - <key>notebook</key> - <value>displays, 0</value> + <key>option</key> + <value>'decim'</value> + </param> + <param> + <key>writeback</key> + <value>decim</value> </param> <param> <key>_coordinate</key> - <value>(434, 337)</value> + <value>(725, 300)</value> </param> <param> <key>_rotation</key> @@ -448,30 +552,42 @@ </param> </block> <block> - <key>gr_throttle</key> + <key>variable_text_box</key> <param> <key>id</key> - <value>gr_throttle_0</value> + <value>decim</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>label</key> + <value>Decim</value> </param> <param> - <key>samples_per_second</key> - <value>samp_rate</value> + <key>value</key> + <value>saved_decim</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>converver</key> + <value>int_converter</value> + </param> + <param> + <key>formatter</key> + <value>None</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 2, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(181, 663)</value> + <value>(672, 151)</value> </param> <param> <key>_rotation</key> @@ -479,58 +595,85 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>variable_config</key> <param> <key>id</key> - <value>wxgui_scopesink2_1</value> + <value>saved_costas_alpha</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>value</key> + <value>0.005</value> + </param> + <param> <key>type</key> - <value>complex</value> + <value>real</value> </param> <param> - <key>title</key> - <value>Scope Plot</value> + <key>config_file</key> + <value>config_filename</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>section</key> + <value>'usrp_rx_lrit'</value> </param> <param> - <key>v_scale</key> - <value>0.4</value> + <key>option</key> + <value>'costas_alpha'</value> </param> <param> - <key>t_scale</key> - <value>20.0/samp_rate</value> + <key>writeback</key> + <value>costas_alpha</value> </param> <param> - <key>ac_couple</key> - <value>False</value> + <key>_coordinate</key> + <value>(885, 298)</value> </param> <param> - <key>xy_mode</key> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_config</key> + <param> + <key>id</key> + <value>saved_gain_mu</value> + </param> + <param> + <key>_enabled</key> <value>True</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>value</key> + <value>0.005</value> </param> <param> - <key>grid_pos</key> - <value>0, 0, 1, 1</value> + <key>type</key> + <value>real</value> </param> <param> - <key>notebook</key> - <value>displays, 1</value> + <key>config_file</key> + <value>config_filename</value> + </param> + <param> + <key>section</key> + <value>'usrp_rx_lrit'</value> + </param> + <param> + <key>option</key> + <value>'gain_mu'</value> + </param> + <param> + <key>writeback</key> + <value>gain_mu</value> </param> <param> <key>_coordinate</key> - <value>(1126, 251)</value> + <value>(1046, 298)</value> </param> <param> <key>_rotation</key> @@ -538,30 +681,42 @@ </param> </block> <block> - <key>gr_probe_mpsk_snr_c</key> + <key>variable_config</key> <param> <key>id</key> - <value>gr_probe_mpsk_snr_c_0</value> + <value>side</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> + <key>value</key> + <value>'A'</value> + </param> + <param> <key>type</key> - <value>snr</value> + <value>string</value> </param> <param> - <key>alpha</key> - <value>0.0001</value> + <key>config_file</key> + <value>config_filename</value> </param> <param> - <key>probe_rate</key> - <value>10</value> + <key>section</key> + <value>'usrp_rx_lrit'</value> + </param> + <param> + <key>option</key> + <value>'side'</value> + </param> + <param> + <key>writeback</key> + <value>side</value> </param> <param> <key>_coordinate</key> - <value>(1126, 723)</value> + <value>(1102, 152)</value> </param> <param> <key>_rotation</key> @@ -569,10 +724,10 @@ </param> </block> <block> - <key>wxgui_numbersink2</key> + <key>gr_agc_xx</key> <param> <key>id</key> - <value>wxgui_numbersink2_0</value> + <value>gr_agc_xx_0</value> </param> <param> <key>_enabled</key> @@ -580,71 +735,94 @@ </param> <param> <key>type</key> - <value>float</value> + <value>complex</value> </param> <param> - <key>title</key> - <value>SNR</value> + <key>rate</key> + <value>1e-6</value> + </param> + <param> + <key>reference</key> + <value>1.0</value> </param> <param> - <key>units</key> - <value>dB</value> + <key>gain</key> + <value>1.0/32767.0</value> </param> <param> - <key>samp_rate</key> - <value>10</value> + <key>max_gain</key> + <value>1.0</value> </param> <param> - <key>min_value</key> + <key>_coordinate</key> + <value>(286, 729)</value> + </param> + <param> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>wxgui_scopesink2</key> <param> - <key>max_value</key> - <value>30</value> + <key>id</key> + <value>rx_waveform</value> </param> <param> - <key>factor</key> - <value>1.0</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>decimal_places</key> - <value>1</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>ref_level</key> + <key>title</key> + <value>RX Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> <value>0</value> </param> <param> - <key>number_rate</key> - <value>10</value> + <key>v_offset</key> + <value>0</value> </param> <param> - <key>peak_hold</key> + <key>t_scale</key> + <value>20.0/sample_rate</value> + </param> + <param> + <key>ac_couple</key> <value>False</value> </param> <param> - <key>average</key> + <key>xy_mode</key> <value>False</value> </param> <param> - <key>avg_alpha</key> - <value>0</value> + <key>num_inputs</key> + <value>1</value> </param> <param> - <key>show_gauge</key> - <value>True</value> + <key>win_size</key> + <value></value> </param> <param> <key>grid_pos</key> - <value>2, 0, 1, 1</value> + <value>1, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value>displays, 1</value> + <value>displays, 0</value> </param> <param> <key>_coordinate</key> - <value>(1335, 651)</value> + <value>(281, 862)</value> </param> <param> <key>_rotation</key> @@ -652,62 +830,86 @@ </param> </block> <block> - <key>gr_mpsk_receiver_cc</key> + <key>wxgui_fftsink2</key> <param> <key>id</key> - <value>gr_mpsk_receiver_cc_0</value> + <value>rx_spectrum</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>M</key> - <value>2</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>theta</key> - <value>0</value> + <key>title</key> + <value>RX Spectrum</value> </param> <param> - <key>alpha</key> - <value>costas_alpha</value> + <key>samp_rate</key> + <value>sample_rate</value> </param> <param> - <key>beta</key> - <value>costas_alpha*costas_alpha/4.0</value> + <key>baseband_freq</key> + <value>freq</value> </param> <param> - <key>fmin</key> - <value>-0.05</value> + <key>y_per_div</key> + <value>10</value> </param> <param> - <key>fmax</key> - <value>0.05</value> + <key>y_divs</key> + <value>10</value> </param> <param> - <key>mu</key> - <value>0.5</value> + <key>ref_level</key> + <value>50</value> </param> <param> - <key>gain_mu</key> - <value>gain_mu</value> + <key>ref_scale</key> + <value>2.0</value> </param> <param> - <key>omega</key> - <value>sps</value> + <key>fft_size</key> + <value>1024</value> </param> <param> - <key>gain_omega</key> - <value>gain_mu*gain_mu/4.0</value> + <key>fft_rate</key> + <value>30</value> </param> <param> - <key>omega_relative_limit</key> - <value>0.05</value> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 0</value> </param> <param> <key>_coordinate</key> - <value>(881, 437)</value> + <value>(280, 468)</value> </param> <param> <key>_rotation</key> @@ -715,22 +917,50 @@ </param> </block> <block> - <key>gr_complex_to_real</key> + <key>root_raised_cosine_filter</key> <param> <key>id</key> - <value>gr_complex_to_real_0</value> + <value>root_raised_cosine_filter_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>vlen</key> + <key>type</key> + <value>fir_filter_ccf</value> + </param> + <param> + <key>decim</key> <value>1</value> </param> <param> + <key>interp</key> + <value>1</value> + </param> + <param> + <key>gain</key> + <value>1</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>sym_rate</key> + <value>symbol_rate</value> + </param> + <param> + <key>alpha</key> + <value>0.25</value> + </param> + <param> + <key>ntaps</key> + <value>int(11*sample_rate/symbol_rate)</value> + </param> + <param> <key>_coordinate</key> - <value>(1133, 521)</value> + <value>(472, 713)</value> </param> <param> <key>_rotation</key> @@ -738,37 +968,66 @@ </param> </block> <block> - <key>gr_char_to_float</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>gr_char_to_float_0</value> + <value>rrc_waveform</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>_coordinate</key> - <value>(1523, 521)</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>_rotation</key> + <key>title</key> + <value>RRC Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>v_offset</key> <value>0</value> </param> - </block> - <block> - <key>gr_binary_slicer_fb</key> <param> - <key>id</key> - <value>gr_binary_slicer_fb_0</value> + <key>t_scale</key> + <value>20.0/sample_rate</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <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>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> </param> <param> <key>_coordinate</key> - <value>(1343, 521)</value> + <value>(768, 866)</value> </param> <param> <key>_rotation</key> @@ -776,10 +1035,10 @@ </param> </block> <block> - <key>gr_add_const_vxx</key> + <key>wxgui_fftsink2</key> <param> <key>id</key> - <value>gr_add_const_vxx_0</value> + <value>rrc_spectrum</value> </param> <param> <key>_enabled</key> @@ -787,38 +1046,75 @@ </param> <param> <key>type</key> - <value>float</value> + <value>complex</value> </param> <param> - <key>const</key> - <value>48.0</value> + <key>title</key> + <value>RRC Spectrum</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>samp_rate</key> + <value>sample_rate</value> </param> <param> - <key>_coordinate</key> - <value>(1707, 517)</value> + <key>baseband_freq</key> + <value>freq+offset</value> </param> <param> - <key>_rotation</key> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>-15</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> <value>0</value> </param> - </block> - <block> - <key>gr_float_to_char</key> <param> - <key>id</key> - <value>gr_float_to_char_0</value> + <key>win</key> + <value>None</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>win_size</key> + <value></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>(1878, 521)</value> + <value>(767, 499)</value> </param> <param> <key>_rotation</key> @@ -826,30 +1122,38 @@ </param> </block> <block> - <key>gr_file_sink</key> + <key>gr_costas_loop_cc</key> <param> <key>id</key> - <value>gr_file_sink_0</value> + <value>costas</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>file</key> - <value>bits.dat</value> + <key>alpha</key> + <value>costas_alpha</value> </param> <param> - <key>type</key> - <value>byte</value> + <key>beta</key> + <value>(costas_alpha**2.0)/4.0</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>max_freq</key> + <value>50e-6*sps</value> + </param> + <param> + <key>min_freq</key> + <value>-50e-6*sps</value> + </param> + <param> + <key>order</key> + <value>2</value> </param> <param> <key>_coordinate</key> - <value>(2059, 517)</value> + <value>(767, 721)</value> </param> <param> <key>_rotation</key> @@ -857,69 +1161,86 @@ </param> </block> <block> - <key>gr_file_source</key> + <key>wxgui_fftsink2</key> <param> <key>id</key> - <value>gr_file_source_0</value> + <value>costas_spectrum</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>file</key> - <value>lrit.dat</value> - </param> - <param> <key>type</key> <value>complex</value> </param> <param> - <key>repeat</key> - <value>False</value> + <key>title</key> + <value>PLL Spectrum</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>samp_rate</key> + <value>sample_rate</value> </param> <param> - <key>_coordinate</key> - <value>(11, 655)</value> + <key>baseband_freq</key> + <value>freq+offset</value> </param> <param> - <key>_rotation</key> - <value>0</value> + <key>y_per_div</key> + <value>10</value> </param> - </block> - <block> - <key>notebook</key> <param> - <key>id</key> - <value>displays</value> + <key>y_divs</key> + <value>10</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>ref_level</key> + <value>-15</value> </param> <param> - <key>style</key> - <value>wx.NB_TOP</value> + <key>ref_scale</key> + <value>2.0</value> </param> <param> - <key>labels</key> - <value>['USRP RX', 'Costas Output']</value> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> </param> <param> <key>grid_pos</key> - <value>2, 0, 1, 3</value> + <value>0, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value></value> + <value>displays, 2</value> </param> <param> <key>_coordinate</key> - <value>(14, 351)</value> + <value>(969, 502)</value> </param> <param> <key>_rotation</key> @@ -927,42 +1248,86 @@ </param> </block> <block> - <key>variable_config</key> + <key>wxgui_fftsink2</key> <param> <key>id</key> - <value>saved_decim</value> + <value>mm_spectrum</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>160</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>type</key> - <value>int</value> + <key>title</key> + <value>Bit Sync Spectrum</value> </param> <param> - <key>config_file</key> - <value>config_filename</value> + <key>samp_rate</key> + <value>symbol_rate</value> </param> <param> - <key>section</key> - <value>main</value> + <key>baseband_freq</key> + <value>0</value> </param> <param> - <key>option</key> - <value>decim</value> + <key>y_per_div</key> + <value>10</value> </param> <param> - <key>writeback</key> - <value>decim</value> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>-15</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 3</value> </param> <param> <key>_coordinate</key> - <value>(246, 172)</value> + <value>(1225, 503)</value> </param> <param> <key>_rotation</key> @@ -970,54 +1335,66 @@ </param> </block> <block> - <key>variable_slider</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>gain</value> + <value>costas_waveform</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value>Gain</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>value</key> - <value>saved_gain</value> + <key>title</key> + <value>PLL Waveform</value> </param> <param> - <key>min</key> + <key>samp_rate</key> + <value>sample_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>v_offset</key> <value>0</value> </param> <param> - <key>max</key> - <value>115</value> + <key>t_scale</key> + <value>20.0/sample_rate</value> </param> <param> - <key>num_steps</key> - <value>115</value> + <key>ac_couple</key> + <value>False</value> </param> <param> - <key>style</key> - <value>wx.SL_HORIZONTAL</value> + <key>xy_mode</key> + <value>False</value> </param> <param> - <key>converver</key> - <value>float_converter</value> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> </param> <param> <key>grid_pos</key> - <value>0, 1, 1, 1</value> + <value>1, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value></value> + <value>displays, 2</value> </param> <param> <key>_coordinate</key> - <value>(411, 11)</value> + <value>(968, 852)</value> </param> <param> <key>_rotation</key> @@ -1025,42 +1402,42 @@ </param> </block> <block> - <key>variable_config</key> + <key>gr_clock_recovery_mm_xx</key> <param> <key>id</key> - <value>saved_gain</value> + <value>mm_sync</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>33</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>type</key> - <value>real</value> + <key>omega</key> + <value>sps</value> </param> <param> - <key>config_file</key> - <value>config_filename</value> + <key>gain_omega</key> + <value>(gain_mu**2)/4.0</value> </param> <param> - <key>section</key> - <value>main</value> + <key>mu</key> + <value>0.5</value> </param> <param> - <key>option</key> - <value>gain</value> + <key>gain_mu</key> + <value>gain_mu</value> </param> <param> - <key>writeback</key> - <value>gain</value> + <key>omega_relative_limit</key> + <value>50e-6*sps</value> </param> <param> <key>_coordinate</key> - <value>(412, 172)</value> + <value>(969, 722)</value> </param> <param> <key>_rotation</key> @@ -1068,54 +1445,66 @@ </param> </block> <block> - <key>variable_slider</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>freq</value> + <value>mm_const</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value>Frequency</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>value</key> - <value>saved_freq</value> + <key>title</key> + <value>Constellation</value> </param> <param> - <key>min</key> - <value>135e6</value> + <key>samp_rate</key> + <value>symbol_rate</value> </param> <param> - <key>max</key> - <value>139e6</value> + <key>v_scale</key> + <value>0.5</value> </param> <param> - <key>num_steps</key> - <value>400</value> + <key>v_offset</key> + <value>0</value> </param> <param> - <key>style</key> - <value>wx.SL_HORIZONTAL</value> + <key>t_scale</key> + <value>20.0/symbol_rate</value> </param> <param> - <key>converver</key> - <value>float_converter</value> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> </param> <param> <key>grid_pos</key> - <value>0, 2, 1, 1</value> + <value>1, 0, 1, 1</value> </param> <param> <key>notebook</key> - <value></value> + <value>displays, 3</value> </param> <param> <key>_coordinate</key> - <value>(574, 12)</value> + <value>(1225, 859)</value> </param> <param> <key>_rotation</key> @@ -1123,42 +1512,34 @@ </param> </block> <block> - <key>variable_config</key> + <key>notebook</key> <param> <key>id</key> - <value>saved_freq</value> + <value>displays</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>137e6</value> - </param> - <param> - <key>type</key> - <value>real</value> - </param> - <param> - <key>config_file</key> - <value>config_filename</value> + <key>style</key> + <value>wx.NB_TOP</value> </param> <param> - <key>section</key> - <value>main</value> + <key>labels</key> + <value>['USRP RX','RRC','PLL','Const']</value> </param> <param> - <key>option</key> - <value>freq</value> + <key>grid_pos</key> + <value>2, 0, 1, 3</value> </param> <param> - <key>writeback</key> - <value>freq</value> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(576, 170)</value> + <value>(10, 228)</value> </param> <param> <key>_rotation</key> @@ -1169,7 +1550,7 @@ <key>variable_slider</key> <param> <key>id</key> - <value>costas_alpha</value> + <value>gain</value> </param> <param> <key>_enabled</key> @@ -1177,11 +1558,11 @@ </param> <param> <key>label</key> - <value>Costas Alpha</value> + <value>Gain</value> </param> <param> <key>value</key> - <value>saved_costas_alpha</value> + <value>saved_gain</value> </param> <param> <key>min</key> @@ -1189,11 +1570,11 @@ </param> <param> <key>max</key> - <value>0.5</value> + <value>115</value> </param> <param> <key>num_steps</key> - <value>100</value> + <value>115</value> </param> <param> <key>style</key> @@ -1213,7 +1594,7 @@ </param> <param> <key>_coordinate</key> - <value>(738, 13)</value> + <value>(532, 150)</value> </param> <param> <key>_rotation</key> @@ -1221,42 +1602,30 @@ </param> </block> <block> - <key>variable_config</key> + <key>gr_throttle</key> <param> <key>id</key> - <value>saved_costas_alpha</value> + <value>gr_throttle_0</value> </param> <param> <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>0.005</value> + <value>False</value> </param> <param> <key>type</key> - <value>real</value> - </param> - <param> - <key>config_file</key> - <value>config_filename</value> - </param> - <param> - <key>section</key> - <value>main</value> + <value>complex</value> </param> <param> - <key>option</key> - <value>costas_alpha</value> + <key>samples_per_second</key> + <value>sample_rate</value> </param> <param> - <key>writeback</key> - <value>costas_alpha</value> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(739, 170)</value> + <value>(63, 859)</value> </param> <param> <key>_rotation</key> @@ -1264,42 +1633,34 @@ </param> </block> <block> - <key>variable_config</key> + <key>gr_file_source</key> <param> <key>id</key> - <value>saved_gain_mu</value> + <value>gr_file_source_0</value> </param> <param> <key>_enabled</key> - <value>True</value> + <value>False</value> </param> <param> - <key>value</key> - <value>0.005</value> + <key>file</key> + <value>lrit.dat</value> </param> <param> <key>type</key> - <value>real</value> - </param> - <param> - <key>config_file</key> - <value>config_filename</value> - </param> - <param> - <key>section</key> - <value>main</value> + <value>complex</value> </param> <param> - <key>option</key> - <value>gain_mu</value> + <key>repeat</key> + <value>False</value> </param> <param> - <key>writeback</key> - <value>gain_mu</value> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(900, 170)</value> + <value>(36, 943)</value> </param> <param> <key>_rotation</key> @@ -1307,77 +1668,58 @@ </param> </block> <block> - <key>variable_slider</key> + <key>usrp_simple_source_x</key> <param> <key>id</key> - <value>gain_mu</value> + <value>usrp_simple_source_x_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>label</key> - <value>Gain Mu</value> + <key>type</key> + <value>complex</value> </param> <param> - <key>value</key> - <value>saved_gain_mu</value> + <key>format</key> + <value></value> </param> <param> - <key>min</key> + <key>which</key> <value>0</value> </param> <param> - <key>max</key> - <value>0.5</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> + <key>decimation</key> + <value>decim</value> </param> <param> - <key>grid_pos</key> - <value>1, 1, 1, 1</value> + <key>frequency</key> + <value>freq+offset</value> </param> <param> - <key>notebook</key> - <value></value> + <key>lo_offset</key> + <value>float('inf')</value> </param> <param> - <key>_coordinate</key> - <value>(902, 13)</value> + <key>gain</key> + <value>gain</value> </param> <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>config_filename</value> + <key>side</key> + <value>side</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>rx_ant</key> + <value>RXA</value> </param> <param> - <key>value</key> - <value>"usrp_rx_lrit.cfg"</value> + <key>hb_filters</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(13, 283)</value> + <value>(19, 713)</value> </param> <param> <key>_rotation</key> @@ -1385,14 +1727,14 @@ </param> </block> <connection> - <source_block_id>usrp_simple_source_x_0</source_block_id> - <sink_block_id>gr_agc_xx_0</sink_block_id> + <source_block_id>gr_agc_xx_0</source_block_id> + <sink_block_id>root_raised_cosine_filter_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_agc_xx_0</source_block_id> - <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_agc_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> @@ -1403,74 +1745,80 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_throttle_0</source_block_id> + <source_block_id>usrp_simple_source_x_0</source_block_id> <sink_block_id>gr_agc_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_probe_mpsk_snr_c_0</source_block_id> - <sink_block_id>wxgui_numbersink2_0</sink_block_id> + <source_block_id>usrp_simple_source_x_0</source_block_id> + <sink_block_id>rx_spectrum</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_mpsk_receiver_cc_0</source_block_id> - <sink_block_id>gr_probe_mpsk_snr_c_0</sink_block_id> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>rx_spectrum</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_agc_xx_0</source_block_id> - <sink_block_id>gr_mpsk_receiver_cc_0</sink_block_id> + <source_block_id>usrp_simple_source_x_0</source_block_id> + <sink_block_id>rx_waveform</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_mpsk_receiver_cc_0</source_block_id> - <sink_block_id>wxgui_scopesink2_1</sink_block_id> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>rx_waveform</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_agc_xx_0</source_block_id> - <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_block_id>root_raised_cosine_filter_0</source_block_id> + <sink_block_id>rrc_waveform</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>root_raised_cosine_filter_0</source_block_id> + <sink_block_id>rrc_spectrum</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_mpsk_receiver_cc_0</source_block_id> - <sink_block_id>gr_complex_to_real_0</sink_block_id> + <source_block_id>root_raised_cosine_filter_0</source_block_id> + <sink_block_id>costas</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_complex_to_real_0</source_block_id> - <sink_block_id>gr_binary_slicer_fb_0</sink_block_id> + <source_block_id>costas</source_block_id> + <sink_block_id>costas_spectrum</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_binary_slicer_fb_0</source_block_id> - <sink_block_id>gr_char_to_float_0</sink_block_id> + <source_block_id>costas</source_block_id> + <sink_block_id>costas_waveform</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_char_to_float_0</source_block_id> - <sink_block_id>gr_add_const_vxx_0</sink_block_id> + <source_block_id>costas</source_block_id> + <sink_block_id>mm_sync</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_const_vxx_0</source_block_id> - <sink_block_id>gr_float_to_char_0</sink_block_id> + <source_block_id>mm_sync</source_block_id> + <sink_block_id>mm_spectrum</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_float_to_char_0</source_block_id> - <sink_block_id>gr_file_sink_0</sink_block_id> + <source_block_id>mm_sync</source_block_id> + <sink_block_id>mm_const</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-noaa/apps/usrp_rx_lrit.py b/gr-noaa/apps/usrp_rx_lrit.py index bc313e3af..9a3d70200 100755 --- a/gr-noaa/apps/usrp_rx_lrit.py +++ b/gr-noaa/apps/usrp_rx_lrit.py @@ -2,19 +2,22 @@ ################################################## # Gnuradio Python Flow Graph # Title: USRP LRIT Receiver -# Generated: Sat Aug 29 11:26:03 2009 +# Generated: Wed Dec 16 09:49:15 2009 ################################################## +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 from gnuradio.wxgui import forms -from gnuradio.wxgui import numbersink2 from gnuradio.wxgui import scopesink2 -from grc_gnuradio import blks2 as grc_blks2 +from grc_gnuradio import usrp as grc_usrp from grc_gnuradio import wxgui as grc_wxgui from optparse import OptionParser import ConfigParser +import os import wx class usrp_rx_lrit(grc_wxgui.top_block_gui): @@ -25,36 +28,47 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): ################################################## # Variables ################################################## - self.config_filename = config_filename = "usrp_rx_lrit.cfg" + self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' self._saved_decim_config = ConfigParser.ConfigParser() self._saved_decim_config.read(config_filename) - try: saved_decim = self._saved_decim_config.getint("main", "decim") + try: saved_decim = self._saved_decim_config.getint('usrp_rx_lrit', 'decim') except: saved_decim = 160 self.saved_decim = saved_decim self.decim = decim = saved_decim self.symbol_rate = symbol_rate = 293e3 + self._saved_offset_config = ConfigParser.ConfigParser() + self._saved_offset_config.read(config_filename) + try: saved_offset = self._saved_offset_config.getfloat('usrp_rx_lrit', 'offset') + except: saved_offset = 0 + self.saved_offset = saved_offset self._saved_gain_mu_config = ConfigParser.ConfigParser() self._saved_gain_mu_config.read(config_filename) - try: saved_gain_mu = self._saved_gain_mu_config.getfloat("main", "gain_mu") + try: saved_gain_mu = self._saved_gain_mu_config.getfloat('usrp_rx_lrit', 'gain_mu') except: saved_gain_mu = 0.005 self.saved_gain_mu = saved_gain_mu self._saved_gain_config = ConfigParser.ConfigParser() self._saved_gain_config.read(config_filename) - try: saved_gain = self._saved_gain_config.getfloat("main", "gain") + try: saved_gain = self._saved_gain_config.getfloat('usrp_rx_lrit', 'gain') except: saved_gain = 33 self.saved_gain = saved_gain self._saved_freq_config = ConfigParser.ConfigParser() self._saved_freq_config.read(config_filename) - try: saved_freq = self._saved_freq_config.getfloat("main", "freq") - except: saved_freq = 137e6 + try: saved_freq = self._saved_freq_config.getfloat('usrp_rx_lrit', 'freq') + except: saved_freq = 1691e6 self.saved_freq = saved_freq self._saved_costas_alpha_config = ConfigParser.ConfigParser() self._saved_costas_alpha_config.read(config_filename) - try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat("main", "costas_alpha") + try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat('usrp_rx_lrit', 'costas_alpha') except: saved_costas_alpha = 0.005 self.saved_costas_alpha = saved_costas_alpha - self.samp_rate = samp_rate = 64e6/decim - self.sps = sps = samp_rate/symbol_rate + self.sample_rate = sample_rate = 64e6/decim + self.sps = sps = sample_rate/symbol_rate + self._side_config = ConfigParser.ConfigParser() + self._side_config.read(config_filename) + try: side = self._side_config.get('usrp_rx_lrit', 'side') + except: side = 'A' + self.side = side + self.offset = offset = saved_offset self.gain_mu = gain_mu = saved_gain_mu self.gain = gain = saved_gain self.freq = freq = saved_freq @@ -65,7 +79,9 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): ################################################## self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP) self.displays.AddPage(grc_wxgui.Panel(self.displays), "USRP RX") - self.displays.AddPage(grc_wxgui.Panel(self.displays), "Costas Output") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "RRC") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL") + self.displays.AddPage(grc_wxgui.Panel(self.displays), "Const") self.GridAdd(self.displays, 2, 0, 1, 3) ################################################## @@ -78,7 +94,30 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): label="Decim", converter=forms.int_converter(), ) - self.GridAdd(self._decim_text_box, 0, 0, 1, 1) + self.GridAdd(self._decim_text_box, 0, 2, 1, 1) + _offset_sizer = wx.BoxSizer(wx.VERTICAL) + self._offset_text_box = forms.text_box( + parent=self.GetWin(), + sizer=_offset_sizer, + value=self.offset, + callback=self.set_offset, + label="Offset", + converter=forms.float_converter(), + proportion=0, + ) + self._offset_slider = forms.slider( + parent=self.GetWin(), + sizer=_offset_sizer, + value=self.offset, + callback=self.set_offset, + minimum=-50e3, + maximum=50e3, + num_steps=100, + style=wx.SL_HORIZONTAL, + cast=float, + proportion=1, + ) + self.GridAdd(_offset_sizer, 0, 1, 1, 1) _gain_mu_sizer = wx.BoxSizer(wx.VERTICAL) self._gain_mu_text_box = forms.text_box( parent=self.GetWin(), @@ -101,7 +140,7 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): cast=float, proportion=1, ) - self.GridAdd(_gain_mu_sizer, 1, 1, 1, 1) + self.GridAdd(_gain_mu_sizer, 1, 2, 1, 1) _gain_sizer = wx.BoxSizer(wx.VERTICAL) self._gain_text_box = forms.text_box( parent=self.GetWin(), @@ -124,30 +163,15 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): cast=float, proportion=1, ) - self.GridAdd(_gain_sizer, 0, 1, 1, 1) - _freq_sizer = wx.BoxSizer(wx.VERTICAL) + self.GridAdd(_gain_sizer, 1, 0, 1, 1) self._freq_text_box = forms.text_box( parent=self.GetWin(), - sizer=_freq_sizer, value=self.freq, callback=self.set_freq, label="Frequency", converter=forms.float_converter(), - proportion=0, ) - self._freq_slider = forms.slider( - parent=self.GetWin(), - sizer=_freq_sizer, - value=self.freq, - callback=self.set_freq, - minimum=135e6, - maximum=139e6, - num_steps=400, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_freq_sizer, 0, 2, 1, 1) + self.GridAdd(self._freq_text_box, 0, 0, 1, 1) _costas_alpha_sizer = wx.BoxSizer(wx.VERTICAL) self._costas_alpha_text_box = forms.text_box( parent=self.GetWin(), @@ -170,131 +194,193 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): cast=float, proportion=1, ) - self.GridAdd(_costas_alpha_sizer, 1, 0, 1, 1) + self.GridAdd(_costas_alpha_sizer, 1, 1, 1, 1) ################################################## # Blocks ################################################## - self.gr_add_const_vxx_0 = gr.add_const_vff((48.0, )) + self.costas = gr.costas_loop_cc(costas_alpha, (costas_alpha**2.0)/4.0, 50e-6*sps, -50e-6*sps, 2) + self.costas_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(2).GetWin(), + baseband_freq=freq+offset, + y_per_div=10, + y_divs=10, + ref_level=-15, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=15, + average=False, + avg_alpha=None, + title="PLL Spectrum", + peak_hold=False, + ) + self.displays.GetPage(2).GridAdd(self.costas_spectrum.win, 0, 0, 1, 1) + self.costas_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(2).GetWin(), + title="PLL Waveform", + sample_rate=sample_rate, + v_scale=0.5, + v_offset=0, + t_scale=20.0/sample_rate, + ac_couple=False, + xy_mode=False, + num_inputs=1, + ) + self.displays.GetPage(2).GridAdd(self.costas_waveform.win, 1, 0, 1, 1) self.gr_agc_xx_0 = gr.agc_cc(1e-6, 1.0, 1.0/32767.0, 1.0) - self.gr_binary_slicer_fb_0 = gr.binary_slicer_fb() - self.gr_char_to_float_0 = gr.char_to_float() - self.gr_complex_to_real_0 = gr.complex_to_real(1) - self.gr_file_sink_0 = gr.file_sink(gr.sizeof_char*1, "bits.dat") - self.gr_file_source_0 = gr.file_source(gr.sizeof_gr_complex*1, "lrit.dat", False) - self.gr_float_to_char_0 = gr.float_to_char() - self.gr_mpsk_receiver_cc_0 = gr.mpsk_receiver_cc(2, 0, costas_alpha, costas_alpha*costas_alpha/4.0, -0.05, 0.05, 0.5, gain_mu, sps, gain_mu*gain_mu/4.0, 0.05) - self.gr_probe_mpsk_snr_c_0 = grc_blks2.probe_mpsk_snr_c( - type='snr', - alpha=0.0001, - probe_rate=10, + self.mm_const = scopesink2.scope_sink_c( + self.displays.GetPage(3).GetWin(), + title="Constellation", + sample_rate=symbol_rate, + v_scale=0.5, + v_offset=0, + t_scale=20.0/symbol_rate, + ac_couple=False, + xy_mode=True, + num_inputs=1, ) - self.gr_throttle_0 = gr.throttle(gr.sizeof_gr_complex*1, samp_rate) - self.wxgui_fftsink2_0 = fftsink2.fft_sink_c( - self.displays.GetPage(0).GetWin(), - baseband_freq=freq, + self.displays.GetPage(3).GridAdd(self.mm_const.win, 1, 0, 1, 1) + self.mm_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(3).GetWin(), + baseband_freq=0, y_per_div=10, y_divs=10, - ref_level=50, - sample_rate=samp_rate, + ref_level=-15, + ref_scale=2.0, + sample_rate=symbol_rate, fft_size=1024, - fft_rate=30, + fft_rate=15, average=False, avg_alpha=None, - title="Spectrum", + title="Bit Sync Spectrum", peak_hold=False, ) - self.displays.GetPage(0).GridAdd(self.wxgui_fftsink2_0.win, 0, 0, 1, 1) - self.wxgui_numbersink2_0 = numbersink2.number_sink_f( + self.displays.GetPage(3).GridAdd(self.mm_spectrum.win, 0, 0, 1, 1) + self.mm_sync = gr.clock_recovery_mm_cc(sps, (gain_mu**2)/4.0, 0.5, gain_mu, 50e-6*sps) + self.root_raised_cosine_filter_0 = gr.fir_filter_ccf(1, firdes.root_raised_cosine( + 1, sample_rate, symbol_rate, 0.25, int(11*sample_rate/symbol_rate))) + self.rrc_spectrum = fftsink2.fft_sink_c( self.displays.GetPage(1).GetWin(), - unit="dB", - minval=0, - maxval=30, - factor=1.0, - decimal_places=1, - ref_level=0, - sample_rate=10, - number_rate=10, + baseband_freq=freq+offset, + y_per_div=10, + y_divs=10, + ref_level=-15, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=15, average=False, avg_alpha=None, - label="SNR", + title="RRC Spectrum", peak_hold=False, - show_gauge=True, ) - self.displays.GetPage(1).GridAdd(self.wxgui_numbersink2_0.win, 2, 0, 1, 1) - self.wxgui_scopesink2_0 = scopesink2.scope_sink_c( - self.displays.GetPage(0).GetWin(), - title="Waveform", - sample_rate=samp_rate, + self.displays.GetPage(1).GridAdd(self.rrc_spectrum.win, 0, 0, 1, 1) + self.rrc_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(1).GetWin(), + title="RRC Waveform", + sample_rate=sample_rate, v_scale=0.5, - t_scale=20.0/samp_rate, + v_offset=0, + t_scale=20.0/sample_rate, ac_couple=False, - xy_mode=True, + xy_mode=False, num_inputs=1, ) - self.displays.GetPage(0).GridAdd(self.wxgui_scopesink2_0.win, 1, 0, 1, 1) - self.wxgui_scopesink2_1 = scopesink2.scope_sink_c( - self.displays.GetPage(1).GetWin(), - title="Scope Plot", - sample_rate=samp_rate, - v_scale=0.4, - t_scale=20.0/samp_rate, + self.displays.GetPage(1).GridAdd(self.rrc_waveform.win, 1, 0, 1, 1) + self.rx_spectrum = fftsink2.fft_sink_c( + self.displays.GetPage(0).GetWin(), + baseband_freq=freq, + y_per_div=10, + y_divs=10, + ref_level=50, + ref_scale=2.0, + sample_rate=sample_rate, + fft_size=1024, + fft_rate=30, + average=False, + avg_alpha=None, + title="RX Spectrum", + peak_hold=False, + ) + self.displays.GetPage(0).GridAdd(self.rx_spectrum.win, 0, 0, 1, 1) + self.rx_waveform = scopesink2.scope_sink_c( + self.displays.GetPage(0).GetWin(), + title="RX Waveform", + sample_rate=sample_rate, + v_scale=0, + v_offset=0, + t_scale=20.0/sample_rate, ac_couple=False, - xy_mode=True, + xy_mode=False, num_inputs=1, ) - self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_1.win, 0, 0, 1, 1) + self.displays.GetPage(0).GridAdd(self.rx_waveform.win, 1, 0, 1, 1) + self.usrp_simple_source_x_0 = grc_usrp.simple_source_c(which=0, side=side, rx_ant="RXA") + self.usrp_simple_source_x_0.set_decim_rate(decim) + self.usrp_simple_source_x_0.set_frequency(freq+offset, verbose=True) + self.usrp_simple_source_x_0.set_gain(gain) ################################################## # Connections ################################################## - self.connect((self.gr_agc_xx_0, 0), (self.wxgui_scopesink2_0, 0)) - self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 0)) - self.connect((self.gr_throttle_0, 0), (self.gr_agc_xx_0, 0)) - self.connect((self.gr_probe_mpsk_snr_c_0, 0), (self.wxgui_numbersink2_0, 0)) - self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.gr_probe_mpsk_snr_c_0, 0)) - self.connect((self.gr_agc_xx_0, 0), (self.gr_mpsk_receiver_cc_0, 0)) - self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.wxgui_scopesink2_1, 0)) - self.connect((self.gr_agc_xx_0, 0), (self.wxgui_fftsink2_0, 0)) - self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.gr_complex_to_real_0, 0)) - self.connect((self.gr_complex_to_real_0, 0), (self.gr_binary_slicer_fb_0, 0)) - self.connect((self.gr_binary_slicer_fb_0, 0), (self.gr_char_to_float_0, 0)) - self.connect((self.gr_char_to_float_0, 0), (self.gr_add_const_vxx_0, 0)) - self.connect((self.gr_add_const_vxx_0, 0), (self.gr_float_to_char_0, 0)) - self.connect((self.gr_float_to_char_0, 0), (self.gr_file_sink_0, 0)) + self.connect((self.gr_agc_xx_0, 0), (self.root_raised_cosine_filter_0, 0)) + self.connect((self.usrp_simple_source_x_0, 0), (self.gr_agc_xx_0, 0)) + self.connect((self.usrp_simple_source_x_0, 0), (self.rx_spectrum, 0)) + self.connect((self.usrp_simple_source_x_0, 0), (self.rx_waveform, 0)) + self.connect((self.root_raised_cosine_filter_0, 0), (self.rrc_waveform, 0)) + self.connect((self.root_raised_cosine_filter_0, 0), (self.rrc_spectrum, 0)) + self.connect((self.root_raised_cosine_filter_0, 0), (self.costas, 0)) + self.connect((self.costas, 0), (self.costas_spectrum, 0)) + self.connect((self.costas, 0), (self.costas_waveform, 0)) + self.connect((self.costas, 0), (self.mm_sync, 0)) + self.connect((self.mm_sync, 0), (self.mm_spectrum, 0)) + self.connect((self.mm_sync, 0), (self.mm_const, 0)) def set_config_filename(self, config_filename): self.config_filename = config_filename - self._saved_decim_config = ConfigParser.ConfigParser() - self._saved_decim_config.read(self.config_filename) - if not self._saved_decim_config.has_section("main"): - self._saved_decim_config.add_section("main") - self._saved_decim_config.set("main", "decim", str(self.decim)) - self._saved_decim_config.write(open(self.config_filename, 'w')) - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section("main"): - self._saved_gain_config.add_section("main") - self._saved_gain_config.set("main", "gain", str(self.gain)) - self._saved_gain_config.write(open(self.config_filename, 'w')) self._saved_freq_config = ConfigParser.ConfigParser() self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section("main"): - self._saved_freq_config.add_section("main") - self._saved_freq_config.set("main", "freq", str(self.freq)) + if not self._saved_freq_config.has_section('usrp_rx_lrit'): + self._saved_freq_config.add_section('usrp_rx_lrit') + self._saved_freq_config.set('usrp_rx_lrit', 'freq', str(self.freq)) self._saved_freq_config.write(open(self.config_filename, 'w')) + self._saved_offset_config = ConfigParser.ConfigParser() + self._saved_offset_config.read(self.config_filename) + if not self._saved_offset_config.has_section('usrp_rx_lrit'): + self._saved_offset_config.add_section('usrp_rx_lrit') + self._saved_offset_config.set('usrp_rx_lrit', 'offset', str(self.offset)) + self._saved_offset_config.write(open(self.config_filename, 'w')) + self._saved_gain_config = ConfigParser.ConfigParser() + self._saved_gain_config.read(self.config_filename) + if not self._saved_gain_config.has_section('usrp_rx_lrit'): + self._saved_gain_config.add_section('usrp_rx_lrit') + self._saved_gain_config.set('usrp_rx_lrit', 'gain', str(self.gain)) + self._saved_gain_config.write(open(self.config_filename, 'w')) + self._saved_decim_config = ConfigParser.ConfigParser() + self._saved_decim_config.read(self.config_filename) + if not self._saved_decim_config.has_section('usrp_rx_lrit'): + self._saved_decim_config.add_section('usrp_rx_lrit') + self._saved_decim_config.set('usrp_rx_lrit', 'decim', str(self.decim)) + self._saved_decim_config.write(open(self.config_filename, 'w')) self._saved_costas_alpha_config = ConfigParser.ConfigParser() self._saved_costas_alpha_config.read(self.config_filename) - if not self._saved_costas_alpha_config.has_section("main"): - self._saved_costas_alpha_config.add_section("main") - self._saved_costas_alpha_config.set("main", "costas_alpha", str(self.costas_alpha)) + if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'): + self._saved_costas_alpha_config.add_section('usrp_rx_lrit') + self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha)) self._saved_costas_alpha_config.write(open(self.config_filename, 'w')) self._saved_gain_mu_config = ConfigParser.ConfigParser() self._saved_gain_mu_config.read(self.config_filename) - if not self._saved_gain_mu_config.has_section("main"): - self._saved_gain_mu_config.add_section("main") - self._saved_gain_mu_config.set("main", "gain_mu", str(self.gain_mu)) + if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'): + self._saved_gain_mu_config.add_section('usrp_rx_lrit') + self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu)) self._saved_gain_mu_config.write(open(self.config_filename, 'w')) + self._side_config = ConfigParser.ConfigParser() + self._side_config.read(self.config_filename) + if not self._side_config.has_section('usrp_rx_lrit'): + self._side_config.add_section('usrp_rx_lrit') + self._side_config.set('usrp_rx_lrit', 'side', str(self.side)) + self._side_config.write(open(self.config_filename, 'w')) def set_saved_decim(self, saved_decim): self.saved_decim = saved_decim @@ -302,18 +388,26 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): def set_decim(self, decim): self.decim = decim - self.set_samp_rate(64e6/self.decim) - self._decim_text_box.set_value(self.decim) + self.set_sample_rate(64e6/self.decim) self._saved_decim_config = ConfigParser.ConfigParser() self._saved_decim_config.read(self.config_filename) - if not self._saved_decim_config.has_section("main"): - self._saved_decim_config.add_section("main") - self._saved_decim_config.set("main", "decim", str(self.decim)) + if not self._saved_decim_config.has_section('usrp_rx_lrit'): + self._saved_decim_config.add_section('usrp_rx_lrit') + self._saved_decim_config.set('usrp_rx_lrit', 'decim', str(self.decim)) self._saved_decim_config.write(open(self.config_filename, 'w')) + self._decim_text_box.set_value(self.decim) + self.usrp_simple_source_x_0.set_decim_rate(self.decim) def set_symbol_rate(self, symbol_rate): self.symbol_rate = symbol_rate - self.set_sps(self.samp_rate/self.symbol_rate) + self.set_sps(self.sample_rate/self.symbol_rate) + self.root_raised_cosine_filter_0.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate))) + self.mm_spectrum.set_sample_rate(self.symbol_rate) + self.mm_const.set_sample_rate(self.symbol_rate) + + def set_saved_offset(self, saved_offset): + self.saved_offset = saved_offset + self.set_offset(self.saved_offset) def set_saved_gain_mu(self, saved_gain_mu): self.saved_gain_mu = saved_gain_mu @@ -331,65 +425,95 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui): self.saved_costas_alpha = saved_costas_alpha self.set_costas_alpha(self.saved_costas_alpha) - def set_samp_rate(self, samp_rate): - self.samp_rate = samp_rate - self.set_sps(self.samp_rate/self.symbol_rate) - self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate) - self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate) - self.wxgui_scopesink2_1.set_sample_rate(self.samp_rate) + def set_sample_rate(self, sample_rate): + self.sample_rate = sample_rate + self.set_sps(self.sample_rate/self.symbol_rate) + self.rx_waveform.set_sample_rate(self.sample_rate) + self.rx_spectrum.set_sample_rate(self.sample_rate) + self.root_raised_cosine_filter_0.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate))) + self.rrc_waveform.set_sample_rate(self.sample_rate) + self.rrc_spectrum.set_sample_rate(self.sample_rate) + self.costas_spectrum.set_sample_rate(self.sample_rate) + self.costas_waveform.set_sample_rate(self.sample_rate) def set_sps(self, sps): self.sps = sps - self.gr_mpsk_receiver_cc_0.set_omega(self.sps) + self.mm_sync.set_omega(self.sps) + + def set_side(self, side): + self.side = side + self._side_config = ConfigParser.ConfigParser() + self._side_config.read(self.config_filename) + if not self._side_config.has_section('usrp_rx_lrit'): + self._side_config.add_section('usrp_rx_lrit') + self._side_config.set('usrp_rx_lrit', 'side', str(self.side)) + self._side_config.write(open(self.config_filename, 'w')) + + def set_offset(self, offset): + self.offset = offset + self._saved_offset_config = ConfigParser.ConfigParser() + self._saved_offset_config.read(self.config_filename) + if not self._saved_offset_config.has_section('usrp_rx_lrit'): + self._saved_offset_config.add_section('usrp_rx_lrit') + self._saved_offset_config.set('usrp_rx_lrit', 'offset', str(self.offset)) + self._saved_offset_config.write(open(self.config_filename, 'w')) + self._offset_slider.set_value(self.offset) + self._offset_text_box.set_value(self.offset) + self.rrc_spectrum.set_baseband_freq(self.freq+self.offset) + self.costas_spectrum.set_baseband_freq(self.freq+self.offset) + self.usrp_simple_source_x_0.set_frequency(self.freq+self.offset) def set_gain_mu(self, gain_mu): self.gain_mu = gain_mu - self.gr_mpsk_receiver_cc_0.set_gain_mu(self.gain_mu) - self.gr_mpsk_receiver_cc_0.set_gain_omega(self.gain_mu*self.gain_mu/4.0) + self._gain_mu_slider.set_value(self.gain_mu) + self._gain_mu_text_box.set_value(self.gain_mu) self._saved_gain_mu_config = ConfigParser.ConfigParser() self._saved_gain_mu_config.read(self.config_filename) - if not self._saved_gain_mu_config.has_section("main"): - self._saved_gain_mu_config.add_section("main") - self._saved_gain_mu_config.set("main", "gain_mu", str(self.gain_mu)) + if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'): + self._saved_gain_mu_config.add_section('usrp_rx_lrit') + self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu)) self._saved_gain_mu_config.write(open(self.config_filename, 'w')) - self._gain_mu_slider.set_value(self.gain_mu) - self._gain_mu_text_box.set_value(self.gain_mu) + self.mm_sync.set_gain_omega((self.gain_mu**2)/4.0) + self.mm_sync.set_gain_mu(self.gain_mu) def set_gain(self, gain): self.gain = gain - self._gain_slider.set_value(self.gain) - self._gain_text_box.set_value(self.gain) self._saved_gain_config = ConfigParser.ConfigParser() self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section("main"): - self._saved_gain_config.add_section("main") - self._saved_gain_config.set("main", "gain", str(self.gain)) + if not self._saved_gain_config.has_section('usrp_rx_lrit'): + self._saved_gain_config.add_section('usrp_rx_lrit') + self._saved_gain_config.set('usrp_rx_lrit', 'gain', str(self.gain)) self._saved_gain_config.write(open(self.config_filename, 'w')) + self._gain_slider.set_value(self.gain) + self._gain_text_box.set_value(self.gain) + self.usrp_simple_source_x_0.set_gain(self.gain) def set_freq(self, freq): self.freq = freq - self.wxgui_fftsink2_0.set_baseband_freq(self.freq) - self._freq_slider.set_value(self.freq) self._freq_text_box.set_value(self.freq) self._saved_freq_config = ConfigParser.ConfigParser() self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section("main"): - self._saved_freq_config.add_section("main") - self._saved_freq_config.set("main", "freq", str(self.freq)) + if not self._saved_freq_config.has_section('usrp_rx_lrit'): + self._saved_freq_config.add_section('usrp_rx_lrit') + self._saved_freq_config.set('usrp_rx_lrit', 'freq', str(self.freq)) self._saved_freq_config.write(open(self.config_filename, 'w')) + self.rx_spectrum.set_baseband_freq(self.freq) + self.rrc_spectrum.set_baseband_freq(self.freq+self.offset) + self.costas_spectrum.set_baseband_freq(self.freq+self.offset) + self.usrp_simple_source_x_0.set_frequency(self.freq+self.offset) def set_costas_alpha(self, costas_alpha): self.costas_alpha = costas_alpha - self.gr_mpsk_receiver_cc_0.set_alpha(self.costas_alpha) - self.gr_mpsk_receiver_cc_0.set_beta(self.costas_alpha*self.costas_alpha/4.0) self._costas_alpha_slider.set_value(self.costas_alpha) self._costas_alpha_text_box.set_value(self.costas_alpha) self._saved_costas_alpha_config = ConfigParser.ConfigParser() self._saved_costas_alpha_config.read(self.config_filename) - if not self._saved_costas_alpha_config.has_section("main"): - self._saved_costas_alpha_config.add_section("main") - self._saved_costas_alpha_config.set("main", "costas_alpha", str(self.costas_alpha)) + if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'): + self._saved_costas_alpha_config.add_section('usrp_rx_lrit') + self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha)) self._saved_costas_alpha_config.write(open(self.config_filename, 'w')) + self.costas.set_alpha(self.costas_alpha) + self.costas.set_beta((self.costas_alpha**2.0)/4.0) if __name__ == '__main__': parser = OptionParser(option_class=eng_option, usage="%prog: [options]") |