Commit ce8d54eb authored by Manolis Surligas's avatar Manolis Surligas Committed by Manolis Surligas

Improve the generic FM demodulator

The FM demodulator now supports a variaty of hardware setups and saves
the WAV file for further processing. A set of command line arguments can
control most of the flowgraph internals, such as the wav file name and
storage path e.t.c.

TODO: Check the settings for all the available hardware
parent 33a27566
......@@ -22,5 +22,6 @@ include(GrPython)
GR_PYTHON_INSTALL(
PROGRAMS
flowgraphs/upsat_transceiver_cli.py
flowgraphs/satnogs_fm_demod.py
DESTINATION bin
)
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.9'?>
<?grc format='1' created='3.7.10'?>
<flow_graph>
<timestamp>Thu May 5 00:22:45 2016</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
<value>Manolis Surligas (surligas@gmail.com)</value>
</param>
<param>
<key>window_size</key>
......@@ -22,7 +22,7 @@
</param>
<param>
<key>description</key>
<value></value>
<value>A generic FM demodulation block</value>
</param>
<param>
<key>_enabled</key>
......@@ -46,7 +46,7 @@
</param>
<param>
<key>id</key>
<value>fm_demod</value>
<value>satnogs_fm_demod</value>
</param>
<param>
<key>max_nouts</key>
......@@ -78,7 +78,7 @@
</param>
<param>
<key>title</key>
<value></value>
<value>FM Generic Demodulation</value>
</param>
</block>
<block>
......@@ -93,7 +93,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(480, 21)</value>
<value>(568, 508)</value>
</param>
<param>
<key>_rotation</key>
......@@ -109,14 +109,12 @@
</param>
</block>
<block>
<key>variable_qtgui_range</key>
<key>variable</key>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>value</key>
<value>0.9</value>
<value>Decimation factor
for the RX after the
SDR received samples</value>
</param>
<param>
<key>_enabled</key>
......@@ -124,11 +122,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(1048, 249)</value>
</param>
<param>
<key>gui_hint</key>
<value></value>
<value>(336, 612)</value>
</param>
<param>
<key>_rotation</key>
......@@ -139,36 +133,8 @@
<value>audio_gain</value>
</param>
<param>
<key>label</key>
<value>Audio Gain</value>
</param>
<param>
<key>min_len</key>
<value>200</value>
</param>
<param>
<key>orient</key>
<value>Qt.Horizontal</value>
</param>
<param>
<key>start</key>
<value>0</value>
</param>
<param>
<key>step</key>
<value>0.01</value>
</param>
<param>
<key>stop</key>
<value>8</value>
</param>
<param>
<key>rangeType</key>
<value>float</value>
</param>
<param>
<key>widget</key>
<value>counter_slider</value>
<key>value</key>
<value>satnogs.fm_demod_settings[rx_sdr_device]['audio_gain']</value>
</param>
</block>
<block>
......@@ -183,7 +149,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(480, 93)</value>
<value>(568, 580)</value>
</param>
<param>
<key>_rotation</key>
......@@ -212,7 +178,7 @@ SDR received samples</value>
</param>
<param>
<key>_coordinate</key>
<value>(232, 21)</value>
<value>(192, 612)</value>
</param>
<param>
<key>_rotation</key>
......@@ -224,161 +190,7 @@ SDR received samples</value>
</param>
<param>
<key>value</key>
<value>10</value>
</param>
</block>
<block>
<key>variable_qtgui_range</key>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>value</key>
<value>100e6</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(1048, 24)</value>
</param>
<param>
<key>gui_hint</key>
<value></value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>freq</value>
</param>
<param>
<key>label</key>
<value>RX Frequency</value>
</param>
<param>
<key>min_len</key>
<value>200</value>
</param>
<param>
<key>orient</key>
<value>Qt.Horizontal</value>
</param>
<param>
<key>start</key>
<value>92e6</value>
</param>
<param>
<key>step</key>
<value>100e3</value>
</param>
<param>
<key>stop</key>
<value>105e6</value>
</param>
<param>
<key>rangeType</key>
<value>float</value>
</param>
<param>
<key>widget</key>
<value>counter_slider</value>
</param>
</block>
<block>
<key>variable_qtgui_range</key>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>value</key>
<value>10</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(1048, 137)</value>
</param>
<param>
<key>gui_hint</key>
<value></value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>gain</value>
</param>
<param>
<key>label</key>
<value>RX RF Gain</value>
</param>
<param>
<key>min_len</key>
<value>200</value>
</param>
<param>
<key>orient</key>
<value>Qt.Horizontal</value>
</param>
<param>
<key>start</key>
<value>0</value>
</param>
<param>
<key>step</key>
<value>0.5</value>
</param>
<param>
<key>stop</key>
<value>40</value>
</param>
<param>
<key>rangeType</key>
<value>float</value>
</param>
<param>
<key>widget</key>
<value>counter_slider</value>
</param>
</block>
<block>
<key>variable</key>
<param>
<key>comment</key>
<value>To avoid the SDR carrier at the DC
we shift the LO a little further</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(832, 18)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>lo_offset</value>
</param>
<param>
<key>value</key>
<value>100e3</value>
<value>satnogs.fm_demod_settings[rx_sdr_device]['decimation_rx']</value>
</param>
</block>
<block>
......@@ -393,7 +205,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(360, 21)</value>
<value>(432, 476)</value>
</param>
<param>
<key>_rotation</key>
......@@ -412,7 +224,8 @@ we shift the LO a little further</value>
<key>variable</key>
<param>
<key>comment</key>
<value></value>
<value>SDR device
TX sampling rate</value>
</param>
<param>
<key>_enabled</key>
......@@ -420,7 +233,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(8, 160)</value>
<value>(192, 484)</value>
</param>
<param>
<key>_rotation</key>
......@@ -432,7 +245,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>value</key>
<value>10e6</value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['samp_rate']</value>
</param>
</block>
<block>
......@@ -455,7 +268,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(664, 18)</value>
<value>(560, 648)</value>
</param>
<param>
<key>_rotation</key>
......@@ -502,7 +315,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>0</value>
</param>
<param>
<key>freq</key>
......@@ -510,7 +323,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(296, 192)</value>
<value>(312, 24)</value>
</param>
<param>
<key>_rotation</key>
......@@ -569,7 +382,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(712, 501)</value>
<value>(736, 292)</value>
</param>
<param>
<key>_rotation</key>
......@@ -593,7 +406,7 @@ we shift the LO a little further</value>
</param>
</block>
<block>
<key>audio_sink</key>
<key>blocks_multiply_const_vxx</key>
<param>
<key>alias</key>
<value></value>
......@@ -603,11 +416,11 @@ we shift the LO a little further</value>
<value></value>
</param>
<param>
<key>affinity</key>
<value></value>
<key>const</key>
<value>audio_gain</value>
</param>
<param>
<key>device_name</key>
<key>affinity</key>
<value></value>
</param>
<param>
......@@ -616,7 +429,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(776, 668)</value>
<value>(976, 444)</value>
</param>
<param>
<key>_rotation</key>
......@@ -624,23 +437,27 @@ we shift the LO a little further</value>
</param>
<param>
<key>id</key>
<value>audio_sink_0</value>
<value>blocks_multiply_const_vxx_0</value>
</param>
<param>
<key>num_inputs</key>
<value>1</value>
<key>type</key>
<value>float</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
<key>maxoutbuf</key>
<value>0</value>
</param>
<param>
<key>samp_rate</key>
<value>audio_samp_rate</value>
<key>minoutbuf</key>
<value>0</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
</block>
<block>
<key>blocks_multiply_const_vxx</key>
<key>blocks_multiply_xx</key>
<param>
<key>alias</key>
<value></value>
......@@ -649,33 +466,29 @@ we shift the LO a little further</value>
<key>comment</key>
<value></value>
</param>
<param>
<key>const</key>
<value>audio_gain</value>
</param>
<param>
<key>affinity</key>
<value></value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>0</value>
</param>
<param>
<key>_coordinate</key>
<value>(968, 668)</value>
<value>(568, 64)</value>
</param>
<param>
<key>_rotation</key>
<value>180</value>
<value>0</value>
</param>
<param>
<key>id</key>
<value>blocks_multiply_const_vxx_0</value>
<value>blocks_multiply_xx_0</value>
</param>
<param>
<key>type</key>
<value>float</value>
<value>complex</value>
</param>
<param>
<key>maxoutbuf</key>
......@@ -685,13 +498,21 @@ we shift the LO a little further</value>
<key>minoutbuf</key>
<value>0</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
</block>
<block>
<key>blocks_multiply_xx</key>
<key>blocks_wavfile_sink</key>
<param>
<key>bits_per_sample</key>
<value>16</value>
</param>
<param>
<key>alias</key>
<value></value>
......@@ -706,39 +527,74 @@ we shift the LO a little further</value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>True</value>
</param>
<param>
<key>file</key>
<value>file_path</value>
</param>
<param>
<key>_coordinate</key>
<value>(568, 264)</value>
<value>(800, 428)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
<value>180</value>
</param>
<param>
<key>id</key>
<value>blocks_multiply_xx_0</value>
<value>blocks_wavfile_sink_0</value>
</param>
<param>
<key>type</key>
<value>complex</value>
<key>nchan</key>
<value>1</value>
</param>
<param>
<key>maxoutbuf</key>
<value>0</value>
<key>samp_rate</key>
<value>audio_samp_rate</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
<key>minoutbuf</key>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value></value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(64, 620)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
<key>id</key>
<value>file_path</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
<key>label</key>
<value></value>
</param>
<param>
<key>short_id</key>
<value></value>
</param>
<param>
<key>type</key>
<value>string</value>
</param>
<param>
<key>value</key>
<value>test.wav</value>
</param>
</block>
<block>
......@@ -769,7 +625,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(496, 487)</value>
<value>(520, 280)</value>
</param>
<param>
<key>_rotation</key>
......@@ -800,6 +656,50 @@ we shift the LO a little further</value>
<value>ccc</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value>To avoid the SDR carrier at the DC
we shift the LO a little further</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(328, 476)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>lo_offset</value>
</param>
<param>
<key>label</key>
<value></value>
</param>
<param>
<key>short_id</key>
<value></value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
</param>
<param>
<key>value</key>
<value>100e3</value>
</param>
</block>
<block>
<key>osmosdr_source</key>
<param>
......@@ -808,11 +708,11 @@ we shift the LO a little further</value>
</param>
<param>
<key>ant0</key>
<value></value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['antenna']</value>
</param>
<param>
<key>bb_gain0</key>
<value>20</value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['bb_gain']</value>
</param>
<param>
<key>bw0</key>
......@@ -828,7 +728,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>freq0</key>
<value>freq - lo_offset</value>
<value>rx_freq - lo_offset</value>
</param>
<param>
<key>gain_mode0</key>
......@@ -836,7 +736,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>if_gain0</key>
<value>20</value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['if_gain']</value>
</param>
<param>
<key>iq_balance_mode0</key>
......@@ -844,7 +744,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>gain0</key>
<value>gain</value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['rf_gain']</value>
</param>
<param>
<key>ant10</key>
......@@ -2096,7 +1996,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>args</key>
<value></value>
<value>satnogs.hw_rx_settings[rx_sdr_device]['dev_arg']</value>
</param>
<param>
<key>_enabled</key>
......@@ -2104,7 +2004,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(104, 229)</value>
<value>(24, 256)</value>
</param>
<param>
<key>_rotation</key>
......@@ -2227,7 +2127,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(904, 487)</value>
<value>(944, 288)</value>
</param>
<param>
<key>_rotation</key>
......@@ -2280,6 +2180,10 @@ we shift the LO a little further</value>
<key>average</key>
<value>1.0</value>
</param>
<param>
<key>axislabels</key>
<value>True</value>
</param>
<param>
<key>bw</key>
<value>samp_rate_rx</value>
......@@ -2306,7 +2210,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>0</value>
</param>
<param>
<key>fftsize</key>
......@@ -2314,7 +2218,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>_coordinate</key>
<value>(896, 262)</value>
<value>(792, 28)</value>
</param>
<param>
<key>gui_hint</key>
......@@ -2548,6 +2452,10 @@ we shift the LO a little further</value>
<key>wintype</key>
<value>firdes.WIN_BLACKMAN_hARRIS</value>
</param>
<param>
<key>label</key>
<value>Relative Gain</value>
</param>
<param>
<key>ymax</key>
<value>10</value>
......@@ -2556,6 +2464,96 @@ we shift the LO a little further</value>
<key>ymin</key>
<value>-140</value>
</param>
<param>
<key>units</key>
<value>dB</value>
</param>
</block>
<block>
<key>parameter</key>
<param>
<key>alias</key>
<value></value>
</param>
<param>
<key>comment</key>
<value></value>