Skip to content

Instantly share code, notes, and snippets.

@daniestevez
Created July 1, 2023 21:44
Show Gist options
  • Save daniestevez/58373345b2adc3610e82e01912afd66b to your computer and use it in GitHub Desktop.
Save daniestevez/58373345b2adc3610e82e01912afd66b to your computer and use it in GitHub Desktop.
EUCLID GNU Radio decoder
options:
parameters:
author: Daniel Estevez
catch_exceptions: 'True'
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
generate_options: qt_gui
hier_block_src_path: '.:'
id: euclid
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: EUCLID decoder
window_size: (1000,1000)
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 8]
rotation: 0
state: enabled
blocks:
- name: access_code
id: variable
parameters:
comment: ''
value: '''''.join([str(i) for i in (syncword+1)//2])'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1200, 156.0]
rotation: 0
state: true
- name: baudrate
id: variable
parameters:
comment: ''
value: 60e3
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [432, 12.0]
rotation: 0
state: true
- name: pll_bw
id: variable
parameters:
comment: ''
value: '25'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [304, 12.0]
rotation: 0
state: true
- name: samp_rate
id: variable
parameters:
comment: ''
value: '249995'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [184, 12]
rotation: 0
state: enabled
- name: sps
id: variable
parameters:
comment: ''
value: samp_rate / baudrate
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [552, 12.0]
rotation: 0
state: true
- name: syncword
id: variable
parameters:
comment: ''
value: 2*np.unpackbits(np.frombuffer(bytes.fromhex(syncword_hex), dtype = 'uint8')).astype('int')-1
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1200, 76.0]
rotation: 0
state: true
- name: syncword_hex
id: variable
parameters:
comment: ''
value: '''1ACFFC1D'''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1200, 12.0]
rotation: 0
state: true
- name: analog_pll_carriertracking_cc_0
id: analog_pll_carriertracking_cc
parameters:
affinity: ''
alias: ''
comment: ''
max_freq: np.pi
maxoutbuf: '0'
min_freq: '- np.pi'
minoutbuf: '0'
w: 2 * np.pi * pll_bw / samp_rate
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [456, 164.0]
rotation: 0
state: true
- name: blocks_complex_to_float_0
id: blocks_complex_to_float
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [712, 168.0]
rotation: 0
state: true
- name: blocks_complex_to_real_0
id: blocks_complex_to_real
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [384, 600.0]
rotation: 0
state: true
- name: blocks_file_sink_0
id: blocks_file_sink
parameters:
affinity: ''
alias: ''
append: 'False'
comment: ''
file: euclid_frames.u8
type: byte
unbuffered: 'False'
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1344, 804.0]
rotation: 0
state: true
- name: blocks_file_source_0
id: blocks_file_source
parameters:
affinity: ''
alias: ''
begin_tag: pmt.PMT_NIL
comment: ''
file: /home/daniel/euclid/euclid_8455_20230701_205430_249995.raw
length: '0'
maxoutbuf: '0'
minoutbuf: '0'
offset: '0'
repeat: 'True'
type: short
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [32, 148.0]
rotation: 0
state: true
- name: blocks_interleaved_short_to_complex_0
id: blocks_interleaved_short_to_complex
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
scale_factor: 2**15
swap: 'False'
vector_input: 'False'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [248, 172.0]
rotation: 0
state: true
- name: blocks_message_debug_0
id: blocks_message_debug
parameters:
affinity: ''
alias: ''
comment: ''
en_uvec: 'True'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1312, 648.0]
rotation: 0
state: disabled
- name: blocks_multiply_const_vxx_0
id: blocks_multiply_const_vxx
parameters:
affinity: ''
alias: ''
comment: ''
const: '-1'
maxoutbuf: '0'
minoutbuf: '0'
type: float
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [560, 772.0]
rotation: 0
state: true
- name: digital_costas_loop_cc_0
id: digital_costas_loop_cc
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
order: '2'
use_snr: 'False'
w: '0.003'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [160, 512.0]
rotation: 0
state: true
- name: digital_symbol_sync_xx_0
id: digital_symbol_sync_xx
parameters:
affinity: ''
alias: ''
comment: ''
constellation: digital.constellation_bpsk().base()
damping: '1.0'
loop_bw: '0.01'
max_dev: '0.01'
maxoutbuf: '0'
minoutbuf: '0'
nfilters: '128'
osps: '1'
pfb_mf_taps: '[]'
resamp_type: digital.IR_MMSE_8TAP
sps: sps
ted_gain: '1.0'
ted_type: digital.TED_GARDNER
type: cc
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [824, 292.0]
rotation: 0
state: true
- name: fir_filter_xxx_0
id: fir_filter_xxx
parameters:
affinity: ''
alias: ''
comment: ''
decim: '1'
maxoutbuf: '0'
minoutbuf: '0'
samp_delay: '0'
taps: '[1.6 * 1/int(sps)] * int(sps)'
type: ccc
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [568, 340.0]
rotation: 0
state: true
- name: freq_xlating_fir_filter_xxx_0
id: freq_xlating_fir_filter_xxx
parameters:
affinity: ''
alias: ''
center_freq: baudrate
comment: ''
decim: '1'
maxoutbuf: '0'
minoutbuf: '0'
samp_rate: samp_rate
taps: firdes.low_pass(1.0, samp_rate, baudrate, 0.1*baudrate)
type: fcf
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [168, 324.0]
rotation: 0
state: true
- name: import_0
id: import
parameters:
alias: ''
comment: ''
imports: import numpy as np
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [184, 84.0]
rotation: 0
state: true
- 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: [1112, 820.0]
rotation: 0
state: true
- name: qtgui_const_sink_x_0
id: qtgui_const_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: '"red"'
color2: '"red"'
color3: '"red"'
color4: '"red"'
color5: '"red"'
color6: '"red"'
color7: '"red"'
color8: '"red"'
color9: '"red"'
comment: ''
grid: 'False'
gui_hint: 0,1,1,1
label1: ''
label10: ''
label2: ''
label3: ''
label4: ''
label5: ''
label6: ''
label7: ''
label8: ''
label9: ''
legend: 'False'
marker1: '0'
marker10: '0'
marker2: '0'
marker3: '0'
marker4: '0'
marker5: '0'
marker6: '0'
marker7: '0'
marker8: '0'
marker9: '0'
name: '""'
nconnections: '1'
size: int(baudrate / 10)
style1: '0'
style10: '0'
style2: '0'
style3: '0'
style4: '0'
style5: '0'
style6: '0'
style7: '0'
style8: '0'
style9: '0'
tr_chan: '0'
tr_level: '0.0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_slope: qtgui.TRIG_SLOPE_POS
tr_tag: '""'
type: complex
update_time: '0.10'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
xmax: '3'
xmin: '-3'
ymax: '3'
ymin: '-3'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [424, 500.0]
rotation: 0
state: true
- name: qtgui_freq_sink_x_0
id: qtgui_freq_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'
average: '0.1'
axislabels: 'True'
bw: samp_rate
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'
fc: '0'
fftsize: '4096'
freqhalf: 'True'
grid: 'False'
gui_hint: 1,0,1,2
label: Relative Gain
label1: I
label10: ''''''
label2: Q
label3: ''''''
label4: ''''''
label5: ''''''
label6: ''''''
label7: ''''''
label8: ''''''
label9: ''''''
legend: 'True'
maxoutbuf: '0'
minoutbuf: '0'
name: PLL output
nconnections: '2'
norm_window: 'False'
showports: 'False'
tr_chan: '0'
tr_level: '0.0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_tag: '""'
type: float
units: dB
update_time: '0.10'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
wintype: window.WIN_BLACKMAN_hARRIS
ymax: '-40'
ymin: '-90'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [936, 156.0]
rotation: 0
state: true
- name: qtgui_freq_sink_x_1
id: qtgui_freq_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'
average: '0.1'
axislabels: 'True'
bw: samp_rate
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'
fc: '0'
fftsize: '4096'
freqhalf: 'True'
grid: 'False'
gui_hint: 0,0,1,1
label: Relative Gain
label1: ''
label10: ''''''
label2: ''''''
label3: ''''''
label4: ''''''
label5: ''''''
label6: ''''''
label7: ''''''
label8: ''''''
label9: ''''''
legend: 'False'
maxoutbuf: '0'
minoutbuf: '0'
name: Signal spectrum
nconnections: '1'
norm_window: 'False'
showports: 'False'
tr_chan: '0'
tr_level: '0.0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_tag: '""'
type: complex
units: dB
update_time: '0.10'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
wintype: window.WIN_BLACKMAN_hARRIS
ymax: '-40'
ymin: '-90'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [728, 60.0]
rotation: 0
state: true
- name: satellites_ccsds_concatenated_deframer_0
id: satellites_ccsds_concatenated_deframer
parameters:
affinity: ''
alias: ''
comment: ''
convolutional: '"CCSDS"'
frame_size: 223 * 5
maxoutbuf: '0'
minoutbuf: '0'
options: '""'
precoding: None
rs_basis: '"dual"'
rs_interleaving: '5'
scrambler: '"CCSDS"'
threshold: '4'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [704, 548.0]
rotation: 0
state: true
- name: satellites_ccsds_concatenated_deframer_0_0
id: satellites_ccsds_concatenated_deframer
parameters:
affinity: ''
alias: ''
comment: ''
convolutional: '"CCSDS"'
frame_size: 223 * 5
maxoutbuf: '0'
minoutbuf: '0'
options: '""'
precoding: None
rs_basis: '"dual"'
rs_interleaving: '5'
scrambler: '"CCSDS"'
threshold: '4'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [720, 724.0]
rotation: 0
state: true
- name: satellites_crc_check_0
id: satellites_crc_check
parameters:
affinity: ''
alias: ''
comment: ''
discard_crc: 'True'
final_xor: '0x0'
initial_value: '0xFFFF'
input_reflected: 'False'
maxoutbuf: '0'
minoutbuf: '0'
num_bits: '16'
poly: '0x1021'
result_reflected: 'False'
skip_header_bytes: '0'
swap_endianness: 'False'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1072, 648.0]
rotation: 0
state: enabled
- name: satellites_rms_agc_0
id: satellites_rms_agc
parameters:
affinity: ''
alias: ''
alpha: 1e-3
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
reference: '1.0'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [416, 340.0]
rotation: 0
state: true
connections:
- [analog_pll_carriertracking_cc_0, '0', blocks_complex_to_float_0, '0']
- [blocks_complex_to_float_0, '0', qtgui_freq_sink_x_0, '0']
- [blocks_complex_to_float_0, '1', freq_xlating_fir_filter_xxx_0, '0']
- [blocks_complex_to_float_0, '1', qtgui_freq_sink_x_0, '1']
- [blocks_complex_to_real_0, '0', blocks_multiply_const_vxx_0, '0']
- [blocks_complex_to_real_0, '0', satellites_ccsds_concatenated_deframer_0, '0']
- [blocks_file_source_0, '0', blocks_interleaved_short_to_complex_0, '0']
- [blocks_interleaved_short_to_complex_0, '0', analog_pll_carriertracking_cc_0, '0']
- [blocks_interleaved_short_to_complex_0, '0', qtgui_freq_sink_x_1, '0']
- [blocks_multiply_const_vxx_0, '0', satellites_ccsds_concatenated_deframer_0_0, '0']
- [digital_costas_loop_cc_0, '0', blocks_complex_to_real_0, '0']
- [digital_costas_loop_cc_0, '0', qtgui_const_sink_x_0, '0']
- [digital_symbol_sync_xx_0, '0', digital_costas_loop_cc_0, '0']
- [fir_filter_xxx_0, '0', digital_symbol_sync_xx_0, '0']
- [freq_xlating_fir_filter_xxx_0, '0', satellites_rms_agc_0, '0']
- [pdu_pdu_to_tagged_stream_0, '0', blocks_file_sink_0, '0']
- [satellites_ccsds_concatenated_deframer_0, out, satellites_crc_check_0, in]
- [satellites_ccsds_concatenated_deframer_0_0, out, satellites_crc_check_0, in]
- [satellites_crc_check_0, ok, blocks_message_debug_0, print]
- [satellites_crc_check_0, ok, pdu_pdu_to_tagged_stream_0, pdus]
- [satellites_rms_agc_0, '0', fir_filter_xxx_0, '0']
metadata:
file_format: 1
grc_version: 3.10.6.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment