コード例 #1
0
    def __init__(self, callsign='', host='localhost', latitude=0, longitude=0, norad=0, port='8001', recstart=''):
        gr.top_block.__init__(self, "KISS client telemetry submitter")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.host = host
        self.latitude = latitude
        self.longitude = longitude
        self.norad = norad
        self.port = port
        self.recstart = recstart

        ##################################################
        # Blocks
        ##################################################
        self.sids_submit_0 = sids.submit('http://tlm.pe0sat.nl/tlmdb/frame_db.php', norad, callsign, longitude, latitude, recstart)
        self.kiss_kiss_to_pdu_0 = kiss.kiss_to_pdu(True)
        self.blocks_socket_pdu_0 = blocks.socket_pdu("TCP_CLIENT", host, port, 10000, False)
        self.blocks_pdu_to_tagged_stream_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, 'packet_len')

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.blocks_socket_pdu_0, 'pdus'), (self.blocks_pdu_to_tagged_stream_0, 'pdus'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'), (self.sids_submit_0, 'in'))    
        self.connect((self.blocks_pdu_to_tagged_stream_0, 0), (self.kiss_kiss_to_pdu_0, 0))    
コード例 #2
0
    def __init__(self, callsign='', invert=1, ip='::', latitude=0, longitude=0, port=7355, recstart=''):
        gr.top_block.__init__(self, "TW-1B decoder")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.invert = invert
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.threshold = threshold = 6
        self.gain_mu = gain_mu = 0.175*3
        self.access_code = access_code = "10010011000010110101000111011110"

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_packed_0 = sync_to_pdu_packed(
            packlen=256,
            sync=access_code,
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit('http://tlm.pe0sat.nl/tlmdb/frame_db.php', 40927, callsign, longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.low_pass_filter_0 = filter.fir_filter_fff(1, firdes.low_pass(
        	1, 48000, 2400, 2000, firdes.WIN_HAMMING, 6.76))
        self.digital_descrambler_bb_0 = digital.descrambler_bb(0x21, 0x00, 16)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(10, 0.25*gain_mu*gain_mu, 0.5, gain_mu, 0.005)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short*1, ip, port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767.0)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((invert*10, ))
        self.blocks_message_debug_0 = blocks.message_debug()
        self.ax100_gomx3_rs_decode_0 = ax100.gomx3_rs_decode(False)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ax100_gomx3_rs_decode_0, 'out'), (self.sids_print_timestamp_0, 'in'))    
        self.msg_connect((self.ax100_gomx3_rs_decode_0, 'out'), (self.sids_submit_0, 'in'))    
        self.msg_connect((self.sids_print_timestamp_0, 'out'), (self.blocks_message_debug_0, 'print_pdu'))    
        self.msg_connect((self.sync_to_pdu_packed_0, 'out'), (self.ax100_gomx3_rs_decode_0, 'in'))    
        self.connect((self.blocks_multiply_const_vxx_0, 0), (self.low_pass_filter_0, 0))    
        self.connect((self.blocks_short_to_float_0, 0), (self.blocks_multiply_const_vxx_0, 0))    
        self.connect((self.blocks_udp_source_0, 0), (self.blocks_short_to_float_0, 0))    
        self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_descrambler_bb_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))    
        self.connect((self.digital_descrambler_bb_0, 0), (self.sync_to_pdu_packed_0, 0))    
        self.connect((self.low_pass_filter_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))    
コード例 #3
0
ファイル: nayif1.py プロジェクト: jamdart/gr-satellites
    def __init__(self,
                 bfo=1500,
                 callsign='',
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "Nayif-1 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.bfo = bfo
        self.callsign = callsign
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.sps = sps = 8
        self.nfilts = nfilts = 16
        self.alpha = alpha = 0.35

        self.variable_constellation_0_0 = variable_constellation_0_0 = digital.constellation_calcdist(
            ([-1, 1]), ([0, 1]), 2, 1).base()

        self.samp_rate = samp_rate = 48000
        self.rrc_taps = rrc_taps = firdes.root_raised_cosine(
            nfilts, nfilts, 1.0 / float(sps), alpha, 11 * sps * nfilts)

        ##################################################
        # Blocks
        ##################################################
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 42017, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.funcube_telemetry_parser_0 = ao40.funcube_telemetry_parser()
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_fcf(
            5, (firdes.low_pass(1, samp_rate, 1300, 500)), bfo, samp_rate)
        self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(
            sps, 0.1, (rrc_taps), nfilts, nfilts / 2, 0.05, 1)
        self.digital_fll_band_edge_cc_0 = digital.fll_band_edge_cc(
            sps, 0.350, 100, 0.01)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((-1, ))
        self.blocks_multiply_conjugate_cc_0 = blocks.multiply_conjugate_cc(1)
        self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex * 1, 1)
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.ao40_fec_decoder_0 = ao40_fec_decoder()
        self.analog_feedforward_agc_cc_0 = analog.feedforward_agc_cc(1024, 2)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ao40_fec_decoder_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.ao40_fec_decoder_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.funcube_telemetry_parser_0, 'in'))
        self.connect((self.analog_feedforward_agc_cc_0, 0),
                     (self.digital_fll_band_edge_cc_0, 0))
        self.connect((self.blocks_complex_to_real_0, 0),
                     (self.blocks_multiply_const_vxx_0, 0))
        self.connect((self.blocks_delay_0, 0),
                     (self.blocks_multiply_conjugate_cc_0, 1))
        self.connect((self.blocks_multiply_conjugate_cc_0, 0),
                     (self.blocks_complex_to_real_0, 0))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.digital_binary_slicer_fb_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.freq_xlating_fir_filter_xxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_binary_slicer_fb_0, 0),
                     (self.ao40_fec_decoder_0, 0))
        self.connect((self.digital_fll_band_edge_cc_0, 0),
                     (self.digital_pfb_clock_sync_xxx_0, 0))
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0),
                     (self.blocks_delay_0, 0))
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0),
                     (self.blocks_multiply_conjugate_cc_0, 0))
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0),
                     (self.analog_feedforward_agc_cc_0, 0))
コード例 #4
0
    def __init__(self,
                 callsign='',
                 invert=1,
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "BEESAT decoder")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.invert = invert
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Blocks
        ##################################################
        self.tnc_nx_nx_decoder_1_0 = tnc_nx.nx_decoder()
        self.tnc_nx_beesat_classifier_0 = tnc_nx.beesat_classifier()
        self.sids_submit_0_0_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 41619, callsign,
            longitude, latitude, recstart)
        self.sids_submit_0_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 39136, callsign,
            longitude, latitude, recstart)
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 35933, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.low_pass_filter_0 = filter.interp_fir_filter_fff(
            1, firdes.low_pass(1, 48000, 3000, 100, firdes.WIN_HAMMING, 6.76))
        self.digital_clock_recovery_mm_xx_0_0 = digital.clock_recovery_mm_ff(
            10 * (1 + 0.0), 0.25 * 0.175 * 0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767.0)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff(
            (invert * 10, ))
        self.blocks_message_debug_0 = blocks.message_debug()

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.blocks_message_debug_0, 'print_pdu'))
        self.msg_connect((self.tnc_nx_beesat_classifier_0, 'BEESAT-1'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.tnc_nx_beesat_classifier_0, 'BEESAT-2'),
                         (self.sids_submit_0_0, 'in'))
        self.msg_connect((self.tnc_nx_beesat_classifier_0, 'BEESAT-4'),
                         (self.sids_submit_0_0_0, 'in'))
        self.msg_connect((self.tnc_nx_nx_decoder_1_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.tnc_nx_nx_decoder_1_0, 'out'),
                         (self.tnc_nx_beesat_classifier_0, 'in'))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.low_pass_filter_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.blocks_multiply_const_vxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_binary_slicer_fb_0, 0),
                     (self.tnc_nx_nx_decoder_1_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0_0, 0),
                     (self.digital_binary_slicer_fb_0, 0))
        self.connect((self.low_pass_filter_0, 0),
                     (self.digital_clock_recovery_mm_xx_0_0, 0))
コード例 #5
0
ファイル: gomx_3.py プロジェクト: jamdart/gr-satellites
    def __init__(self,
                 callsign='',
                 invert=1,
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "GOMX-3 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.invert = invert
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.threshold = threshold = 6
        self.access_code = access_code = "10010011000010110101000111011110"

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_packed_0_0 = sync_to_pdu_packed(
            packlen=256,
            sync=access_code,
            threshold=threshold,
        )
        self.sync_to_pdu_packed_0 = sync_to_pdu_packed(
            packlen=256,
            sync=access_code,
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 40949, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.digital_descrambler_bb_0_0 = digital.descrambler_bb(
            0x21, 0x00, 16)
        self.digital_descrambler_bb_0 = digital.descrambler_bb(0x21, 0x00, 16)
        self.digital_clock_recovery_mm_xx_0_0 = digital.clock_recovery_mm_ff(
            10, 0.25 * 0.175 * 0.175, 0.1, 0.175, 0.005)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(
            2.5, 0.25 * 0.175 * 0.175, 0.1, 0.175, 0.005)
        self.digital_binary_slicer_fb_0_0 = digital.binary_slicer_fb()
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.csp_check_crc_0 = csp.check_crc(False, False, False)
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767.0)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff(
            (invert * 10, ))
        self.ax100_gomx3_rs_decode_0 = ax100.gomx3_rs_decode(False)
        self.ax100_beacon_parser_0 = ax100.beacon_parser()

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ax100_gomx3_rs_decode_0, 'out'),
                         (self.csp_check_crc_0, 'in'))
        self.msg_connect((self.csp_check_crc_0, 'ok'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.ax100_beacon_parser_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.sync_to_pdu_packed_0, 'out'),
                         (self.ax100_gomx3_rs_decode_0, 'in'))
        self.msg_connect((self.sync_to_pdu_packed_0_0, 'out'),
                         (self.ax100_gomx3_rs_decode_0, 'in'))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.digital_clock_recovery_mm_xx_0, 0))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.digital_clock_recovery_mm_xx_0_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.blocks_multiply_const_vxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_binary_slicer_fb_0, 0),
                     (self.digital_descrambler_bb_0, 0))
        self.connect((self.digital_binary_slicer_fb_0_0, 0),
                     (self.digital_descrambler_bb_0_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0, 0),
                     (self.digital_binary_slicer_fb_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0_0, 0),
                     (self.digital_binary_slicer_fb_0_0, 0))
        self.connect((self.digital_descrambler_bb_0, 0),
                     (self.sync_to_pdu_packed_0, 0))
        self.connect((self.digital_descrambler_bb_0_0, 0),
                     (self.sync_to_pdu_packed_0_0, 0))
コード例 #6
0
    def __init__(self,
                 callsign='',
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "ATHENOXAT-1 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.threshold = threshold = 4
        self.access_code = access_code = "11000011101010100110011001010101"

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_packed_0 = sync_to_pdu_packed(
            packlen=255 + 3,
            sync=access_code,
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 41168, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.low_pass_filter_0 = filter.fir_filter_ccf(
            1, firdes.low_pass(1, 48000, 2600, 1000, firdes.WIN_HAMMING, 6.76))
        self.hilbert_fc_0 = filter.hilbert_fc(65, firdes.WIN_HAMMING, 6.76)
        self.digital_gmsk_demod_0 = digital.gmsk_demod(
            samples_per_symbol=10,
            gain_mu=0.175,
            mu=0.5,
            omega_relative_limit=0.005,
            freq_error=0.0,
            verbose=False,
            log=False,
        )
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767.0)
        self.blocks_multiply_xx_0 = blocks.multiply_vcc(1)
        self.blocks_message_debug_0 = blocks.message_debug()
        self.blocks_conjugate_cc_0 = blocks.conjugate_cc()
        self.ax100_gomx1_decode_0 = ax100.gomx1_decode(False)
        self.analog_sig_source_x_0 = analog.sig_source_c(
            48000, analog.GR_COS_WAVE, -3600, 1, 0)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ax100_gomx1_decode_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.ax100_gomx1_decode_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.blocks_message_debug_0, 'print_pdu'))
        self.msg_connect((self.sync_to_pdu_packed_0, 'out'),
                         (self.ax100_gomx1_decode_0, 'in'))
        self.connect((self.analog_sig_source_x_0, 0),
                     (self.blocks_multiply_xx_0, 0))
        self.connect((self.blocks_conjugate_cc_0, 0),
                     (self.low_pass_filter_0, 0))
        self.connect((self.blocks_multiply_xx_0, 0),
                     (self.blocks_conjugate_cc_0, 0))
        self.connect((self.blocks_short_to_float_0, 0), (self.hilbert_fc_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_gmsk_demod_0, 0),
                     (self.sync_to_pdu_packed_0, 0))
        self.connect((self.hilbert_fc_0, 0), (self.blocks_multiply_xx_0, 1))
        self.connect((self.low_pass_filter_0, 0),
                     (self.digital_gmsk_demod_0, 0))
コード例 #7
0
ファイル: sat_3cat_2.py プロジェクト: jamdart/gr-satellites
    def __init__(self,
                 bfo=12000,
                 callsign='',
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "3CAT-2 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.bfo = bfo
        self.callsign = callsign
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.samp_per_sym = samp_per_sym = 5
        self.nfilts = nfilts = 16

        self.variable_constellation_0 = variable_constellation_0 = digital.constellation_calcdist(
            ([-1, 1]), ([0, 1]), 2, 1).base()

        self.samp_rate = samp_rate = 48000
        self.rrc_taps = rrc_taps = firdes.root_raised_cosine(
            nfilts, nfilts, 1.0 / float(samp_per_sym), 0.35,
            11 * samp_per_sym * nfilts)

        ##################################################
        # Blocks
        ##################################################
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 41732, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.sat3cat2_telemetry_parser_0 = sat3cat2.telemetry_parser()
        self.low_pass_filter_0 = filter.fir_filter_ccf(
            1,
            firdes.low_pass(1, samp_rate, 7500, 500, firdes.WIN_HAMMING, 6.76))
        self.kiss_pdu_to_kiss_0 = kiss.pdu_to_kiss()
        self.kiss_nrzi_decode_0 = kiss.nrzi_decode()
        self.kiss_hdlc_deframer_0 = kiss.hdlc_deframer(check_fcs=True,
                                                       max_length=10000)
        self.kiss_check_address_0 = kiss.check_address('3CAT2', "from")
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_fcf(
            1, (firdes.low_pass(1, samp_rate, 10000, 1000)), bfo, samp_rate)
        self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(
            samp_per_sym, 0.1, (rrc_taps), nfilts, nfilts / 2, 1.5, 2)
        self.digital_lms_dd_equalizer_cc_0_0 = digital.lms_dd_equalizer_cc(
            2, 0.03, 2, variable_constellation_0)
        self.digital_fll_band_edge_cc_0 = digital.fll_band_edge_cc(
            samp_per_sym, 0.350, 100, 0.020)
        self.digital_costas_loop_cc_0_0_0_0 = digital.costas_loop_cc(
            0.04, 2, False)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_socket_pdu_0 = blocks.socket_pdu("TCP_SERVER", '', '52001',
                                                     10000, True)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767)
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.analog_feedforward_agc_cc_0 = analog.feedforward_agc_cc(
            1024 * 4, 2)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.kiss_check_address_0, 'ok'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.kiss_hdlc_deframer_0, 'out'),
                         (self.kiss_check_address_0, 'in'))
        self.msg_connect((self.kiss_pdu_to_kiss_0, 'out'),
                         (self.blocks_socket_pdu_0, 'pdus'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.kiss_pdu_to_kiss_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.sat3cat2_telemetry_parser_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.connect((self.analog_feedforward_agc_cc_0, 0),
                     (self.digital_fll_band_edge_cc_0, 0))
        self.connect((self.blocks_complex_to_real_0, 0),
                     (self.digital_binary_slicer_fb_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.freq_xlating_fir_filter_xxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_binary_slicer_fb_0, 0),
                     (self.kiss_nrzi_decode_0, 0))
        self.connect((self.digital_costas_loop_cc_0_0_0_0, 0),
                     (self.digital_lms_dd_equalizer_cc_0_0, 0))
        self.connect((self.digital_fll_band_edge_cc_0, 0),
                     (self.low_pass_filter_0, 0))
        self.connect((self.digital_lms_dd_equalizer_cc_0_0, 0),
                     (self.blocks_complex_to_real_0, 0))
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0),
                     (self.digital_costas_loop_cc_0_0_0_0, 0))
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0),
                     (self.analog_feedforward_agc_cc_0, 0))
        self.connect((self.kiss_nrzi_decode_0, 0),
                     (self.kiss_hdlc_deframer_0, 0))
        self.connect((self.low_pass_filter_0, 0),
                     (self.digital_pfb_clock_sync_xxx_0, 0))
コード例 #8
0
    def __init__(self, callsign='', gpredict_port=4532, latitude=0, longitude=0):
        gr.top_block.__init__(self, "LilacSat-2 decoder for FUNcube Dongle Pro+")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.gpredict_port = gpredict_port
        self.latitude = latitude
        self.longitude = longitude

        ##################################################
        # Variables
        ##################################################
        self.sub_sps = sub_sps = 32
        self.sub_nfilts = sub_nfilts = 16
        self.sub_alpha = sub_alpha = 0.35
        self.sps = sps = 5
        self.nfilts = nfilts = 16
        self.freq = freq = 437.2e6
        self.alpha = alpha = 0.35
        
        self.variable_constellation_0 = variable_constellation_0 = digital.constellation_calcdist(([-1, 1]), ([0, 1]), 2, 1).base()
        
        self.threshold = threshold = 4
        self.sub_rrc_taps = sub_rrc_taps = firdes.root_raised_cosine(sub_nfilts, sub_nfilts, 1.0/float(sub_sps), sub_alpha, 11*sub_sps*sub_nfilts)
        self.rrc_taps = rrc_taps = firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), alpha, 11*sps*nfilts)
        self.rf_samp_rate = rf_samp_rate = 192000
        self.offset = offset = 30e3
        self.if_samp_rate = if_samp_rate = 48000
        self.doppler_freq = doppler_freq = freq
        self.af_samp_rate = af_samp_rate = 9600

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_0_1_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_1 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_0_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit('http://tlm.pe0sat.nl/tlmdb/frame_db.php', 40908, callsign, longitude, latitude, '')
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.low_pass_filter_3_0_0 = filter.fir_filter_ccf(1, firdes.low_pass(
        	1, if_samp_rate, 8e3, 2e3, firdes.WIN_HAMMING, 6.76))
        self.low_pass_filter_0 = filter.fir_filter_fff(1, firdes.low_pass(
        	1, af_samp_rate, 200, 50, firdes.WIN_HAMMING, 6.76))
        self.libfec_decode_rs_0_0_0 = libfec.decode_rs(True, 0)
        self.libfec_decode_rs_0_0 = libfec.decode_rs(True, 0)
        self.libfec_decode_rs_0 = libfec.decode_rs(True, 0)
        self.kiss_kiss_to_pdu_0_1 = kiss.kiss_to_pdu(False)
        self.kiss_kiss_to_pdu_0_0 = kiss.kiss_to_pdu(False)
        self.kiss_kiss_to_pdu_0 = kiss.kiss_to_pdu(False)
        self.gpredict_doppler_0 = gpredict.doppler(self.set_doppler_freq, "localhost", 4532, False)
        self.freq_xlating_fir_filter_xxx_0_0 = filter.freq_xlating_fir_filter_ccc(rf_samp_rate/if_samp_rate, (filter.firdes.low_pass(1,rf_samp_rate,10000,2000)), doppler_freq - freq + offset, rf_samp_rate)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(rf_samp_rate/if_samp_rate, (filter.firdes.low_pass(1,rf_samp_rate,5000,2000)), doppler_freq - freq + offset + 25e3, rf_samp_rate)
        self.fcdproplus_fcdproplus_0 = fcdproplus.fcdproplus('',1)
        self.fcdproplus_fcdproplus_0.set_lna(0)
        self.fcdproplus_fcdproplus_0.set_mixer_gain(0)
        self.fcdproplus_fcdproplus_0.set_if_gain(0)
        self.fcdproplus_fcdproplus_0.set_freq_corr(0)
        self.fcdproplus_fcdproplus_0.set_freq(freq-offset)
          
        self.digital_pfb_clock_sync_xxx_0_0 = digital.pfb_clock_sync_fff(sub_sps, 0.0628, (sub_rrc_taps), sub_nfilts, sub_nfilts/2, 0.01, 1)
        self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(sps, 0.100, (rrc_taps), nfilts, nfilts/2, 1.5, 2)
        self.digital_lms_dd_equalizer_cc_0_0 = digital.lms_dd_equalizer_cc(2, 0.3, 2, variable_constellation_0)
        self.digital_fll_band_edge_cc_0 = digital.fll_band_edge_cc(sps, 0.350, 100, 0.1)
        self.digital_diff_decoder_bb_0_0 = digital.diff_decoder_bb(2)
        self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
        self.digital_costas_loop_cc_0_0 = digital.costas_loop_cc(0.4, 2, False)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(10, 0.25*0.175*0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_1 = digital.binary_slicer_fb()
        self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True)
        self.ccsds_viterbi_0_1 = ccsds_viterbi()
        self.ccsds_viterbi_0_0_0 = ccsds_viterbi()
        self.ccsds_viterbi_0_0 = ccsds_viterbi()
        self.ccsds_viterbi_0 = ccsds_viterbi()
        self.ccsds_descrambler_0_0_0 = ccsds_descrambler()
        self.ccsds_descrambler_0_0 = ccsds_descrambler()
        self.ccsds_descrambler_0 = ccsds_descrambler()
        self.blocks_pdu_to_tagged_stream_0_1 = blocks.pdu_to_tagged_stream(blocks.byte_t, 'packet_len')
        self.blocks_pdu_to_tagged_stream_0_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, 'packet_len')
        self.blocks_pdu_to_tagged_stream_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, 'packet_len')
        self.blocks_message_debug_0 = blocks.message_debug()
        self.blocks_delay_0_0_0 = blocks.delay(gr.sizeof_float*1, 1)
        self.blocks_delay_0_0 = blocks.delay(gr.sizeof_float*1, 1)
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(0.5)
        self.analog_nbfm_rx_0 = analog.nbfm_rx(
        	audio_rate=af_samp_rate,
        	quad_rate=if_samp_rate,
        	tau=75e-6,
        	max_dev=3.5e3,
          )
        self.analog_feedforward_agc_cc_0 = analog.feedforward_agc_cc(1024, 2)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ccsds_descrambler_0, 'out'), (self.libfec_decode_rs_0, 'in'))    
        self.msg_connect((self.ccsds_descrambler_0_0, 'out'), (self.libfec_decode_rs_0_0, 'in'))    
        self.msg_connect((self.ccsds_descrambler_0_0_0, 'out'), (self.libfec_decode_rs_0_0_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'), (self.sids_print_timestamp_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'), (self.sids_submit_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0_0, 'out'), (self.sids_print_timestamp_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0_0, 'out'), (self.sids_submit_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0_1, 'out'), (self.sids_print_timestamp_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0_1, 'out'), (self.sids_submit_0, 'in'))    
        self.msg_connect((self.libfec_decode_rs_0, 'out'), (self.blocks_pdu_to_tagged_stream_0, 'pdus'))    
        self.msg_connect((self.libfec_decode_rs_0_0, 'out'), (self.blocks_pdu_to_tagged_stream_0_0, 'pdus'))    
        self.msg_connect((self.libfec_decode_rs_0_0_0, 'out'), (self.blocks_pdu_to_tagged_stream_0_1, 'pdus'))    
        self.msg_connect((self.sids_print_timestamp_0, 'out'), (self.blocks_message_debug_0, 'print_pdu'))    
        self.msg_connect((self.sync_to_pdu_0, 'out'), (self.ccsds_descrambler_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0_0, 'out'), (self.ccsds_descrambler_0_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0_0_0, 'out'), (self.ccsds_descrambler_0_0_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0_1, 'out'), (self.ccsds_descrambler_0_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0_1_0, 'out'), (self.ccsds_descrambler_0_0_0, 'in'))    
        self.connect((self.analog_feedforward_agc_cc_0, 0), (self.digital_fll_band_edge_cc_0, 0))    
        self.connect((self.analog_nbfm_rx_0, 0), (self.low_pass_filter_0, 0))    
        self.connect((self.analog_quadrature_demod_cf_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.blocks_delay_0_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.ccsds_viterbi_0_1, 0))    
        self.connect((self.blocks_delay_0_0, 0), (self.ccsds_viterbi_0_0_0, 0))    
        self.connect((self.blocks_delay_0_0_0, 0), (self.ccsds_viterbi_0_0, 0))    
        self.connect((self.blocks_pdu_to_tagged_stream_0, 0), (self.kiss_kiss_to_pdu_0, 0))    
        self.connect((self.blocks_pdu_to_tagged_stream_0_0, 0), (self.kiss_kiss_to_pdu_0_0, 0))    
        self.connect((self.blocks_pdu_to_tagged_stream_0_1, 0), (self.kiss_kiss_to_pdu_0_1, 0))    
        self.connect((self.ccsds_viterbi_0, 0), (self.sync_to_pdu_0_1_0, 0))    
        self.connect((self.ccsds_viterbi_0_0, 0), (self.sync_to_pdu_0_0_0, 0))    
        self.connect((self.ccsds_viterbi_0_0_0, 0), (self.digital_diff_decoder_bb_0_0, 0))    
        self.connect((self.ccsds_viterbi_0_1, 0), (self.digital_diff_decoder_bb_0, 0))    
        self.connect((self.dc_blocker_xx_0, 0), (self.digital_pfb_clock_sync_xxx_0_0, 0))    
        self.connect((self.digital_binary_slicer_fb_1, 0), (self.sync_to_pdu_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.blocks_delay_0_0_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.ccsds_viterbi_0, 0))    
        self.connect((self.digital_costas_loop_cc_0_0, 0), (self.digital_lms_dd_equalizer_cc_0_0, 0))    
        self.connect((self.digital_diff_decoder_bb_0, 0), (self.sync_to_pdu_0_1, 0))    
        self.connect((self.digital_diff_decoder_bb_0_0, 0), (self.sync_to_pdu_0_0, 0))    
        self.connect((self.digital_fll_band_edge_cc_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))    
        self.connect((self.digital_lms_dd_equalizer_cc_0_0, 0), (self.blocks_complex_to_real_0, 0))    
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.digital_costas_loop_cc_0_0, 0))    
        self.connect((self.digital_pfb_clock_sync_xxx_0_0, 0), (self.digital_binary_slicer_fb_1, 0))    
        self.connect((self.fcdproplus_fcdproplus_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))    
        self.connect((self.fcdproplus_fcdproplus_0, 0), (self.freq_xlating_fir_filter_xxx_0_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_quadrature_demod_cf_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0_0, 0), (self.analog_feedforward_agc_cc_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0_0, 0), (self.low_pass_filter_3_0_0, 0))    
        self.connect((self.low_pass_filter_0, 0), (self.dc_blocker_xx_0, 0))    
        self.connect((self.low_pass_filter_3_0_0, 0), (self.analog_nbfm_rx_0, 0))    
コード例 #9
0
ファイル: by701.py プロジェクト: jamdart/gr-satellites
    def __init__(self, bfo=12000, callsign='', ip='::', latitude=0, longitude=0, port=7355, recstart=''):
        gr.top_block.__init__(self, "BY70-1 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.bfo = bfo
        self.callsign = callsign
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.sps = sps = 5
        self.samp_per_sym = samp_per_sym = 5
        self.nfilts = nfilts = 16
        self.alpha = alpha = 0.35
        
        self.variable_constellation_0_0 = variable_constellation_0_0 = digital.constellation_calcdist(([-1, 1]), ([0, 1]), 2, 1).base()
        
        
        self.variable_constellation_0 = variable_constellation_0 = digital.constellation_calcdist(([-1, 1]), ([0, 1]), 2, 1).base()
        
        self.threshold = threshold = 3
        self.samp_rate = samp_rate = 48000
        self.rrc_taps_0 = rrc_taps_0 = firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(samp_per_sym), 0.35, 11*samp_per_sym*nfilts)
        self.rrc_taps = rrc_taps = firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), alpha, 11*sps*nfilts)
        self.nfilts_0 = nfilts_0 = 16

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_0_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0 = sync_to_pdu(
            packlen=(114+32)*8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit('http://tlm.pe0sat.nl/tlmdb/frame_db.php', 41909, callsign, longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.lilacsat_image_decoder_0 = lilacsat.image_decoder('/tmp', True)
        self.lilacsat_camera_telemetry_parser_0 = lilacsat.camera_telemetry_parser()
        self.libfec_decode_rs_0 = libfec.decode_rs(True, 0)
        self.kiss_kiss_to_pdu_0 = kiss.kiss_to_pdu(False)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_fcf(1, (firdes.low_pass(1, samp_rate, 10000, 1000)), bfo, samp_rate)
        self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(sps, 0.05, (rrc_taps), nfilts, nfilts/2, 0.05, 2)
        self.digital_lms_dd_equalizer_cc_0_0 = digital.lms_dd_equalizer_cc(2, 0.05, 2, variable_constellation_0)
        self.digital_fll_band_edge_cc_0 = digital.fll_band_edge_cc(sps, 0.350, 100, 0.01)
        self.digital_diff_decoder_bb_0_0 = digital.diff_decoder_bb(2)
        self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
        self.digital_costas_loop_cc_0_0 = digital.costas_loop_cc(0.1, 2, False)
        self.csp_swap_header_0 = csp.swap_header()
        self.ccsds_viterbi_0_0 = ccsds_viterbi()
        self.ccsds_viterbi_0 = ccsds_viterbi()
        self.ccsds_descrambler_0 = ccsds_descrambler()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short*1, ip, port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767)
        self.blocks_pdu_to_tagged_stream_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, 'packet_len')
        self.blocks_delay_0 = blocks.delay(gr.sizeof_float*1, 1)
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.analog_feedforward_agc_cc_0 = analog.feedforward_agc_cc(480, 2)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ccsds_descrambler_0, 'out'), (self.libfec_decode_rs_0, 'in'))    
        self.msg_connect((self.csp_swap_header_0, 'out'), (self.lilacsat_camera_telemetry_parser_0, 'in'))    
        self.msg_connect((self.csp_swap_header_0, 'out'), (self.lilacsat_image_decoder_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'), (self.sids_print_timestamp_0, 'in'))    
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'), (self.sids_submit_0, 'in'))    
        self.msg_connect((self.libfec_decode_rs_0, 'out'), (self.blocks_pdu_to_tagged_stream_0, 'pdus'))    
        self.msg_connect((self.sids_print_timestamp_0, 'out'), (self.csp_swap_header_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0, 'out'), (self.ccsds_descrambler_0, 'in'))    
        self.msg_connect((self.sync_to_pdu_0_0, 'out'), (self.ccsds_descrambler_0, 'in'))    
        self.connect((self.analog_feedforward_agc_cc_0, 0), (self.digital_fll_band_edge_cc_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.blocks_delay_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.ccsds_viterbi_0, 0))    
        self.connect((self.blocks_delay_0, 0), (self.ccsds_viterbi_0_0, 0))    
        self.connect((self.blocks_pdu_to_tagged_stream_0, 0), (self.kiss_kiss_to_pdu_0, 0))    
        self.connect((self.blocks_short_to_float_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))    
        self.connect((self.blocks_udp_source_0, 0), (self.blocks_short_to_float_0, 0))    
        self.connect((self.ccsds_viterbi_0, 0), (self.digital_diff_decoder_bb_0, 0))    
        self.connect((self.ccsds_viterbi_0_0, 0), (self.digital_diff_decoder_bb_0_0, 0))    
        self.connect((self.digital_costas_loop_cc_0_0, 0), (self.digital_lms_dd_equalizer_cc_0_0, 0))    
        self.connect((self.digital_diff_decoder_bb_0, 0), (self.sync_to_pdu_0, 0))    
        self.connect((self.digital_diff_decoder_bb_0_0, 0), (self.sync_to_pdu_0_0, 0))    
        self.connect((self.digital_fll_band_edge_cc_0, 0), (self.digital_pfb_clock_sync_xxx_0, 0))    
        self.connect((self.digital_lms_dd_equalizer_cc_0_0, 0), (self.blocks_complex_to_real_0, 0))    
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0), (self.digital_costas_loop_cc_0_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_feedforward_agc_cc_0, 0))    
コード例 #10
0
ファイル: lilacsat2.py プロジェクト: jamdart/gr-satellites
    def __init__(self,
                 bfo=12000,
                 callsign='',
                 invert=1,
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "LilacSat-2 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.bfo = bfo
        self.callsign = callsign
        self.invert = invert
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.sub_sps = sub_sps = 32
        self.sub_nfilts = sub_nfilts = 16
        self.sub_alpha = sub_alpha = 0.35
        self.sps = sps = 5
        self.samp_per_sym = samp_per_sym = 5
        self.nfilts = nfilts = 16
        self.alpha = alpha = 0.35

        self.variable_constellation_0_0 = variable_constellation_0_0 = digital.constellation_calcdist(
            ([-1, 1]), ([0, 1]), 2, 1).base()

        self.variable_constellation_0 = variable_constellation_0 = digital.constellation_calcdist(
            ([-1, 1]), ([0, 1]), 2, 1).base()

        self.threshold = threshold = 4
        self.sub_rrc_taps = sub_rrc_taps = firdes.root_raised_cosine(
            sub_nfilts, sub_nfilts, 1.0 / float(sub_sps), sub_alpha,
            11 * sub_sps * sub_nfilts)
        self.samp_rate = samp_rate = 48000
        self.rrc_taps_0 = rrc_taps_0 = firdes.root_raised_cosine(
            nfilts, nfilts, 1.0 / float(samp_per_sym), 0.35,
            11 * samp_per_sym * nfilts)
        self.rrc_taps = rrc_taps = firdes.root_raised_cosine(
            nfilts, nfilts, 1.0 / float(sps), alpha, 11 * sps * nfilts)
        self.nfilts_0 = nfilts_0 = 16

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_0_1_0 = sync_to_pdu(
            packlen=(114 + 32) * 8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_1 = sync_to_pdu(
            packlen=(114 + 32) * 8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_0_0 = sync_to_pdu(
            packlen=(114 + 32) * 8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0_0 = sync_to_pdu(
            packlen=(114 + 32) * 8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sync_to_pdu_0 = sync_to_pdu(
            packlen=(114 + 32) * 8,
            sync="00011010110011111111110000011101",
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 40908, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.low_pass_filter_0 = filter.fir_filter_fff(
            5, firdes.low_pass(1, samp_rate, 200, 50, firdes.WIN_HAMMING,
                               6.76))
        self.libfec_decode_rs_0_0_0 = libfec.decode_rs(True, 0)
        self.libfec_decode_rs_0_0 = libfec.decode_rs(True, 0)
        self.libfec_decode_rs_0 = libfec.decode_rs(True, 0)
        self.kiss_kiss_to_pdu_0_1 = kiss.kiss_to_pdu(False)
        self.kiss_kiss_to_pdu_0_0 = kiss.kiss_to_pdu(False)
        self.kiss_kiss_to_pdu_0 = kiss.kiss_to_pdu(False)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_fcf(
            1, (firdes.low_pass(1, samp_rate, 10000, 1000)), bfo, samp_rate)
        self.digital_pfb_clock_sync_xxx_0_0 = digital.pfb_clock_sync_fff(
            sub_sps, 0.0628, (sub_rrc_taps), sub_nfilts, sub_nfilts / 2, 0.01,
            1)
        self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(
            sps, 0.100, (rrc_taps), nfilts, nfilts / 2, 1.5, 2)
        self.digital_lms_dd_equalizer_cc_0_0 = digital.lms_dd_equalizer_cc(
            2, 0.3, 2, variable_constellation_0)
        self.digital_fll_band_edge_cc_0 = digital.fll_band_edge_cc(
            sps, 0.350, 100, 0.1)
        self.digital_diff_decoder_bb_0_0 = digital.diff_decoder_bb(2)
        self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
        self.digital_costas_loop_cc_0_0 = digital.costas_loop_cc(0.4, 2, False)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(
            10, 0.25 * 0.175 * 0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_1 = digital.binary_slicer_fb()
        self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True)
        self.ccsds_viterbi_0_1 = ccsds_viterbi()
        self.ccsds_viterbi_0_0_0 = ccsds_viterbi()
        self.ccsds_viterbi_0_0 = ccsds_viterbi()
        self.ccsds_viterbi_0 = ccsds_viterbi()
        self.ccsds_descrambler_0_0_0 = ccsds_descrambler()
        self.ccsds_descrambler_0_0 = ccsds_descrambler()
        self.ccsds_descrambler_0 = ccsds_descrambler()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767)
        self.blocks_pdu_to_tagged_stream_0_1 = blocks.pdu_to_tagged_stream(
            blocks.byte_t, 'packet_len')
        self.blocks_pdu_to_tagged_stream_0_0 = blocks.pdu_to_tagged_stream(
            blocks.byte_t, 'packet_len')
        self.blocks_pdu_to_tagged_stream_0 = blocks.pdu_to_tagged_stream(
            blocks.byte_t, 'packet_len')
        self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff(
            (invert * 10, ))
        self.blocks_message_debug_0 = blocks.message_debug()
        self.blocks_delay_0_0_0 = blocks.delay(gr.sizeof_float * 1, 1)
        self.blocks_delay_0_0 = blocks.delay(gr.sizeof_float * 1, 1)
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.analog_feedforward_agc_cc_0 = analog.feedforward_agc_cc(1024, 2)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.ccsds_descrambler_0, 'out'),
                         (self.libfec_decode_rs_0, 'in'))
        self.msg_connect((self.ccsds_descrambler_0_0, 'out'),
                         (self.libfec_decode_rs_0_0, 'in'))
        self.msg_connect((self.ccsds_descrambler_0_0_0, 'out'),
                         (self.libfec_decode_rs_0_0_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0_1, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.kiss_kiss_to_pdu_0_1, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.libfec_decode_rs_0, 'out'),
                         (self.blocks_pdu_to_tagged_stream_0, 'pdus'))
        self.msg_connect((self.libfec_decode_rs_0_0, 'out'),
                         (self.blocks_pdu_to_tagged_stream_0_0, 'pdus'))
        self.msg_connect((self.libfec_decode_rs_0_0_0, 'out'),
                         (self.blocks_pdu_to_tagged_stream_0_1, 'pdus'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.blocks_message_debug_0, 'print_pdu'))
        self.msg_connect((self.sync_to_pdu_0, 'out'),
                         (self.ccsds_descrambler_0, 'in'))
        self.msg_connect((self.sync_to_pdu_0_0, 'out'),
                         (self.ccsds_descrambler_0_0, 'in'))
        self.msg_connect((self.sync_to_pdu_0_0_0, 'out'),
                         (self.ccsds_descrambler_0_0_0, 'in'))
        self.msg_connect((self.sync_to_pdu_0_1, 'out'),
                         (self.ccsds_descrambler_0_0, 'in'))
        self.msg_connect((self.sync_to_pdu_0_1_0, 'out'),
                         (self.ccsds_descrambler_0_0_0, 'in'))
        self.connect((self.analog_feedforward_agc_cc_0, 0),
                     (self.digital_fll_band_edge_cc_0, 0))
        self.connect((self.blocks_complex_to_real_0, 0),
                     (self.blocks_delay_0_0, 0))
        self.connect((self.blocks_complex_to_real_0, 0),
                     (self.ccsds_viterbi_0_1, 0))
        self.connect((self.blocks_delay_0_0, 0), (self.ccsds_viterbi_0_0_0, 0))
        self.connect((self.blocks_delay_0_0_0, 0), (self.ccsds_viterbi_0_0, 0))
        self.connect((self.blocks_multiply_const_vxx_0_0, 0),
                     (self.digital_clock_recovery_mm_xx_0, 0))
        self.connect((self.blocks_multiply_const_vxx_0_0, 0),
                     (self.low_pass_filter_0, 0))
        self.connect((self.blocks_pdu_to_tagged_stream_0, 0),
                     (self.kiss_kiss_to_pdu_0, 0))
        self.connect((self.blocks_pdu_to_tagged_stream_0_0, 0),
                     (self.kiss_kiss_to_pdu_0_0, 0))
        self.connect((self.blocks_pdu_to_tagged_stream_0_1, 0),
                     (self.kiss_kiss_to_pdu_0_1, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.blocks_multiply_const_vxx_0_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.freq_xlating_fir_filter_xxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.ccsds_viterbi_0, 0), (self.sync_to_pdu_0_1_0, 0))
        self.connect((self.ccsds_viterbi_0_0, 0), (self.sync_to_pdu_0_0_0, 0))
        self.connect((self.ccsds_viterbi_0_0_0, 0),
                     (self.digital_diff_decoder_bb_0_0, 0))
        self.connect((self.ccsds_viterbi_0_1, 0),
                     (self.digital_diff_decoder_bb_0, 0))
        self.connect((self.dc_blocker_xx_0, 0),
                     (self.digital_pfb_clock_sync_xxx_0_0, 0))
        self.connect((self.digital_binary_slicer_fb_1, 0),
                     (self.sync_to_pdu_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0, 0),
                     (self.blocks_delay_0_0_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0, 0),
                     (self.ccsds_viterbi_0, 0))
        self.connect((self.digital_costas_loop_cc_0_0, 0),
                     (self.digital_lms_dd_equalizer_cc_0_0, 0))
        self.connect((self.digital_diff_decoder_bb_0, 0),
                     (self.sync_to_pdu_0_1, 0))
        self.connect((self.digital_diff_decoder_bb_0_0, 0),
                     (self.sync_to_pdu_0_0, 0))
        self.connect((self.digital_fll_band_edge_cc_0, 0),
                     (self.digital_pfb_clock_sync_xxx_0, 0))
        self.connect((self.digital_lms_dd_equalizer_cc_0_0, 0),
                     (self.blocks_complex_to_real_0, 0))
        self.connect((self.digital_pfb_clock_sync_xxx_0, 0),
                     (self.digital_costas_loop_cc_0_0, 0))
        self.connect((self.digital_pfb_clock_sync_xxx_0_0, 0),
                     (self.digital_binary_slicer_fb_1, 0))
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0),
                     (self.analog_feedforward_agc_cc_0, 0))
        self.connect((self.low_pass_filter_0, 0), (self.dc_blocker_xx_0, 0))
コード例 #11
0
ファイル: aausat_4.py プロジェクト: jamdart/gr-satellites
    def __init__(self,
                 callsign='',
                 invert=1,
                 ip='::',
                 latitude=0,
                 longitude=0,
                 port=7355,
                 recstart=''):
        gr.top_block.__init__(self, "AAUSAT-4 decoder")

        ##################################################
        # Parameters
        ##################################################
        self.callsign = callsign
        self.invert = invert
        self.ip = ip
        self.latitude = latitude
        self.longitude = longitude
        self.port = port
        self.recstart = recstart

        ##################################################
        # Variables
        ##################################################
        self.threshold = threshold = 8
        self.access_code = access_code = "010011110101101000110100010000110101010101000010"

        ##################################################
        # Blocks
        ##################################################
        self.sync_to_pdu_packed_0_0 = sync_to_pdu_packed(
            packlen=251,
            sync=access_code,
            threshold=threshold,
        )
        self.sync_to_pdu_packed_0 = sync_to_pdu_packed(
            packlen=251,
            sync=access_code,
            threshold=threshold,
        )
        self.sids_submit_0 = sids.submit(
            'http://tlm.pe0sat.nl/tlmdb/frame_db.php', 41460, callsign,
            longitude, latitude, recstart)
        self.sids_print_timestamp_0 = sids.print_timestamp('%Y-%m-%d %H:%M:%S')
        self.digital_clock_recovery_mm_xx_0_0 = digital.clock_recovery_mm_ff(
            5.0, 0.25 * 0.175 * 0.175, 0.005, 0.175, 0.005)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(
            20.0, 0.25 * 0.175 * 0.175, 0.005, 0.175, 0.005)
        self.digital_binary_slicer_fb_0_0 = digital.binary_slicer_fb()
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_udp_source_0 = blocks.udp_source(gr.sizeof_short * 1, ip,
                                                     port, 1472, False)
        self.blocks_short_to_float_0 = blocks.short_to_float(1, 32767.0)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff(
            (invert * 10, ))
        self.aausat_aausat4_fec_0 = aausat.aausat4_fec(False)
        self.aausat_aausat4_beacon_parser_0 = aausat.aausat4_beacon_parser()

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.aausat_aausat4_fec_0, 'out'),
                         (self.sids_print_timestamp_0, 'in'))
        self.msg_connect((self.aausat_aausat4_fec_0, 'out'),
                         (self.sids_submit_0, 'in'))
        self.msg_connect((self.sids_print_timestamp_0, 'out'),
                         (self.aausat_aausat4_beacon_parser_0, 'in'))
        self.msg_connect((self.sync_to_pdu_packed_0, 'out'),
                         (self.aausat_aausat4_fec_0, 'in'))
        self.msg_connect((self.sync_to_pdu_packed_0_0, 'out'),
                         (self.aausat_aausat4_fec_0, 'in'))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.digital_clock_recovery_mm_xx_0, 0))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.digital_clock_recovery_mm_xx_0_0, 0))
        self.connect((self.blocks_short_to_float_0, 0),
                     (self.blocks_multiply_const_vxx_0, 0))
        self.connect((self.blocks_udp_source_0, 0),
                     (self.blocks_short_to_float_0, 0))
        self.connect((self.digital_binary_slicer_fb_0, 0),
                     (self.sync_to_pdu_packed_0, 0))
        self.connect((self.digital_binary_slicer_fb_0_0, 0),
                     (self.sync_to_pdu_packed_0_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0, 0),
                     (self.digital_binary_slicer_fb_0, 0))
        self.connect((self.digital_clock_recovery_mm_xx_0_0, 0),
                     (self.digital_binary_slicer_fb_0_0, 0))