usrp_rx_lrit.py
dist_grcblocks_DATA = \
- noaa_hrpt_pll_cc.xml \
- noaa_hrpt_sync_cc.xml
+ noaa_hrpt_pll_cf.xml \
+ noaa_hrpt_sync_ff.xml
EXTRA_DIST = \
usrp_rx_hrpt.grc \
+++ /dev/null
-<?xml version="1.0"?>
-<block>
- <name>HRPT PLL</name>
- <key>noaa_hrpt_pll_cc</key>
- <category>NOAA</category>
- <import>from gnuradio import noaa</import>
- <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>
- <param>
- <name>Alpha</name>
- <key>alpha</key>
- <type>real</type>
- </param>
- <param>
- <name>Beta</name>
- <key>beta</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>
--- /dev/null
+<?xml version="1.0"?>
+<block>
+ <name>HRPT PLL</name>
+ <key>noaa_hrpt_pll_cf</key>
+ <category>NOAA</category>
+ <import>from gnuradio import noaa</import>
+ <make>noaa.hrpt_pll_cf($alpha, $beta, $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>Max Offset</name>
+ <key>max_offset</key>
+ <type>real</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
+++ /dev/null
-<?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>
--- /dev/null
+<?xml version="1.0"?>
+<block>
+ <name>HRPT SYNC</name>
+ <key>noaa_hrpt_sync_ff</key>
+ <category>NOAA</category>
+ <import>from gnuradio import noaa</import>
+ <make>noaa.hrpt_sync_ff($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>float</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ </source>
+</block>
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Sat Aug 29 13:16:19 2009</timestamp>
+ <timestamp>Mon Sep 7 13:05:09 2009</timestamp>
<block>
<key>options</key>
<param>
<value>0</value>
</param>
</block>
- <block>
- <key>gr_file_source</key>
- <param>
- <key>id</key>
- <value>src</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <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>(34, 423)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
<block>
<key>variable</key>
<param>
</param>
</block>
<block>
- <key>variable</key>
+ <key>wxgui_fftsink2</key>
<param>
<key>id</key>
- <value>max_carrier_offset</value>
+ <value>rx_fftsink</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>2*math.pi*100e3/sample_rate</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(668, 107)</value>
+ <key>title</key>
+ <value>RX Spectrum</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>samp_rate</key>
+ <value>sample_rate</value>
</param>
- </block>
- <block>
- <key>variable</key>
<param>
- <key>id</key>
- <value>max_sync_offset</value>
+ <key>baseband_freq</key>
+ <value>1698e6</value>
</param>
<param>
- <key>_enabled</key>
+ <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>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>value</key>
- <value>0.01</value>
+ <key>avg_alpha</key>
+ <value>0.1</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value>0, 0, 1, 1</value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value>displays, 0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(665, 173)</value>
+ <value>(433, 297)</value>
</param>
<param>
<key>_rotation</key>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_0</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
</param>
<param>
<key>title</key>
- <value>Post-PLL</value>
+ <value>RX Waveform</value>
</param>
<param>
<key>samp_rate</key>
</param>
<param>
<key>v_scale</key>
- <value>0.5</value>
+ <value>0</value>
</param>
<param>
<key>t_scale</key>
</param>
<param>
<key>grid_pos</key>
- <value>0, 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>(618, 335)</value>
+ <value>(434, 603)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>notebook</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>displays</value>
+ <value>pll_alpha</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
+ <param>
+ <key>label</key>
+ <value>PLL Alpha</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.001</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>0.5</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>500</value>
+ </param>
<param>
<key>style</key>
- <value>wx.NB_TOP</value>
+ <value>wx.SL_HORIZONTAL</value>
</param>
<param>
- <key>labels</key>
- <value>['RX','PLL','SYNC']</value>
+ <key>converver</key>
+ <value>float_converter</value>
</param>
<param>
<key>grid_pos</key>
- <value>1, 0, 1, 2</value>
+ <value>0, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
</param>
<param>
<key>_coordinate</key>
- <value>(9, 99)</value>
+ <value>(192, 100)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_0_0</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>Post-PLL</value>
+ <key>value</key>
+ <value>0.001</value>
</param>
<param>
- <key>samp_rate</key>
- <value>sample_rate</value>
+ <key>min</key>
+ <value>0.0</value>
</param>
<param>
- <key>v_scale</key>
+ <key>max</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>
+ <key>num_steps</key>
+ <value>500</value>
</param>
<param>
- <key>xy_mode</key>
- <value>True</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, 1, 1, 1</value>
</param>
<param>
<key>notebook</key>
- <value>displays, 1</value>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(618, 614)</value>
+ <value>(344, 101)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>noaa_hrpt_sync_cc</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>sync</value>
+ <value>max_carrier_offset</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>alpha</key>
- <value>sync_alpha</value>
+ <key>value</key>
+ <value>2*math.pi*100e3/sample_rate</value>
</param>
<param>
- <key>beta</key>
- <value>sync_alpha**2/4.0</value>
+ <key>_coordinate</key>
+ <value>(671, 14)</value>
</param>
<param>
- <key>sps</key>
- <value>sps</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>max_offset</key>
+ <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>(865, 494)</value>
+ <value>(805, 13)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>gr_file_source</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_0_0_0</value>
+ <value>src</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
+ <param>
+ <key>file</key>
+ <value>poes-d16.dat</value>
+ </param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
- <key>title</key>
- <value>Post-SYNC</value>
+ <key>repeat</key>
+ <value>False</value>
</param>
<param>
- <key>samp_rate</key>
- <value>sym_rate</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>v_scale</key>
- <value>0.5</value>
+ <key>_coordinate</key>
+ <value>(34, 423)</value>
</param>
<param>
- <key>t_scale</key>
- <value>20.0/sym_rate</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>gr_agc_xx</key>
<param>
- <key>ac_couple</key>
- <value>False</value>
+ <key>id</key>
+ <value>agr</value>
</param>
<param>
- <key>xy_mode</key>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>num_inputs</key>
- <value>1</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <key>rate</key>
+ <value>1e-6</value>
</param>
<param>
- <key>notebook</key>
- <value>displays, 2</value>
+ <key>reference</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>gain</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>max_gain</key>
+ <value>1.0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(872, 607)</value>
+ <value>(261, 494)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0_0_1</value>
+ <value>wxgui_scopesink2_0_0</value>
</param>
<param>
<key>_enabled</key>
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>float</value>
</param>
<param>
<key>title</key>
- <value>Post-SYNC</value>
+ <value>Post-PLL</value>
</param>
<param>
<key>samp_rate</key>
- <value>sym_rate</value>
+ <value>sample_rate</value>
</param>
<param>
<key>v_scale</key>
</param>
<param>
<key>t_scale</key>
- <value>20.0/sym_rate</value>
+ <value>20.0/sample_rate</value>
</param>
<param>
<key>ac_couple</key>
</param>
<param>
<key>notebook</key>
- <value>displays, 2</value>
+ <value>displays, 1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(872, 341)</value>
+ <value>(618, 335)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>gr_agc_xx</key>
+ <key>noaa_hrpt_pll_cf</key>
<param>
<key>id</key>
- <value>agr</value>
+ <value>noaa_hrpt_pll_cf_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>
+ <key>alpha</key>
+ <value>pll_alpha</value>
</param>
<param>
- <key>gain</key>
- <value>1.0</value>
+ <key>beta</key>
+ <value>pll_alpha**2/4.0</value>
</param>
<param>
- <key>max_gain</key>
- <value>1.0</value>
+ <key>max_offset</key>
+ <value>max_carrier_offset</value>
</param>
<param>
<key>_coordinate</key>
- <value>(261, 494)</value>
+ <value>(639, 502)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>noaa_hrpt_pll_cc</key>
+ <key>noaa_hrpt_sync_ff</key>
<param>
<key>id</key>
- <value>noaa_hrpt_pll_cc_0</value>
+ <value>noaa_hrpt_sync_ff_0</value>
</param>
<param>
<key>_enabled</key>
</param>
<param>
<key>alpha</key>
- <value>pll_alpha</value>
+ <value>.005</value>
</param>
<param>
<key>beta</key>
- <value>pll_alpha**2/4.0</value>
+ <value>.005*.005/4.0</value>
+ </param>
+ <param>
+ <key>sps</key>
+ <value>sps</value>
</param>
<param>
<key>max_offset</key>
- <value>max_carrier_offset</value>
+ <value>max_sync_offset</value>
</param>
<param>
<key>_coordinate</key>
- <value>(628, 502)</value>
+ <value>(876, 494)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>wxgui_fftsink2</key>
+ <key>gr_binary_slicer_fb</key>
<param>
<key>id</key>
- <value>rx_fftsink</value>
+ <value>gr_binary_slicer_fb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(1108, 522)</value>
</param>
<param>
- <key>title</key>
- <value>RX Spectrum</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
<param>
- <key>samp_rate</key>
- <value>sample_rate</value>
+ <key>id</key>
+ <value>virtual_sink_1</value>
</param>
<param>
- <key>baseband_freq</key>
- <value>1698e6</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>y_per_div</key>
- <value>5</value>
+ <key>stream_id</key>
+ <value>bits</value>
</param>
<param>
- <key>y_divs</key>
- <value>8</value>
+ <key>_coordinate</key>
+ <value>(1289, 518)</value>
</param>
<param>
- <key>ref_level</key>
- <value>20</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>gr_file_sink</key>
<param>
- <key>fft_size</key>
- <value>1024</value>
+ <key>id</key>
+ <value>gr_file_sink_0</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>file</key>
+ <value>bits.dat</value>
</param>
<param>
- <key>average</key>
- <value>True</value>
+ <key>type</key>
+ <value>byte</value>
</param>
<param>
- <key>avg_alpha</key>
- <value>0.1</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>grid_pos</key>
- <value>0, 0, 1, 1</value>
+ <key>_coordinate</key>
+ <value>(981, 919)</value>
</param>
<param>
- <key>notebook</key>
- <value>displays, 0</value>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>gr_char_to_float_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(433, 297)</value>
+ <value>(477, 923)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>gr_float_to_char</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0</value>
+ <value>gr_float_to_char_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(809, 923)</value>
</param>
<param>
- <key>title</key>
- <value>RX Waveform</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>gr_add_const_vxx</key>
<param>
- <key>samp_rate</key>
- <value>sample_rate</value>
+ <key>id</key>
+ <value>gr_add_const_vxx_0</value>
</param>
<param>
- <key>v_scale</key>
- <value>0</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>t_scale</key>
- <value>20.0/sample_rate</value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>ac_couple</key>
- <value>False</value>
+ <key>const</key>
+ <value>48.0</value>
</param>
<param>
- <key>xy_mode</key>
- <value>False</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>num_inputs</key>
- <value>1</value>
+ <key>_coordinate</key>
+ <value>(653, 919)</value>
</param>
<param>
- <key>grid_pos</key>
- <value>1, 0, 1, 1</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>virtual_source</key>
<param>
- <key>notebook</key>
- <value>displays, 0</value>
+ <key>id</key>
+ <value>virtual_source_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(434, 603)</value>
+ <value>(283, 919)</value>
</param>
<param>
<key>_rotation</key>
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>pll_alpha</value>
+ <value>wxgui_scopesink2_0_0_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>PLL Alpha</value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>value</key>
- <value>0.001</value>
+ <key>title</key>
+ <value>Post-SYNC</value>
</param>
<param>
- <key>min</key>
- <value>0.0</value>
+ <key>samp_rate</key>
+ <value>sym_rate</value>
</param>
<param>
- <key>max</key>
+ <key>v_scale</key>
<value>0.5</value>
</param>
<param>
- <key>num_steps</key>
- <value>500</value>
+ <key>t_scale</key>
+ <value>20.0/sym_rate</value>
</param>
<param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <key>ac_couple</key>
+ <value>False</value>
</param>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
</param>
<param>
<key>grid_pos</key>
- <value>0, 0, 1, 1</value>
+ <value>1, 0, 1, 1</value>
</param>
<param>
<key>notebook</key>
- <value></value>
+ <value>displays, 1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(192, 100)</value>
+ <value>(872, 607)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>notebook</key>
<param>
<key>id</key>
- <value>sync_alpha</value>
+ <value>displays</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
- <param>
- <key>label</key>
- <value>SYNC Alpha</value>
- </param>
- <param>
- <key>value</key>
- <value>0.001</value>
- </param>
- <param>
- <key>min</key>
- <value>0.0</value>
- </param>
- <param>
- <key>max</key>
- <value>0.5</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>500</value>
- </param>
<param>
<key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <value>wx.NB_TOP</value>
</param>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>labels</key>
+ <value>['RX','PLL/SYNC']</value>
</param>
<param>
<key>grid_pos</key>
- <value>0, 1, 1, 1</value>
+ <value>1, 0, 1, 2</value>
</param>
<param>
<key>notebook</key>
</param>
<param>
<key>_coordinate</key>
- <value>(344, 101)</value>
+ <value>(9, 99)</value>
</param>
<param>
<key>_rotation</key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>noaa_hrpt_pll_cc_0</source_block_id>
- <sink_block_id>wxgui_scopesink2_0_0</sink_block_id>
+ <source_block_id>gr_binary_slicer_fb_0</source_block_id>
+ <sink_block_id>virtual_sink_1</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>wxgui_scopesink2_0_0_0</sink_block_id>
+ <source_block_id>agr</source_block_id>
+ <sink_block_id>noaa_hrpt_pll_cf_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>noaa_hrpt_pll_cc_0</source_block_id>
- <sink_block_id>sync</sink_block_id>
+ <source_block_id>noaa_hrpt_pll_cf_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>sync</source_block_id>
- <sink_block_id>wxgui_scopesink2_0_0_1</sink_block_id>
+ <source_block_id>noaa_hrpt_pll_cf_0</source_block_id>
+ <sink_block_id>noaa_hrpt_sync_ff_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>sync</source_block_id>
+ <source_block_id>noaa_hrpt_sync_ff_0</source_block_id>
+ <sink_block_id>gr_binary_slicer_fb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>noaa_hrpt_sync_ff_0</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>
<connection>
- <source_block_id>agr</source_block_id>
- <sink_block_id>noaa_hrpt_pll_cc_0</sink_block_id>
+ <source_block_id>virtual_source_0</source_block_id>
+ <sink_block_id>gr_char_to_float_0</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_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_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_key>0</source_key>
<sink_key>0</sink_key>
</connection>
##################################################
# Gnuradio Python Flow Graph
# Title: USRP HRPT Receiver
-# Generated: Sat Aug 29 13:16:19 2009
+# Generated: Mon Sep 7 13:05:09 2009
##################################################
+from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import noaa
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
##################################################
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.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL/SYNC")
self.GridAdd(self.displays, 1, 0, 1, 2)
##################################################
# Blocks
##################################################
self.agr = gr.agc_cc(1e-6, 1.0, 1.0, 1.0)
- self.noaa_hrpt_pll_cc_0 = noaa.hrpt_pll_cc(pll_alpha, pll_alpha**2/4.0, max_carrier_offset)
+ self.gr_add_const_vxx_0 = gr.add_const_vff((48.0, ))
+ self.gr_binary_slicer_fb_0 = gr.binary_slicer_fb()
+ self.gr_char_to_float_0 = gr.char_to_float()
+ self.gr_file_sink_0 = gr.file_sink(gr.sizeof_char*1, "bits.dat")
+ self.gr_float_to_char_0 = gr.float_to_char()
+ self.noaa_hrpt_pll_cf_0 = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset)
+ self.noaa_hrpt_sync_ff_0 = noaa.hrpt_sync_ff(.005, .005*.005/4.0, sps, max_sync_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,
+ ref_scale=2.0,
sample_rate=sample_rate,
fft_size=1024,
fft_rate=30,
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.src = gr.file_source(gr.sizeof_gr_complex*1, "poes-d16.dat", False)
self.throttle = gr.throttle(gr.sizeof_gr_complex*1, sample_rate)
self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
self.displays.GetPage(0).GetWin(),
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.wxgui_scopesink2_0_0 = scopesink2.scope_sink_f(
self.displays.GetPage(1).GetWin(),
title="Post-PLL",
sample_rate=sample_rate,
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.wxgui_scopesink2_0_0_0_0 = scopesink2.scope_sink_f(
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=sym_rate,
- v_scale=0.5,
- t_scale=20.0/sym_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=sym_rate,
v_scale=0.5,
xy_mode=False,
num_inputs=1,
)
- self.displays.GetPage(2).GridAdd(self.wxgui_scopesink2_0_0_1.win, 0, 0, 1, 1)
+ self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_0_0_0_0.win, 1, 0, 1, 1)
##################################################
# Connections
self.connect((self.throttle, 0), (self.agr, 0))
self.connect((self.agr, 0), (self.rx_fftsink, 0))
self.connect((self.agr, 0), (self.wxgui_scopesink2_0, 0))
- self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0, 0))
- self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.wxgui_scopesink2_0_0_0, 0))
- self.connect((self.noaa_hrpt_pll_cc_0, 0), (self.sync, 0))
- self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_1, 0))
- self.connect((self.sync, 0), (self.wxgui_scopesink2_0_0_0_0, 0))
- self.connect((self.agr, 0), (self.noaa_hrpt_pll_cc_0, 0))
+ self.connect((self.agr, 0), (self.noaa_hrpt_pll_cf_0, 0))
+ self.connect((self.noaa_hrpt_pll_cf_0, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.noaa_hrpt_pll_cf_0, 0), (self.noaa_hrpt_sync_ff_0, 0))
+ self.connect((self.noaa_hrpt_sync_ff_0, 0), (self.gr_binary_slicer_fb_0, 0))
+ self.connect((self.noaa_hrpt_sync_ff_0, 0), (self.wxgui_scopesink2_0_0_0_0, 0))
+ self.connect((self.gr_binary_slicer_fb_0, 0), (self.gr_char_to_float_0, 0))
+ self.connect((self.gr_float_to_char_0, 0), (self.gr_file_sink_0, 0))
+ self.connect((self.gr_add_const_vxx_0, 0), (self.gr_float_to_char_0, 0))
+ self.connect((self.gr_char_to_float_0, 0), (self.gr_add_const_vxx_0, 0))
def set_decim(self, decim):
self.decim = decim
self.sym_rate = sym_rate
self.set_sps(self.sample_rate/self.sym_rate)
self.wxgui_scopesink2_0_0_0_0.set_sample_rate(self.sym_rate)
- self.wxgui_scopesink2_0_0_1.set_sample_rate(self.sym_rate)
def set_sample_rate(self, sample_rate):
self.sample_rate = sample_rate
self.set_sps(self.sample_rate/self.sym_rate)
- self.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_0.set_sample_rate(self.sample_rate)
self.rx_fftsink.set_sample_rate(self.sample_rate)
self.wxgui_scopesink2_0.set_sample_rate(self.sample_rate)
+ self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate)
+ self.wxgui_scopesink2_0_0.set_sample_rate(self.sample_rate)
def set_sps(self, sps):
self.sps = sps
def set_sync_alpha(self, sync_alpha):
self.sync_alpha = sync_alpha
- self.sync.set_alpha(self.sync_alpha)
- self.sync.set_beta(self.sync_alpha**2/4.0)
self._sync_alpha_slider.set_value(self.sync_alpha)
self._sync_alpha_text_box.set_value(self.sync_alpha)
def set_pll_alpha(self, pll_alpha):
self.pll_alpha = pll_alpha
- self.noaa_hrpt_pll_cc_0.set_alpha(self.pll_alpha)
- self.noaa_hrpt_pll_cc_0.set_beta(self.pll_alpha**2/4.0)
self._pll_alpha_slider.set_value(self.pll_alpha)
self._pll_alpha_text_box.set_value(self.pll_alpha)
+ self.noaa_hrpt_pll_cf_0.set_alpha(self.pll_alpha)
+ self.noaa_hrpt_pll_cf_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)
+ self.noaa_hrpt_sync_ff_0.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)
+ self.noaa_hrpt_pll_cf_0.set_max_offset(self.max_carrier_offset)
def set_hs(self, hs):
self.hs = hs
libgnuradio-noaa.la
libgnuradio_noaa_la_SOURCES = \
- noaa_hrpt_pll_cc.cc \
- noaa_hrpt_sync_cc.cc
+ noaa_hrpt_pll_cf.cc \
+ noaa_hrpt_sync_ff.cc
libgnuradio_noaa_la_LIBADD = \
$(GNURADIO_CORE_LA)
libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
grinclude_HEADERS = \
- noaa_hrpt_pll_cc.h \
- noaa_hrpt_sync_cc.h
+ noaa_hrpt_pll_cf.h \
+ noaa_hrpt_sync_ff.h
+++ /dev/null
-/* -*- 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_pll_cc.h>
-#include <gr_io_signature.h>
-#include <gr_math.h>
-#include <gr_sincos.h>
-
-#define M_TWOPI (2*M_PI)
-
-noaa_hrpt_pll_cc_sptr
-noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset)
-{
- return gnuradio::get_initial_sptr(new noaa_hrpt_pll_cc(alpha, beta, max_offset));
-}
-
-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),
- d_phase(0.0), d_freq(0.0)
-{
-}
-
-float
-phase_wrap(float phase)
-{
- while (phase < -M_PI)
- phase += M_TWOPI;
- while (phase > M_PI)
- phase -= M_TWOPI;
-
- return phase;
-}
-
-int
-noaa_hrpt_pll_cc::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- const gr_complex *in = (const gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
-
- for (int i = 0; i < noutput_items; i++) {
-
- // Adjust PLL phase/frequency
- float error = phase_wrap(gr_fast_atan2f(in[i].imag(), in[i].real()) - d_phase);
- d_freq = gr_branchless_clip(d_freq + error*d_beta, d_max_offset);
- d_phase = phase_wrap(d_phase + error*d_alpha + d_freq);
-
- // Generate and mix out carrier
- float re, im;
- gr_sincosf(d_phase, &im, &re);
- out[i] = in[i]*gr_complex(re, -im);
- }
-
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_PLL_CC_H
-#define INCLUDED_NOAA_HRPT_PLL_CC_H
-
-#include <gr_sync_block.h>
-
-class noaa_hrpt_pll_cc;
-typedef boost::shared_ptr<noaa_hrpt_pll_cc> noaa_hrpt_pll_cc_sptr;
-
-noaa_hrpt_pll_cc_sptr
-noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
-
-class noaa_hrpt_pll_cc : public gr_sync_block
-{
- 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
- float d_max_offset; // Maximum frequency offset, radians/sample
- float d_phase; // Instantaneous carrier phase
- float d_freq; // Instantaneous carrier frequency, radians/sample
-
- public:
- virtual int work(int noutput_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_PLL_CC_H */
--- /dev/null
+/* -*- 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_pll_cf.h>
+#include <gr_io_signature.h>
+#include <gr_math.h>
+#include <gr_sincos.h>
+
+#define M_TWOPI (2*M_PI)
+
+noaa_hrpt_pll_cf_sptr
+noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset)
+{
+ return gnuradio::get_initial_sptr(new noaa_hrpt_pll_cf(alpha, beta, max_offset));
+}
+
+noaa_hrpt_pll_cf::noaa_hrpt_pll_cf(float alpha, float beta, float max_offset)
+ : gr_sync_block("noaa_hrpt_pll_cf",
+ gr_make_io_signature(1, 1, sizeof(gr_complex)),
+ gr_make_io_signature(1, 1, sizeof(float))),
+ d_alpha(alpha), d_beta(beta), d_max_offset(max_offset),
+ d_phase(0.0), d_freq(0.0)
+{
+}
+
+float
+phase_wrap(float phase)
+{
+ while (phase < -M_PI)
+ phase += M_TWOPI;
+ while (phase > M_PI)
+ phase -= M_TWOPI;
+
+ return phase;
+}
+
+int
+noaa_hrpt_pll_cf::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+{
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ float *out = (float *) output_items[0];
+
+ for (int i = 0; i < noutput_items; i++) {
+
+ // Adjust PLL phase/frequency
+ float error = phase_wrap(gr_fast_atan2f(in[i].imag(), in[i].real()) - d_phase);
+ d_freq = gr_branchless_clip(d_freq + error*d_beta, d_max_offset);
+ d_phase = phase_wrap(d_phase + error*d_alpha + d_freq);
+
+ // Generate and mix out carrier
+ float re, im;
+ gr_sincosf(d_phase, &im, &re);
+ out[i] = (in[i]*gr_complex(re, -im)).imag();
+ }
+
+ return noutput_items;
+}
--- /dev/null
+/* -*- 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_PLL_CF_H
+#define INCLUDED_NOAA_HRPT_PLL_CF_H
+
+#include <gr_sync_block.h>
+
+class noaa_hrpt_pll_cf;
+typedef boost::shared_ptr<noaa_hrpt_pll_cf> noaa_hrpt_pll_cf_sptr;
+
+noaa_hrpt_pll_cf_sptr
+noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset);
+
+class noaa_hrpt_pll_cf : public gr_sync_block
+{
+ friend noaa_hrpt_pll_cf_sptr noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset);
+ noaa_hrpt_pll_cf(float alpha, float beta, float max_offset);
+
+ float d_alpha; // 1st order loop constant
+ float d_beta; // 2nd order loop constant
+ float d_max_offset; // Maximum frequency offset, radians/sample
+ float d_phase; // Instantaneous carrier phase
+ float d_freq; // Instantaneous carrier frequency, radians/sample
+
+ public:
+ virtual int work(int noutput_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_PLL_CF_H */
+++ /dev/null
-/* -*- 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>
-
-inline int signum(float f)
-{
- return f >= 0.0 ? 1 : -1;
-}
-
-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(1.0/sps),
- d_last_sign(1)
-{
-}
-
-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) {
- float sample = in[i++].imag();
- int sign = signum(sample);
- d_phase += d_freq;
-
- // Train on zero crossings in center region of symbol
- if (sign != d_last_sign) {
- if (d_phase > 0.25 && d_phase < 0.75) {
- float phase_err = d_phase-0.5;
- d_phase -= phase_err*d_alpha; // 1st order phase adjustment
- d_freq -= phase_err*d_beta; // 2nd order frequency adjustment
- }
-
- d_last_sign = sign;
- }
-
- if (d_phase > 1.0) {
- out[j++] = in[i];
- d_phase -= 1.0;
- }
- }
-
- consume_each(i);
- return j;
-}
+++ /dev/null
-/* -*- 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
- int d_last_sign; // Tracks zero crossings
-
- 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 */
--- /dev/null
+/* -*- 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_ff.h>
+#include <gr_io_signature.h>
+
+inline int signum(float f)
+{
+ return f >= 0.0 ? 1 : -1;
+}
+
+noaa_hrpt_sync_ff_sptr
+noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset)
+{
+ return gnuradio::get_initial_sptr(new noaa_hrpt_sync_ff(alpha, beta, sps, max_offset));
+}
+
+noaa_hrpt_sync_ff::noaa_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset)
+ : gr_block("noaa_hrpt_sync_ff",
+ gr_make_io_signature(1, 1, sizeof(float)),
+ gr_make_io_signature(1, 1, sizeof(float))),
+ d_alpha(alpha), d_beta(beta),
+ d_sps(sps), d_max_offset(max_offset),
+ d_phase(0.0), d_freq(1.0/sps),
+ d_last_sign(1)
+{
+}
+
+int
+noaa_hrpt_sync_ff::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 float *in = (const float *) input_items[0];
+ float *out = (float *) output_items[0];
+
+ int i = 0, j = 0;
+ while (i < ninputs && j < noutput_items) {
+ float sample = in[i++];
+ int sign = signum(sample);
+ d_phase += d_freq;
+
+ // Train on zero crossings in center region of symbol
+ if (sign != d_last_sign) {
+ if (d_phase > 0.25 && d_phase < 0.75) {
+ float phase_err = d_phase-0.5;
+ d_phase -= phase_err*d_alpha; // 1st order phase adjustment
+ d_freq -= phase_err*d_beta; // 2nd order frequency adjustment
+ }
+
+ d_last_sign = sign;
+ }
+
+ if (d_phase > 1.0) {
+ out[j++] = -sample; // Invert sense, -68 degrees=1
+ d_phase -= 1.0;
+ }
+ }
+
+ consume_each(i);
+ return j;
+}
--- /dev/null
+/* -*- 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_FF_H
+#define INCLUDED_NOAA_HRPT_SYNC_FF_H
+
+#include <gr_sync_block.h>
+
+class noaa_hrpt_sync_ff;
+typedef boost::shared_ptr<noaa_hrpt_sync_ff> noaa_hrpt_sync_ff_sptr;
+
+noaa_hrpt_sync_ff_sptr
+noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
+
+class noaa_hrpt_sync_ff : public gr_block
+{
+ friend noaa_hrpt_sync_ff_sptr noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
+ noaa_hrpt_sync_ff(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
+ int d_last_sign; // Tracks zero crossings
+
+ 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_FF_H */
# additional SWIG files to be installed
noaa_swig_swiginclude_headers = \
noaa_swig.i \
- noaa_hrpt_pll_cc.i \
- noaa_hrpt_sync_cc.i
+ noaa_hrpt_pll_cf.i \
+ noaa_hrpt_sync_ff.i
include $(top_srcdir)/Makefile.swig
+++ /dev/null
-/* -*- 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_pll_cc)
-
-noaa_hrpt_pll_cc_sptr
-noaa_make_hrpt_pll_cc(float alpha, float beta, float max_offset);
-
-class noaa_hrpt_pll_cc : public gr_sync_block
-{
-private:
- noaa_hrpt_pll_cc();
-
-public:
- void set_alpha(float alpha);
- void set_beta(float beta);
- void set_max_offset(float min_freq);
-};
--- /dev/null
+/* -*- 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_pll_cf)
+
+noaa_hrpt_pll_cf_sptr
+noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset);
+
+class noaa_hrpt_pll_cf : public gr_sync_block
+{
+private:
+ noaa_hrpt_pll_cf();
+
+public:
+ void set_alpha(float alpha);
+ void set_beta(float beta);
+ void set_max_offset(float min_freq);
+};
+++ /dev/null
-/* -*- 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);
-};
--- /dev/null
+/* -*- 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_ff)
+
+noaa_hrpt_sync_ff_sptr
+noaa_make_hrpt_sync_ff(float alpha, float beta, float sps, float max_offset);
+
+class noaa_hrpt_sync_ff : public gr_sync_block
+{
+private:
+ noaa_hrpt_sync_ff();
+
+public:
+ void set_alpha(float alpha);
+ void set_beta(float beta);
+ void set_max_offset(float min_freq);
+};
%include "gnuradio.i"
%{
-#include <noaa_hrpt_pll_cc.h>
-#include <noaa_hrpt_sync_cc.h>
+#include <noaa_hrpt_pll_cf.h>
+#include <noaa_hrpt_sync_ff.h>
%}
-%include "noaa_hrpt_pll_cc.i"
-%include "noaa_hrpt_sync_cc.i"
+%include "noaa_hrpt_pll_cf.i"
+%include "noaa_hrpt_sync_ff.i"