Skip to content

Instantly share code, notes, and snippets.

@kng
Last active July 18, 2024 08:25
Show Gist options
  • Save kng/cf1d121e1df6738213745f16385ca09c to your computer and use it in GitHub Desktop.
Save kng/cf1d121e1df6738213745f16385ca09c to your computer and use it in GitHub Desktop.
Flowgraph that takes SatNOGS IQ dump and produces a file with float DC offset
options:
parameters:
author: sa2kng
catch_exceptions: 'True'
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
generate_options: no_gui
hier_block_src_path: '.:'
id: rawint2dc_offset
max_nouts: '0'
output_language: python
placement: (0,0)
qt_qss_theme: ''
realtime_scheduling: ''
run: 'True'
run_command: '{python} -u {filename}'
run_options: run
sizing_mode: fixed
thread_safe_setters: ''
title: satnogs raw int16 to dc offset
window_size: 2*1080,1080
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 12.0]
rotation: 0
state: enabled
blocks:
- name: scale
id: variable
parameters:
comment: SatNOGS IQ dump scale
value: '16768'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [408, 308.0]
rotation: 0
state: enabled
- name: analog_quadrature_demod_cf_0_0_0_0
id: analog_quadrature_demod_cf
parameters:
affinity: ''
alias: ''
comment: ''
gain: '1.0'
maxoutbuf: '0'
minoutbuf: '0'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [824, 244.0]
rotation: 0
state: enabled
- name: average
id: parameter
parameters:
alias: ''
comment: ''
hide: none
label: average
short_id: a
type: intx
value: '1024'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1016, 12.0]
rotation: 0
state: enabled
- name: baudrate
id: parameter
parameters:
alias: ''
comment: ''
hide: none
label: baudrate
short_id: b
type: intx
value: '1200'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [624, 12.0]
rotation: 0
state: enabled
- name: blocks_file_sink_0
id: blocks_file_sink
parameters:
affinity: ''
alias: ''
append: 'False'
comment: ''
file: out_file
type: float
unbuffered: 'False'
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1208, 228.0]
rotation: 0
state: enabled
- name: blocks_file_source_0
id: blocks_file_source
parameters:
affinity: ''
alias: ''
begin_tag: pmt.PMT_NIL
comment: ''
file: in_file
length: '0'
maxoutbuf: '0'
minoutbuf: '0'
offset: '0'
repeat: 'False'
type: short
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [200, 212.0]
rotation: 0
state: enabled
- name: blocks_interleaved_short_to_complex_0
id: blocks_interleaved_short_to_complex
parameters:
affinity: ''
alias: ''
comment: ''
maxoutbuf: '0'
minoutbuf: '0'
scale_factor: scale
swap: 'False'
vector_input: 'False'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [408, 236.0]
rotation: 0
state: enabled
- name: blocks_moving_average_xx_0
id: blocks_moving_average_xx
parameters:
affinity: ''
alias: ''
comment: ''
length: average
max_iter: '4096'
maxoutbuf: '0'
minoutbuf: '0'
scale: 1.0/average
type: float
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1016, 220.0]
rotation: 0
state: enabled
- name: import_0
id: import
parameters:
alias: ''
comment: ''
imports: import math
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 156.0]
rotation: 0
state: enabled
- name: in_file
id: parameter
parameters:
alias: ''
comment: ''
hide: none
label: ''
short_id: i
type: str
value: ''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [211, 8]
rotation: 0
state: enabled
- name: low_pass_filter_0_0
id: low_pass_filter
parameters:
affinity: ''
alias: ''
beta: '6.76'
comment: "Perform a relaxed filter to increase \nthe performance of the auto frequency\n\
correction"
cutoff_freq: baudrate*1.25
decim: '1'
gain: '1'
interp: '1'
maxoutbuf: '0'
minoutbuf: '0'
samp_rate: samp_rate
type: fir_filter_ccf
width: baudrate / 2.0
win: window.WIN_HAMMING
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [624, 196.0]
rotation: 0
state: enabled
- name: out_file
id: parameter
parameters:
alias: ''
comment: ''
hide: none
label: ''
short_id: o
type: str
value: ''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [1208, 12.0]
rotation: 0
state: enabled
- name: samp_rate
id: parameter
parameters:
alias: ''
comment: ''
hide: none
label: sample rate
short_id: s
type: intx
value: '48000'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [408, 12.0]
rotation: 0
state: enabled
connections:
- [analog_quadrature_demod_cf_0_0_0_0, '0', blocks_moving_average_xx_0, '0']
- [blocks_file_source_0, '0', blocks_interleaved_short_to_complex_0, '0']
- [blocks_interleaved_short_to_complex_0, '0', low_pass_filter_0_0, '0']
- [blocks_moving_average_xx_0, '0', blocks_file_sink_0, '0']
- [low_pass_filter_0_0, '0', analog_quadrature_demod_cf_0_0_0_0, '0']
metadata:
file_format: 1
grc_version: 3.10.10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment