diff --git a/apps/flowgraphs/satellites/reaktor_hello_world_fsk9600_decoder.grc b/apps/flowgraphs/satellites/reaktor_hello_world_fsk9600_decoder.grc index 678597e..69b6807 100644 --- a/apps/flowgraphs/satellites/reaktor_hello_world_fsk9600_decoder.grc +++ b/apps/flowgraphs/satellites/reaktor_hello_world_fsk9600_decoder.grc @@ -175,7 +175,7 @@ _coordinate - (1248, 196) + (904, 412) _rotation @@ -183,11 +183,11 @@ gain - 1.2 + 0.9 id - analog_quadrature_demod_cf_0_0 + analog_quadrature_demod_cf_0_0_0 maxoutbuf @@ -214,11 +214,11 @@ _enabled - True + 1 _coordinate - (992, 316) + (952, 316) _rotation @@ -226,11 +226,54 @@ gain - 0.9 + 1.0 id - analog_quadrature_demod_cf_0_0_0 + analog_quadrature_demod_cf_0_0_0_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + + analog_quadrature_demod_cf + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1824, 180) + + + _rotation + 0 + + + gain + 1.2 + + + id + analog_quadrature_demod_cf_0_0_0_1 maxoutbuf @@ -382,6 +425,171 @@ satnogs.not_set_rx_bb_gain + + blocks_delay + + alias + + + + comment + + + + affinity + + + + delay + 1024/2 + + + _enabled + 1 + + + _coordinate + (992, 164) + + + _rotation + 0 + + + id + blocks_delay_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_ports + 1 + + + type + complex + + + vlen + 1 + + + + blocks_moving_average_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1136, 300) + + + _rotation + 0 + + + id + blocks_moving_average_xx_0 + + + vlen + 1 + + + length + 1024 + + + max_iter + 4096 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + scale + 1.0/1024.0 + + + type + float + + + + blocks_multiply_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1296, 168) + + + _rotation + 0 + + + id + blocks_multiply_xx_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_inputs + 2 + + + vlen + 1 + + blocks_rotator_cc @@ -402,7 +610,7 @@ _coordinate - (472, 372) + (368, 372) _rotation @@ -425,6 +633,57 @@ -2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)) + + blocks_vco_c + + amplitude + 1.0 + + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1296, 300) + + + _rotation + 0 + + + id + blocks_vco_c_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_samp_rate + + + sensitivity + -audio_samp_rate + + dc_blocker_xx @@ -445,7 +704,7 @@ _coordinate - (1432, 188) + (1120, 404) _rotation @@ -453,7 +712,7 @@ id - dc_blocker_xx_0 + dc_blocker_xx_0_0 length @@ -492,19 +751,19 @@ _enabled - True + 1 _coordinate - (1208, 308) + (1912, 556) _rotation - 0 + 180 id - dc_blocker_xx_0_0 + dc_blocker_xx_0_0_0 length @@ -680,19 +939,19 @@ _coordinate - (1616, 164) + (1672, 532) _rotation - 0 + 180 gain_mu - 0.175 + 0.5/8.0 gain_omega - 0.25*0.175*0.175 + 2 * math.pi / 100 id @@ -712,7 +971,7 @@ omega_relative_limit - 0.005 + 0.01 omega @@ -1037,6 +1296,156 @@ we shift the LO a little further 100e3 + + low_pass_filter + + beta + 6.76 + + + alias + + + + comment + + + + affinity + + + + cutoff_freq + 0.75 * baudrate + + + decim + 1 + + + _enabled + 1 + + + type + fir_filter_ccf + + + _coordinate + (1424, 132) + + + _rotation + 0 + + + gain + 1 + + + id + low_pass_filter_0 + + + interp + 1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_samp_rate + + + width + 1000 + + + win + firdes.WIN_HAMMING + + + + low_pass_filter + + beta + 6.76 + + + alias + + + + comment + + + + affinity + + + + cutoff_freq + baudrate * 0.60 + + + decim + 1 + + + _enabled + 1 + + + type + fir_filter_fff + + + _coordinate + (1984, 132) + + + _rotation + 0 + + + gain + 1 + + + id + low_pass_filter_1 + + + interp + 1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + 2 * baudrate + + + width + baudrate / 8.0 + + + win + firdes.WIN_HAMMING + + osmosdr_source @@ -2341,7 +2750,7 @@ we shift the LO a little further _coordinate - (216, 284) + (112, 284) _rotation @@ -2464,7 +2873,7 @@ we shift the LO a little further _coordinate - (728, 172) + (624, 172) _rotation @@ -2523,11 +2932,11 @@ we shift the LO a little further _enabled - True + 1 _coordinate - (984, 172) + (1592, 156) _rotation @@ -2535,7 +2944,7 @@ we shift the LO a little further id - pfb_arb_resampler_xxx_0_0 + pfb_arb_resampler_xxx_0_0_0 maxoutbuf @@ -2872,7 +3281,7 @@ we shift the LO a little further _coordinate - (496, 184) + (392, 184) _rotation @@ -3045,7 +3454,7 @@ we shift the LO a little further _coordinate - (992, 68) + (888, 44) _rotation @@ -3088,7 +3497,7 @@ we shift the LO a little further _coordinate - (1384, 300) + (1296, 396) _rotation @@ -3127,7 +3536,7 @@ we shift the LO a little further _coordinate - (216, 148) + (112, 148) _rotation @@ -3241,7 +3650,7 @@ we shift the LO a little further _coordinate - (760, 44) + (656, 44) _rotation @@ -3406,14 +3815,38 @@ we shift the LO a little further - analog_quadrature_demod_cf_0_0 - dc_blocker_xx_0 + analog_quadrature_demod_cf_0_0_0 + dc_blocker_xx_0_0 0 0 - analog_quadrature_demod_cf_0_0_0 - dc_blocker_xx_0_0 + analog_quadrature_demod_cf_0_0_0_0 + blocks_moving_average_xx_0 + 0 + 0 + + + analog_quadrature_demod_cf_0_0_0_1 + low_pass_filter_1 + 0 + 0 + + + blocks_delay_0 + blocks_multiply_xx_0_0 + 0 + 0 + + + blocks_moving_average_xx_0 + blocks_vco_c_0 + 0 + 0 + + + blocks_multiply_xx_0_0 + low_pass_filter_0 0 0 @@ -3424,10 +3857,10 @@ we shift the LO a little further 0 - dc_blocker_xx_0 - digital_clock_recovery_mm_xx_0 + blocks_vco_c_0 + blocks_multiply_xx_0_0 0 - 0 + 1 dc_blocker_xx_0_0 @@ -3435,6 +3868,12 @@ we shift the LO a little further 0 0 + + dc_blocker_xx_0_0_0 + digital_clock_recovery_mm_xx_0 + 0 + 0 + digital_binary_slicer_fb_0 satnogs_frame_acquisition_0 @@ -3447,6 +3886,18 @@ we shift the LO a little further 0 0 + + low_pass_filter_0 + pfb_arb_resampler_xxx_0_0_0 + 0 + 0 + + + low_pass_filter_1 + dc_blocker_xx_0_0_0 + 0 + 0 + osmosdr_source_0 blocks_rotator_cc_0 @@ -3461,7 +3912,13 @@ we shift the LO a little further pfb_arb_resampler_xxx_0 - pfb_arb_resampler_xxx_0_0 + analog_quadrature_demod_cf_0_0_0_0 + 0 + 0 + + + pfb_arb_resampler_xxx_0 + blocks_delay_0 0 0 @@ -3478,8 +3935,8 @@ we shift the LO a little further 0 - pfb_arb_resampler_xxx_0_0 - analog_quadrature_demod_cf_0_0 + pfb_arb_resampler_xxx_0_0_0 + analog_quadrature_demod_cf_0_0_0_1 0 0 diff --git a/apps/flowgraphs/satellites/satnogs_reaktor_hello_world_fsk9600_decoder.py b/apps/flowgraphs/satellites/satnogs_reaktor_hello_world_fsk9600_decoder.py index cc74286..78d6a87 100755 --- a/apps/flowgraphs/satellites/satnogs_reaktor_hello_world_fsk9600_decoder.py +++ b/apps/flowgraphs/satellites/satnogs_reaktor_hello_world_fsk9600_decoder.py @@ -5,9 +5,10 @@ # Title: satnogs_reaktor_hello_world_fsk9600_decoder # Author: Manolis Surligas (surligas@gmail.com) # Description: FSK 9600 Decoder for the Reaktor-Hello-World satellite -# Generated: Mon Dec 3 11:51:46 2018 +# GNU Radio version: 3.7.13.5 ################################################## + from gnuradio import analog from gnuradio import blocks from gnuradio import digital @@ -70,11 +71,11 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0) self.satnogs_frame_acquisition_0 = satnogs.frame_acquisition(1, [0xAA, 0xAA, 0xAA, 0xAA], 4, [0x35, 0x2E, 0x35, 0x2E], 3, 1, 256, 3, variable_whitening_0, 2048) self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)) - self.pfb_arb_resampler_xxx_0_0 = pfb.arb_resampler_ccf( + self.pfb_arb_resampler_xxx_0_0_0 = pfb.arb_resampler_ccf( (2.0*baudrate)/audio_samp_rate, taps=None, flt_size=32) - self.pfb_arb_resampler_xxx_0_0.declare_sample_delay(0) + self.pfb_arb_resampler_xxx_0_0_0.declare_sample_delay(0) self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf( audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), @@ -95,13 +96,22 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0) self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 0.25*0.175*0.175, 0.5, 0.175, 0.005) + self.low_pass_filter_1 = filter.fir_filter_fff(1, firdes.low_pass( + 1, 2 * baudrate, baudrate * 0.60, baudrate / 8.0, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( + 1, audio_samp_rate, 0.75 * baudrate, 1000, firdes.WIN_HAMMING, 6.76)) + self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 2 * math.pi / 100, 0.5, 0.5/8.0, 0.01) self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() + self.dc_blocker_xx_0_0_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True) - self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) + self.blocks_vco_c_0 = blocks.vco_c(audio_samp_rate, -audio_samp_rate, 1.0) self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))) + self.blocks_multiply_xx_0_0 = blocks.multiply_vcc(1) + self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096) + self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 1024/2) + self.analog_quadrature_demod_cf_0_0_0_1 = analog.quadrature_demod_cf(1.2) + self.analog_quadrature_demod_cf_0_0_0_0 = analog.quadrature_demod_cf(1.0) self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9) - self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2) @@ -111,19 +121,27 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_udp_msg_sink_0_0, 'in')) 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, 0), (self.dc_blocker_xx_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0)) + self.connect((self.analog_quadrature_demod_cf_0_0_0_0, 0), (self.blocks_moving_average_xx_0, 0)) + self.connect((self.analog_quadrature_demod_cf_0_0_0_1, 0), (self.low_pass_filter_1, 0)) + self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0_0, 0)) + self.connect((self.blocks_moving_average_xx_0, 0), (self.blocks_vco_c_0, 0)) + self.connect((self.blocks_multiply_xx_0_0, 0), (self.low_pass_filter_0, 0)) self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) - self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) + self.connect((self.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0_0, 1)) self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0)) + self.connect((self.dc_blocker_xx_0_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_frame_acquisition_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) + self.connect((self.low_pass_filter_0, 0), (self.pfb_arb_resampler_xxx_0_0_0, 0)) + self.connect((self.low_pass_filter_1, 0), (self.dc_blocker_xx_0_0_0, 0)) self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0)) - self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.pfb_arb_resampler_xxx_0_0, 0)) + self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0_0, 0)) + self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_delay_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0)) - self.connect((self.pfb_arb_resampler_xxx_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) + self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0_0_1, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) def get_antenna(self): @@ -138,7 +156,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): def set_baudrate(self, baudrate): self.baudrate = baudrate - self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) + self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) + self.low_pass_filter_1.set_taps(firdes.low_pass(1, 2 * self.baudrate, self.baudrate * 0.60, self.baudrate / 8.0, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76)) def get_bb_gain(self): return self.bb_gain @@ -279,8 +299,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): def set_audio_samp_rate(self, audio_samp_rate): self.audio_samp_rate = audio_samp_rate - self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) + self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76)) def argument_parser():