summaryrefslogtreecommitdiff
path: root/gr-fcd/grc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fcd/grc')
-rw-r--r--gr-fcd/grc/.gitignore2
-rw-r--r--gr-fcd/grc/CMakeLists.txt24
-rw-r--r--gr-fcd/grc/Makefile.am28
-rw-r--r--gr-fcd/grc/fcd_source_c.xml117
4 files changed, 171 insertions, 0 deletions
diff --git a/gr-fcd/grc/.gitignore b/gr-fcd/grc/.gitignore
new file mode 100644
index 000000000..b336cc7ce
--- /dev/null
+++ b/gr-fcd/grc/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-fcd/grc/CMakeLists.txt b/gr-fcd/grc/CMakeLists.txt
new file mode 100644
index 000000000..16af2cdba
--- /dev/null
+++ b/gr-fcd/grc/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Copyright 2012 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.
+
+install(FILES
+ fcd_source_c.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "fcd_python"
+)
diff --git a/gr-fcd/grc/Makefile.am b/gr-fcd/grc/Makefile.am
new file mode 100644
index 000000000..203ebdc16
--- /dev/null
+++ b/gr-fcd/grc/Makefile.am
@@ -0,0 +1,28 @@
+#
+# Copyright 2012 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.
+#
+
+include $(top_srcdir)/Makefile.common
+
+grcblocksdir = $(grc_blocksdir)
+
+dist_grcblocks_DATA = \
+ fcd_source_c.xml
+
diff --git a/gr-fcd/grc/fcd_source_c.xml b/gr-fcd/grc/fcd_source_c.xml
new file mode 100644
index 000000000..7c55239aa
--- /dev/null
+++ b/gr-fcd/grc/fcd_source_c.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<block>
+ <name>Funcube Dongle Source</name>
+ <key>fcd_source_c</key>
+ <category>Sources</category>
+ <throttle>1</throttle>
+ <import>from gnuradio import fcd</import>
+ <make>fcd.source_c($device_name)
+#if $lna() != 20.0
+self.$(id).set_lna_gain($lna)
+#end if
+#if $mixer() != +12.0
+self.$(id).set_mixer_gain($mixer)
+#end if
+#if $ppm() != 115
+self.$(id).set_freq_corr($ppm)
+#end if
+#if ($dci() != 0.0) or ($dcq() != 0.0)
+self.$(id).set_dc_corr($dci,$dcq)
+#end if
+#if ($iq_phase() != 0.0) or ($iq_gain() != 1.0)
+self.$(id).set_iq_corr($iq_phase,$iq_gain)
+#end if
+self.$(id).set_freq($freq)
+ </make>
+ <callback>set_freq($freq)</callback>
+ <callback>set_lna_gain($lna)</callback>
+ <callback>set_mixer_gain($mixer)</callback>
+ <callback>set_freq_corr($ppm)</callback>
+ <callback>set_dc_corr($dci,$dcq)</callback>
+ <callback>set_iq_corr($iq_gain,$iq_phase)</callback>
+ <param>
+ <name>Device Name</name>
+ <key>device_name</key>
+ <value>hw:1</value>
+ <type>string</type>
+ <hide>#if $device_name() then 'none' else 'part'#</hide>
+ </param>
+ <param>
+ <name>Frequency (Hz)</name>
+ <key>freq</key>
+ <value>145500000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>LNA Gain (dB)</name>
+ <key>lna</key>
+ <value>20.0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Mixer Gain (dB)</name>
+ <key>mixer</key>
+ <value>+12</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Frequency corr. (ppm)</name>
+ <key>ppm</key>
+ <value>-120</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>DC I offset</name>
+ <key>dci</key>
+ <value>0.0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>DC Q offset</name>
+ <key>dcq</key>
+ <value>0.0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>IQ phase balance</name>
+ <key>iq_phase</key>
+ <value>0.0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>IQ gain balance</name>
+ <key>iq_gain</key>
+ <value>1.0</value>
+ <type>real</type>
+ </param>
+ <check>($freq &gt;= 50e6) and ($freq &lt;= 2e9)</check>
+ <check>($dci &gt;= -1.0) and ($dci &lt;= 1.0)</check>
+ <check>($dcq &gt;= -1.0) and ($dcq &lt;= 1.0)</check>
+ <check>($iq_phase &gt;= -1.0) and ($iq_phase &lt;= 1.0)</check>
+ <check>($iq_gain &gt;= -1.0) and ($iq_gain &lt;= 1.0)</check>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+ <doc>
+This block wraps the Funcube Dongle USB audio input and the USB HID control interface \
+into one convenient GNU Radio source block.
+
+The sample rate is fixed at 96 ksps.
+
+To find the device name on Linux type:
+ cat /proc/asound/cards
+
+The LNA gain is a set of discrete values between -5 to 30 dB with 2.5 dB step, but you can \
+use any float value and it will be rounded to the nearest valid value.
+
+The Mixer gain can be set either to +4 or +12 dB, but you can use any float value \
+and it will be rounded to the nearest valid value.
+
+The FCD block can autmatically apply frequency correction:
+ - For FCD v1.0 you can leave at -120 ppm
+ - For FCD v1.1 with serial number 810 or greater use -12 ppm
+
+The DC offset and IQ balance parameters can have range -1.0 to 1.0.
+ </doc>
+</block>