diff --git a/apps/flowgraphs/afsk1200_ax25.grc b/apps/flowgraphs/afsk1200_ax25.grc index bcd80fd..dd1dcf9 100644 --- a/apps/flowgraphs/afsk1200_ax25.grc +++ b/apps/flowgraphs/afsk1200_ax25.grc @@ -260,7 +260,7 @@ _coordinate - (574, 394) + (936, 396) _rotation @@ -436,6 +436,85 @@ satnogs.not_set_antenna + + band_pass_filter + + beta + 6.76 + + + alias + + + + comment + + + + affinity + + + + decim + 1 + + + _enabled + True + + + type + fir_filter_fff + + + _coordinate + (360, 492) + + + _rotation + 0 + + + gain + 1 + + + high_cutoff_freq + 2400 + + + id + band_pass_filter_0 + + + interp + 1 + + + low_cutoff_freq + 1000 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + audio_samp_rate + + + width + 400 + + + win + firdes.WIN_HAMMING + + parameter @@ -480,7 +559,7 @@ value - 9600.0 + 1200.0 @@ -903,7 +982,7 @@ _coordinate - (534, 538) + (544, 540) _rotation @@ -954,7 +1033,7 @@ _coordinate - (1352, 572) + (1344, 572) _rotation @@ -1099,11 +1178,11 @@ _coordinate - (1994, 606) + (1928, 752) _rotation - 0 + 180 id @@ -1138,7 +1217,7 @@ _coordinate - (1563, 550) + (1928, 548) _rotation @@ -1146,11 +1225,11 @@ gain_mu - 0.175 + 0.5/8.0 gain_omega - 0.25*0.175*0.175 + 2*math.pi/100.0 id @@ -1170,7 +1249,7 @@ omega_relative_limit - 0.005 + 0.01 omega @@ -1503,7 +1582,7 @@ max_modulation_freq = 3000 _coordinate - (853, 347) + (1208, 348) _rotation @@ -1535,7 +1614,7 @@ max_modulation_freq = 3000 width - 3000 + 1000 win @@ -1562,7 +1641,7 @@ max_modulation_freq = 3000 cutoff_freq - (mark_frequency - space_frequency)/2.0 + (mark_frequency - space_frequency)/2.0 + 250 decim @@ -1610,7 +1689,82 @@ max_modulation_freq = 3000 width - 1000 + 500 + + + win + firdes.WIN_HAMMING + + + + low_pass_filter + + beta + 6.76 + + + alias + + + + comment + + + + affinity + + + + cutoff_freq + baudrate /2+ 500 /2 + + + decim + 1 + + + _enabled + 1 + + + type + fir_filter_fff + + + _coordinate + (1760, 532) + + + _rotation + 0 + + + gain + 1 + + + id + low_pass_filter_2_0 + + + interp + 1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + samp_rate + baudrate*2 + + + width + 500 win @@ -4063,7 +4217,7 @@ max_modulation_freq = 3000 analog_quadrature_demod_cf_0_0 - dc_blocker_xx_0 + band_pass_filter_0 0 0 @@ -4085,6 +4239,12 @@ max_modulation_freq = 3000 0 1 + + band_pass_filter_0 + dc_blocker_xx_0 + 0 + 0 + blocks_delay_0 blocks_multiply_xx_0_0 @@ -4135,7 +4295,7 @@ max_modulation_freq = 3000 dc_blocker_xx_0_0 - digital_clock_recovery_mm_xx_0 + low_pass_filter_2_0 0 0 @@ -4169,6 +4329,12 @@ max_modulation_freq = 3000 0 0 + + low_pass_filter_2_0 + digital_clock_recovery_mm_xx_0 + 0 + 0 + osmosdr_source_0 blocks_rotator_cc_0 diff --git a/apps/flowgraphs/fsk_ax25.grc b/apps/flowgraphs/fsk_ax25.grc index aa44a2d..c742d9e 100644 --- a/apps/flowgraphs/fsk_ax25.grc +++ b/apps/flowgraphs/fsk_ax25.grc @@ -136,7 +136,7 @@ _coordinate - (1190, 411) + (1328, 420) _rotation @@ -665,7 +665,7 @@ _coordinate - (1390, 403) + (1824, 412) _rotation @@ -900,19 +900,19 @@ _coordinate - (1595, 379) + (1768, 556) _rotation - 0 + 180 gain_mu - 0.175 + 0.5/8.0 gain_omega - 0.25*0.175*0.175 + 2 * math.pi / 100 id @@ -932,7 +932,7 @@ omega_relative_limit - 0.005 + 0.01 omega @@ -1269,7 +1269,7 @@ we shift the LO a little further comment - + Avoid aliasing of the polyphase resampler affinity @@ -1277,7 +1277,7 @@ we shift the LO a little further cutoff_freq - (baudrate / 2) + 1500 + 0.75 * baudrate decim @@ -1285,7 +1285,7 @@ we shift the LO a little further _enabled - True + 1 type @@ -1293,7 +1293,7 @@ we shift the LO a little further _coordinate - (1005, 371) + (832, 372) _rotation @@ -1321,7 +1321,7 @@ we shift the LO a little further samp_rate - 2.0 * baudrate + audio_samp_rate width @@ -1332,6 +1332,81 @@ we shift the LO a little further 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 + (1584, 372) + + + _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 @@ -2822,7 +2897,7 @@ we shift the LO a little further _coordinate - (1563, 163) + (1016, 396) _rotation @@ -2830,7 +2905,7 @@ we shift the LO a little further id - pfb_arb_resampler_xxx_0_0 + pfb_arb_resampler_xxx_0_0_0 maxoutbuf @@ -3741,7 +3816,7 @@ we shift the LO a little further analog_quadrature_demod_cf_0_0 - dc_blocker_xx_0 + low_pass_filter_1 0 0 @@ -3771,7 +3846,7 @@ we shift the LO a little further blocks_multiply_xx_0 - pfb_arb_resampler_xxx_0_0 + low_pass_filter_0 0 0 @@ -3819,7 +3894,13 @@ we shift the LO a little further low_pass_filter_0 - analog_quadrature_demod_cf_0_0 + pfb_arb_resampler_xxx_0_0_0 + 0 + 0 + + + low_pass_filter_1 + dc_blocker_xx_0 0 0 @@ -3860,8 +3941,8 @@ we shift the LO a little further 0 - pfb_arb_resampler_xxx_0_0 - low_pass_filter_0 + pfb_arb_resampler_xxx_0_0_0 + analog_quadrature_demod_cf_0_0 0 0 diff --git a/apps/flowgraphs/msk_ax25.grc b/apps/flowgraphs/msk_ax25.grc index 84ab838..4b94bbf 100644 --- a/apps/flowgraphs/msk_ax25.grc +++ b/apps/flowgraphs/msk_ax25.grc @@ -136,7 +136,7 @@ _coordinate - (1214, 419) + (1544, 420) _rotation @@ -410,7 +410,7 @@ _coordinate - (1292, 203) + (1360, 228) _rotation @@ -665,7 +665,7 @@ _coordinate - (1430, 411) + (1912, 412) _rotation @@ -861,7 +861,7 @@ _coordinate - (1512, 592) + (1520, 592) _rotation @@ -900,19 +900,19 @@ _coordinate - (1611, 386) + (1704, 556) _rotation - 0 + 180 gain_mu - 0.175 + 0.5/8.0 gain_omega - 0.25*0.175*0.175 + 2 * math.pi / 100 id @@ -932,7 +932,7 @@ omega_relative_limit - 0.005 + 0.01 omega @@ -1269,7 +1269,7 @@ we shift the LO a little further comment - + Avoid aliasing of the polyphase resampler affinity @@ -1277,7 +1277,7 @@ we shift the LO a little further cutoff_freq - baudrate / 2 + 1500 + 0.75 * baudrate decim @@ -1285,7 +1285,7 @@ we shift the LO a little further _enabled - True + 1 type @@ -1293,7 +1293,7 @@ we shift the LO a little further _coordinate - (1022, 371) + (768, 372) _rotation @@ -1321,7 +1321,7 @@ we shift the LO a little further samp_rate - 2.0 * baudrate + audio_samp_rate width @@ -1332,6 +1332,81 @@ we shift the LO a little further 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 + (1712, 372) + + + _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 @@ -2822,7 +2897,7 @@ we shift the LO a little further _coordinate - (735, 395) + (1288, 396) _rotation @@ -3379,7 +3454,7 @@ we shift the LO a little further _coordinate - (965, 59) + (1008, 60) _rotation @@ -3741,7 +3816,7 @@ we shift the LO a little further analog_quadrature_demod_cf_0_0 - dc_blocker_xx_0 + low_pass_filter_1 0 0 @@ -3771,7 +3846,7 @@ we shift the LO a little further blocks_multiply_xx_0 - pfb_arb_resampler_xxx_0_0_0 + low_pass_filter_0 0 0 @@ -3819,7 +3894,13 @@ we shift the LO a little further low_pass_filter_0 - analog_quadrature_demod_cf_0_0 + pfb_arb_resampler_xxx_0_0_0 + 0 + 0 + + + low_pass_filter_1 + dc_blocker_xx_0 0 0 @@ -3861,7 +3942,7 @@ we shift the LO a little further pfb_arb_resampler_xxx_0_0_0 - low_pass_filter_0 + analog_quadrature_demod_cf_0_0 0 0 diff --git a/apps/flowgraphs/satnogs_afsk1200_ax25.py b/apps/flowgraphs/satnogs_afsk1200_ax25.py index 5806bc8..45a36e8 100755 --- a/apps/flowgraphs/satnogs_afsk1200_ax25.py +++ b/apps/flowgraphs/satnogs_afsk1200_ax25.py @@ -27,7 +27,7 @@ import time class satnogs_afsk1200_ax25(gr.top_block): - def __init__(self, antenna=satnogs.not_set_antenna, baudrate=9600.0, 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=1000, 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, mark_frequency=2200.0, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', samp_rate_rx=satnogs.not_set_samp_rate_rx, space_frequency=1200.0, udp_IP='127.0.0.1', udp_port=16887, waterfall_file_path='/tmp/waterfall.dat'): + def __init__(self, antenna=satnogs.not_set_antenna, baudrate=1200.0, 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=1000, 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, mark_frequency=2200.0, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', samp_rate_rx=satnogs.not_set_samp_rate_rx, space_frequency=1200.0, udp_IP='127.0.0.1', udp_port=16887, waterfall_file_path='/tmp/waterfall.dat'): gr.top_block.__init__(self, "AFSK1200 AX.25 decoder ") ################################################## @@ -95,11 +95,13 @@ class satnogs_afsk1200_ax25(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.low_pass_filter_2_0 = filter.fir_filter_fff(1, firdes.low_pass( + 1, baudrate*2, baudrate /2+ 500 /2, 500, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_1 = filter.fir_filter_ccf(20, firdes.low_pass( - 1, audio_samp_rate, (mark_frequency - space_frequency)/2.0, 1000, firdes.WIN_HAMMING, 6.76)) + 1, audio_samp_rate, (mark_frequency - space_frequency)/2.0 + 250, 500, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( - 1, audio_samp_rate, deviation+max_modulation_freq, 3000, firdes.WIN_HAMMING, 6.76)) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff((48e3/20)/baud_rate, 0.25*0.175*0.175, 0.5, 0.175, 0.005) + 1, audio_samp_rate, deviation+max_modulation_freq, 1000, firdes.WIN_HAMMING, 6.76)) + self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff((48e3/20)/baud_rate, 2*math.pi/100.0, 0.5, 0.5/8.0, 0.01) self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) @@ -110,6 +112,8 @@ class satnogs_afsk1200_ax25(gr.top_block): self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096) self.blocks_float_to_complex_0 = blocks.float_to_complex(1) self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 1024/2) + self.band_pass_filter_0 = filter.fir_filter_fff(1, firdes.band_pass( + 1, audio_samp_rate, 1000, 2400, 400, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0 = analog.sig_source_c(audio_samp_rate, analog.GR_COS_WAVE, -(1200 + 2200) / 2, 1, 0) self.analog_quadrature_demod_cf_0_0_0_0 = analog.quadrature_demod_cf(1.0) self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf((2*math.pi*deviation)/audio_samp_rate) @@ -126,10 +130,11 @@ class satnogs_afsk1200_ax25(gr.top_block): self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (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), (self.dc_blocker_xx_0_0, 0)) - 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), (self.band_pass_filter_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.satnogs_ogg_encoder_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_sig_source_x_0, 0), (self.blocks_multiply_xx_0, 1)) + self.connect((self.band_pass_filter_0, 0), (self.dc_blocker_xx_0, 0)) self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0_0, 0)) self.connect((self.blocks_float_to_complex_0, 0), (self.blocks_multiply_xx_0, 0)) self.connect((self.blocks_moving_average_xx_0, 0), (self.blocks_vco_c_0, 0)) @@ -138,12 +143,13 @@ class satnogs_afsk1200_ax25(gr.top_block): self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_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), (self.blocks_float_to_complex_0, 0)) - self.connect((self.dc_blocker_xx_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) + self.connect((self.dc_blocker_xx_0_0, 0), (self.low_pass_filter_2_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_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.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.low_pass_filter_1, 0), (self.analog_quadrature_demod_cf_0, 0)) + self.connect((self.low_pass_filter_2_0, 0), (self.digital_clock_recovery_mm_xx_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, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_delay_0, 0)) @@ -163,6 +169,7 @@ class satnogs_afsk1200_ax25(gr.top_block): def set_baudrate(self, baudrate): self.baudrate = baudrate + self.low_pass_filter_2_0.set_taps(firdes.low_pass(1, self.baudrate*2, self.baudrate /2+ 500 /2, 500, firdes.WIN_HAMMING, 6.76)) def get_bb_gain(self): return self.bb_gain @@ -227,7 +234,7 @@ class satnogs_afsk1200_ax25(gr.top_block): def set_mark_frequency(self, mark_frequency): self.mark_frequency = mark_frequency - self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0, 1000, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0 + 250, 500, firdes.WIN_HAMMING, 6.76)) def get_ppm(self): return self.ppm @@ -286,7 +293,7 @@ class satnogs_afsk1200_ax25(gr.top_block): def set_space_frequency(self, space_frequency): self.space_frequency = space_frequency - self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0, 1000, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0 + 250, 500, firdes.WIN_HAMMING, 6.76)) def get_udp_IP(self): return self.udp_IP @@ -311,14 +318,14 @@ class satnogs_afsk1200_ax25(gr.top_block): def set_max_modulation_freq(self, max_modulation_freq): self.max_modulation_freq = max_modulation_freq - self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 3000, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 1000, firdes.WIN_HAMMING, 6.76)) def get_deviation(self): return self.deviation def set_deviation(self, deviation): self.deviation = deviation - self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 3000, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 1000, firdes.WIN_HAMMING, 6.76)) self.analog_quadrature_demod_cf_0_0.set_gain((2*math.pi*self.deviation)/self.audio_samp_rate) def get_baud_rate(self): @@ -335,8 +342,9 @@ class satnogs_afsk1200_ax25(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.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) - self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0, 1000, firdes.WIN_HAMMING, 6.76)) - self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 3000, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_1.set_taps(firdes.low_pass(1, self.audio_samp_rate, (self.mark_frequency - self.space_frequency)/2.0 + 250, 500, firdes.WIN_HAMMING, 6.76)) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, self.deviation+self.max_modulation_freq, 1000, firdes.WIN_HAMMING, 6.76)) + self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.audio_samp_rate, 1000, 2400, 400, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0.set_sampling_freq(self.audio_samp_rate) self.analog_quadrature_demod_cf_0_0.set_gain((2*math.pi*self.deviation)/self.audio_samp_rate) self.analog_quadrature_demod_cf_0.set_gain(((self.audio_samp_rate/20) / self.baud_rate)/(math.pi*1)) @@ -349,7 +357,7 @@ def argument_parser(): "", "--antenna", dest="antenna", type="string", default=satnogs.not_set_antenna, help="Set antenna [default=%default]") parser.add_option( - "", "--baudrate", dest="baudrate", type="eng_float", default=eng_notation.num_to_str(9600.0), + "", "--baudrate", dest="baudrate", type="eng_float", default=eng_notation.num_to_str(1200.0), help="Set baudrate [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), diff --git a/apps/flowgraphs/satnogs_fsk_ax25.py b/apps/flowgraphs/satnogs_fsk_ax25.py index b00cafa..84f4d34 100755 --- a/apps/flowgraphs/satnogs_fsk_ax25.py +++ b/apps/flowgraphs/satnogs_fsk_ax25.py @@ -71,11 +71,11 @@ class satnogs_fsk_ax25(gr.top_block): 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.satnogs_ax25_decoder_bm_0_0 = satnogs.ax25_decoder_bm('GND', 0, True, False, 1024) self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, True, True, 1024) - 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)/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 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), @@ -96,16 +96,18 @@ class satnogs_fsk_ax25(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.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, 2.0 * baudrate, (baudrate / 2) + 1500, 1000, firdes.WIN_HAMMING, 6.76)) - 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) + 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 = 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 = blocks.multiply_vcc(1) - self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096) + 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_0 = analog.quadrature_demod_cf(1.0) self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9) @@ -121,12 +123,12 @@ class satnogs_fsk_ax25(gr.top_block): self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (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), (self.low_pass_filter_1, 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.blocks_delay_0, 0), (self.blocks_multiply_xx_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), (self.pfb_arb_resampler_xxx_0_0, 0)) + self.connect((self.blocks_multiply_xx_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.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0, 1)) self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) @@ -134,14 +136,15 @@ class satnogs_fsk_ax25(gr.top_block): self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_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.analog_quadrature_demod_cf_0_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)) 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.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.low_pass_filter_0, 0)) + self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) def get_antenna(self): @@ -156,8 +159,9 @@ class satnogs_fsk_ax25(gr.top_block): def set_baudrate(self, baudrate): self.baudrate = baudrate - self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) - self.low_pass_filter_0.set_taps(firdes.low_pass(1, 2.0 * self.baudrate, (self.baudrate / 2) + 1500, 1000, firdes.WIN_HAMMING, 6.76)) + self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) + 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 @@ -250,7 +254,7 @@ class satnogs_fsk_ax25(gr.top_block): def set_rx_sdr_device(self, rx_sdr_device): self.rx_sdr_device = rx_sdr_device - self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) + self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) 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.osmosdr_source_0.set_sample_rate(satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(self.rx_sdr_device, self.rf_gain), 0) @@ -265,7 +269,7 @@ class satnogs_fsk_ax25(gr.top_block): def set_samp_rate_rx(self, samp_rate_rx): self.samp_rate_rx = samp_rate_rx - self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) + self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) 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.osmosdr_source_0.set_sample_rate(satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx), 0) @@ -295,6 +299,7 @@ class satnogs_fsk_ax25(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.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(): diff --git a/apps/flowgraphs/satnogs_msk_ax25.py b/apps/flowgraphs/satnogs_msk_ax25.py index c4bcc10..a0137fd 100755 --- a/apps/flowgraphs/satnogs_msk_ax25.py +++ b/apps/flowgraphs/satnogs_msk_ax25.py @@ -96,9 +96,11 @@ class satnogs_msk_ax25(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.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, 2.0 * baudrate, baudrate / 2 + 1500, 1000, firdes.WIN_HAMMING, 6.76)) - 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) + 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 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) @@ -121,12 +123,12 @@ class satnogs_msk_ax25(gr.top_block): self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (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), (self.low_pass_filter_1, 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.blocks_delay_0, 0), (self.blocks_multiply_xx_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), (self.pfb_arb_resampler_xxx_0_0_0, 0)) + self.connect((self.blocks_multiply_xx_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.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0, 1)) self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) @@ -134,14 +136,15 @@ class satnogs_msk_ax25(gr.top_block): self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_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.analog_quadrature_demod_cf_0_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)) 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.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, 0), (self.low_pass_filter_0, 0)) + self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) def get_antenna(self): @@ -157,7 +160,8 @@ class satnogs_msk_ax25(gr.top_block): def set_baudrate(self, baudrate): self.baudrate = baudrate self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) - self.low_pass_filter_0.set_taps(firdes.low_pass(1, 2.0 * self.baudrate, self.baudrate / 2 + 1500, 1000, firdes.WIN_HAMMING, 6.76)) + 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 @@ -295,6 +299,7 @@ class satnogs_msk_ax25(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.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():