summaryrefslogtreecommitdiff
path: root/gr-fcd/grc/fcd_source_c.xml
blob: 7c55239aad6087fc920254fc39137fba03af5f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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>