Commit 31fdde55 authored by Manolis Surligas's avatar Manolis Surligas Committed by GitHub

Fix the DC issue at the generic receivers (#40)

Until proper debugging, the receivers are now using the coarse doppler
correction mechanism.
parent eff240e8
......@@ -763,7 +763,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>dc_offset_mode0</key>
<value>0</value>
<value>2</value>
</param>
<param>
<key>corr0</key>
......@@ -2642,7 +2642,7 @@ we shift the LO a little further</value>
</param>
</block>
<block>
<key>satnogs_doppler_correction_cc</key>
<key>satnogs_coarse_doppler_correction_cc</key>
<param>
<key>alias</key>
<value></value>
......@@ -2655,17 +2655,13 @@ we shift the LO a little further</value>
<key>affinity</key>
<value></value>
</param>
<param>
<key>corrections_per_sec</key>
<value>doppler_correction_per_sec</value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(304, 256)</value>
<value>(272, 280)</value>
</param>
<param>
<key>_rotation</key>
......@@ -2673,7 +2669,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>id</key>
<value>satnogs_doppler_correction_cc_0</value>
<value>satnogs_coarse_doppler_correction_cc_0</value>
</param>
<param>
<key>maxoutbuf</key>
......@@ -2789,7 +2785,7 @@ we shift the LO a little further</value>
</connection>
<connection>
<source_block_id>osmosdr_source_0</source_block_id>
<sink_block_id>satnogs_doppler_correction_cc_0</sink_block_id>
<sink_block_id>satnogs_coarse_doppler_correction_cc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
......@@ -2800,14 +2796,14 @@ we shift the LO a little further</value>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>satnogs_doppler_correction_cc_0</source_block_id>
<source_block_id>satnogs_coarse_doppler_correction_cc_0</source_block_id>
<sink_block_id>freq_xlating_fir_filter_xxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>satnogs_tcp_rigctl_msg_source_0</source_block_id>
<sink_block_id>satnogs_doppler_correction_cc_0</sink_block_id>
<sink_block_id>satnogs_coarse_doppler_correction_cc_0</sink_block_id>
<source_key>freq</source_key>
<sink_key>freq</sink_key>
</connection>
......
......@@ -386,7 +386,7 @@ TX sampling rate</value>
</param>
<param>
<key>_coordinate</key>
<value>(784, 284)</value>
<value>(1136, 284)</value>
</param>
<param>
<key>_rotation</key>
......@@ -574,7 +574,7 @@ TX sampling rate</value>
</param>
<param>
<key>_coordinate</key>
<value>(520, 280)</value>
<value>(896, 280)</value>
</param>
<param>
<key>_rotation</key>
......@@ -669,7 +669,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>dc_offset_mode0</key>
<value>0</value>
<value>2</value>
</param>
<param>
<key>corr0</key>
......@@ -2064,7 +2064,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>average</key>
<value>1.0</value>
<value>0.2</value>
</param>
<param>
<key>axislabels</key>
......@@ -2485,7 +2485,7 @@ we shift the LO a little further</value>
</param>
</block>
<block>
<key>satnogs_doppler_correction_cc</key>
<key>satnogs_coarse_doppler_correction_cc</key>
<param>
<key>alias</key>
<value></value>
......@@ -2498,17 +2498,13 @@ we shift the LO a little further</value>
<key>affinity</key>
<value></value>
</param>
<param>
<key>corrections_per_sec</key>
<value>doppler_correction_per_sec</value>
</param>
<param>
<key>_enabled</key>
<value>1</value>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(304, 256)</value>
<value>(568, 288)</value>
</param>
<param>
<key>_rotation</key>
......@@ -2516,7 +2512,7 @@ we shift the LO a little further</value>
</param>
<param>
<key>id</key>
<value>satnogs_doppler_correction_cc_0</value>
<value>satnogs_coarse_doppler_correction_cc_0</value>
</param>
<param>
<key>maxoutbuf</key>
......@@ -2620,19 +2616,19 @@ we shift the LO a little further</value>
</connection>
<connection>
<source_block_id>osmosdr_source_0</source_block_id>
<sink_block_id>satnogs_doppler_correction_cc_0</sink_block_id>
<sink_block_id>satnogs_coarse_doppler_correction_cc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>satnogs_doppler_correction_cc_0</source_block_id>
<source_block_id>satnogs_coarse_doppler_correction_cc_0</source_block_id>
<sink_block_id>freq_xlating_fir_filter_xxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>satnogs_tcp_rigctl_msg_source_0</source_block_id>
<sink_block_id>satnogs_doppler_correction_cc_0</sink_block_id>
<sink_block_id>satnogs_coarse_doppler_correction_cc_0</sink_block_id>
<source_key>freq</source_key>
<sink_key>freq</sink_key>
</connection>
......
......@@ -5,7 +5,7 @@
# Title: FM Generic Demodulation
# Author: Manolis Surligas (surligas@gmail.com)
# Description: A generic FM demodulation block
# Generated: Mon Oct 31 21:08:24 2016
# Generated: Mon Nov 7 19:50:22 2016
##################################################
from gnuradio import analog
......@@ -54,7 +54,7 @@ class satnogs_fm_demod(gr.top_block):
# Blocks
##################################################
self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500)
self.satnogs_doppler_correction_cc_0 = satnogs.doppler_correction_cc(rx_freq, samp_rate_rx, doppler_correction_per_sec)
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, samp_rate_rx)
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_fff(
audio_samp_rate / (quadrature_rate * 1.0 / audio_decimation),
taps=(firdes.low_pass_2(32, 32, 0.8, 0.1, 100)),
......@@ -65,7 +65,7 @@ class satnogs_fm_demod(gr.top_block):
self.osmosdr_source_0.set_sample_rate(samp_rate_rx)
self.osmosdr_source_0.set_center_freq(rx_freq - lo_offset, 0)
self.osmosdr_source_0.set_freq_corr(0, 0)
self.osmosdr_source_0.set_dc_offset_mode(0, 0)
self.osmosdr_source_0.set_dc_offset_mode(2, 0)
self.osmosdr_source_0.set_iq_balance_mode(0, 0)
self.osmosdr_source_0.set_gain_mode(False, 0)
self.osmosdr_source_0.set_gain(satnogs.hw_rx_settings[rx_sdr_device]['rf_gain'], 0)
......@@ -85,13 +85,13 @@ class satnogs_fm_demod(gr.top_block):
##################################################
# Connections
##################################################
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_doppler_correction_cc_0, 'freq'))
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq'))
self.connect((self.analog_wfm_rcv_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_wavfile_sink_0, 0))
self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_wfm_rcv_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.satnogs_doppler_correction_cc_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_multiply_const_vxx_0, 0))
self.connect((self.satnogs_doppler_correction_cc_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
def get_doppler_correction_per_sec(self):
return self.doppler_correction_per_sec
......@@ -125,6 +125,7 @@ class satnogs_fm_demod(gr.top_block):
def set_rx_freq(self, rx_freq):
self.rx_freq = rx_freq
self.satnogs_coarse_doppler_correction_cc_0.set_new_freq_locked(self.rx_freq)
self.osmosdr_source_0.set_center_freq(self.rx_freq - self.lo_offset, 0)
def get_rx_sdr_device(self):
......
......@@ -5,7 +5,7 @@
# Title: Generic IQ samples receiver
# Author: Manolis Surligas (surligas@gmail.com)
# Description: A generic FM demodulation block
# Generated: Mon Oct 31 21:08:00 2016
# Generated: Mon Nov 7 19:49:15 2016
##################################################
from gnuradio import blocks
......@@ -52,12 +52,12 @@ class satnogs_generic_iq_receiver(gr.top_block):
# Blocks
##################################################
self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500)
self.satnogs_doppler_correction_cc_0 = satnogs.doppler_correction_cc(rx_freq, samp_rate_rx, doppler_correction_per_sec)
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, samp_rate_rx)
self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + satnogs.hw_rx_settings[rx_sdr_device]['dev_arg'] )
self.osmosdr_source_0.set_sample_rate(samp_rate_rx)
self.osmosdr_source_0.set_center_freq(rx_freq - lo_offset, 0)
self.osmosdr_source_0.set_freq_corr(0, 0)
self.osmosdr_source_0.set_dc_offset_mode(0, 0)
self.osmosdr_source_0.set_dc_offset_mode(2, 0)
self.osmosdr_source_0.set_iq_balance_mode(0, 0)
self.osmosdr_source_0.set_gain_mode(False, 0)
self.osmosdr_source_0.set_gain(satnogs.hw_rx_settings[rx_sdr_device]['rf_gain'], 0)
......@@ -73,10 +73,10 @@ class satnogs_generic_iq_receiver(gr.top_block):
##################################################
# Connections
##################################################
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_doppler_correction_cc_0, 'freq'))
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq'))
self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blocks_file_sink_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.satnogs_doppler_correction_cc_0, 0))
self.connect((self.satnogs_doppler_correction_cc_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
def get_doppler_correction_per_sec(self):
return self.doppler_correction_per_sec
......@@ -110,6 +110,7 @@ class satnogs_generic_iq_receiver(gr.top_block):
def set_rx_freq(self, rx_freq):
self.rx_freq = rx_freq
self.satnogs_coarse_doppler_correction_cc_0.set_new_freq_locked(self.rx_freq)
self.osmosdr_source_0.set_center_freq(self.rx_freq - self.lo_offset, 0)
def get_rx_sdr_device(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment