diff --git a/apps/flowgraphs/apt_demod.grc b/apps/flowgraphs/apt_demod.grc index e740afc..0fb2094 100644 --- a/apps/flowgraphs/apt_demod.grc +++ b/apps/flowgraphs/apt_demod.grc @@ -537,6 +537,49 @@ TX sampling rate ccc + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (672, 940) + + + _rotation + 0 + + + id + decoded_data_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/.satnogs/data/data + + parameter @@ -623,6 +666,49 @@ TX sampling rate 20 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (456, 940) + + + _rotation + 0 + + + id + enable_iq_dump + + + label + + + + short_id + + + + type + intx + + + value + 0 + + parameter @@ -768,6 +854,49 @@ TX sampling rate satnogs.not_set_rx_if_gain + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (568, 940) + + + _rotation + 0 + + + id + iq_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/iq.dat + + parameter @@ -2540,6 +2669,53 @@ we shift the LO a little further rx_freq + + satnogs_iq_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + filename + iq_file_path + + + _coordinate + (1296, 108) + + + _rotation + 0 + + + id + satnogs_iq_sink_0 + + + scale + 32767 + + + status + enable_iq_dump + + satnogs_ogg_encoder @@ -2752,6 +2928,12 @@ we shift the LO a little further 0 0 + + blks2_rational_resampler_xxx_1 + satnogs_iq_sink_0 + 0 + 0 + blks2_rational_resampler_xxx_1 satnogs_waterfall_sink_0 diff --git a/apps/flowgraphs/bpsk_demod.grc b/apps/flowgraphs/bpsk_demod.grc index d27e4e1..87022c4 100644 --- a/apps/flowgraphs/bpsk_demod.grc +++ b/apps/flowgraphs/bpsk_demod.grc @@ -46,7 +46,7 @@ id - satnogs_cw_demod + satnogs_bpsk_demod max_nouts @@ -759,6 +759,49 @@ tone. This tone is typically 500-800 Hz. 1500 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (696, 1068) + + + _rotation + 0 + + + id + decoded_data_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/.satnogs/data/data + + parameter @@ -845,6 +888,49 @@ tone. This tone is typically 500-800 Hz. 20 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (472, 1068) + + + _rotation + 0 + + + id + enable_iq_dump + + + label + + + + short_id + + + + type + intx + + + value + 0 + + parameter @@ -990,6 +1076,49 @@ tone. This tone is typically 500-800 Hz. satnogs.not_set_rx_if_gain + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (592, 1068) + + + _rotation + 0 + + + id + iq_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/iq.dat + + parameter @@ -2829,6 +2958,53 @@ we shift the LO a little further rx_freq + + satnogs_iq_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + filename + iq_file_path + + + _coordinate + (1272, 372) + + + _rotation + 0 + + + id + satnogs_iq_sink_0 + + + scale + 32767 + + + status + enable_iq_dump + + satnogs_ogg_encoder @@ -2963,7 +3139,7 @@ we shift the LO a little further _coordinate - (1360, 248) + (1408, 248) _rotation @@ -3047,6 +3223,12 @@ we shift the LO a little further 0 0 + + blks2_rational_resampler_xxx_1 + satnogs_iq_sink_0 + 0 + 0 + blks2_rational_resampler_xxx_1 satnogs_waterfall_sink_0 diff --git a/apps/flowgraphs/cw_demod.grc b/apps/flowgraphs/cw_demod.grc index f378a1c..02450da 100644 --- a/apps/flowgraphs/cw_demod.grc +++ b/apps/flowgraphs/cw_demod.grc @@ -759,6 +759,49 @@ tone. This tone is typically 500-800 Hz. 700 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (704, 1084) + + + _rotation + 0 + + + id + decoded_data_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/.satnogs/data/data + + parameter @@ -845,6 +888,49 @@ tone. This tone is typically 500-800 Hz. 20 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (480, 1084) + + + _rotation + 0 + + + id + enable_iq_dump + + + label + + + + short_id + + + + type + intx + + + value + 0 + + parameter @@ -990,6 +1076,49 @@ tone. This tone is typically 500-800 Hz. satnogs.not_set_rx_if_gain + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (600, 1084) + + + _rotation + 0 + + + id + iq_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/iq.dat + + parameter @@ -2413,7 +2542,7 @@ we shift the LO a little further _coordinate - (15, 335) + (16, 360) _rotation @@ -2829,6 +2958,53 @@ we shift the LO a little further rx_freq + + satnogs_iq_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + filename + iq_file_path + + + _coordinate + (1176, 372) + + + _rotation + 0 + + + id + satnogs_iq_sink_0 + + + scale + 32767 + + + status + enable_iq_dump + + satnogs_ogg_encoder @@ -3047,6 +3223,12 @@ we shift the LO a little further 0 0 + + blks2_rational_resampler_xxx_1 + satnogs_iq_sink_0 + 0 + 0 + blks2_rational_resampler_xxx_1 satnogs_waterfall_sink_0 diff --git a/apps/flowgraphs/fm_demod.grc b/apps/flowgraphs/fm_demod.grc index b8e3657..6397991 100644 --- a/apps/flowgraphs/fm_demod.grc +++ b/apps/flowgraphs/fm_demod.grc @@ -537,6 +537,49 @@ TX sampling rate ccc + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (688, 948) + + + _rotation + 0 + + + id + decoded_data_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/.satnogs/data/data + + parameter @@ -623,6 +666,49 @@ TX sampling rate 20 + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (464, 948) + + + _rotation + 0 + + + id + enable_iq_dump + + + label + + + + short_id + + + + type + intx + + + value + 0 + + parameter @@ -768,6 +854,49 @@ TX sampling rate satnogs.not_set_rx_if_gain + + parameter + + alias + + + + comment + + + + _enabled + True + + + _coordinate + (584, 948) + + + _rotation + 0 + + + id + iq_file_path + + + label + + + + short_id + + + + type + string + + + value + /tmp/iq.dat + + parameter @@ -2481,6 +2610,53 @@ we shift the LO a little further rx_freq + + satnogs_iq_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + filename + iq_file_path + + + _coordinate + (1376, 132) + + + _rotation + 0 + + + id + satnogs_iq_sink_0 + + + scale + 32767 + + + status + enable_iq_dump + + satnogs_ogg_encoder @@ -2693,6 +2869,12 @@ we shift the LO a little further 0 0 + + blks2_rational_resampler_xxx_1 + satnogs_iq_sink_0 + 0 + 0 + blks2_rational_resampler_xxx_1 satnogs_waterfall_sink_0 diff --git a/apps/flowgraphs/satnogs_apt_demod.py b/apps/flowgraphs/satnogs_apt_demod.py index a48c1da..13c2d36 100755 --- a/apps/flowgraphs/satnogs_apt_demod.py +++ b/apps/flowgraphs/satnogs_apt_demod.py @@ -5,7 +5,7 @@ # Title: APT Generic Demodulation # Author: Manolis Surligas (surligas@gmail.com) # Description: A generic APT demodulation block -# Generated: Tue Jul 25 21:48:00 2017 +# Generated: Wed Aug 9 13:40:42 2017 ################################################## from gnuradio import analog @@ -23,7 +23,7 @@ import time class satnogs_apt_demod(gr.top_block): - def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): + def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): gr.top_block.__init__(self, "APT Generic Demodulation") ################################################## @@ -31,10 +31,13 @@ class satnogs_apt_demod(gr.top_block): ################################################## self.antenna = antenna self.bb_gain = bb_gain + self.decoded_data_file_path = decoded_data_file_path self.dev_args = dev_args self.doppler_correction_per_sec = doppler_correction_per_sec + self.enable_iq_dump = enable_iq_dump self.file_path = file_path self.if_gain = if_gain + self.iq_file_path = iq_file_path self.lo_offset = lo_offset self.ppm = ppm self.rf_gain = rf_gain @@ -62,6 +65,7 @@ class satnogs_apt_demod(gr.top_block): self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate*2, 0.0, 8, 1024, waterfall_file_path, 1) self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000/doppler_correction_per_sec, 1500) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0) + self.satnogs_iq_sink_0 = satnogs.iq_sink(32767, iq_file_path, False, enable_iq_dump) self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, samp_rate_rx) self.rational_resampler_xxx_0 = filter.rational_resampler_fff( interpolation=1, @@ -97,6 +101,7 @@ class satnogs_apt_demod(gr.top_block): self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq')) self.connect((self.analog_quadrature_demod_cf_0, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.analog_quadrature_demod_cf_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blks2_rational_resampler_xxx_1, 0)) self.connect((self.osmosdr_source_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) @@ -117,6 +122,12 @@ class satnogs_apt_demod(gr.top_block): self.bb_gain = bb_gain self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0) + def get_decoded_data_file_path(self): + return self.decoded_data_file_path + + def set_decoded_data_file_path(self, decoded_data_file_path): + self.decoded_data_file_path = decoded_data_file_path + def get_dev_args(self): return self.dev_args @@ -129,6 +140,12 @@ class satnogs_apt_demod(gr.top_block): def set_doppler_correction_per_sec(self, doppler_correction_per_sec): self.doppler_correction_per_sec = doppler_correction_per_sec + def get_enable_iq_dump(self): + return self.enable_iq_dump + + def set_enable_iq_dump(self, enable_iq_dump): + self.enable_iq_dump = enable_iq_dump + def get_file_path(self): return self.file_path @@ -142,6 +159,12 @@ class satnogs_apt_demod(gr.top_block): self.if_gain = if_gain self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0) + def get_iq_file_path(self): + return self.iq_file_path + + def set_iq_file_path(self, iq_file_path): + self.iq_file_path = iq_file_path + def get_lo_offset(self): return self.lo_offset @@ -253,18 +276,27 @@ def argument_parser(): parser.add_option( "", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain), help="Set bb_gain [default=%default]") + parser.add_option( + "", "--decoded-data-file-path", dest="decoded_data_file_path", type="string", default='/tmp/.satnogs/data/data', + help="Set decoded_data_file_path [default=%default]") parser.add_option( "", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args, help="Set dev_args [default=%default]") parser.add_option( "", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=20, help="Set doppler_correction_per_sec [default=%default]") + parser.add_option( + "", "--enable-iq-dump", dest="enable_iq_dump", type="intx", default=0, + help="Set enable_iq_dump [default=%default]") parser.add_option( "", "--file-path", dest="file_path", type="string", default='test.wav', help="Set file_path [default=%default]") parser.add_option( "", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain), help="Set if_gain [default=%default]") + parser.add_option( + "", "--iq-file-path", dest="iq_file_path", type="string", default='/tmp/iq.dat', + help="Set iq_file_path [default=%default]") parser.add_option( "", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3), help="Set lo_offset [default=%default]") @@ -293,7 +325,7 @@ def main(top_block_cls=satnogs_apt_demod, options=None): if options is None: options, _ = argument_parser().parse_args() - tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, file_path=options.file_path, if_gain=options.if_gain, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) + tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) tb.start() tb.wait() diff --git a/apps/flowgraphs/satnogs_bpsk_demod.py b/apps/flowgraphs/satnogs_bpsk_demod.py index fb35253..1415443 100755 --- a/apps/flowgraphs/satnogs_bpsk_demod.py +++ b/apps/flowgraphs/satnogs_bpsk_demod.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph -# Title: FM Generic Demodulation -# Author: Manolis Surligas (surligas@gmail.com) -# Description: A generic FM demodulation block -# Generated: Sat Apr 22 18:57:53 2017 +# Title: BPSK Generic Demodulation +# Author: surligas, cshields, csete +# Description: A generic BPSK demodulation block +# Generated: Wed Aug 9 13:40:52 2017 ################################################## from gnuradio import analog @@ -21,19 +21,27 @@ import satnogs import time -class satnogs_fm_demod(gr.top_block): +class satnogs_bpsk_demod(gr.top_block): - def __init__(self, cw_offset=1500, doppler_correction_per_sec=1000, file_path='test.wav', lo_offset=100e3, ppm=0, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): - gr.top_block.__init__(self, "USB Generic Demodulation") + def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, cw_offset=1500, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): + gr.top_block.__init__(self, "BPSK Generic Demodulation") ################################################## # Parameters ################################################## + self.antenna = antenna + self.bb_gain = bb_gain self.cw_offset = cw_offset + self.decoded_data_file_path = decoded_data_file_path + self.dev_args = dev_args self.doppler_correction_per_sec = doppler_correction_per_sec + self.enable_iq_dump = enable_iq_dump self.file_path = file_path + self.if_gain = if_gain + self.iq_file_path = iq_file_path self.lo_offset = lo_offset self.ppm = ppm + self.rf_gain = rf_gain self.rigctl_port = rigctl_port self.rx_freq = rx_freq self.rx_sdr_device = rx_sdr_device @@ -44,9 +52,9 @@ class satnogs_fm_demod(gr.top_block): ################################################## self.samp_rate_rx = samp_rate_rx = satnogs.hw_rx_settings[rx_sdr_device]['samp_rate'] self.xlate_filter_taps = xlate_filter_taps = firdes.low_pass(1, samp_rate_rx, 125000, 25000, firdes.WIN_HAMMING, 6.76) - + self.taps = taps = firdes.low_pass(12.0, samp_rate_rx, 100e3, 60000, firdes.WIN_HAMMING, 6.76) - + self.filter_rate = filter_rate = 250000 self.deviation = deviation = 5000 self.audio_samp_rate = audio_samp_rate = 48000 @@ -55,23 +63,24 @@ class satnogs_fm_demod(gr.top_block): ################################################## # Blocks ################################################## - self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 10, 1024, waterfall_file_path, 1) - self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500) + self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 8, 1024, waterfall_file_path, 1) + self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000/doppler_correction_per_sec, 1500) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0) + self.satnogs_iq_sink_0 = satnogs.iq_sink(32767, iq_file_path, False, enable_iq_dump) 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 = osmosdr.source( args="numchan=" + str(1) + " " + satnogs.handle_rx_dev_args(rx_sdr_device, dev_args) ) 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(ppm, 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) - self.osmosdr_source_0.set_if_gain(satnogs.hw_rx_settings[rx_sdr_device]['if_gain'], 0) - self.osmosdr_source_0.set_bb_gain(satnogs.hw_rx_settings[rx_sdr_device]['bb_gain'], 0) - self.osmosdr_source_0.set_antenna(satnogs.hw_rx_settings[rx_sdr_device]['antenna'], 0) + self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(rx_sdr_device, rf_gain), 0) + self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(rx_sdr_device, if_gain), 0) + self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(rx_sdr_device, bb_gain), 0) + self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0) self.osmosdr_source_0.set_bandwidth(samp_rate_rx, 0) - + self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( 1, audio_samp_rate, 2000, 1000, firdes.WIN_HAMMING, 6.76)) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(int(samp_rate_rx/filter_rate), (xlate_filter_taps), lo_offset, samp_rate_rx) @@ -90,17 +99,32 @@ class satnogs_fm_demod(gr.top_block): ################################################## # Connections ################################################## - self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq')) - self.connect((self.analog_agc2_xx_0_0, 0), (self.blocks_multiply_xx_0, 1)) - self.connect((self.analog_sig_source_x_0, 0), (self.blocks_multiply_xx_0, 0)) - self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.low_pass_filter_0, 0)) - self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_waterfall_sink_0, 0)) - self.connect((self.blocks_complex_to_real_0, 0), (self.satnogs_ogg_encoder_0, 0)) - self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_complex_to_real_0, 0)) - self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blks2_rational_resampler_xxx_1, 0)) - self.connect((self.low_pass_filter_0, 0), (self.analog_agc2_xx_0_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)) + self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq')) + self.connect((self.analog_agc2_xx_0_0, 0), (self.blocks_multiply_xx_0, 1)) + self.connect((self.analog_sig_source_x_0, 0), (self.blocks_multiply_xx_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.low_pass_filter_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_iq_sink_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_waterfall_sink_0, 0)) + self.connect((self.blocks_complex_to_real_0, 0), (self.satnogs_ogg_encoder_0, 0)) + self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_complex_to_real_0, 0)) + self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blks2_rational_resampler_xxx_1, 0)) + self.connect((self.low_pass_filter_0, 0), (self.analog_agc2_xx_0_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_antenna(self): + return self.antenna + + def set_antenna(self, antenna): + self.antenna = antenna + self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0) + + def get_bb_gain(self): + return self.bb_gain + + def set_bb_gain(self, bb_gain): + self.bb_gain = bb_gain + self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0) def get_cw_offset(self): return self.cw_offset @@ -109,18 +133,49 @@ class satnogs_fm_demod(gr.top_block): self.cw_offset = cw_offset self.analog_sig_source_x_0.set_frequency(self.cw_offset) + def get_decoded_data_file_path(self): + return self.decoded_data_file_path + + def set_decoded_data_file_path(self, decoded_data_file_path): + self.decoded_data_file_path = decoded_data_file_path + + def get_dev_args(self): + return self.dev_args + + def set_dev_args(self, dev_args): + self.dev_args = dev_args + def get_doppler_correction_per_sec(self): return self.doppler_correction_per_sec def set_doppler_correction_per_sec(self, doppler_correction_per_sec): self.doppler_correction_per_sec = doppler_correction_per_sec + def get_enable_iq_dump(self): + return self.enable_iq_dump + + def set_enable_iq_dump(self, enable_iq_dump): + self.enable_iq_dump = enable_iq_dump + def get_file_path(self): return self.file_path def set_file_path(self, file_path): self.file_path = file_path + def get_if_gain(self): + return self.if_gain + + def set_if_gain(self, if_gain): + self.if_gain = if_gain + self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0) + + def get_iq_file_path(self): + return self.iq_file_path + + def set_iq_file_path(self, iq_file_path): + self.iq_file_path = iq_file_path + def get_lo_offset(self): return self.lo_offset @@ -136,6 +191,13 @@ class satnogs_fm_demod(gr.top_block): self.ppm = ppm self.osmosdr_source_0.set_freq_corr(self.ppm, 0) + def get_rf_gain(self): + return self.rf_gain + + def set_rf_gain(self, rf_gain): + self.rf_gain = rf_gain + self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(self.rx_sdr_device, self.rf_gain), 0) + def get_rigctl_port(self): return self.rigctl_port @@ -156,10 +218,10 @@ class satnogs_fm_demod(gr.top_block): def set_rx_sdr_device(self, rx_sdr_device): self.rx_sdr_device = rx_sdr_device self.set_samp_rate_rx(satnogs.hw_rx_settings[self.rx_sdr_device]['samp_rate']) - self.osmosdr_source_0.set_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['rf_gain'], 0) - self.osmosdr_source_0.set_if_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['if_gain'], 0) - self.osmosdr_source_0.set_bb_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['bb_gain'], 0) - self.osmosdr_source_0.set_antenna(satnogs.hw_rx_settings[self.rx_sdr_device]['antenna'], 0) + self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(self.rx_sdr_device, self.rf_gain), 0) + self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0) + self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0) + self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0) self.set_audio_gain(satnogs.fm_demod_settings[self.rx_sdr_device]['audio_gain']) def get_waterfall_file_path(self): @@ -218,23 +280,47 @@ class satnogs_fm_demod(gr.top_block): def argument_parser(): - description = 'A generic FM demodulation block' + description = 'A generic BPSK demodulation block' parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description) + parser.add_option( + "", "--antenna", dest="antenna", type="string", default=satnogs.not_set_antenna, + help="Set antenna [default=%default]") + parser.add_option( + "", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain), + help="Set bb_gain [default=%default]") parser.add_option( "", "--cw-offset", dest="cw_offset", type="eng_float", default=eng_notation.num_to_str(1500), help="Set cw_offset [default=%default]") parser.add_option( - "", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=1000, + "", "--decoded-data-file-path", dest="decoded_data_file_path", type="string", default='/tmp/.satnogs/data/data', + help="Set decoded_data_file_path [default=%default]") + parser.add_option( + "", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args, + help="Set dev_args [default=%default]") + parser.add_option( + "", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=20, help="Set doppler_correction_per_sec [default=%default]") + parser.add_option( + "", "--enable-iq-dump", dest="enable_iq_dump", type="intx", default=0, + help="Set enable_iq_dump [default=%default]") parser.add_option( "", "--file-path", dest="file_path", type="string", default='test.wav', help="Set file_path [default=%default]") + parser.add_option( + "", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain), + help="Set if_gain [default=%default]") + parser.add_option( + "", "--iq-file-path", dest="iq_file_path", type="string", default='/tmp/iq.dat', + help="Set iq_file_path [default=%default]") parser.add_option( "", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3), help="Set lo_offset [default=%default]") parser.add_option( "", "--ppm", dest="ppm", type="intx", default=0, help="Set ppm [default=%default]") + parser.add_option( + "", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_rf_gain), + help="Set rf_gain [default=%default]") parser.add_option( "", "--rigctl-port", dest="rigctl_port", type="intx", default=4532, help="Set rigctl_port [default=%default]") @@ -250,11 +336,11 @@ def argument_parser(): return parser -def main(top_block_cls=satnogs_fm_demod, options=None): +def main(top_block_cls=satnogs_bpsk_demod, options=None): if options is None: options, _ = argument_parser().parse_args() - tb = top_block_cls(cw_offset=options.cw_offset, doppler_correction_per_sec=options.doppler_correction_per_sec, file_path=options.file_path, lo_offset=options.lo_offset, ppm=options.ppm, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) + tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, cw_offset=options.cw_offset, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) tb.start() tb.wait() diff --git a/apps/flowgraphs/satnogs_cw_demod.py b/apps/flowgraphs/satnogs_cw_demod.py index ecb6ff7..b917638 100755 --- a/apps/flowgraphs/satnogs_cw_demod.py +++ b/apps/flowgraphs/satnogs_cw_demod.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph -# Title: BPSK Generic Demodulation +# Title: FM Generic Demodulation # Author: surligas, cshields, csete -# Description: A generic BPSK demodulation block -# Generated: Tue Jul 25 21:48:53 2017 +# Description: A generic CW demodulation block +# Generated: Wed Aug 9 13:41:00 2017 ################################################## from gnuradio import analog @@ -23,8 +23,8 @@ import time class satnogs_cw_demod(gr.top_block): - def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, cw_offset=1500, dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): - gr.top_block.__init__(self, "BPSK Generic Demodulation") + def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, cw_offset=700, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): + gr.top_block.__init__(self, "FM Generic Demodulation") ################################################## # Parameters @@ -32,10 +32,13 @@ class satnogs_cw_demod(gr.top_block): self.antenna = antenna self.bb_gain = bb_gain self.cw_offset = cw_offset + self.decoded_data_file_path = decoded_data_file_path self.dev_args = dev_args self.doppler_correction_per_sec = doppler_correction_per_sec + self.enable_iq_dump = enable_iq_dump self.file_path = file_path self.if_gain = if_gain + self.iq_file_path = iq_file_path self.lo_offset = lo_offset self.ppm = ppm self.rf_gain = rf_gain @@ -63,6 +66,7 @@ class satnogs_cw_demod(gr.top_block): self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 8, 1024, waterfall_file_path, 1) self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000/doppler_correction_per_sec, 1500) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0) + self.satnogs_iq_sink_0 = satnogs.iq_sink(32767, iq_file_path, False, enable_iq_dump) 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.handle_rx_dev_args(rx_sdr_device, dev_args) ) self.osmosdr_source_0.set_sample_rate(samp_rate_rx) @@ -99,6 +103,7 @@ class satnogs_cw_demod(gr.top_block): self.connect((self.analog_agc2_xx_0_0, 0), (self.blocks_multiply_xx_0, 1)) self.connect((self.analog_sig_source_x_0, 0), (self.blocks_multiply_xx_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.low_pass_filter_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.blocks_complex_to_real_0, 0), (self.satnogs_ogg_encoder_0, 0)) self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_complex_to_real_0, 0)) @@ -128,6 +133,12 @@ class satnogs_cw_demod(gr.top_block): self.cw_offset = cw_offset self.analog_sig_source_x_0.set_frequency(self.cw_offset) + def get_decoded_data_file_path(self): + return self.decoded_data_file_path + + def set_decoded_data_file_path(self, decoded_data_file_path): + self.decoded_data_file_path = decoded_data_file_path + def get_dev_args(self): return self.dev_args @@ -140,6 +151,12 @@ class satnogs_cw_demod(gr.top_block): def set_doppler_correction_per_sec(self, doppler_correction_per_sec): self.doppler_correction_per_sec = doppler_correction_per_sec + def get_enable_iq_dump(self): + return self.enable_iq_dump + + def set_enable_iq_dump(self, enable_iq_dump): + self.enable_iq_dump = enable_iq_dump + def get_file_path(self): return self.file_path @@ -153,6 +170,12 @@ class satnogs_cw_demod(gr.top_block): self.if_gain = if_gain self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0) + def get_iq_file_path(self): + return self.iq_file_path + + def set_iq_file_path(self, iq_file_path): + self.iq_file_path = iq_file_path + def get_lo_offset(self): return self.lo_offset @@ -257,7 +280,7 @@ class satnogs_cw_demod(gr.top_block): def argument_parser(): - description = 'A generic BPSK demodulation block' + description = 'A generic CW demodulation block' parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description) parser.add_option( "", "--antenna", dest="antenna", type="string", default=satnogs.not_set_antenna, @@ -266,20 +289,29 @@ def argument_parser(): "", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain), help="Set bb_gain [default=%default]") parser.add_option( - "", "--cw-offset", dest="cw_offset", type="eng_float", default=eng_notation.num_to_str(1500), + "", "--cw-offset", dest="cw_offset", type="eng_float", default=eng_notation.num_to_str(700), help="Set cw_offset [default=%default]") + parser.add_option( + "", "--decoded-data-file-path", dest="decoded_data_file_path", type="string", default='/tmp/.satnogs/data/data', + help="Set decoded_data_file_path [default=%default]") parser.add_option( "", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args, help="Set dev_args [default=%default]") parser.add_option( "", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=20, help="Set doppler_correction_per_sec [default=%default]") + parser.add_option( + "", "--enable-iq-dump", dest="enable_iq_dump", type="intx", default=0, + help="Set enable_iq_dump [default=%default]") parser.add_option( "", "--file-path", dest="file_path", type="string", default='test.wav', help="Set file_path [default=%default]") parser.add_option( "", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain), help="Set if_gain [default=%default]") + parser.add_option( + "", "--iq-file-path", dest="iq_file_path", type="string", default='/tmp/iq.dat', + help="Set iq_file_path [default=%default]") parser.add_option( "", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3), help="Set lo_offset [default=%default]") @@ -308,7 +340,7 @@ def main(top_block_cls=satnogs_cw_demod, options=None): if options is None: options, _ = argument_parser().parse_args() - tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, cw_offset=options.cw_offset, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, file_path=options.file_path, if_gain=options.if_gain, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) + tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, cw_offset=options.cw_offset, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) tb.start() tb.wait() diff --git a/apps/flowgraphs/satnogs_fm_demod.py b/apps/flowgraphs/satnogs_fm_demod.py index 492b288..cbbe1e7 100755 --- a/apps/flowgraphs/satnogs_fm_demod.py +++ b/apps/flowgraphs/satnogs_fm_demod.py @@ -5,7 +5,7 @@ # Title: FM Generic Demodulation # Author: Manolis Surligas (surligas@gmail.com) # Description: A generic FM demodulation block -# Generated: Tue Jul 25 21:49:05 2017 +# Generated: Wed Aug 9 13:41:22 2017 ################################################## from gnuradio import analog @@ -23,7 +23,7 @@ import time class satnogs_fm_demod(gr.top_block): - def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): + def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.wav', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'): gr.top_block.__init__(self, "FM Generic Demodulation") ################################################## @@ -31,10 +31,13 @@ class satnogs_fm_demod(gr.top_block): ################################################## self.antenna = antenna self.bb_gain = bb_gain + self.decoded_data_file_path = decoded_data_file_path self.dev_args = dev_args self.doppler_correction_per_sec = doppler_correction_per_sec + self.enable_iq_dump = enable_iq_dump self.file_path = file_path self.if_gain = if_gain + self.iq_file_path = iq_file_path self.lo_offset = lo_offset self.ppm = ppm self.rf_gain = rf_gain @@ -62,6 +65,7 @@ class satnogs_fm_demod(gr.top_block): self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 8, 1024, waterfall_file_path, 1) self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000/doppler_correction_per_sec, 1500) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0) + self.satnogs_iq_sink_0 = satnogs.iq_sink(32767, iq_file_path, False, enable_iq_dump) 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.handle_rx_dev_args(rx_sdr_device, dev_args) ) self.osmosdr_source_0.set_sample_rate(samp_rate_rx) @@ -91,6 +95,7 @@ class satnogs_fm_demod(gr.top_block): self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq')) self.connect((self.analog_quadrature_demod_cf_0, 0), (self.satnogs_ogg_encoder_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.analog_quadrature_demod_cf_0, 0)) + self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.blks2_rational_resampler_xxx_1, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blks2_rational_resampler_xxx_1, 0)) self.connect((self.osmosdr_source_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) @@ -110,6 +115,12 @@ class satnogs_fm_demod(gr.top_block): self.bb_gain = bb_gain self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0) + def get_decoded_data_file_path(self): + return self.decoded_data_file_path + + def set_decoded_data_file_path(self, decoded_data_file_path): + self.decoded_data_file_path = decoded_data_file_path + def get_dev_args(self): return self.dev_args @@ -122,6 +133,12 @@ class satnogs_fm_demod(gr.top_block): def set_doppler_correction_per_sec(self, doppler_correction_per_sec): self.doppler_correction_per_sec = doppler_correction_per_sec + def get_enable_iq_dump(self): + return self.enable_iq_dump + + def set_enable_iq_dump(self, enable_iq_dump): + self.enable_iq_dump = enable_iq_dump + def get_file_path(self): return self.file_path @@ -135,6 +152,12 @@ class satnogs_fm_demod(gr.top_block): self.if_gain = if_gain self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0) + def get_iq_file_path(self): + return self.iq_file_path + + def set_iq_file_path(self, iq_file_path): + self.iq_file_path = iq_file_path + def get_lo_offset(self): return self.lo_offset @@ -247,18 +270,27 @@ def argument_parser(): parser.add_option( "", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain), help="Set bb_gain [default=%default]") + parser.add_option( + "", "--decoded-data-file-path", dest="decoded_data_file_path", type="string", default='/tmp/.satnogs/data/data', + help="Set decoded_data_file_path [default=%default]") parser.add_option( "", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args, help="Set dev_args [default=%default]") parser.add_option( "", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=20, help="Set doppler_correction_per_sec [default=%default]") + parser.add_option( + "", "--enable-iq-dump", dest="enable_iq_dump", type="intx", default=0, + help="Set enable_iq_dump [default=%default]") parser.add_option( "", "--file-path", dest="file_path", type="string", default='test.wav', help="Set file_path [default=%default]") parser.add_option( "", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain), help="Set if_gain [default=%default]") + parser.add_option( + "", "--iq-file-path", dest="iq_file_path", type="string", default='/tmp/iq.dat', + help="Set iq_file_path [default=%default]") parser.add_option( "", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3), help="Set lo_offset [default=%default]") @@ -287,7 +319,7 @@ def main(top_block_cls=satnogs_fm_demod, options=None): if options is None: options, _ = argument_parser().parse_args() - tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, file_path=options.file_path, if_gain=options.if_gain, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) + tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path) tb.start() tb.wait()