summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan2009-08-29 11:12:37 -0700
committerJohnathan Corgan2009-09-20 09:39:27 -0700
commit6b6a5522e0b1d12ef5d697b1067a87dfe584cec6 (patch)
tree3ec76adefa7b434eb5f789679f660f2227c078fc
parenta02a0e43d49d3bbb9a76ab8333f1bf8e25c48556 (diff)
downloadgnuradio-6b6a5522e0b1d12ef5d697b1067a87dfe584cec6.tar.gz
gnuradio-6b6a5522e0b1d12ef5d697b1067a87dfe584cec6.tar.bz2
gnuradio-6b6a5522e0b1d12ef5d697b1067a87dfe584cec6.zip
Work in progress, incomplete
* Renamed noaa.carrier_pll_cc to noaa.hrpt_pll_cc * Added nop noaa.hrpt_sync_cc * Renamed grc apps to use usrp_ prefix and protocol name * Installed grc generated scripts to path
-rw-r--r--gr-noaa/grc/Makefile.am12
-rw-r--r--gr-noaa/grc/noaa_hrpt_pll_cc.xml (renamed from gr-noaa/grc/noaa_carrier_pll_cc.xml)6
-rw-r--r--gr-noaa/grc/noaa_hrpt_sync_cc.xml39
-rw-r--r--[-rwxr-xr-x]gr-noaa/grc/usrp_rx_hrpt.grc (renamed from gr-noaa/grc/rx_poes.grc)562
-rwxr-xr-xgr-noaa/grc/usrp_rx_hrpt.py245
-rw-r--r--[-rwxr-xr-x]gr-noaa/grc/usrp_rx_lrit.grc (renamed from gr-noaa/grc/rx_goes.grc)969
-rwxr-xr-xgr-noaa/grc/usrp_rx_lrit.py399
-rw-r--r--gr-noaa/lib/Makefile.am6
-rw-r--r--gr-noaa/lib/noaa_hrpt_pll_cc.cc (renamed from gr-noaa/lib/noaa_carrier_pll_cc.cc)14
-rw-r--r--gr-noaa/lib/noaa_hrpt_pll_cc.h (renamed from gr-noaa/lib/noaa_carrier_pll_cc.h)20
-rw-r--r--gr-noaa/lib/noaa_hrpt_sync_cc.cc62
-rw-r--r--gr-noaa/lib/noaa_hrpt_sync_cc.h57
-rw-r--r--gr-noaa/swig/Makefile.am3
-rw-r--r--gr-noaa/swig/noaa_hrpt_pll_cc.i (renamed from gr-noaa/swig/noaa_carrier_pll_cc.i)10
-rw-r--r--gr-noaa/swig/noaa_hrpt_sync_cc.i37
-rw-r--r--gr-noaa/swig/noaa_swig.i6
16 files changed, 1770 insertions, 677 deletions
diff --git a/gr-noaa/grc/Makefile.am b/gr-noaa/grc/Makefile.am
index 18144040d..c75529778 100644
--- a/gr-noaa/grc/Makefile.am
+++ b/gr-noaa/grc/Makefile.am
@@ -22,9 +22,15 @@
include $(top_srcdir)/Makefile.common
grcblocksdir = $(prefix)/share/gnuradio/grc/blocks
+
+dist_bin_SCRIPTS = \
+ usrp_rx_hrpt.py \
+ usrp_rx_lrit.py
+
dist_grcblocks_DATA = \
- noaa_carrier_pll_cc.xml
+ noaa_hrpt_pll_cc.xml \
+ noaa_hrpt_sync_cc.xml
EXTRA_DIST = \
- rx_goes.grc \
- rx_poes.grc
+ usrp_rx_hrpt.grc \
+ usrp_rx_lrit.grc
diff --git a/gr-noaa/grc/noaa_carrier_pll_cc.xml b/gr-noaa/grc/noaa_hrpt_pll_cc.xml
index 7b1fdc8f2..e56e0b056 100644
--- a/gr-noaa/grc/noaa_carrier_pll_cc.xml
+++ b/gr-noaa/grc/noaa_hrpt_pll_cc.xml
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<block>
- <name>Carrier PLL</name>
- <key>noaa_carrier_pll_cc</key>
+ <name>HRPT PLL</name>
+ <key>noaa_hrpt_pll_cc</key>
<category>NOAA</category>
<import>from gnuradio import noaa</import>
- <make>noaa.carrier_pll_cc($alpha, $beta, $max_offset)</make>
+ <make>noaa.hrpt_pll_cc($alpha, $beta, $max_offset)</make>
<callback>set_alpha($alpha)</callback>
<callback>set_beta($beta)</callback>
<callback>set_max_offset($max_offset)</callback>
diff --git a/gr-noaa/grc/noaa_hrpt_sync_cc.xml b/gr-noaa/grc/noaa_hrpt_sync_cc.xml
new file mode 100644
index 000000000..d311aa946
--- /dev/null
+++ b/gr-noaa/grc/noaa_hrpt_sync_cc.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<block>
+ <name>HRPT SYNC</name>
+ <key>noaa_hrpt_sync_cc</key>
+ <category>NOAA</category>
+ <import>from gnuradio import noaa</import>
+ <make>noaa.hrpt_sync_cc($alpha, $beta, $sps, $max_offset)</make>
+ <callback>set_alpha($alpha)</callback>
+ <callback>set_beta($beta)</callback>
+ <callback>set_max_offset($max_offset)</callback>
+ <param>
+ <name>Alpha</name>
+ <key>alpha</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Beta</name>
+ <key>beta</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Samples/Symbol</name>
+ <key>sps</key>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Max Offset</name>
+ <key>max_offset</key>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-noaa/grc/rx_poes.grc b/gr-noaa/grc/usrp_rx_hrpt.grc
index 1001049a2..d3c6603ad 100755..100644
--- a/gr-noaa/grc/rx_poes.grc
+++ b/gr-noaa/grc/usrp_rx_hrpt.grc
@@ -1,11 +1,11 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Sat Aug 22 13:06:22 2009</timestamp>
+ <timestamp>Sat Aug 29 11:48:56 2009</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
- <value>rx_poes</value>
+ <value>usrp_rx_hrpt</value>
</param>
<param>
<key>_enabled</key>
@@ -13,7 +13,7 @@
</param>
<param>
<key>title</key>
- <value></value>
+ <value>USRP HRPT Receiver</value>
</param>
<param>
<key>author</key>
@@ -53,22 +53,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>import</key>
<param>
<key>id</key>
- <value>decim</value>
+ <value>import_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>16</value>
+ <key>import</key>
+ <value>import math</value>
</param>
<param>
<key>_coordinate</key>
- <value>(97, 10)</value>
+ <value>(9, 202)</value>
</param>
<param>
<key>_rotation</key>
@@ -76,22 +76,30 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>gr_throttle</key>
<param>
<key>id</key>
- <value>sym_rate</value>
+ <value>throttle</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>600*1109</value>
+ <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>(286, 10)</value>
+ <value>(79, 518)</value>
</param>
<param>
<key>_rotation</key>
@@ -99,22 +107,34 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>gr_file_source</key>
<param>
<key>id</key>
- <value>sample_rate</value>
+ <value>src</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>64e6/decim</value>
+ <key>file</key>
+ <value>poes-d16.dat</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(176, 12)</value>
+ <value>(34, 423)</value>
</param>
<param>
<key>_rotation</key>
@@ -125,7 +145,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>sps</value>
+ <value>decim</value>
</param>
<param>
<key>_enabled</key>
@@ -133,11 +153,11 @@
</param>
<param>
<key>value</key>
- <value>sample_rate/sym_rate</value>
+ <value>16</value>
</param>
<param>
<key>_coordinate</key>
- <value>(382, 14)</value>
+ <value>(186, 10)</value>
</param>
<param>
<key>_rotation</key>
@@ -160,7 +180,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(492, 16)</value>
+ <value>(589, 13)</value>
</param>
<param>
<key>_rotation</key>
@@ -168,22 +188,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import_0</value>
+ <value>sym_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import math</value>
+ <key>value</key>
+ <value>600*1109</value>
</param>
<param>
<key>_coordinate</key>
- <value>(9, 202)</value>
+ <value>(383, 7)</value>
</param>
<param>
<key>_rotation</key>
@@ -194,7 +214,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>max_offset</value>
+ <value>sps</value>
</param>
<param>
<key>_enabled</key>
@@ -202,11 +222,11 @@
</param>
<param>
<key>value</key>
- <value>2*math.pi*100e3/sample_rate</value>
+ <value>sample_rate/sym_rate</value>
</param>
<param>
<key>_coordinate</key>
- <value>(342, 95)</value>
+ <value>(479, 11)</value>
</param>
<param>
<key>_rotation</key>
@@ -214,42 +234,85 @@
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>pll_alpha</value>
+ <value>sample_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>PLL Alpha</value>
+ <key>value</key>
+ <value>64e6/decim</value>
</param>
<param>
- <key>value</key>
- <value>0.005</value>
+ <key>_coordinate</key>
+ <value>(273, 9)</value>
</param>
<param>
- <key>min</key>
- <value>0.0</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
<param>
- <key>max</key>
- <value>0.5</value>
+ <key>id</key>
+ <value>rx_fftsink</value>
</param>
<param>
- <key>num_steps</key>
- <value>500</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>title</key>
+ <value>RX Spectrum</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>sample_rate</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>1698e6</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>5</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>20</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.1</value>
</param>
<param>
<key>grid_pos</key>
@@ -257,22 +320,22 @@
</param>
<param>
<key>notebook</key>
- <value></value>
+ <value>displays, 0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(192, 100)</value>
+ <value>(194, 263)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<block>
- <key>gr_throttle</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>throttle</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
@@ -283,20 +346,48 @@
<value>complex</value>
</param>
<param>
- <key>samples_per_second</key>
+ <key>title</key>
+ <value>RX Waveform</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
<value>sample_rate</value>
</param>
<param>
- <key>vlen</key>
+ <key>v_scale</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>grid_pos</key>
+ <value>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>displays, 0</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(79, 518)</value>
+ <value>(198, 609)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<block>
@@ -366,7 +457,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(429, 502)</value>
+ <value>(434, 502)</value>
</param>
<param>
<key>_rotation</key>
@@ -374,30 +465,45 @@
</param>
</block>
<block>
- <key>noaa_carrier_pll_cc</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>noaa_carrier_pll_cc_0</value>
+ <value>max_carrier_offset</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>alpha</key>
- <value>pll_alpha</value>
+ <key>value</key>
+ <value>2*math.pi*100e3/sample_rate</value>
</param>
<param>
- <key>beta</key>
- <value>pll_alpha**2/4.0</value>
+ <key>_coordinate</key>
+ <value>(668, 107)</value>
</param>
<param>
- <key>max_offset</key>
- <value>max_offset</value>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>max_sync_offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.01</value>
</param>
<param>
<key>_coordinate</key>
- <value>(636, 502)</value>
+ <value>(665, 173)</value>
</param>
<param>
<key>_rotation</key>
@@ -405,58 +511,54 @@
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0</value>
+ <value>pll_alpha</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>title</key>
- <value>RX Waveform</value>
+ <key>label</key>
+ <value>PLL Alpha</value>
</param>
<param>
- <key>samp_rate</key>
- <value>sample_rate</value>
+ <key>value</key>
+ <value>0.005</value>
</param>
<param>
- <key>v_scale</key>
- <value>0</value>
+ <key>min</key>
+ <value>0.0</value>
</param>
<param>
- <key>t_scale</key>
- <value>20.0/sample_rate</value>
+ <key>max</key>
+ <value>0.5</value>
</param>
<param>
- <key>ac_couple</key>
- <value>False</value>
+ <key>num_steps</key>
+ <value>500</value>
</param>
<param>
- <key>xy_mode</key>
- <value>False</value>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
</param>
<param>
- <key>num_inputs</key>
- <value>1</value>
+ <key>converver</key>
+ <value>float_converter</value>
</param>
<param>
<key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <value>0, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
- <value>displays, 0</value>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(433, 612)</value>
+ <value>(192, 100)</value>
</param>
<param>
<key>_rotation</key>
@@ -464,74 +566,85 @@
</param>
</block>
<block>
- <key>wxgui_fftsink2</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>rx_fftsink</value>
+ <value>sync_alpha</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>label</key>
+ <value>SYNC Alpha</value>
</param>
<param>
- <key>title</key>
- <value>RX Spectrum</value>
+ <key>value</key>
+ <value>0.005</value>
</param>
<param>
- <key>samp_rate</key>
- <value>sample_rate</value>
+ <key>min</key>
+ <value>0.0</value>
</param>
<param>
- <key>baseband_freq</key>
- <value>1698e6</value>
+ <key>max</key>
+ <value>0.5</value>
</param>
<param>
- <key>y_per_div</key>
- <value>5</value>
+ <key>num_steps</key>
+ <value>500</value>
</param>
<param>
- <key>y_divs</key>
- <value>8</value>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
</param>
<param>
- <key>ref_level</key>
- <value>20</value>
+ <key>converver</key>
+ <value>float_converter</value>
</param>
<param>
- <key>fft_size</key>
- <value>1024</value>
+ <key>grid_pos</key>
+ <value>0, 1, 1, 1</value>
</param>
<param>
- <key>fft_rate</key>
- <value>30</value>
+ <key>notebook</key>
+ <value></value>
</param>
<param>
- <key>peak_hold</key>
- <value>False</value>
+ <key>_coordinate</key>
+ <value>(344, 101)</value>
</param>
<param>
- <key>average</key>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>noaa_hrpt_pll_cc</key>
+ <param>
+ <key>id</key>
+ <value>noaa_hrpt_pll_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0.1</value>
+ <key>alpha</key>
+ <value>pll_alpha</value>
</param>
<param>
- <key>grid_pos</key>
- <value>0, 0, 1, 1</value>
+ <key>beta</key>
+ <value>pll_alpha**2/4.0</value>
</param>
<param>
- <key>notebook</key>
- <value>displays, 0</value>
+ <key>max_offset</key>
+ <value>max_carrier_offset</value>
</param>
<param>
<key>_coordinate</key>
- <value>(433, 241)</value>
+ <value>(628, 502)</value>
</param>
<param>
<key>_rotation</key>
@@ -539,68 +652,69 @@
</param>
</block>
<block>
- <key>gr_complex_to_imag</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>gr_complex_to_imag_0</value>
+ <value>wxgui_scopesink2_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(877, 522)</value>
+ <key>title</key>
+ <value>Post-PLL</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>samp_rate</key>
+ <value>sample_rate</value>
</param>
- </block>
- <block>
- <key>notebook</key>
<param>
- <key>id</key>
- <value>displays</value>
+ <key>v_scale</key>
+ <value>0.5</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>t_scale</key>
+ <value>20.0/sample_rate</value>
</param>
<param>
- <key>style</key>
- <value>wx.NB_TOP</value>
+ <key>ac_couple</key>
+ <value>False</value>
</param>
<param>
- <key>labels</key>
- <value>['RX','Baseband']</value>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
</param>
<param>
<key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <value>0, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
- <value></value>
+ <value>displays, 1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(9, 99)</value>
+ <value>(618, 335)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_1_0_1</value>
+ <value>wxgui_scopesink2_0_0_1</value>
</param>
<param>
<key>_enabled</key>
@@ -608,11 +722,11 @@
</param>
<param>
<key>type</key>
- <value>float</value>
+ <value>complex</value>
</param>
<param>
<key>title</key>
- <value>Manchester Symbols</value>
+ <value>Post-SYNC</value>
</param>
<param>
<key>samp_rate</key>
@@ -624,7 +738,7 @@
</param>
<param>
<key>t_scale</key>
- <value>5.0/sym_rate</value>
+ <value>20.0/sample_rate</value>
</param>
<param>
<key>ac_couple</key>
@@ -640,15 +754,15 @@
</param>
<param>
<key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <value>0, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
- <value>displays, 1</value>
+ <value>displays, 2</value>
</param>
<param>
<key>_coordinate</key>
- <value>(856, 343)</value>
+ <value>(872, 341)</value>
</param>
<param>
<key>_rotation</key>
@@ -656,10 +770,45 @@
</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>['RX','PLL','SYNC']</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>1, 0, 1, 2</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(9, 99)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_0</value>
+ <value>wxgui_scopesink2_0_0_0</value>
</param>
<param>
<key>_enabled</key>
@@ -671,7 +820,7 @@
</param>
<param>
<key>title</key>
- <value>Post-Filter/PLL</value>
+ <value>Post-PLL</value>
</param>
<param>
<key>samp_rate</key>
@@ -691,7 +840,7 @@
</param>
<param>
<key>xy_mode</key>
- <value>False</value>
+ <value>True</value>
</param>
<param>
<key>num_inputs</key>
@@ -699,7 +848,7 @@
</param>
<param>
<key>grid_pos</key>
- <value>0, 0, 1, 1</value>
+ <value>1, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
@@ -707,7 +856,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(634, 335)</value>
+ <value>(618, 614)</value>
</param>
<param>
<key>_rotation</key>
@@ -715,38 +864,97 @@
</param>
</block>
<block>
- <key>gr_file_source</key>
+ <key>noaa_hrpt_sync_cc</key>
<param>
<key>id</key>
- <value>src</value>
+ <value>sync</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>file</key>
- <value>poes-d16.dat</value>
+ <key>alpha</key>
+ <value>sync_alpha</value>
+ </param>
+ <param>
+ <key>beta</key>
+ <value>sync_alpha**2/4.0</value>
+ </param>
+ <param>
+ <key>sps</key>
+ <value>sps</value>
+ </param>
+ <param>
+ <key>max_offset</key>
+ <value>max_sync_offset</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(865, 494)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>repeat</key>
+ <key>title</key>
+ <value>Post-SYNC</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>sample_rate</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>20.0/sample_rate</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
+ <key>num_inputs</key>
<value>1</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>(34, 423)</value>
+ <value>(872, 607)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<connection>
@@ -756,12 +964,6 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>noaa_carrier_pll_cc_0</source_block_id>
- <sink_block_id>gr_complex_to_imag_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>throttle</source_block_id>
<sink_block_id>agr</sink_block_id>
<source_key>0</source_key>
@@ -787,19 +989,37 @@
</connection>
<connection>
<source_block_id>gr_moving_average_xx_0</source_block_id>
- <sink_block_id>noaa_carrier_pll_cc_0</sink_block_id>
+ <sink_block_id>noaa_hrpt_pll_cc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>noaa_carrier_pll_cc_0</source_block_id>
+ <source_block_id>noaa_hrpt_pll_cc_0</source_block_id>
<sink_block_id>wxgui_scopesink2_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_complex_to_imag_0</source_block_id>
- <sink_block_id>wxgui_scopesink2_0_1_0_1</sink_block_id>
+ <source_block_id>noaa_hrpt_pll_cc_0</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>noaa_hrpt_pll_cc_0</source_block_id>
+ <sink_block_id>sync</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>sync</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>sync</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0_0_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-noaa/grc/usrp_rx_hrpt.py b/gr-noaa/grc/usrp_rx_hrpt.py
new file mode 100755
index 000000000..ed6417335
--- /dev/null
+++ b/gr-noaa/grc/usrp_rx_hrpt.py
@@ -0,0 +1,245 @@
+#!/usr/bin/env python
+##################################################
+# Gnuradio Python Flow Graph
+# Title: USRP HRPT Receiver
+# Generated: Sat Aug 29 11:48:57 2009
+##################################################
+
+from gnuradio import gr
+from gnuradio import noaa
+from gnuradio.eng_option import eng_option
+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 math
+import wx
+
+class usrp_rx_hrpt(grc_wxgui.top_block_gui):
+
+ def __init__(self):
+ grc_wxgui.top_block_gui.__init__(self, title="USRP HRPT Receiver")
+
+ ##################################################
+ # Variables
+ ##################################################
+ self.decim = decim = 16
+ self.sym_rate = sym_rate = 600*1109
+ self.sample_rate = sample_rate = 64e6/decim
+ self.sps = sps = sample_rate/sym_rate
+ self.sync_alpha = sync_alpha = 0.005
+ self.pll_alpha = pll_alpha = 0.005
+ self.max_sync_offset = max_sync_offset = 0.01
+ self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate
+ self.hs = hs = int(sps/2.0)
+
+ ##################################################
+ # Notebooks
+ ##################################################
+ self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+ self.displays.AddPage(grc_wxgui.Panel(self.displays), "RX")
+ self.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL")
+ self.displays.AddPage(grc_wxgui.Panel(self.displays), "SYNC")
+ self.GridAdd(self.displays, 1, 0, 1, 2)
+
+ ##################################################
+ # Controls
+ ##################################################
+ _sync_alpha_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._sync_alpha_text_box = forms.text_box(
+ parent=self.GetWin(),
+ sizer=_sync_alpha_sizer,
+ value=self.sync_alpha,
+ callback=self.set_sync_alpha,
+ label="SYNC Alpha",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._sync_alpha_slider = forms.slider(
+ parent=self.GetWin(),
+ sizer=_sync_alpha_sizer,
+ value=self.sync_alpha,
+ callback=self.set_sync_alpha,
+ minimum=0.0,
+ maximum=0.5,
+ num_steps=500,
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.GridAdd(_sync_alpha_sizer, 0, 1, 1, 1)
+ _pll_alpha_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._pll_alpha_text_box = forms.text_box(
+ parent=self.GetWin(),
+ sizer=_pll_alpha_sizer,
+ value=self.pll_alpha,
+ callback=self.set_pll_alpha,
+ label="PLL Alpha",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._pll_alpha_slider = forms.slider(
+ parent=self.GetWin(),
+ sizer=_pll_alpha_sizer,
+ value=self.pll_alpha,
+ callback=self.set_pll_alpha,
+ minimum=0.0,
+ maximum=0.5,
+ num_steps=500,
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.GridAdd(_pll_alpha_sizer, 0, 0, 1, 1)
+
+ ##################################################
+ # Blocks
+ ##################################################
+ self.agr = gr.agc_cc(1e-6, 1.0, 1.0, 1.0)
+ self.gr_moving_average_xx_0 = gr.moving_average_cc(hs, 1.0/hs, 4000)
+ self.noaa_hrpt_pll_cc_0 = noaa.hrpt_pll_cc(pll_alpha, pll_alpha**2/4.0, max_carrier_offset)
+ self.rx_fftsink = fftsink2.fft_sink_c(
+ self.displays.GetPage(0).GetWin(),
+ baseband_freq=1698e6,
+ y_per_div=5,
+ y_divs=8,
+ ref_level=20,
+ sample_rate=sample_rate,
+ fft_size=1024,
+ fft_rate=30,
+ average=True,
+ avg_alpha=0.1,
+ title="RX Spectrum",
+ peak_hold=False,
+ )
+ self.displays.GetPage(0).GridAdd(self.rx_fftsink.win, 0, 0, 1, 1)
+ self.src = gr.file_source(gr.sizeof_gr_complex*1, "poes-d16.dat", True)
+ self.sync = noaa.hrpt_sync_cc(sync_alpha, sync_alpha**2/4.0, sps, max_sync_offset)
+ self.throttle = gr.throttle(gr.sizeof_gr_complex*1, sample_rate)
+ self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
+ self.displays.GetPage(0).GetWin(),
+ title="RX Waveform",
+ sample_rate=sample_rate,
+ v_scale=0,
+ t_scale=20.0/sample_rate,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ )
+ self.displays.GetPage(0).GridAdd(self.wxgui_scopesink2_0.win, 1, 0, 1, 1)
+ self.wxgui_scopesink2_0_0 = scopesink2.scope_sink_c(
+ self.displays.GetPage(1).GetWin(),
+ title="Post-PLL",
+ sample_rate=sample_rate,
+ v_scale=0.5,
+ t_scale=20.0/sample_rate,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ )
+ self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0.win, 0, 0, 1, 1)
+ self.wxgui_scopesink2_0_0_0 = scopesink2.scope_sink_c(
+ self.displays.GetPage(1).GetWin(),
+ title="Post-PLL",
+ sample_rate=sample_rate,
+ v_scale=0.5,
+ t_scale=20.0/sample_rate,
+ ac_couple=False,
+ xy_mode=True,
+ num_inputs=1,
+ )
+ self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0_0.win, 1, 0, 1, 1)
+ self.wxgui_scopesink2_0_0_0_0 = scopesink2.scope_sink_c(
+ self.displays.GetPage(2).GetWin(),
+ title="Post-SYNC",
+ sample_rate=sample_rate,
+ v_scale=0.5,
+ t_scale=20.0/sample_rate,
+ ac_couple=False,
+ xy_mode=True,
+ num_inputs=1,
+ )
+ self.displays.GetPage(2).GridAdd(self.wxgui_scopesink2_0_0_0_0.win, 1, 0, 1, 1)
+ self.wxgui_scopesink2_0_0_1 = scopesink2.scope_sink_c(
+ self.displays.GetPage(2).GetWin(),
+ title="Post-SYNC",
+ sample_rate=sample_rate,
+ v_scale=0.5,
+ t_scale=20.0/sample_rate,
+ ac_couple=False,
+ xy_mode=False,
+ num_inputs=1,
+ )
+ self.displays.GetPage(2).GridAdd(self.wxgui_scopesink2_0_0_1.win, 0, 0, 1, 1)
+
+ ##################################################
+ # Connections
+ ##################################################
+ self.connect((self.src, 0), (self.throttle, 0))
+ self.connect((self.throttle, 0), (self.agr, 0))
+ self.connect((self.agr, 0), (self.gr_moving_average_xx_0, 0))
+ self.connect((self.agr, 0), (self.rx_fftsink, 0))
+ self.connect((self.agr, 0), (self.wxgui_scopesink2_0, 0))
+ self.connect((self.gr_moving_average_xx_0, 0), (self.noaa_hrpt_pll_cc_0, 0))
+ self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0_0, 0))
+ self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.sync, 0))
+ self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_1, 0))
+ self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_0_0, 0))
+
+ def set_decim(self, decim):
+ self.decim = decim
+ self.set_sample_rate(64e6/self.decim)
+
+ def set_sym_rate(self, sym_rate):
+ self.sym_rate = sym_rate
+ self.set_sps(self.sample_rate/self.sym_rate)
+
+ def set_sample_rate(self, sample_rate):
+ self.sample_rate = sample_rate
+ self.set_sps(self.sample_rate/self.sym_rate)
+ self.rx_fftsink.set_sample_rate(self.sample_rate)
+ self.wxgui_scopesink2_0.set_sample_rate(self.sample_rate)
+ self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate)
+ self.wxgui_scopesink2_0_0.set_sample_rate(self.sample_rate)
+ self.wxgui_scopesink2_0_0_1.set_sample_rate(self.sample_rate)
+ self.wxgui_scopesink2_0_0_0.set_sample_rate(self.sample_rate)
+ self.wxgui_scopesink2_0_0_0_0.set_sample_rate(self.sample_rate)
+
+ def set_sps(self, sps):
+ self.sps = sps
+ self.set_hs(int(self.sps/2.0))
+
+ def set_sync_alpha(self, sync_alpha):
+ self.sync_alpha = sync_alpha
+ self._sync_alpha_slider.set_value(self.sync_alpha)
+ self._sync_alpha_text_box.set_value(self.sync_alpha)
+ self.sync.set_alpha(self.sync_alpha)
+ self.sync.set_beta(self.sync_alpha**2/4.0)
+
+ def set_pll_alpha(self, pll_alpha):
+ self.pll_alpha = pll_alpha
+ self._pll_alpha_slider.set_value(self.pll_alpha)
+ self._pll_alpha_text_box.set_value(self.pll_alpha)
+ self.noaa_hrpt_pll_cc_0.set_alpha(self.pll_alpha)
+ self.noaa_hrpt_pll_cc_0.set_beta(self.pll_alpha**2/4.0)
+
+ def set_max_sync_offset(self, max_sync_offset):
+ self.max_sync_offset = max_sync_offset
+ self.sync.set_max_offset(self.max_sync_offset)
+
+ def set_max_carrier_offset(self, max_carrier_offset):
+ self.max_carrier_offset = max_carrier_offset
+ self.noaa_hrpt_pll_cc_0.set_max_offset(self.max_carrier_offset)
+
+ def set_hs(self, hs):
+ self.hs = hs
+ self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs)
+
+if __name__ == '__main__':
+ parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+ (options, args) = parser.parse_args()
+ tb = usrp_rx_hrpt()
+ tb.Run(True)
+
diff --git a/gr-noaa/grc/rx_goes.grc b/gr-noaa/grc/usrp_rx_lrit.grc
index ebd21da40..55fe39787 100755..100644
--- a/gr-noaa/grc/rx_goes.grc
+++ b/gr-noaa/grc/usrp_rx_lrit.grc
@@ -1,11 +1,11 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Sat Aug 1 22:58:41 2009</timestamp>
+ <timestamp>Sat Aug 29 11:26:03 2009</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
- <value>rx_goes</value>
+ <value>usrp_rx_lrit</value>
</param>
<param>
<key>_enabled</key>
@@ -13,7 +13,7 @@
</param>
<param>
<key>title</key>
- <value>USRP GOES Receiver</value>
+ <value>USRP LRIT Receiver</value>
</param>
<param>
<key>author</key>
@@ -122,441 +122,6 @@
</param>
</block>
<block>
- <key>variable_slider</key>
- <param>
- <key>id</key>
- <value>gain</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Gain</value>
- </param>
- <param>
- <key>value</key>
- <value>saved_gain</value>
- </param>
- <param>
- <key>min</key>
- <value>0</value>
- </param>
- <param>
- <key>max</key>
- <value>115</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>115</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>(392, 12)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable_config</key>
- <param>
- <key>id</key>
- <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>real</value>
- </param>
- <param>
- <key>config_file</key>
- <value>rx_goes.cfg</value>
- </param>
- <param>
- <key>section</key>
- <value>main</value>
- </param>
- <param>
- <key>option</key>
- <value>gain</value>
- </param>
- <param>
- <key>writeback</key>
- <value>gain</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(392, 163)</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.005</value>
- </param>
- <param>
- <key>type</key>
- <value>real</value>
- </param>
- <param>
- <key>config_file</key>
- <value>rx_goes.cfg</value>
- </param>
- <param>
- <key>section</key>
- <value>main</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>(835, 162)</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.005</value>
- </param>
- <param>
- <key>type</key>
- <value>real</value>
- </param>
- <param>
- <key>config_file</key>
- <value>rx_goes.cfg</value>
- </param>
- <param>
- <key>section</key>
- <value>main</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>(688, 162)</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>1, 1, 1, 1</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(833, 14)</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>1, 0, 1, 1</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(688, 13)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable_slider</key>
- <param>
- <key>id</key>
- <value>freq</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Frequency</value>
- </param>
- <param>
- <key>value</key>
- <value>saved_freq</value>
- </param>
- <param>
- <key>min</key>
- <value>135e6</value>
- </param>
- <param>
- <key>max</key>
- <value>139e6</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>400</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, 2, 1, 1</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(540, 13)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable_config</key>
- <param>
- <key>id</key>
- <value>saved_freq</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>rx_goes.cfg</value>
- </param>
- <param>
- <key>section</key>
- <value>main</value>
- </param>
- <param>
- <key>option</key>
- <value>freq</value>
- </param>
- <param>
- <key>writeback</key>
- <value>freq</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(541, 162)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable_config</key>
- <param>
- <key>id</key>
- <value>saved_decim</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>value</key>
- <value>160</value>
- </param>
- <param>
- <key>type</key>
- <value>int</value>
- </param>
- <param>
- <key>config_file</key>
- <value>rx_goes.cfg</value>
- </param>
- <param>
- <key>section</key>
- <value>main</value>
- </param>
- <param>
- <key>option</key>
- <value>decim</value>
- </param>
- <param>
- <key>writeback</key>
- <value>decim</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(245, 161)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>variable_text_box</key>
<param>
<key>id</key>
@@ -600,41 +165,6 @@
</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', 'Costas Output']</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value>2, 0, 1, 3</value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(12, 287)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
@@ -1361,6 +891,499 @@
<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', 'Costas Output']</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>2, 0, 1, 3</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(14, 351)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_config</key>
+ <param>
+ <key>id</key>
+ <value>saved_decim</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>160</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>int</value>
+ </param>
+ <param>
+ <key>config_file</key>
+ <value>config_filename</value>
+ </param>
+ <param>
+ <key>section</key>
+ <value>main</value>
+ </param>
+ <param>
+ <key>option</key>
+ <value>decim</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>decim</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(246, 172)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>gain</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Gain</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>saved_gain</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>115</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>115</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>(411, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_config</key>
+ <param>
+ <key>id</key>
+ <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>real</value>
+ </param>
+ <param>
+ <key>config_file</key>
+ <value>config_filename</value>
+ </param>
+ <param>
+ <key>section</key>
+ <value>main</value>
+ </param>
+ <param>
+ <key>option</key>
+ <value>gain</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>gain</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(412, 172)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>saved_freq</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>135e6</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>139e6</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>400</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, 2, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(574, 12)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_config</key>
+ <param>
+ <key>id</key>
+ <value>saved_freq</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>
+ </param>
+ <param>
+ <key>section</key>
+ <value>main</value>
+ </param>
+ <param>
+ <key>option</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>freq</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(576, 170)</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>1, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(738, 13)</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.005</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>
+ </param>
+ <param>
+ <key>option</key>
+ <value>costas_alpha</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>costas_alpha</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(739, 170)</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.005</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>
+ </param>
+ <param>
+ <key>option</key>
+ <value>gain_mu</value>
+ </param>
+ <param>
+ <key>writeback</key>
+ <value>gain_mu</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(900, 170)</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>1, 1, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(902, 13)</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>"usrp_rx_lrit.cfg"</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(13, 283)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>usrp_simple_source_x_0</source_block_id>
<sink_block_id>gr_agc_xx_0</sink_block_id>
diff --git a/gr-noaa/grc/usrp_rx_lrit.py b/gr-noaa/grc/usrp_rx_lrit.py
new file mode 100755
index 000000000..bc313e3af
--- /dev/null
+++ b/gr-noaa/grc/usrp_rx_lrit.py
@@ -0,0 +1,399 @@
+#!/usr/bin/env python
+##################################################
+# Gnuradio Python Flow Graph
+# Title: USRP LRIT Receiver
+# Generated: Sat Aug 29 11:26:03 2009
+##################################################
+
+from gnuradio import gr
+from gnuradio.eng_option import eng_option
+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 wxgui as grc_wxgui
+from optparse import OptionParser
+import ConfigParser
+import wx
+
+class usrp_rx_lrit(grc_wxgui.top_block_gui):
+
+ def __init__(self):
+ grc_wxgui.top_block_gui.__init__(self, title="USRP LRIT Receiver")
+
+ ##################################################
+ # Variables
+ ##################################################
+ self.config_filename = config_filename = "usrp_rx_lrit.cfg"
+ self._saved_decim_config = ConfigParser.ConfigParser()
+ self._saved_decim_config.read(config_filename)
+ try: saved_decim = self._saved_decim_config.getint("main", "decim")
+ except: saved_decim = 160
+ self.saved_decim = saved_decim
+ self.decim = decim = saved_decim
+ 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("main", "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")
+ 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
+ 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")
+ 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.gain_mu = gain_mu = saved_gain_mu
+ self.gain = gain = saved_gain
+ self.freq = freq = saved_freq
+ 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), "Costas Output")
+ self.GridAdd(self.displays, 2, 0, 1, 3)
+
+ ##################################################
+ # Controls
+ ##################################################
+ self._decim_text_box = forms.text_box(
+ parent=self.GetWin(),
+ value=self.decim,
+ callback=self.set_decim,
+ label="Decim",
+ converter=forms.int_converter(),
+ )
+ self.GridAdd(self._decim_text_box, 0, 0, 1, 1)
+ _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, 1, 1, 1, 1)
+ _gain_sizer = wx.BoxSizer(wx.VERTICAL)
+ self._gain_text_box = forms.text_box(
+ parent=self.GetWin(),
+ sizer=_gain_sizer,
+ value=self.gain,
+ callback=self.set_gain,
+ label="Gain",
+ converter=forms.float_converter(),
+ proportion=0,
+ )
+ self._gain_slider = forms.slider(
+ parent=self.GetWin(),
+ sizer=_gain_sizer,
+ value=self.gain,
+ callback=self.set_gain,
+ minimum=0,
+ maximum=115,
+ num_steps=115,
+ style=wx.SL_HORIZONTAL,
+ cast=float,
+ proportion=1,
+ )
+ self.GridAdd(_gain_sizer, 0, 1, 1, 1)
+ _freq_sizer = wx.BoxSizer(wx.VERTICAL)
+ 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)
+ _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, 1, 0, 1, 1)
+
+ ##################################################
+ # Blocks
+ ##################################################
+ self.gr_add_const_vxx_0 = gr.add_const_vff((48.0, ))
+ 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.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,
+ y_per_div=10,
+ y_divs=10,
+ ref_level=50,
+ sample_rate=samp_rate,
+ fft_size=1024,
+ fft_rate=30,
+ average=False,
+ avg_alpha=None,
+ title="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(1).GetWin(),
+ unit="dB",
+ minval=0,
+ maxval=30,
+ factor=1.0,
+ decimal_places=1,
+ ref_level=0,
+ sample_rate=10,
+ number_rate=10,
+ average=False,
+ avg_alpha=None,
+ label="SNR",
+ 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,
+ v_scale=0.5,
+ t_scale=20.0/samp_rate,
+ ac_couple=False,
+ xy_mode=True,
+ 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,
+ ac_couple=False,
+ xy_mode=True,
+ num_inputs=1,
+ )
+ self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_1.win, 0, 0, 1, 1)
+
+ ##################################################
+ # 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))
+
+ 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))
+ self._saved_freq_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))
+ 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))
+ self._saved_gain_mu_config.write(open(self.config_filename, 'w'))
+
+ def set_saved_decim(self, saved_decim):
+ self.saved_decim = saved_decim
+ self.set_decim(self.saved_decim)
+
+ def set_decim(self, decim):
+ self.decim = decim
+ self.set_samp_rate(64e6/self.decim)
+ self._decim_text_box.set_value(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))
+ self._saved_decim_config.write(open(self.config_filename, 'w'))
+
+ def set_symbol_rate(self, symbol_rate):
+ self.symbol_rate = symbol_rate
+ self.set_sps(self.samp_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_gain(self, saved_gain):
+ self.saved_gain = saved_gain
+ self.set_gain(self.saved_gain)
+
+ def set_saved_freq(self, saved_freq):
+ self.saved_freq = saved_freq
+ self.set_freq(self.saved_freq)
+
+ 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_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_sps(self, sps):
+ self.sps = sps
+ self.gr_mpsk_receiver_cc_0.set_omega(self.sps)
+
+ 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._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))
+ 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)
+
+ 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))
+ self._saved_gain_config.write(open(self.config_filename, 'w'))
+
+ 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))
+ self._saved_freq_config.write(open(self.config_filename, 'w'))
+
+ 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))
+ self._saved_costas_alpha_config.write(open(self.config_filename, 'w'))
+
+if __name__ == '__main__':
+ parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+ (options, args) = parser.parse_args()
+ tb = usrp_rx_lrit()
+ tb.Run(True)
+
diff --git a/gr-noaa/lib/Makefile.am b/gr-noaa/lib/Makefile.am
index 39a4f1155..2690ddb54 100644
--- a/gr-noaa/lib/Makefile.am
+++ b/gr-noaa/lib/Makefile.am
@@ -29,7 +29,8 @@ lib_LTLIBRARIES = \
libgnuradio-noaa.la
libgnuradio_noaa_la_SOURCES = \
- noaa_carrier_pll_cc.cc
+ noaa_hrpt_pll_cc.cc \
+ noaa_hrpt_sync_cc.cc
libgnuradio_noaa_la_LIBADD = \
$(GNURADIO_CORE_LA)
@@ -37,4 +38,5 @@ libgnuradio_noaa_la_LIBADD = \
libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
grinclude_HEADERS = \
- noaa_carrier_pll_cc.h
+ noaa_hrpt_pll_cc.h \
+ noaa_hrpt_sync_cc.h
diff --git a/gr-noaa/lib/noaa_carrier_pll_cc.cc b/gr-noaa/lib/noaa_hrpt_pll_cc.cc
index d6a86faa1..46fe24da4 100644
--- a/gr-noaa/lib/noaa_carrier_pll_cc.cc
+++ b/gr-noaa/lib/noaa_hrpt_pll_cc.cc
@@ -24,21 +24,21 @@
#include "config.h"
#endif
-#include <noaa_carrier_pll_cc.h>
+#include <noaa_hrpt_pll_cc.h>
#include <gr_io_signature.h>
#include <gr_math.h>
#include <gr_sincos.h>
#define M_TWOPI (2*M_PI)
-noaa_carrier_pll_cc_sptr
-noaa_make_carrier_pll_cc(float alpha, float beta, float max_offset)
+noaa_hrpt_pll_cc_sptr
+noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset)
{
- return gnuradio::get_initial_sptr(new noaa_carrier_pll_cc(alpha, beta, max_offset));
+ return gnuradio::get_initial_sptr(new noaa_hrpt_pll_cc(alpha, beta, max_offset));
}
-noaa_carrier_pll_cc::noaa_carrier_pll_cc(float alpha, float beta, float max_offset)
- : gr_sync_block("noaa_carrier_pll_cc",
+noaa_hrpt_pll_cc::noaa_hrpt_pll_cc(float alpha, float beta, float max_offset)
+ : gr_sync_block("noaa_hrpt_pll_cc",
gr_make_io_signature(1, 1, sizeof(gr_complex)),
gr_make_io_signature(1, 1, sizeof(gr_complex))),
d_alpha(alpha), d_beta(beta), d_max_offset(max_offset),
@@ -58,7 +58,7 @@ phase_wrap(float phase)
}
int
-noaa_carrier_pll_cc::work(int noutput_items,
+noaa_hrpt_pll_cc::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
diff --git a/gr-noaa/lib/noaa_carrier_pll_cc.h b/gr-noaa/lib/noaa_hrpt_pll_cc.h
index 8e6de866e..810454406 100644
--- a/gr-noaa/lib/noaa_carrier_pll_cc.h
+++ b/gr-noaa/lib/noaa_hrpt_pll_cc.h
@@ -20,21 +20,21 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef INCLUDED_NOAA_CARRIER_PLL_CC_H
-#define INCLUDED_NOAA_CARRIER_PLL_CC_H
+#ifndef INCLUDED_NOAA_HRPT_PLL_CC_H
+#define INCLUDED_NOAA_HRPT_PLL_CC_H
#include <gr_sync_block.h>
-class noaa_carrier_pll_cc;
-typedef boost::shared_ptr<noaa_carrier_pll_cc> noaa_carrier_pll_cc_sptr;
+class noaa_hrpt_pll_cc;
+typedef boost::shared_ptr<noaa_hrpt_pll_cc> noaa_hrpt_pll_cc_sptr;
-noaa_carrier_pll_cc_sptr
-noaa_make_carrier_pll_cc(float alpha, float beta, float max_offset);
+noaa_hrpt_pll_cc_sptr
+noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
-class noaa_carrier_pll_cc : public gr_sync_block
+class noaa_hrpt_pll_cc : public gr_sync_block
{
- friend noaa_carrier_pll_cc_sptr noaa_make_carrier_pll_cc(float alpha, float beta, float max_offset);
- noaa_carrier_pll_cc(float alpha, float beta, float max_offset);
+ friend noaa_hrpt_pll_cc_sptr noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
+ noaa_hrpt_pll_cc(float alpha, float beta, float max_offset);
float d_alpha; // 1st order loop constant
float d_beta; // 2nd order loop constant
@@ -52,4 +52,4 @@ class noaa_carrier_pll_cc : public gr_sync_block
void set_max_offset(float max_offset) { d_max_offset = max_offset; }
};
-#endif /* INCLUDED_NOAA_CARRIER_PLL_CC_H */
+#endif /* INCLUDED_NOAA_HRPT_PLL_CC_H */
diff --git a/gr-noaa/lib/noaa_hrpt_sync_cc.cc b/gr-noaa/lib/noaa_hrpt_sync_cc.cc
new file mode 100644
index 000000000..47858d758
--- /dev/null
+++ b/gr-noaa/lib/noaa_hrpt_sync_cc.cc
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <noaa_hrpt_sync_cc.h>
+#include <gr_io_signature.h>
+
+noaa_hrpt_sync_cc_sptr
+noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset)
+{
+ return gnuradio::get_initial_sptr(new noaa_hrpt_sync_cc(alpha, beta, sps, max_offset));
+}
+
+noaa_hrpt_sync_cc::noaa_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset)
+ : gr_block("noaa_hrpt_sync_cc",
+ gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ gr_make_io_signature(1, 1, sizeof(gr_complex))),
+ d_alpha(alpha), d_beta(beta), d_sps(sps), d_max_offset(max_offset),
+ d_phase(0.0), d_freq(0.0)
+{
+}
+
+int
+noaa_hrpt_sync_cc::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+{
+ int ninputs = ninput_items[0];
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+
+ int i = 0, j = 0;
+ while (i < ninputs && j < noutput_items) {
+ out[j++] = in[i++];
+ }
+
+ consume_each(i);
+ return j;
+}
diff --git a/gr-noaa/lib/noaa_hrpt_sync_cc.h b/gr-noaa/lib/noaa_hrpt_sync_cc.h
new file mode 100644
index 000000000..f5b23ccaf
--- /dev/null
+++ b/gr-noaa/lib/noaa_hrpt_sync_cc.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_NOAA_HRPT_SYNC_CC_H
+#define INCLUDED_NOAA_HRPT_SYNC_CC_H
+
+#include <gr_sync_block.h>
+
+class noaa_hrpt_sync_cc;
+typedef boost::shared_ptr<noaa_hrpt_sync_cc> noaa_hrpt_sync_cc_sptr;
+
+noaa_hrpt_sync_cc_sptr
+noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+
+class noaa_hrpt_sync_cc : public gr_block
+{
+ friend noaa_hrpt_sync_cc_sptr noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+ noaa_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+
+ float d_alpha; // 1st order loop constant
+ float d_beta; // 2nd order loop constant
+ float d_sps; // samples per symbol
+ float d_max_offset; // Maximum frequency offset for d_sps, samples/symbol
+ float d_phase; // Instantaneous symbol phase
+ float d_freq; // Instantaneous symbol frequency, samples/symbol
+
+ public:
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+
+ void set_alpha(float alpha) { d_alpha = alpha; }
+ void set_beta(float beta) { d_beta = beta; }
+ void set_max_offset(float max_offset) { d_max_offset = max_offset; }
+};
+
+#endif /* INCLUDED_NOAA_HRPT_SYNC_CC_H */
diff --git a/gr-noaa/swig/Makefile.am b/gr-noaa/swig/Makefile.am
index 927c6cfb2..18cb5920a 100644
--- a/gr-noaa/swig/Makefile.am
+++ b/gr-noaa/swig/Makefile.am
@@ -53,7 +53,8 @@ noaa_swig_python = \
# additional SWIG files to be installed
noaa_swig_swiginclude_headers = \
noaa_swig.i \
- noaa_carrier_pll_cc.i
+ noaa_hrpt_pll_cc.i \
+ noaa_hrpt_sync_cc.i
include $(top_srcdir)/Makefile.swig
diff --git a/gr-noaa/swig/noaa_carrier_pll_cc.i b/gr-noaa/swig/noaa_hrpt_pll_cc.i
index 4d61f393c..a29eaa38a 100644
--- a/gr-noaa/swig/noaa_carrier_pll_cc.i
+++ b/gr-noaa/swig/noaa_hrpt_pll_cc.i
@@ -20,15 +20,15 @@
* Boston, MA 02110-1301, USA.
*/
-GR_SWIG_BLOCK_MAGIC(noaa,carrier_pll_cc)
+GR_SWIG_BLOCK_MAGIC(noaa,hrpt_pll_cc)
-noaa_carrier_pll_cc_sptr
-noaa_make_carrier_pll_cc(float alpha, float beta, float max_offset);
+noaa_hrpt_pll_cc_sptr
+noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
-class noaa_carrier_pll_cc : public gr_sync_block
+class noaa_hrpt_pll_cc : public gr_sync_block
{
private:
- noaa_carrier_pll_cc();
+ noaa_hrpt_pll_cc();
public:
void set_alpha(float alpha);
diff --git a/gr-noaa/swig/noaa_hrpt_sync_cc.i b/gr-noaa/swig/noaa_hrpt_sync_cc.i
new file mode 100644
index 000000000..6dcfa57df
--- /dev/null
+++ b/gr-noaa/swig/noaa_hrpt_sync_cc.i
@@ -0,0 +1,37 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+GR_SWIG_BLOCK_MAGIC(noaa,hrpt_sync_cc)
+
+noaa_hrpt_sync_cc_sptr
+noaa_make_hrpt_sync_cc(float alpha, float beta, float sps, float max_offset);
+
+class noaa_hrpt_sync_cc : public gr_sync_block
+{
+private:
+ noaa_hrpt_sync_cc();
+
+public:
+ void set_alpha(float alpha);
+ void set_beta(float beta);
+ void set_max_offset(float min_freq);
+};
diff --git a/gr-noaa/swig/noaa_swig.i b/gr-noaa/swig/noaa_swig.i
index 384f4e6a2..470f5f960 100644
--- a/gr-noaa/swig/noaa_swig.i
+++ b/gr-noaa/swig/noaa_swig.i
@@ -23,7 +23,9 @@
%include "gnuradio.i"
%{
-#include <noaa_carrier_pll_cc.h>
+#include <noaa_hrpt_pll_cc.h>
+#include <noaa_hrpt_sync_cc.h>
%}
-%include "noaa_carrier_pll_cc.i"
+%include "noaa_hrpt_pll_cc.i"
+%include "noaa_hrpt_sync_cc.i"