Skip to content

Commit

Permalink
Added new blocks for clock freqeuncy correction
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr authored and piotr committed Aug 6, 2014
1 parent 969ecbc commit 4089c1a
Show file tree
Hide file tree
Showing 21 changed files with 1,502 additions and 66 deletions.
6 changes: 5 additions & 1 deletion grc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ install(FILES
gsm_fcch_detector.xml
gsm_get_bcch_or_ccch_bursts.xml
gsm_control_channels_decoder.xml
gsm_extract_system_info.xml DESTINATION share/gnuradio/grc/blocks
gsm_extract_system_info.xml
gsm_controlled_rotator_cc.xml
gsm_controlled_const_source_f.xml
gsm_clock_offset_control.xml
gsm_message_printer.xml DESTINATION share/gnuradio/grc/blocks
)
33 changes: 33 additions & 0 deletions grc/gsm_clock_offset_control.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<block>
<name>Clock offset control</name>
<key>gsm_clock_offset_control</key>
<category>GSM</category>
<import>import gsm</import>
<make>gsm.clock_offset_control($fc, $samp_rate)</make>
<callback></callback>
<param>
<name>fc</name>
<key>fc</key>
<value>fc</value>
<type>float</type>
</param>

<param>
<name>samp_rate</name>
<key>samp_rate</key>
<value>samp_rate</value>
<type>float</type>
</param>

<sink>
<name>measurements</name>
<type>message</type>
</sink>

<source>
<name>ppm</name>
<type>message</type>
<optional>1</optional>
</source>
</block>
50 changes: 50 additions & 0 deletions grc/gsm_clock_offset_corrector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version='1.0' encoding='ASCII'?>
<block>
<name>Clock offset corrector</name>
<key>clock_offset_corrector</key>
<category>GSM</category>
<import>execfile("/home/piotr/.grc_gnuradio/clock_offset_corrector.py")</import>
<make>clock_offset_corrector(
ppm=$ppm,
samp_rate=$samp_rate,
fc=$fc,
)</make>
<callback>set_ppm($ppm)</callback>
<callback>set_samp_rate($samp_rate)</callback>
<callback>set_fc($fc)</callback>
<param>
<name>ppm</name>
<key>ppm</key>
<value>0</value>
<type>raw</type>
</param>
<param>
<name>samp_rate</name>
<key>samp_rate</key>
<value>1625000.0/6.0*4.0</value>
<type>raw</type>
</param>
<param>
<name>fc</name>
<key>fc</key>
<value>936.6e6</value>
<type>raw</type>
</param>
<sink>
<name>in</name>
<type>complex</type>
<vlen>1</vlen>
</sink>
<sink>
<name>ppm_msg</name>
<type>message</type>
<optional>True</optional>
</sink>
<source>
<name>out</name>
<type>complex</type>
<vlen>1</vlen>
</source>
<doc>Piotr Krysik
<grc_source>gr-gsm/examples/clock_offset_corrector.grc</grc_source>
</block>
27 changes: 27 additions & 0 deletions grc/gsm_controlled_const_source_f.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<block>
<name>Controlled const source</name>
<key>gsm_controlled_const_source_f</key>
<category>GSM</category>
<import>import gsm</import>
<make>gsm.controlled_const_source_f($constant)</make>
<callback>set_constant($constant)</callback>

<param>
<name>constant</name>
<key>constant</key>
<value>0</value>
<type>float</type>
</param>

<sink>
<name>constant_msg</name>
<type>message</type>
<optional>1</optional>
</sink>

<source>
<name>out</name>
<type>float</type>
</source>
</block>
38 changes: 38 additions & 0 deletions grc/gsm_controlled_rotator_cc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0"?>
<block>
<name>Controlled rotator</name>
<key>gsm_controlled_rotator_cc</key>
<category>GSM</category>
<import>import gsm</import>
<make>gsm.controlled_rotator_cc($phase_inc,$samp_rate)</make>
<callback>set_phase_inc($phase_inc)</callback>
<callback>set_samp_rate($samp_rate)</callback>
<param>
<name>phase_inc</name>
<key>phase_inc</key>
<value>0</value>
<type>real</type>
</param>

<param>
<name>samp_rate</name>
<key>samp_rate</key>
<value>samp_rate</value>
<type>real</type>
</param>

<sink>
<name>in</name>
<type>complex</type>
</sink>
<sink>
<name>phase_inc</name>
<type>float</type>
</sink>

<source>
<name>out</name>
<type>complex</type>
</source>
</block>

Loading

0 comments on commit 4089c1a

Please sign in to comment.