Add waterfall and Ogg sink at the NOAA decoder flowgraph
This commit is contained in:
parent
536440d9fd
commit
c2b66c5887
|
@ -352,7 +352,7 @@ TX sampling rate</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(518, 634)</value>
|
<value>(494, 634)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -474,7 +474,7 @@ TX sampling rate</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(430, 634)</value>
|
<value>(414, 634)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -630,6 +630,49 @@ TX sampling rate</value>
|
||||||
<value>1000</value>
|
<value>1000</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(183, 714)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>180</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>file_path</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>string</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>/tmp/test.ogg</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>fir_filter_xxx</key>
|
<key>fir_filter_xxx</key>
|
||||||
<param>
|
<param>
|
||||||
|
@ -866,7 +909,7 @@ TX sampling rate</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(351, 634)</value>
|
<value>(343, 634)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -2284,7 +2327,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(15, 223)</value>
|
<value>(31, 223)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -2548,6 +2591,65 @@ we shift the LO a little further</value>
|
||||||
<value>fff</value>
|
<value>fff</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>rational_resampler_xxx</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>affinity</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>decim</key>
|
||||||
|
<value>int(samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth)) / audio_decimation)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>fbw</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(1172, 0)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>rational_resampler_xxx_1</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>interp</key>
|
||||||
|
<value>48000</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>maxoutbuf</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>minoutbuf</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>taps</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>fff</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>parameter</key>
|
<key>parameter</key>
|
||||||
<param>
|
<param>
|
||||||
|
@ -2564,7 +2666,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(279, 634)</value>
|
<value>(271, 634)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -2822,6 +2924,49 @@ we shift the LO a little further</value>
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>satnogs_ogg_encoder</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>affinity</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>filename</key>
|
||||||
|
<value>file_path</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(1420, 3)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>satnogs_ogg_encoder_0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>quality</key>
|
||||||
|
<value>0.8</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>samp_rate</key>
|
||||||
|
<value>48000</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>satnogs_tcp_rigctl_msg_source</key>
|
<key>satnogs_tcp_rigctl_msg_source</key>
|
||||||
<param>
|
<param>
|
||||||
|
@ -2881,12 +3026,116 @@ we shift the LO a little further</value>
|
||||||
<value>1000</value>
|
<value>1000</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>satnogs_waterfall_sink</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>center_freq</key>
|
||||||
|
<value>0.0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>affinity</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>fft_size</key>
|
||||||
|
<value>1024</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>filename</key>
|
||||||
|
<value>waterfall_file_path</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(917, 0)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>satnogs_waterfall_sink_0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>mode</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>pps</key>
|
||||||
|
<value>8</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>samp_rate</key>
|
||||||
|
<value>samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth))</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(335, 546)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>waterfall_file_path</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>string</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>/tmp/waterfall.dat</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>analog_wfm_rcv_0</source_block_id>
|
<source_block_id>analog_wfm_rcv_0</source_block_id>
|
||||||
<sink_block_id>band_pass_filter_0</sink_block_id>
|
<sink_block_id>band_pass_filter_0</sink_block_id>
|
||||||
<source_key>0</source_key>
|
<source_key>0</source_key>
|
||||||
<sink_key>0</sink_key>
|
<sink_key>0</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>analog_wfm_rcv_0</source_block_id>
|
||||||
|
<sink_block_id>rational_resampler_xxx_1</sink_block_id>
|
||||||
|
<source_key>0</source_key>
|
||||||
|
<sink_key>0</sink_key>
|
||||||
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>band_pass_filter_0</source_block_id>
|
<source_block_id>band_pass_filter_0</source_block_id>
|
||||||
<sink_block_id>fir_filter_xxx_1</sink_block_id>
|
<sink_block_id>fir_filter_xxx_1</sink_block_id>
|
||||||
|
@ -2905,6 +3154,12 @@ we shift the LO a little further</value>
|
||||||
<source_key>0</source_key>
|
<source_key>0</source_key>
|
||||||
<sink_key>0</sink_key>
|
<sink_key>0</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>fir_filter_xxx_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_waterfall_sink_0</sink_block_id>
|
||||||
|
<source_key>0</source_key>
|
||||||
|
<sink_key>0</sink_key>
|
||||||
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>fir_filter_xxx_1</source_block_id>
|
<source_block_id>fir_filter_xxx_1</source_block_id>
|
||||||
<sink_block_id>rational_resampler_xxx_0</sink_block_id>
|
<sink_block_id>rational_resampler_xxx_0</sink_block_id>
|
||||||
|
@ -2941,6 +3196,12 @@ we shift the LO a little further</value>
|
||||||
<source_key>0</source_key>
|
<source_key>0</source_key>
|
||||||
<sink_key>0</sink_key>
|
<sink_key>0</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>rational_resampler_xxx_1</source_block_id>
|
||||||
|
<sink_block_id>satnogs_ogg_encoder_0</sink_block_id>
|
||||||
|
<source_key>0</source_key>
|
||||||
|
<sink_key>0</sink_key>
|
||||||
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>satnogs_coarse_doppler_correction_cc_0</source_block_id>
|
<source_block_id>satnogs_coarse_doppler_correction_cc_0</source_block_id>
|
||||||
<sink_block_id>fir_filter_xxx_0</sink_block_id>
|
<sink_block_id>fir_filter_xxx_0</sink_block_id>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Title: NOAA APT Decoder
|
# Title: NOAA APT Decoder
|
||||||
# Author: Manolis Surligas, George Vardakis
|
# Author: Manolis Surligas, George Vardakis
|
||||||
# Description: A NOAA APT Decoder with automatic image synchronization
|
# Description: A NOAA APT Decoder with automatic image synchronization
|
||||||
# Generated: Thu Jul 20 22:29:00 2017
|
# Generated: Fri Jul 21 18:34:01 2017
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
from gnuradio import analog
|
from gnuradio import analog
|
||||||
|
@ -23,24 +23,26 @@ import time
|
||||||
|
|
||||||
class satnogs_noaa_apt_decoder(gr.top_block):
|
class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
|
|
||||||
def __init__(self, doppler_correction_per_sec=1000, image_file_path='/tmp/noaa.png', lo_offset=100e3, ppm=0, rigctl_port=4532, rx_freq=90.4e6, rx_sdr_device='usrpb200', if_gain=satnogs.not_set_rx_if_gain, rf_gain=satnogs.not_set_rx_rf_gain, dev_args=satnogs.not_set_dev_args, bb_gain=satnogs.not_set_rx_bb_gain, antenna=satnogs.not_set_antenna):
|
def __init__(self, antenna=satnogs.not_set_antenna, bb_gain=satnogs.not_set_rx_bb_gain, dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=1000, file_path='/tmp/test.ogg', if_gain=satnogs.not_set_rx_if_gain, image_file_path='/tmp/noaa.png', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=90.4e6, rx_sdr_device='usrpb200', waterfall_file_path='/tmp/waterfall.dat'):
|
||||||
gr.top_block.__init__(self, "NOAA APT Decoder")
|
gr.top_block.__init__(self, "NOAA APT Decoder")
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Parameters
|
# Parameters
|
||||||
##################################################
|
##################################################
|
||||||
|
self.antenna = antenna
|
||||||
|
self.bb_gain = bb_gain
|
||||||
|
self.dev_args = dev_args
|
||||||
self.doppler_correction_per_sec = doppler_correction_per_sec
|
self.doppler_correction_per_sec = doppler_correction_per_sec
|
||||||
|
self.file_path = file_path
|
||||||
|
self.if_gain = if_gain
|
||||||
self.image_file_path = image_file_path
|
self.image_file_path = image_file_path
|
||||||
self.lo_offset = lo_offset
|
self.lo_offset = lo_offset
|
||||||
self.ppm = ppm
|
self.ppm = ppm
|
||||||
|
self.rf_gain = rf_gain
|
||||||
self.rigctl_port = rigctl_port
|
self.rigctl_port = rigctl_port
|
||||||
self.rx_freq = rx_freq
|
self.rx_freq = rx_freq
|
||||||
self.rx_sdr_device = rx_sdr_device
|
self.rx_sdr_device = rx_sdr_device
|
||||||
self.if_gain = if_gain
|
self.waterfall_file_path = waterfall_file_path
|
||||||
self.rf_gain = rf_gain
|
|
||||||
self.dev_args = dev_args
|
|
||||||
self.bb_gain = bb_gain
|
|
||||||
self.antenna = antenna
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Variables
|
# Variables
|
||||||
|
@ -59,9 +61,17 @@ class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
# Blocks
|
# Blocks
|
||||||
##################################################
|
##################################################
|
||||||
|
self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth)), 0.0, 8, 1024, waterfall_file_path, 0)
|
||||||
self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500)
|
self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500)
|
||||||
|
self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, 48000, 0.8)
|
||||||
self.satnogs_noaa_apt_sink_0 = satnogs.noaa_apt_sink(image_file_path, 2080, 1500, True, False, False)
|
self.satnogs_noaa_apt_sink_0 = satnogs.noaa_apt_sink(image_file_path, 2080, 1500, True, False, False)
|
||||||
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, samp_rate_rx /first_stage_decimation)
|
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, samp_rate_rx /first_stage_decimation)
|
||||||
|
self.rational_resampler_xxx_1 = filter.rational_resampler_fff(
|
||||||
|
interpolation=48000,
|
||||||
|
decimation=int(samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth)) / audio_decimation),
|
||||||
|
taps=None,
|
||||||
|
fractional_bw=None,
|
||||||
|
)
|
||||||
self.rational_resampler_xxx_0_0 = filter.rational_resampler_fff(
|
self.rational_resampler_xxx_0_0 = filter.rational_resampler_fff(
|
||||||
interpolation=4160,
|
interpolation=4160,
|
||||||
decimation=9600,
|
decimation=9600,
|
||||||
|
@ -106,23 +116,59 @@ class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq'))
|
self.msg_connect((self.satnogs_tcp_rigctl_msg_source_0, 'freq'), (self.satnogs_coarse_doppler_correction_cc_0, 'freq'))
|
||||||
self.connect((self.analog_wfm_rcv_0, 0), (self.band_pass_filter_0, 0))
|
self.connect((self.analog_wfm_rcv_0, 0), (self.band_pass_filter_0, 0))
|
||||||
|
self.connect((self.analog_wfm_rcv_0, 0), (self.rational_resampler_xxx_1, 0))
|
||||||
self.connect((self.band_pass_filter_0, 0), (self.fir_filter_xxx_1, 0))
|
self.connect((self.band_pass_filter_0, 0), (self.fir_filter_xxx_1, 0))
|
||||||
self.connect((self.blocks_complex_to_mag_0, 0), (self.rational_resampler_xxx_0_0, 0))
|
self.connect((self.blocks_complex_to_mag_0, 0), (self.rational_resampler_xxx_0_0, 0))
|
||||||
self.connect((self.fir_filter_xxx_0, 0), (self.analog_wfm_rcv_0, 0))
|
self.connect((self.fir_filter_xxx_0, 0), (self.analog_wfm_rcv_0, 0))
|
||||||
|
self.connect((self.fir_filter_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0))
|
||||||
self.connect((self.fir_filter_xxx_1, 0), (self.rational_resampler_xxx_0, 0))
|
self.connect((self.fir_filter_xxx_1, 0), (self.rational_resampler_xxx_0, 0))
|
||||||
self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
|
self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
|
||||||
self.connect((self.hilbert_fc_0, 0), (self.blocks_complex_to_mag_0, 0))
|
self.connect((self.hilbert_fc_0, 0), (self.blocks_complex_to_mag_0, 0))
|
||||||
self.connect((self.osmosdr_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
|
self.connect((self.osmosdr_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
|
||||||
self.connect((self.rational_resampler_xxx_0, 0), (self.hilbert_fc_0, 0))
|
self.connect((self.rational_resampler_xxx_0, 0), (self.hilbert_fc_0, 0))
|
||||||
self.connect((self.rational_resampler_xxx_0_0, 0), (self.satnogs_noaa_apt_sink_0, 0))
|
self.connect((self.rational_resampler_xxx_0_0, 0), (self.satnogs_noaa_apt_sink_0, 0))
|
||||||
|
self.connect((self.rational_resampler_xxx_1, 0), (self.satnogs_ogg_encoder_0, 0))
|
||||||
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.fir_filter_xxx_0, 0))
|
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.fir_filter_xxx_0, 0))
|
||||||
|
|
||||||
|
def get_antenna(self):
|
||||||
|
return self.antenna
|
||||||
|
|
||||||
|
def set_antenna(self, antenna):
|
||||||
|
self.antenna = antenna
|
||||||
|
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0)
|
||||||
|
|
||||||
|
def get_bb_gain(self):
|
||||||
|
return self.bb_gain
|
||||||
|
|
||||||
|
def set_bb_gain(self, bb_gain):
|
||||||
|
self.bb_gain = bb_gain
|
||||||
|
self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0)
|
||||||
|
|
||||||
|
def get_dev_args(self):
|
||||||
|
return self.dev_args
|
||||||
|
|
||||||
|
def set_dev_args(self, dev_args):
|
||||||
|
self.dev_args = dev_args
|
||||||
|
|
||||||
def get_doppler_correction_per_sec(self):
|
def get_doppler_correction_per_sec(self):
|
||||||
return self.doppler_correction_per_sec
|
return self.doppler_correction_per_sec
|
||||||
|
|
||||||
def set_doppler_correction_per_sec(self, doppler_correction_per_sec):
|
def set_doppler_correction_per_sec(self, doppler_correction_per_sec):
|
||||||
self.doppler_correction_per_sec = doppler_correction_per_sec
|
self.doppler_correction_per_sec = doppler_correction_per_sec
|
||||||
|
|
||||||
|
def get_file_path(self):
|
||||||
|
return self.file_path
|
||||||
|
|
||||||
|
def set_file_path(self, file_path):
|
||||||
|
self.file_path = file_path
|
||||||
|
|
||||||
|
def get_if_gain(self):
|
||||||
|
return self.if_gain
|
||||||
|
|
||||||
|
def set_if_gain(self, if_gain):
|
||||||
|
self.if_gain = if_gain
|
||||||
|
self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0)
|
||||||
|
|
||||||
def get_image_file_path(self):
|
def get_image_file_path(self):
|
||||||
return self.image_file_path
|
return self.image_file_path
|
||||||
|
|
||||||
|
@ -144,6 +190,13 @@ class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
self.ppm = ppm
|
self.ppm = ppm
|
||||||
self.osmosdr_source_0.set_freq_corr(self.ppm, 0)
|
self.osmosdr_source_0.set_freq_corr(self.ppm, 0)
|
||||||
|
|
||||||
|
def get_rf_gain(self):
|
||||||
|
return self.rf_gain
|
||||||
|
|
||||||
|
def set_rf_gain(self, rf_gain):
|
||||||
|
self.rf_gain = rf_gain
|
||||||
|
self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(self.rx_sdr_device, self.rf_gain), 0)
|
||||||
|
|
||||||
def get_rigctl_port(self):
|
def get_rigctl_port(self):
|
||||||
return self.rigctl_port
|
return self.rigctl_port
|
||||||
|
|
||||||
|
@ -169,39 +222,11 @@ class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0)
|
self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0)
|
||||||
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0)
|
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0)
|
||||||
|
|
||||||
def get_if_gain(self):
|
def get_waterfall_file_path(self):
|
||||||
return self.if_gain
|
return self.waterfall_file_path
|
||||||
|
|
||||||
def set_if_gain(self, if_gain):
|
def set_waterfall_file_path(self, waterfall_file_path):
|
||||||
self.if_gain = if_gain
|
self.waterfall_file_path = waterfall_file_path
|
||||||
self.osmosdr_source_0.set_if_gain(satnogs.handle_rx_if_gain(self.rx_sdr_device, self.if_gain), 0)
|
|
||||||
|
|
||||||
def get_rf_gain(self):
|
|
||||||
return self.rf_gain
|
|
||||||
|
|
||||||
def set_rf_gain(self, rf_gain):
|
|
||||||
self.rf_gain = rf_gain
|
|
||||||
self.osmosdr_source_0.set_gain(satnogs.handle_rx_rf_gain(self.rx_sdr_device, self.rf_gain), 0)
|
|
||||||
|
|
||||||
def get_dev_args(self):
|
|
||||||
return self.dev_args
|
|
||||||
|
|
||||||
def set_dev_args(self, dev_args):
|
|
||||||
self.dev_args = dev_args
|
|
||||||
|
|
||||||
def get_bb_gain(self):
|
|
||||||
return self.bb_gain
|
|
||||||
|
|
||||||
def set_bb_gain(self, bb_gain):
|
|
||||||
self.bb_gain = bb_gain
|
|
||||||
self.osmosdr_source_0.set_bb_gain(satnogs.handle_rx_bb_gain(self.rx_sdr_device, self.bb_gain), 0)
|
|
||||||
|
|
||||||
def get_antenna(self):
|
|
||||||
return self.antenna
|
|
||||||
|
|
||||||
def set_antenna(self, antenna):
|
|
||||||
self.antenna = antenna
|
|
||||||
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0)
|
|
||||||
|
|
||||||
def get_samp_rate_rx(self):
|
def get_samp_rate_rx(self):
|
||||||
return self.samp_rate_rx
|
return self.samp_rate_rx
|
||||||
|
@ -251,9 +276,24 @@ class satnogs_noaa_apt_decoder(gr.top_block):
|
||||||
def argument_parser():
|
def argument_parser():
|
||||||
description = 'A NOAA APT Decoder with automatic image synchronization'
|
description = 'A NOAA APT Decoder with automatic image synchronization'
|
||||||
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
|
parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description)
|
||||||
|
parser.add_option(
|
||||||
|
"", "--antenna", dest="antenna", type="string", default=satnogs.not_set_antenna,
|
||||||
|
help="Set antenna [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain),
|
||||||
|
help="Set bb_gain [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args,
|
||||||
|
help="Set dev_args [default=%default]")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=1000,
|
"", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=1000,
|
||||||
help="Set doppler_correction_per_sec [default=%default]")
|
help="Set doppler_correction_per_sec [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--file-path", dest="file_path", type="string", default='/tmp/test.ogg',
|
||||||
|
help="Set file_path [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain),
|
||||||
|
help="Set if_gain [default=%default]")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--image-file-path", dest="image_file_path", type="string", default='/tmp/noaa.png',
|
"", "--image-file-path", dest="image_file_path", type="string", default='/tmp/noaa.png',
|
||||||
help="Set image_file_path [default=%default]")
|
help="Set image_file_path [default=%default]")
|
||||||
|
@ -263,6 +303,9 @@ def argument_parser():
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--ppm", dest="ppm", type="intx", default=0,
|
"", "--ppm", dest="ppm", type="intx", default=0,
|
||||||
help="Set ppm [default=%default]")
|
help="Set ppm [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_rf_gain),
|
||||||
|
help="Set rf_gain [default=%default]")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--rigctl-port", dest="rigctl_port", type="intx", default=4532,
|
"", "--rigctl-port", dest="rigctl_port", type="intx", default=4532,
|
||||||
help="Set rigctl_port [default=%default]")
|
help="Set rigctl_port [default=%default]")
|
||||||
|
@ -273,20 +316,8 @@ def argument_parser():
|
||||||
"", "--rx-sdr-device", dest="rx_sdr_device", type="string", default='usrpb200',
|
"", "--rx-sdr-device", dest="rx_sdr_device", type="string", default='usrpb200',
|
||||||
help="Set rx_sdr_device [default=%default]")
|
help="Set rx_sdr_device [default=%default]")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--if-gain", dest="if_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_if_gain),
|
"", "--waterfall-file-path", dest="waterfall_file_path", type="string", default='/tmp/waterfall.dat',
|
||||||
help="Set if_gain [default=%default]")
|
help="Set waterfall_file_path [default=%default]")
|
||||||
parser.add_option(
|
|
||||||
"", "--rf-gain", dest="rf_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_rf_gain),
|
|
||||||
help="Set rf_gain [default=%default]")
|
|
||||||
parser.add_option(
|
|
||||||
"", "--dev-args", dest="dev_args", type="string", default=satnogs.not_set_dev_args,
|
|
||||||
help="Set dev_args [default=%default]")
|
|
||||||
parser.add_option(
|
|
||||||
"", "--bb-gain", dest="bb_gain", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_rx_bb_gain),
|
|
||||||
help="Set bb_gain [default=%default]")
|
|
||||||
parser.add_option(
|
|
||||||
"", "--antenna", dest="antenna", type="string", default=satnogs.not_set_antenna,
|
|
||||||
help="Set antenna [default=%default]")
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -294,7 +325,7 @@ def main(top_block_cls=satnogs_noaa_apt_decoder, options=None):
|
||||||
if options is None:
|
if options is None:
|
||||||
options, _ = argument_parser().parse_args()
|
options, _ = argument_parser().parse_args()
|
||||||
|
|
||||||
tb = top_block_cls(doppler_correction_per_sec=options.doppler_correction_per_sec, image_file_path=options.image_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, if_gain=options.if_gain, rf_gain=options.rf_gain, dev_args=options.dev_args, bb_gain=options.bb_gain, antenna=options.antenna)
|
tb = top_block_cls(antenna=options.antenna, bb_gain=options.bb_gain, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, file_path=options.file_path, if_gain=options.if_gain, image_file_path=options.image_file_path, lo_offset=options.lo_offset, ppm=options.ppm, rf_gain=options.rf_gain, rigctl_port=options.rigctl_port, rx_freq=options.rx_freq, rx_sdr_device=options.rx_sdr_device, waterfall_file_path=options.waterfall_file_path)
|
||||||
tb.start()
|
tb.start()
|
||||||
tb.wait()
|
tb.wait()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue