Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- parameters:
- author: Barry Duggan
- catch_exceptions: 'True'
- category: '[GRC Hier Blocks]'
- cmake_opt: ''
- comment: ''
- copyright: ''
- description: fsk_xmt_AT03
- gen_cmake: 'On'
- gen_linking: dynamic
- generate_options: qt_gui
- hier_block_src_path: '.:'
- id: fsk_xmt_AT03
- max_nouts: '0'
- output_language: python
- placement: (0,0)
- qt_qss_theme: ''
- realtime_scheduling: ''
- run: 'True'
- run_command: '{python} -u {filename}'
- run_options: prompt
- sizing_mode: fixed
- thread_safe_setters: ''
- title: fsk_xmt_AT03
- window_size: (1000,1000)
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [16, 12.0]
- rotation: 0
- state: enabled
- blocks:
- - name: baud
- id: variable
- parameters:
- comment: ''
- value: '9600'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [368, 12.0]
- rotation: 0
- state: true
- - name: center
- id: variable
- parameters:
- comment: ''
- value: (mark+space)/2
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [240, 124.0]
- rotation: 0
- state: enabled
- - name: fsk_deviation
- id: variable
- parameters:
- comment: ''
- value: (abs)(mark-space)
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [392, 124.0]
- rotation: 0
- state: enabled
- - name: inp_amp
- id: variable
- parameters:
- comment: ''
- value: (mark/vco_max)-vco_offset
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [672, 124.0]
- rotation: 0
- state: true
- - name: mark
- id: variable
- parameters:
- comment: ''
- value: '11000'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [448, 12.0]
- rotation: 0
- state: true
- - name: p1
- id: variable_qtgui_entry
- parameters:
- comment: ''
- gui_hint: 1,0,1,1
- label: CALL-GS
- type: string
- value: '"OE3ALA"'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1144, 12.0]
- rotation: 0
- state: true
- - name: p2
- id: variable_qtgui_entry
- parameters:
- comment: ''
- gui_hint: 2,0,1,1
- label: PW
- type: string
- value: '"ABCdef"'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1144, 104.0]
- rotation: 0
- state: true
- - name: p3
- id: variable_qtgui_chooser
- parameters:
- comment: ''
- gui_hint: 4,0,1,1
- label: STACIE Commands
- label0: 0x00 STACIE Telemetry
- label1: 0x01 EPS Telemetry
- label2: 0x02 Antenna Telemetry
- label3: ''
- label4: ''
- labels: '[]'
- num_opts: '3'
- option0: '0'
- option1: '1'
- option2: '2'
- option3: '3'
- option4: '4'
- options: '[0, 1, 2]'
- orient: Qt.QVBoxLayout
- type: int
- value: '0'
- widget: combo_box
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1288, 12.0]
- rotation: 0
- state: true
- - name: repeat
- id: variable
- parameters:
- comment: ''
- value: (int)(samp_rate/baud)
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [320, 124.0]
- rotation: 0
- state: true
- - name: samp_rate
- id: variable
- parameters:
- comment: '|----------------------------------------------------------------------------------------->
- User set values'
- value: '192000'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [184, 12.0]
- rotation: 0
- state: enabled
- - name: space
- id: variable
- parameters:
- comment: ''
- value: '1000'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [528, 12.0]
- rotation: 0
- state: true
- - name: tx_atten
- id: variable_qtgui_range
- parameters:
- comment: ''
- gui_hint: 5,0,1,2
- label: Tx Attenuation
- min_len: '200'
- orient: QtCore.Qt.Horizontal
- rangeType: float
- start: '0'
- step: '1'
- stop: '89'
- value: '0'
- widget: slider
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [792, 12.0]
- rotation: 0
- state: enabled
- - name: tx_freq
- id: variable_qtgui_entry
- parameters:
- comment: 'By reducing the transmit frequency
- by the FSK center freq, the resultant
- output should be where desired:
- 433.050MHz'
- gui_hint: ''
- label: Transmit Freq
- type: real
- value: 433050000-center
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [928, 12.0]
- rotation: 0
- state: true
- - name: usrp_rate
- id: variable
- parameters:
- comment: ''
- value: '768000'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [280, 12.0]
- rotation: 0
- state: true
- - name: vco_max
- id: variable
- parameters:
- comment: ''
- value: center+fsk_deviation
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [496, 124.0]
- rotation: 0
- state: true
- - name: vco_offset
- id: variable
- parameters:
- comment: ''
- value: space/vco_max
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [584, 124.0]
- rotation: 0
- state: true
- - name: blocks_add_const_vxx_0
- id: blocks_add_const_vxx
- parameters:
- affinity: ''
- alias: ''
- comment: vco_offset
- const: vco_offset
- maxoutbuf: '0'
- minoutbuf: '0'
- type: float
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [528, 648.0]
- rotation: 0
- state: true
- - name: blocks_message_debug_0
- id: blocks_message_debug
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- en_uvec: 'True'
- log_level: info
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1128, 376.0]
- rotation: 0
- state: true
- - name: blocks_multiply_const_vxx_0
- id: blocks_multiply_const_vxx
- parameters:
- affinity: ''
- alias: ''
- comment: inp_amp
- const: inp_amp
- maxoutbuf: '0'
- minoutbuf: '0'
- type: float
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [352, 648.0]
- rotation: 0
- state: true
- - name: blocks_null_sink_0
- id: blocks_null_sink
- parameters:
- affinity: ''
- alias: ''
- bus_structure_sink: '[[0,],]'
- comment: ''
- num_inputs: '1'
- type: complex
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1064, 656.0]
- rotation: 0
- state: true
- - name: blocks_repack_bits_bb_1_0
- id: blocks_repack_bits_bb
- parameters:
- affinity: ''
- alias: ''
- align_output: 'False'
- comment: ''
- endianness: gr.GR_MSB_FIRST
- k: '8'
- l: '1'
- len_tag_key: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [336, 456.0]
- rotation: 0
- state: true
- - name: blocks_repeat_0
- id: blocks_repeat
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- interp: repeat
- maxoutbuf: '0'
- minoutbuf: '0'
- type: byte
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [536, 464.0]
- rotation: 0
- state: enabled
- - name: blocks_throttle2_0_0
- id: blocks_throttle2
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- ignoretag: 'True'
- limit: auto
- maximum: '0.1'
- maxoutbuf: '0'
- minoutbuf: '0'
- samples_per_second: samp_rate
- type: complex
- vlen: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [896, 640.0]
- rotation: 0
- state: true
- - name: blocks_uchar_to_float_0
- id: blocks_uchar_to_float
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [704, 472.0]
- rotation: 0
- state: enabled
- - name: blocks_vco_c_0
- id: blocks_vco_c
- parameters:
- affinity: ''
- alias: ''
- amplitude: '1.0'
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- samp_rate: samp_rate
- sensitivity: 2*math.pi*vco_max
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [696, 632.0]
- rotation: 0
- state: true
- - name: epy_block_0
- id: epy_block
- parameters:
- Callsign: p1
- Num_of_postambles: '4'
- Num_of_preambles: '2'
- Password: p2
- Stacie_Cmd: p3
- _source_code: "\"\"\"\nEPB: Generate message\n\"\"\"\n\nimport numpy as np\nfrom\
- \ gnuradio import gr\nimport pmt\n\n\"\"\"\nState definitions\n 0 idle\n\
- \ 1 send preamble\n 2 send command\n 3 send postamble\n\"\"\"\
- \n\nclass blk(gr.sync_block):\n \"\"\"\n reads input from a message port\n\
- \ generates control messages\n \"\"\"\n def __init__(self, Callsign='None',\
- \ Password='xxx', Stacie_Cmd=4, Num_of_preambles=64, Num_of_postambles=16):\n\
- \ gr.sync_block.__init__(self,\n name='EPB: Generate message',\
- \ # will show up in GRC\n in_sig=None,\n out_sig=None)\n\
- \ self.Callsign = Callsign\n self.Password = Password\n \
- \ self.Stacie_Cmd = Stacie_Cmd\n self.Num_of_preambles = Num_of_preambles\n\
- \ self.Num_of_postambles = Num_of_postambles\n self._debug = 0\
- \ # debug flag\n self.state = 0 # idle state\n self.pre_count\
- \ = 0\n self.message_port_register_in(pmt.intern('msg_in'))\n \
- \ self.message_port_register_out(pmt.intern('msg_out'))\n self.set_msg_handler(pmt.intern('msg_in'),\
- \ self.handle_msg)\n\n def handle_msg(self, msg):\n try:\n \
- \ new_val = pmt.to_python(pmt.cdr(msg)) # this is just a trigger\n \
- \ except Exception as e:\n gr.log.error(\"Error with message\
- \ conversion: %s\" % str(e))\n if (self._debug):\n print (\"\
- Callsign:\", self.Callsign)\n print (\"Password:\", self.Password)\n\
- \ print (\"Stacie_Cmd:\", self.Stacie_Cmd)\n _amble = pmt.cons(pmt.PMT_NIL,pmt.init_u8vector(16,(85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85)))\n\
- \n if (self.Stacie_Cmd == 0):\n # build STACIE message here\n\
- # print (\"Stacie_Cmd:\", self.Stacie_Cmd)\n new_pmt =\
- \ pmt.cons(pmt.PMT_NIL,pmt.init_u8vector(11,(71,78,85,32,82,97,100,105,111,45,48)))\n\
- \n elif (self.Stacie_Cmd == 1):\n # build EPS message here\n\
- # print (\"Stacie_Cmd:\", self.Stacie_Cmd)\n new_pmt =\
- \ pmt.cons(pmt.PMT_NIL,pmt.init_u8vector(11,(71,78,85,32,82,97,100,105,111,45,49)))\n\
- \n elif (self.Stacie_Cmd == 2):\n # build Antenna message\
- \ here\n# print (\"Stacie_Cmd:\", self.Stacie_Cmd)\n new_pmt\
- \ = pmt.cons(pmt.PMT_NIL,pmt.init_u8vector(11,(71,78,85,32,82,97,100,105,111,45,50)))\n\
- \n self.state = 1\n while (self.state > 0):\n\n if\
- \ (self.state == 1):\n # send preamble\n if (self._debug):\n\
- \ print (\"state = 1\", self.pre_count)\n \
- \ self.message_port_pub(pmt.intern('msg_out'), _amble)\n self.pre_count\
- \ += 1\n if (self.pre_count > (self.Num_of_preambles-1)):\n \
- \ self.pre_count = 0\n self.state = 2 \
- \ # send msg\n continue\n\n elif (self.state\
- \ == 2):\n # send command\n if (self._debug):\n\
- \ print (\"state = 2\", self.pre_count)\n \
- \ self.message_port_pub(pmt.intern('msg_out'), new_pmt)\n self.pre_count\
- \ = 0\n self.state = 3 # send postamble\n \
- \ continue\n\n elif (self.state == 3):\n \
- \ # send postamble\n if (self._debug):\n print\
- \ (\"state = 3\", self.pre_count)\n self.message_port_pub(pmt.intern('msg_out'),\
- \ _amble)\n self.pre_count += 1\n if (self.pre_count\
- \ > (self.Num_of_postambles-1)):\n self.pre_count = 0\n \
- \ self.state = 0 # idle\n continue\n\
- \n"
- affinity: ''
- alias: ''
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- states:
- _io_cache: '(''EPB: Generate message'', ''blk'', [(''Callsign'', "''None''"),
- (''Password'', "''xxx''"), (''Stacie_Cmd'', ''4''), (''Num_of_preambles'', ''64''),
- (''Num_of_postambles'', ''16'')], [(''msg_in'', ''message'', 1)], [(''msg_out'',
- ''message'', 1)], ''\n reads input from a message port\n generates control
- messages\n '', [''Callsign'', ''Num_of_postambles'', ''Num_of_preambles'',
- ''Password'', ''Stacie_Cmd''])'
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [768, 272.0]
- rotation: 0
- state: true
- - name: import_0
- id: import
- parameters:
- alias: ''
- comment: ''
- imports: import math
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [16, 136.0]
- rotation: 0
- state: enabled
- - name: note_0
- id: note
- parameters:
- alias: ''
- comment: '|--------------------------------------------------------------------------------------------------------------------------------------------|
- Calculated values:
- - center freq = (mark+space)/2
- - repeat = (int)(samp_rate/baud)
- - fsk_deviation = (abs)(mark-space)
- - vco_max = center+fsk_deviation
- - vco_offset = space/vco_max
- - inp_amp = (mark/vco_max)-vco_offset
- - vco sensitivity = 2*math.pi*vco_max'
- note: ''
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [184, 148.0]
- rotation: 0
- state: enabled
- - name: pdu_pdu_to_tagged_stream_0
- id: pdu_pdu_to_tagged_stream
- parameters:
- affinity: ''
- alias: ''
- comment: ''
- maxoutbuf: '0'
- minoutbuf: '0'
- tag: packet_len
- type: byte
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1048, 304.0]
- rotation: 0
- state: true
- - name: qtgui_time_sink_x_0
- id: qtgui_time_sink_x
- parameters:
- affinity: ''
- alias: ''
- alpha1: '1.0'
- alpha10: '1.0'
- alpha2: '1.0'
- alpha3: '1.0'
- alpha4: '1.0'
- alpha5: '1.0'
- alpha6: '1.0'
- alpha7: '1.0'
- alpha8: '1.0'
- alpha9: '1.0'
- autoscale: 'False'
- axislabels: 'True'
- color1: blue
- color10: dark blue
- color2: red
- color3: green
- color4: black
- color5: cyan
- color6: magenta
- color7: yellow
- color8: dark red
- color9: dark green
- comment: ''
- ctrlpanel: 'False'
- entags: 'True'
- grid: 'False'
- gui_hint: ''
- label1: ''
- label10: ''
- label2: ''
- label3: ''
- label4: ''
- label5: ''
- label6: ''
- label7: ''
- label8: ''
- label9: ''
- legend: 'True'
- marker1: '-1'
- marker10: '-1'
- marker2: '-1'
- marker3: '-1'
- marker4: '-1'
- marker5: '-1'
- marker6: '-1'
- marker7: '-1'
- marker8: '-1'
- marker9: '-1'
- name: Transmit data
- nconnections: '1'
- size: '384'
- srate: samp_rate
- stemplot: 'False'
- style1: '1'
- style10: '1'
- style2: '1'
- style3: '1'
- style4: '1'
- style5: '1'
- style6: '1'
- style7: '1'
- style8: '1'
- style9: '1'
- tr_chan: '0'
- tr_delay: '0.0'
- tr_level: '0.0'
- tr_mode: qtgui.TRIG_MODE_AUTO
- tr_slope: qtgui.TRIG_SLOPE_POS
- tr_tag: '"packet_len"'
- type: float
- update_time: '0.10'
- width1: '1'
- width10: '1'
- width2: '1'
- width3: '1'
- width4: '1'
- width5: '1'
- width6: '1'
- width7: '1'
- width8: '1'
- width9: '1'
- ylabel: Amplitude
- ymax: '1.1'
- ymin: '-0.1'
- yunit: '""'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [888, 440.0]
- rotation: 0
- state: enabled
- - name: variable_qtgui_msg_push_button_0
- id: variable_qtgui_msg_push_button
- parameters:
- comment: ''
- gui_hint: 4,3,1,1
- label: Send GET STATUS
- msgName: pressed
- relBackgroundColor: default
- relFontColor: default
- type: int
- value: '1'
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [464, 280.0]
- rotation: 0
- state: true
- - name: virtual_sink_0
- id: virtual_sink
- parameters:
- alias: ''
- comment: ''
- stream_id: t2
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [712, 532.0]
- rotation: 180
- state: true
- - name: virtual_sink_0_0
- id: virtual_sink
- parameters:
- alias: ''
- comment: ''
- stream_id: t1
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [1272, 304.0]
- rotation: 0
- state: true
- - name: virtual_source_0
- id: virtual_source
- parameters:
- alias: ''
- comment: ''
- stream_id: t2
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [192, 648.0]
- rotation: 0
- state: true
- - name: virtual_source_0_0
- id: virtual_source
- parameters:
- alias: ''
- comment: ''
- stream_id: t1
- states:
- bus_sink: false
- bus_source: false
- bus_structure: null
- coordinate: [168, 464.0]
- rotation: 0
- state: true
- connections:
- - [blocks_add_const_vxx_0, '0', blocks_vco_c_0, '0']
- - [blocks_multiply_const_vxx_0, '0', blocks_add_const_vxx_0, '0']
- - [blocks_repack_bits_bb_1_0, '0', blocks_repeat_0, '0']
- - [blocks_repeat_0, '0', blocks_uchar_to_float_0, '0']
- - [blocks_throttle2_0_0, '0', blocks_null_sink_0, '0']
- - [blocks_uchar_to_float_0, '0', qtgui_time_sink_x_0, '0']
- - [blocks_uchar_to_float_0, '0', virtual_sink_0, '0']
- - [blocks_vco_c_0, '0', blocks_throttle2_0_0, '0']
- - [epy_block_0, msg_out, blocks_message_debug_0, print]
- - [epy_block_0, msg_out, pdu_pdu_to_tagged_stream_0, pdus]
- - [pdu_pdu_to_tagged_stream_0, '0', virtual_sink_0_0, '0']
- - [variable_qtgui_msg_push_button_0, pressed, epy_block_0, msg_in]
- - [virtual_source_0, '0', blocks_multiply_const_vxx_0, '0']
- - [virtual_source_0_0, '0', blocks_repack_bits_bb_1_0, '0']
- metadata:
- file_format: 1
- grc_version: 3.10.7.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement