Commit 255277f7 authored by Patrick Dohmen's avatar Patrick Dohmen Committed by Manolis Surligas

Add missing parameter "udp_IP"

Added the missing parameter "udp_IP" to get the UDP sink working.

Fixes issue #131
parent 61501694
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.13'?>
<?grc format='1' created='3.7.11'?>
<flow_graph>
<timestamp>Thu May 5 00:22:45 2016</timestamp>
<block>
......@@ -72,10 +72,6 @@
<key>run</key>
<value>True</value>
</param>
<param>
<key>sizing_mode</key>
<value>fixed</value>
</param>
<param>
<key>thread_safe_setters</key>
<value></value>
......@@ -84,10 +80,6 @@
<key>title</key>
<value>AMSAT FOX DUV Decoder</value>
</param>
<param>
<key>placement</key>
<value>(0,0)</value>
</param>
</block>
<block>
<key>variable</key>
......@@ -290,10 +282,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -319,7 +307,7 @@
</param>
<param>
<key>_coordinate</key>
<value>(160, 1028)</value>
<value>(216, 1028)</value>
</param>
<param>
<key>_rotation</key>
......@@ -337,10 +325,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -384,10 +368,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -525,10 +505,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -572,10 +548,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -721,10 +693,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>intx</value>
......@@ -768,10 +736,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>intx</value>
......@@ -815,10 +779,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -862,10 +822,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -909,10 +865,6 @@
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -957,10 +909,6 @@ we shift the LO a little further</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -2627,10 +2575,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>intx</value>
......@@ -2656,7 +2600,7 @@ max_modulation_freq = 3000</value>
</param>
<param>
<key>_coordinate</key>
<value>(143, 945)</value>
<value>(128, 948)</value>
</param>
<param>
<key>_rotation</key>
......@@ -2674,10 +2618,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -2721,10 +2661,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>intx</value>
......@@ -2839,10 +2775,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -2886,10 +2818,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......@@ -2933,10 +2861,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>eng_float</value>
......@@ -3467,7 +3391,7 @@ max_modulation_freq = 3000</value>
</param>
<param>
<key>_coordinate</key>
<value>(296, 1028)</value>
<value>(392, 1028)</value>
</param>
<param>
<key>_rotation</key>
......@@ -3475,7 +3399,7 @@ max_modulation_freq = 3000</value>
</param>
<param>
<key>id</key>
<value>udp_port</value>
<value>udp_IP</value>
</param>
<param>
<key>label</key>
......@@ -3486,8 +3410,47 @@ max_modulation_freq = 3000</value>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
<key>type</key>
<value>string</value>
</param>
<param>
<key>value</key>
<value>127.0.0.1</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>(296, 1028)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
<param>
<key>id</key>
<value>udp_port</value>
</param>
<param>
<key>label</key>
<value></value>
</param>
<param>
<key>short_id</key>
<value></value>
</param>
<param>
<key>type</key>
......@@ -3532,10 +3495,6 @@ max_modulation_freq = 3000</value>
<key>short_id</key>
<value></value>
</param>
<param>
<key>hide</key>
<value>none</value>
</param>
<param>
<key>type</key>
<value>string</value>
......
......@@ -5,9 +5,10 @@
# Title: AMSAT FOX DUV Decoder
# Author: Thanos Giolias (agiolias@csd.uoc.gr), Nikos Karamolegos (karamolegkos.n@gmail.com), Manolis Surligas (surligas@gmail.com)
# Description: A DUV Decoder for the AMSAT FOX satellites
# Generated: Sun Aug 19 21:41:34 2018
# Generated: Wed Sep 5 12:05:57 2018
##################################################
from gnuradio import analog
from gnuradio import blocks
from gnuradio import digital
......@@ -26,7 +27,7 @@ import time
class satnogs_amsat_fox_duv_decoder(gr.top_block):
def __init__(self, antenna=satnogs.not_set_antenna, baudrate=9600.0, bb_gain=satnogs.not_set_rx_bb_gain, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.ogg', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', samp_rate_rx=satnogs.not_set_samp_rate_rx, udp_port=16887, waterfall_file_path='/tmp/waterfall.dat'):
def __init__(self, antenna=satnogs.not_set_antenna, baudrate=9600.0, bb_gain=satnogs.not_set_rx_bb_gain, decoded_data_file_path='/tmp/.satnogs/data/data', dev_args=satnogs.not_set_dev_args, doppler_correction_per_sec=20, enable_iq_dump=0, file_path='test.ogg', if_gain=satnogs.not_set_rx_if_gain, iq_file_path='/tmp/iq.dat', lo_offset=100e3, ppm=0, rf_gain=satnogs.not_set_rx_rf_gain, rigctl_port=4532, rx_freq=100e6, rx_sdr_device='usrpb200', samp_rate_rx=satnogs.not_set_samp_rate_rx, udp_IP='127.0.0.1', udp_port=16887, waterfall_file_path='/tmp/waterfall.dat'):
gr.top_block.__init__(self, "AMSAT FOX DUV Decoder")
##################################################
......@@ -49,6 +50,7 @@ class satnogs_amsat_fox_duv_decoder(gr.top_block):
self.rx_freq = rx_freq
self.rx_sdr_device = rx_sdr_device
self.samp_rate_rx = samp_rate_rx
self.udp_IP = udp_IP
self.udp_port = udp_port
self.waterfall_file_path = waterfall_file_path
......@@ -63,7 +65,7 @@ class satnogs_amsat_fox_duv_decoder(gr.top_block):
# Blocks
##################################################
self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 10, 1024, waterfall_file_path, 1)
self.satnogs_udp_msg_sink_0_0 = satnogs.udp_msg_sink('udp_IP', udp_port, 1500)
self.satnogs_udp_msg_sink_0_0 = satnogs.udp_msg_sink(udp_IP, udp_port, 1500)
self.satnogs_tcp_rigctl_msg_source_0 = satnogs.tcp_rigctl_msg_source("127.0.0.1", rigctl_port, False, 1000, 1500)
self.satnogs_quad_demod_filter_ff_0 = satnogs.quad_demod_filter_ff(1.2)
self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0)
......@@ -106,8 +108,6 @@ class satnogs_amsat_fox_duv_decoder(gr.top_block):
self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2)
self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(1.0)
##################################################
# Connections
##################################################
......@@ -256,6 +256,12 @@ class satnogs_amsat_fox_duv_decoder(gr.top_block):
self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx), 0)
self.blocks_rotator_cc_0.set_phase_inc(-2.0 * math.pi * (self.lo_offset / satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)))
def get_udp_IP(self):
return self.udp_IP
def set_udp_IP(self, udp_IP):
self.udp_IP = udp_IP
def get_udp_port(self):
return self.udp_port
......@@ -347,6 +353,9 @@ def argument_parser():
parser.add_option(
"", "--samp-rate-rx", dest="samp_rate_rx", type="eng_float", default=eng_notation.num_to_str(satnogs.not_set_samp_rate_rx),
help="Set samp_rate_rx [default=%default]")
parser.add_option(
"", "--udp-IP", dest="udp_IP", type="string", default='127.0.0.1',
help="Set udp_IP [default=%default]")
parser.add_option(
"", "--udp-port", dest="udp_port", type="intx", default=16887,
help="Set udp_port [default=%default]")
......@@ -360,7 +369,7 @@ def main(top_block_cls=satnogs_amsat_fox_duv_decoder, options=None):
if options is None:
options, _ = argument_parser().parse_args()
tb = top_block_cls(antenna=options.antenna, baudrate=options.baudrate, bb_gain=options.bb_gain, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_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, samp_rate_rx=options.samp_rate_rx, udp_port=options.udp_port, waterfall_file_path=options.waterfall_file_path)
tb = top_block_cls(antenna=options.antenna, baudrate=options.baudrate, bb_gain=options.bb_gain, decoded_data_file_path=options.decoded_data_file_path, dev_args=options.dev_args, doppler_correction_per_sec=options.doppler_correction_per_sec, enable_iq_dump=options.enable_iq_dump, file_path=options.file_path, if_gain=options.if_gain, iq_file_path=options.iq_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, samp_rate_rx=options.samp_rate_rx, udp_IP=options.udp_IP, udp_port=options.udp_port, waterfall_file_path=options.waterfall_file_path)
tb.start()
tb.wait()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment