diff --git a/apps/flowgraphs/satellites/noaa_apt_decoder.grc b/apps/flowgraphs/satellites/noaa_apt_decoder.grc
index bd605e0..b162991 100644
--- a/apps/flowgraphs/satellites/noaa_apt_decoder.grc
+++ b/apps/flowgraphs/satellites/noaa_apt_decoder.grc
@@ -352,7 +352,7 @@ TX sampling rate
_coordinate
- (518, 634)
+ (494, 634)
_rotation
@@ -474,7 +474,7 @@ TX sampling rate
_coordinate
- (430, 634)
+ (414, 634)
_rotation
@@ -630,6 +630,49 @@ TX sampling rate
1000
+
+ parameter
+
+ alias
+
+
+
+ comment
+
+
+
+ _enabled
+ True
+
+
+ _coordinate
+ (183, 714)
+
+
+ _rotation
+ 180
+
+
+ id
+ file_path
+
+
+ label
+
+
+
+ short_id
+
+
+
+ type
+ string
+
+
+ value
+ /tmp/test.ogg
+
+
fir_filter_xxx
@@ -866,7 +909,7 @@ TX sampling rate
_coordinate
- (351, 634)
+ (343, 634)
_rotation
@@ -2284,7 +2327,7 @@ we shift the LO a little further
_coordinate
- (15, 223)
+ (31, 223)
_rotation
@@ -2548,6 +2591,65 @@ we shift the LO a little further
fff
+
+ rational_resampler_xxx
+
+ alias
+
+
+
+ comment
+
+
+
+ affinity
+
+
+
+ decim
+ int(samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth)) / audio_decimation)
+
+
+ _enabled
+ True
+
+
+ fbw
+ 0
+
+
+ _coordinate
+ (1172, 0)
+
+
+ _rotation
+ 0
+
+
+ id
+ rational_resampler_xxx_1
+
+
+ interp
+ 48000
+
+
+ maxoutbuf
+ 0
+
+
+ minoutbuf
+ 0
+
+
+ taps
+
+
+
+ type
+ fff
+
+
parameter
@@ -2564,7 +2666,7 @@ we shift the LO a little further
_coordinate
- (279, 634)
+ (271, 634)
_rotation
@@ -2822,6 +2924,49 @@ we shift the LO a little further
False
+
+ satnogs_ogg_encoder
+
+ alias
+
+
+
+ comment
+
+
+
+ affinity
+
+
+
+ _enabled
+ True
+
+
+ filename
+ file_path
+
+
+ _coordinate
+ (1420, 3)
+
+
+ _rotation
+ 0
+
+
+ id
+ satnogs_ogg_encoder_0
+
+
+ quality
+ 0.8
+
+
+ samp_rate
+ 48000
+
+
satnogs_tcp_rigctl_msg_source
@@ -2881,12 +3026,116 @@ we shift the LO a little further
1000
+
+ satnogs_waterfall_sink
+
+ alias
+
+
+
+ center_freq
+ 0.0
+
+
+ comment
+
+
+
+ affinity
+
+
+
+ _enabled
+ True
+
+
+ fft_size
+ 1024
+
+
+ filename
+ waterfall_file_path
+
+
+ _coordinate
+ (917, 0)
+
+
+ _rotation
+ 0
+
+
+ id
+ satnogs_waterfall_sink_0
+
+
+ mode
+ 0
+
+
+ pps
+ 8
+
+
+ samp_rate
+ samp_rate_rx/ ( first_stage_decimation * int(samp_rate_rx/ first_stage_decimation / initial_bandwidth))
+
+
+
+ parameter
+
+ alias
+
+
+
+ comment
+
+
+
+ _enabled
+ True
+
+
+ _coordinate
+ (335, 546)
+
+
+ _rotation
+ 0
+
+
+ id
+ waterfall_file_path
+
+
+ label
+
+
+
+ short_id
+
+
+
+ type
+ string
+
+
+ value
+ /tmp/waterfall.dat
+
+
analog_wfm_rcv_0
band_pass_filter_0
0
0
+
+ analog_wfm_rcv_0
+ rational_resampler_xxx_1
+ 0
+ 0
+
band_pass_filter_0
fir_filter_xxx_1
@@ -2905,6 +3154,12 @@ we shift the LO a little further
0
0
+
+ fir_filter_xxx_0
+ satnogs_waterfall_sink_0
+ 0
+ 0
+
fir_filter_xxx_1
rational_resampler_xxx_0
@@ -2941,6 +3196,12 @@ we shift the LO a little further
0
0
+
+ rational_resampler_xxx_1
+ satnogs_ogg_encoder_0
+ 0
+ 0
+
satnogs_coarse_doppler_correction_cc_0
fir_filter_xxx_0
diff --git a/apps/flowgraphs/satellites/satnogs_noaa_apt_decoder.py b/apps/flowgraphs/satellites/satnogs_noaa_apt_decoder.py
index 00e2a1b..0aa8aa9 100755
--- a/apps/flowgraphs/satellites/satnogs_noaa_apt_decoder.py
+++ b/apps/flowgraphs/satellites/satnogs_noaa_apt_decoder.py
@@ -5,7 +5,7 @@
# Title: NOAA APT Decoder
# Author: Manolis Surligas, George Vardakis
# 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
@@ -23,24 +23,26 @@ import time
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")
##################################################
# Parameters
##################################################
+ self.antenna = antenna
+ self.bb_gain = bb_gain
+ self.dev_args = dev_args
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.lo_offset = lo_offset
self.ppm = ppm
+ self.rf_gain = rf_gain
self.rigctl_port = rigctl_port
self.rx_freq = rx_freq
self.rx_sdr_device = rx_sdr_device
- self.if_gain = if_gain
- self.rf_gain = rf_gain
- self.dev_args = dev_args
- self.bb_gain = bb_gain
- self.antenna = antenna
+ self.waterfall_file_path = waterfall_file_path
##################################################
# Variables
@@ -59,9 +61,17 @@ class satnogs_noaa_apt_decoder(gr.top_block):
##################################################
# 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_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_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(
interpolation=4160,
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.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.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.satnogs_waterfall_sink_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.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.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_1, 0), (self.satnogs_ogg_encoder_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):
return 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
+ 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):
return self.image_file_path
@@ -144,6 +190,13 @@ class satnogs_noaa_apt_decoder(gr.top_block):
self.ppm = ppm
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):
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_antenna(satnogs.handle_rx_antenna(self.rx_sdr_device, self.antenna), 0)
- def get_if_gain(self):
- return self.if_gain
+ def get_waterfall_file_path(self):
+ return self.waterfall_file_path
- 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_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 set_waterfall_file_path(self, waterfall_file_path):
+ self.waterfall_file_path = waterfall_file_path
def get_samp_rate_rx(self):
return self.samp_rate_rx
@@ -251,9 +276,24 @@ class satnogs_noaa_apt_decoder(gr.top_block):
def argument_parser():
description = 'A NOAA APT Decoder with automatic image synchronization'
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(
"", "--doppler-correction-per-sec", dest="doppler_correction_per_sec", type="intx", default=1000,
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(
"", "--image-file-path", dest="image_file_path", type="string", default='/tmp/noaa.png',
help="Set image_file_path [default=%default]")
@@ -263,6 +303,9 @@ def argument_parser():
parser.add_option(
"", "--ppm", dest="ppm", type="intx", default=0,
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(
"", "--rigctl-port", dest="rigctl_port", type="intx", default=4532,
help="Set rigctl_port [default=%default]")
@@ -273,20 +316,8 @@ def argument_parser():
"", "--rx-sdr-device", dest="rx_sdr_device", type="string", default='usrpb200',
help="Set rx_sdr_device [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(
- "", "--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]")
+ "", "--waterfall-file-path", dest="waterfall_file_path", type="string", default='/tmp/waterfall.dat',
+ help="Set waterfall_file_path [default=%default]")
return parser
@@ -294,7 +325,7 @@ def main(top_block_cls=satnogs_noaa_apt_decoder, options=None):
if options is None:
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.wait()