...
 
Commits (16)
...@@ -48,7 +48,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) ...@@ -48,7 +48,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
# Set the version information here # Set the version information here
set(VERSION_INFO_MAJOR_VERSION 1) set(VERSION_INFO_MAJOR_VERSION 1)
set(VERSION_INFO_API_COMPAT 5) set(VERSION_INFO_API_COMPAT 5)
set(VERSION_INFO_MINOR_VERSION 0) set(VERSION_INFO_MINOR_VERSION 1)
set(VERSION_INFO_MAINT_VERSION git) set(VERSION_INFO_MAINT_VERSION git)
......
...@@ -14,6 +14,7 @@ for decoding signals from various scientific and academic sattelites. ...@@ -14,6 +14,7 @@ for decoding signals from various scientific and academic sattelites.
* libpng * libpng
* libpng++ * libpng++
* git * git
* swig
**Optional** **Optional**
* gr-osmocom (for using the flowgraphs with real SDR hardware) * gr-osmocom (for using the flowgraphs with real SDR hardware)
...@@ -23,14 +24,15 @@ for decoding signals from various scientific and academic sattelites. ...@@ -23,14 +24,15 @@ for decoding signals from various scientific and academic sattelites.
``` ```
apt install -y build-essential cmake gnuradio g++ \ apt install -y build-essential cmake gnuradio g++ \
python-mako python-six libogg-dev \ python-mako python-six libogg-dev \
libvorbis-dev libpng-dev libpng++-dev libvorbis-dev libpng-dev libpng++-dev \
swig
cd /tmp cd /tmp
git clone https://github.com/gnuradio/volk.git git clone https://github.com/gnuradio/volk.git
cd volk cd volk
mkdir build mkdir build
cd build cd build
cmake .. cmake ..
make -j 8 make -j $(nproc --all)
sudo make install sudo make install
``` ```
...@@ -41,7 +43,7 @@ sudo make install ...@@ -41,7 +43,7 @@ sudo make install
3. `mkdir build` 3. `mkdir build`
4. `cd build` 4. `cd build`
5. `cmake ..` 5. `cmake ..`
6. `make` 6. `make -j $(nproc --all)`
7. `sudo make install` 7. `sudo make install`
If this is the first time you are building the gr-satnogs module run If this is the first time you are building the gr-satnogs module run
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
# Title: satnogs_reaktor_hello_world_fsk9600_decoder # Title: satnogs_reaktor_hello_world_fsk9600_decoder
# Author: Manolis Surligas (surligas@gmail.com) # Author: Manolis Surligas (surligas@gmail.com)
# Description: FSK 9600 Decoder for the Reaktor-Hello-World satellite # Description: FSK 9600 Decoder for the Reaktor-Hello-World satellite
# Generated: Mon Dec 3 11:51:46 2018 # GNU Radio version: 3.7.13.5
################################################## ##################################################
from gnuradio import analog from gnuradio import analog
from gnuradio import blocks from gnuradio import blocks
from gnuradio import digital from gnuradio import digital
...@@ -70,11 +71,11 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): ...@@ -70,11 +71,11 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0) self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0)
self.satnogs_frame_acquisition_0 = satnogs.frame_acquisition(1, [0xAA, 0xAA, 0xAA, 0xAA], 4, [0x35, 0x2E, 0x35, 0x2E], 3, 1, 256, 3, variable_whitening_0, 2048) self.satnogs_frame_acquisition_0 = satnogs.frame_acquisition(1, [0xAA, 0xAA, 0xAA, 0xAA], 4, [0x35, 0x2E, 0x35, 0x2E], 3, 1, 256, 3, variable_whitening_0, 2048)
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)) self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))
self.pfb_arb_resampler_xxx_0_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0_0_0 = pfb.arb_resampler_ccf(
(2.0*baudrate)/audio_samp_rate, (2.0*baudrate)/audio_samp_rate,
taps=None, taps=None,
flt_size=32) flt_size=32)
self.pfb_arb_resampler_xxx_0_0.declare_sample_delay(0) self.pfb_arb_resampler_xxx_0_0_0.declare_sample_delay(0)
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf(
audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx),
...@@ -95,13 +96,22 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): ...@@ -95,13 +96,22 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0) self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0)
self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0) self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0)
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 0.25*0.175*0.175, 0.5, 0.175, 0.005) self.low_pass_filter_1 = filter.fir_filter_fff(1, firdes.low_pass(
1, 2 * baudrate, baudrate * 0.60, baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass(
1, audio_samp_rate, 0.75 * baudrate, 1000, firdes.WIN_HAMMING, 6.76))
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 2 * math.pi / 100, 0.5, 0.5/8.0, 0.01)
self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
self.dc_blocker_xx_0_0_0 = filter.dc_blocker_ff(1024, True)
self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True)
self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) self.blocks_vco_c_0 = blocks.vco_c(audio_samp_rate, -audio_samp_rate, 1.0)
self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))) self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)))
self.blocks_multiply_xx_0_0 = blocks.multiply_vcc(1)
self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096)
self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 1024/2)
self.analog_quadrature_demod_cf_0_0_0_1 = analog.quadrature_demod_cf(1.2)
self.analog_quadrature_demod_cf_0_0_0_0 = analog.quadrature_demod_cf(1.0)
self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9) self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9)
self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2)
...@@ -111,19 +121,27 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): ...@@ -111,19 +121,27 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_frame_file_sink_0_1_0, 'frame'))
self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_udp_msg_sink_0_0, 'in')) self.msg_connect((self.satnogs_frame_acquisition_0, 'out'), (self.satnogs_udp_msg_sink_0_0, 'in'))
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_quadrature_demod_cf_0_0, 0), (self.dc_blocker_xx_0, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0_0, 0), (self.blocks_moving_average_xx_0, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0_1, 0), (self.low_pass_filter_1, 0))
self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0_0, 0))
self.connect((self.blocks_moving_average_xx_0, 0), (self.blocks_vco_c_0, 0))
self.connect((self.blocks_multiply_xx_0_0, 0), (self.low_pass_filter_0, 0))
self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0_0, 1))
self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0)) self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0))
self.connect((self.dc_blocker_xx_0_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))
self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_frame_acquisition_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_frame_acquisition_0, 0))
self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))
self.connect((self.low_pass_filter_0, 0), (self.pfb_arb_resampler_xxx_0_0_0, 0))
self.connect((self.low_pass_filter_1, 0), (self.dc_blocker_xx_0_0_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0)) self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.pfb_arb_resampler_xxx_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_delay_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0_0_1, 0))
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
def get_antenna(self): def get_antenna(self):
...@@ -138,7 +156,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): ...@@ -138,7 +156,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
def set_baudrate(self, baudrate): def set_baudrate(self, baudrate):
self.baudrate = baudrate self.baudrate = baudrate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.low_pass_filter_1.set_taps(firdes.low_pass(1, 2 * self.baudrate, self.baudrate * 0.60, self.baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def get_bb_gain(self): def get_bb_gain(self):
return self.bb_gain return self.bb_gain
...@@ -279,8 +299,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block): ...@@ -279,8 +299,9 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
def set_audio_samp_rate(self, audio_samp_rate): def set_audio_samp_rate(self, audio_samp_rate):
self.audio_samp_rate = audio_samp_rate self.audio_samp_rate = audio_samp_rate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def argument_parser(): def argument_parser():
......
This diff is collapsed.
This diff is collapsed.
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
# Title: satnogs_fsk_ax25 # Title: satnogs_fsk_ax25
# Author: Manolis Surligas (surligas@gmail.com) # Author: Manolis Surligas (surligas@gmail.com)
# Description: Generic FSK AX.25 decoder # Description: Generic FSK AX.25 decoder
# Generated: Fri Aug 17 00:38:04 2018 # GNU Radio version: 3.7.13.5
################################################## ##################################################
from gnuradio import analog from gnuradio import analog
from gnuradio import blocks from gnuradio import blocks
from gnuradio import digital from gnuradio import digital
...@@ -64,18 +65,17 @@ class satnogs_fsk_ax25(gr.top_block): ...@@ -64,18 +65,17 @@ class satnogs_fsk_ax25(gr.top_block):
self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 10, 1024, waterfall_file_path, 1) 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_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) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0)
self.satnogs_iq_sink_0 = satnogs.iq_sink(16768, iq_file_path, False, enable_iq_dump) self.satnogs_iq_sink_0 = satnogs.iq_sink(16768, iq_file_path, False, enable_iq_dump)
self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0) self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0)
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)) self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))
self.satnogs_ax25_decoder_bm_0_0 = satnogs.ax25_decoder_bm('GND', 0, True, False, 1024) self.satnogs_ax25_decoder_bm_0_0 = satnogs.ax25_decoder_bm('GND', 0, True, False, 1024)
self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, True, True, 1024) self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, True, True, 1024)
self.pfb_arb_resampler_xxx_0_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0_0_0 = pfb.arb_resampler_ccf(
(2.0*baudrate)/audio_samp_rate, (2.0*baudrate)/audio_samp_rate,
taps=None, taps=None,
flt_size=32) flt_size=32)
self.pfb_arb_resampler_xxx_0_0.declare_sample_delay(0) self.pfb_arb_resampler_xxx_0_0_0.declare_sample_delay(0)
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf(
audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx),
...@@ -96,11 +96,20 @@ class satnogs_fsk_ax25(gr.top_block): ...@@ -96,11 +96,20 @@ class satnogs_fsk_ax25(gr.top_block):
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0) self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0)
self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0) self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0)
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 0.25*0.175*0.175, 0.5, 0.175, 0.005) self.low_pass_filter_1 = filter.fir_filter_fff(1, firdes.low_pass(
1, 2 * baudrate, baudrate * 0.60, baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass(
1, audio_samp_rate, 0.75 * baudrate, 1000, firdes.WIN_HAMMING, 6.76))
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 2 * math.pi / 100, 0.5, 0.5/8.0, 0.01)
self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True)
self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True)
self.blocks_vco_c_0 = blocks.vco_c(audio_samp_rate, -audio_samp_rate, 1.0)
self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))) self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)))
self.blocks_multiply_xx_0 = blocks.multiply_vcc(1)
self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096)
self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 1024/2)
self.analog_quadrature_demod_cf_0_0_0_0 = analog.quadrature_demod_cf(1.0)
self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9) self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9)
self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2) self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2)
...@@ -114,22 +123,29 @@ class satnogs_fsk_ax25(gr.top_block): ...@@ -114,22 +123,29 @@ class satnogs_fsk_ax25(gr.top_block):
self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame'))
self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_udp_msg_sink_0_0, 'in')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_udp_msg_sink_0_0, 'in'))
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_quadrature_demod_cf_0_0, 0), (self.dc_blocker_xx_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.low_pass_filter_1, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0_0, 0), (self.blocks_moving_average_xx_0, 0))
self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0, 0))
self.connect((self.blocks_moving_average_xx_0, 0), (self.blocks_vco_c_0, 0))
self.connect((self.blocks_multiply_xx_0, 0), (self.low_pass_filter_0, 0))
self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
self.connect((self.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0, 1))
self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))
self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0)) self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0))
self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0))
self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_0, 0))
self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.satnogs_quad_demod_filter_ff_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))
self.connect((self.low_pass_filter_0, 0), (self.pfb_arb_resampler_xxx_0_0_0, 0))
self.connect((self.low_pass_filter_1, 0), (self.dc_blocker_xx_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0)) self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.pfb_arb_resampler_xxx_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_delay_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0))
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
self.connect((self.satnogs_quad_demod_filter_ff_0, 0), (self.digital_binary_slicer_fb_0, 0))
def get_antenna(self): def get_antenna(self):
return self.antenna return self.antenna
...@@ -143,7 +159,9 @@ class satnogs_fsk_ax25(gr.top_block): ...@@ -143,7 +159,9 @@ class satnogs_fsk_ax25(gr.top_block):
def set_baudrate(self, baudrate): def set_baudrate(self, baudrate):
self.baudrate = baudrate self.baudrate = baudrate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.low_pass_filter_1.set_taps(firdes.low_pass(1, 2 * self.baudrate, self.baudrate * 0.60, self.baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def get_bb_gain(self): def get_bb_gain(self):
return self.bb_gain return self.bb_gain
...@@ -278,8 +296,9 @@ class satnogs_fsk_ax25(gr.top_block): ...@@ -278,8 +296,9 @@ class satnogs_fsk_ax25(gr.top_block):
def set_audio_samp_rate(self, audio_samp_rate): def set_audio_samp_rate(self, audio_samp_rate):
self.audio_samp_rate = audio_samp_rate self.audio_samp_rate = audio_samp_rate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def argument_parser(): def argument_parser():
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
# Title: satnogs_msk_ax25 # Title: satnogs_msk_ax25
# Author: Manolis Surligas (surligas@gmail.com) # Author: Manolis Surligas (surligas@gmail.com)
# Description: Generic MSK AX.25 decoder # Description: Generic MSK AX.25 decoder
# Generated: Fri Aug 17 00:38:15 2018 # GNU Radio version: 3.7.13.5
################################################## ##################################################
from gnuradio import analog from gnuradio import analog
from gnuradio import blocks from gnuradio import blocks
from gnuradio import digital from gnuradio import digital
...@@ -64,18 +65,17 @@ class satnogs_msk_ax25(gr.top_block): ...@@ -64,18 +65,17 @@ class satnogs_msk_ax25(gr.top_block):
self.satnogs_waterfall_sink_0 = satnogs.waterfall_sink(audio_samp_rate, 0.0, 10, 1024, waterfall_file_path, 1) 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_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) self.satnogs_ogg_encoder_0 = satnogs.ogg_encoder(file_path, audio_samp_rate, 1.0)
self.satnogs_iq_sink_0 = satnogs.iq_sink(16768, iq_file_path, False, enable_iq_dump) self.satnogs_iq_sink_0 = satnogs.iq_sink(16768, iq_file_path, False, enable_iq_dump)
self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0) self.satnogs_frame_file_sink_0_1_0 = satnogs.frame_file_sink(decoded_data_file_path, 0)
self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)) self.satnogs_coarse_doppler_correction_cc_0 = satnogs.coarse_doppler_correction_cc(rx_freq, satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))
self.satnogs_ax25_decoder_bm_0_0 = satnogs.ax25_decoder_bm('GND', 0, True, False, 1024) self.satnogs_ax25_decoder_bm_0_0 = satnogs.ax25_decoder_bm('GND', 0, True, False, 1024)
self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, True, True, 1024) self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, True, True, 1024)
self.pfb_arb_resampler_xxx_0_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0_0_0 = pfb.arb_resampler_ccf(
(2.0*baudrate)/audio_samp_rate, (2.0*baudrate)/audio_samp_rate,
taps=None, taps=None,
flt_size=32) flt_size=32)
self.pfb_arb_resampler_xxx_0_0.declare_sample_delay(0) self.pfb_arb_resampler_xxx_0_0_0.declare_sample_delay(0)
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf( self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf(
audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), audio_samp_rate/satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx),
...@@ -96,11 +96,20 @@ class satnogs_msk_ax25(gr.top_block): ...@@ -96,11 +96,20 @@ class satnogs_msk_ax25(gr.top_block):
self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0) self.osmosdr_source_0.set_antenna(satnogs.handle_rx_antenna(rx_sdr_device, antenna), 0)
self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0) self.osmosdr_source_0.set_bandwidth(satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx), 0)
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 0.25*0.175*0.175, 0.5, 0.175, 0.005) self.low_pass_filter_1 = filter.fir_filter_fff(1, firdes.low_pass(
1, 2 * baudrate, baudrate * 0.60, baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass(
1, audio_samp_rate, 0.75 * baudrate, 1000, firdes.WIN_HAMMING, 6.76))
self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(2, 2 * math.pi / 100, 0.5, 0.5/8.0, 0.01)
self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0_0 = filter.dc_blocker_ff(1024, True)
self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True) self.dc_blocker_xx_0 = filter.dc_blocker_ff(1024, True)
self.blocks_vco_c_0 = blocks.vco_c(audio_samp_rate, -audio_samp_rate, 1.0)
self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx))) self.blocks_rotator_cc_0 = blocks.rotator_cc(-2.0 * math.pi * (lo_offset / satnogs.handle_samp_rate_rx(rx_sdr_device, samp_rate_rx)))
self.blocks_multiply_xx_0 = blocks.multiply_vcc(1)
self.blocks_moving_average_xx_0 = blocks.moving_average_ff(1024, 1.0/1024.0, 4096)
self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 1024/2)
self.analog_quadrature_demod_cf_0_0_0_0 = analog.quadrature_demod_cf(1.0)
self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9) self.analog_quadrature_demod_cf_0_0_0 = analog.quadrature_demod_cf(0.9)
self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2) self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(1.2)
...@@ -114,22 +123,29 @@ class satnogs_msk_ax25(gr.top_block): ...@@ -114,22 +123,29 @@ class satnogs_msk_ax25(gr.top_block):
self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_frame_file_sink_0_1_0, 'frame'))
self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_udp_msg_sink_0_0, 'in')) self.msg_connect((self.satnogs_ax25_decoder_bm_0_0, 'pdu'), (self.satnogs_udp_msg_sink_0_0, 'in'))
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_quadrature_demod_cf_0_0, 0), (self.dc_blocker_xx_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.low_pass_filter_1, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0)) self.connect((self.analog_quadrature_demod_cf_0_0_0, 0), (self.dc_blocker_xx_0_0, 0))
self.connect((self.analog_quadrature_demod_cf_0_0_0_0, 0), (self.blocks_moving_average_xx_0, 0))
self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0, 0))
self.connect((self.blocks_moving_average_xx_0, 0), (self.blocks_vco_c_0, 0))
self.connect((self.blocks_multiply_xx_0, 0), (self.low_pass_filter_0, 0))
self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0)) self.connect((self.blocks_rotator_cc_0, 0), (self.satnogs_coarse_doppler_correction_cc_0, 0))
self.connect((self.blocks_vco_c_0, 0), (self.blocks_multiply_xx_0, 1))
self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.dc_blocker_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))
self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0)) self.connect((self.dc_blocker_xx_0_0, 0), (self.satnogs_ogg_encoder_0, 0))
self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0, 0))
self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_0, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.satnogs_ax25_decoder_bm_0_0, 0))
self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.satnogs_quad_demod_filter_ff_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))
self.connect((self.low_pass_filter_0, 0), (self.pfb_arb_resampler_xxx_0_0_0, 0))
self.connect((self.low_pass_filter_1, 0), (self.dc_blocker_xx_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0)) self.connect((self.osmosdr_source_0, 0), (self.blocks_rotator_cc_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.pfb_arb_resampler_xxx_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0_0_0_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.blocks_delay_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_iq_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0, 0), (self.satnogs_waterfall_sink_0, 0))
self.connect((self.pfb_arb_resampler_xxx_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0)) self.connect((self.pfb_arb_resampler_xxx_0_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0))
self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0)) self.connect((self.satnogs_coarse_doppler_correction_cc_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
self.connect((self.satnogs_quad_demod_filter_ff_0, 0), (self.digital_binary_slicer_fb_0, 0))
def get_antenna(self): def get_antenna(self):
return self.antenna return self.antenna
...@@ -143,7 +159,9 @@ class satnogs_msk_ax25(gr.top_block): ...@@ -143,7 +159,9 @@ class satnogs_msk_ax25(gr.top_block):
def set_baudrate(self, baudrate): def set_baudrate(self, baudrate):
self.baudrate = baudrate self.baudrate = baudrate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.low_pass_filter_1.set_taps(firdes.low_pass(1, 2 * self.baudrate, self.baudrate * 0.60, self.baudrate / 8.0, firdes.WIN_HAMMING, 6.76))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def get_bb_gain(self): def get_bb_gain(self):
return self.bb_gain return self.bb_gain
...@@ -278,8 +296,9 @@ class satnogs_msk_ax25(gr.top_block): ...@@ -278,8 +296,9 @@ class satnogs_msk_ax25(gr.top_block):
def set_audio_samp_rate(self, audio_samp_rate): def set_audio_samp_rate(self, audio_samp_rate):
self.audio_samp_rate = audio_samp_rate self.audio_samp_rate = audio_samp_rate
self.pfb_arb_resampler_xxx_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate) self.pfb_arb_resampler_xxx_0_0_0.set_rate((2.0*self.baudrate)/self.audio_samp_rate)
self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx)) self.pfb_arb_resampler_xxx_0.set_rate(self.audio_samp_rate/satnogs.handle_samp_rate_rx(self.rx_sdr_device, self.samp_rate_rx))
self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.audio_samp_rate, 0.75 * self.baudrate, 1000, firdes.WIN_HAMMING, 6.76))
def argument_parser(): def argument_parser():
......
<?xml version="1.0"?> <?xml version="1.0"?>
<block> <block>
<name>CW to Symbols</name> <name>CW to Symbols</name>
<key>satnogs_cw_to_symbol</key> <key>satnogs_cw_to_symbol</key>
<import>import satnogs</import> <import>import satnogs</import>
<make>satnogs.cw_to_symbol($sampling_rate, $threshold, $conf_level, $wpm)</make> <make>satnogs.cw_to_symbol($sampling_rate, $threshold, $conf_level, $wpm, $hysteresis)</make>
<callback>set_act_threshold($threshold)</callback> <callback>set_act_threshold($threshold)</callback>
<param>
<name>Sampling Rate</name>
<key>sampling_rate</key>
<value>samp_rate</value>
<type>real</type>
</param>
<param> <param>
<name>Activation Threshold</name> <name>Sampling Rate</name>
<key>threshold</key> <key>sampling_rate</key>
<type>real</type> <value>samp_rate</value>
</param> <type>real</type>
</param>
<param>
<name>Confidence Level</name>
<key>conf_level</key>
<value>0.9</value>
<type>real</type>
</param>
<param> <param>
<name>Words per Minute</name> <name>Activation Threshold</name>
<key>wpm</key> <key>threshold</key>
<value>20</value> <type>real</type>
<type>int</type> </param>
</param>
<sink> <param>
<name>act_threshold</name> <name>Confidence Level</name>
<type>message</type> <key>conf_level</key>
<optional>1</optional> <value>0.9</value>
</sink> <type>real</type>
</param>
<sink>
<name>in</name>
<type>float</type>
</sink>
<source> <param>
<name>out</name> <name>Words per Minute</name>
<type>message</type> <key>wpm</key>
</source> <value>20</value>
<type>int</type>
</param>
<param>
<name>Hysteresis</name>
<key>hysteresis</key>
<value>0</value>
<type>int</type>
</param>
<sink>
<name>act_threshold</name>
<type>message</type>
<optional>1</optional>
</sink>
<sink>
<name>in</name>
<type>float</type>
</sink>
<source>
<name>out</name>
<type>message</type>
</source>
</block> </block>
...@@ -197,7 +197,10 @@ namespace gr ...@@ -197,7 +197,10 @@ namespace gr
out[i++] = fcs & 0xFF; out[i++] = fcs & 0xFF;
out[i++] = (fcs >> 8) & 0xFF; out[i++] = (fcs >> 8) & 0xFF;
memset (out + i, AX25_SYNC_FLAG, postamble_len); memset (out + i, AX25_SYNC_FLAG, postamble_len);
for(size_t j = preamble_len; j < i; j++) {
printf("0x%02x ", out[j]);
}
printf("\n");
return i + postamble_len; return i + postamble_len;
} }
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
#include <satnogs/api.h> #include <satnogs/api.h>
#include <gnuradio/sync_block.h> #include <gnuradio/sync_block.h>
#define MIN_WPM 5
#define MAX_WPM 50
namespace gr namespace gr
{ {
namespace satnogs namespace satnogs
...@@ -65,10 +68,19 @@ namespace gr ...@@ -65,10 +68,19 @@ namespace gr
* symbols * symbols
* *
* @param wpm Morse code Words per Minute * @param wpm Morse code Words per Minute
*
* @param hysteresis this value represents the hysteresis of a possible
* filter used before the CW to Symbol block. For example if there is
* a moving average filter with x taps, the full power of the signal
* will be available after x samples. The total length of samples with
* maximum power will be 2*x less. Because the block searches for plateaus
* with proper durations, this filtering hysteresis should be known.
* If no such a filter is used, the hysteresis value should be set to zero.
*/ */
static cw_to_symbol::sptr static cw_to_symbol::sptr
make (double sampling_rate, float threshold, float conf_level = 0.9, make (double sampling_rate, float threshold, float conf_level = 0.9,
size_t wpm = 20); size_t wpm = 20,
size_t hysteresis = 0);
virtual void virtual void
set_act_threshold (float thrld) = 0; set_act_threshold (float thrld) = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
* *
* Copyright (C) 2016,2017 * Copyright (C) 2016-2018
* Libre Space Foundation <http://librespacefoundation.org/> * Libre Space Foundation <http://librespacefoundation.org/>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#ifndef INCLUDE_SATNOGS_MORSE_H_ #ifndef INCLUDE_SATNOGS_MORSE_H_
#define INCLUDE_SATNOGS_MORSE_H_ #define INCLUDE_SATNOGS_MORSE_H_
#define MIN_WPM 5
#define MAX_WPM 30
/** /**
* The different Morse symbols * The different Morse symbols
*/ */
...@@ -32,7 +30,8 @@ typedef enum { ...@@ -32,7 +30,8 @@ typedef enum {
MORSE_DASH, //!< Morse dash (-) symbol MORSE_DASH, //!< Morse dash (-) symbol
MORSE_INTRA_SPACE, //!< Space between dot and dash symbols MORSE_INTRA_SPACE, //!< Space between dot and dash symbols
MORSE_S_SPACE, //!< Morse short space between characters MORSE_S_SPACE, //!< Morse short space between characters
MORSE_L_SPACE //!<Morse long space between words MORSE_L_SPACE, //!<Morse long space between words
MORSE_END_MSG_SPACE //!< End of message
} morse_symbol_t; } morse_symbol_t;
......
This diff is collapsed.
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <satnogs/ax25_decoder_bm.h> #include <satnogs/ax25_decoder_bm.h>
#include <gnuradio/digital/lfsr.h> #include <gnuradio/digital/lfsr.h>
#include <deque>
namespace gr namespace gr
{ {
...@@ -35,7 +36,7 @@ namespace gr ...@@ -35,7 +36,7 @@ namespace gr
private: private:
typedef enum typedef enum
{ {
NO_SYNC, IN_SYNC, DECODING, FRAME_END NO_SYNC, IN_SYNC, DECODING
} decoding_state_t; } decoding_state_t;
/** /**
...@@ -53,6 +54,8 @@ namespace gr ...@@ -53,6 +54,8 @@ namespace gr
size_t d_decoded_bits; size_t d_decoded_bits;
digital::lfsr d_lfsr; digital::lfsr d_lfsr;
uint8_t *d_frame_buffer; uint8_t *d_frame_buffer;
std::deque<uint8_t> d_bitstream;
size_t d_start_idx;
void void
reset_state (); reset_state ();
...@@ -60,20 +63,16 @@ namespace gr ...@@ -60,20 +63,16 @@ namespace gr
enter_sync_state (); enter_sync_state ();
void void
enter_decoding_state (); enter_decoding_state ();
void bool
enter_frame_end (); enter_frame_end ();
size_t void
descramble_and_decode (const uint8_t *in, size_t nitems); decode ();
size_t
decode (const uint8_t *in, size_t nitems);
inline void
descramble_and_decode_1b (uint8_t in);
inline void inline void
decode_1b (uint8_t in); decode_1b (uint8_t in);
inline bool bool
check_byte (); frame_check();
public: public:
......
This diff is collapsed.
...@@ -45,6 +45,7 @@ namespace gr ...@@ -45,6 +45,7 @@ namespace gr
size_t d_dot_samples; size_t d_dot_samples;
size_t d_window_size; size_t d_window_size;
size_t d_window_cnt; size_t d_window_cnt;
size_t d_idle_cnt;
size_t d_dot_windows_num; size_t d_dot_windows_num;
size_t d_dash_windows_num; size_t d_dash_windows_num;
size_t d_short_pause_windows_num; size_t d_short_pause_windows_num;
...@@ -84,7 +85,7 @@ namespace gr ...@@ -84,7 +85,7 @@ namespace gr
public: public:
cw_to_symbol_impl (double sampling_rate, float threshold, cw_to_symbol_impl (double sampling_rate, float threshold,
float conf_level, size_t wpm); float conf_level, size_t wpm, size_t hysteresis);
~cw_to_symbol_impl (); ~cw_to_symbol_impl ();
// Where all the action really happens // Where all the action really happens
......
This diff is collapsed.
...@@ -24,24 +24,27 @@ ...@@ -24,24 +24,27 @@
#include <satnogs/morse_decoder.h> #include <satnogs/morse_decoder.h>
#include <satnogs/morse_tree.h> #include <satnogs/morse_tree.h>
namespace gr { namespace gr
namespace satnogs { {
namespace satnogs
{
class morse_decoder_impl : public morse_decoder class morse_decoder_impl : public morse_decoder
{ {
private:
morse_tree d_morse_tree;
size_t d_min_frame_len;
void public:
symbol_msg_handler(pmt::pmt_t msg); morse_decoder_impl (char unrecognized_char, size_t min_frame_len);
public: private:
morse_decoder_impl(char unrecognized_char, size_t min_frame_len); morse_tree d_morse_tree;
size_t d_min_frame_len;
std::string d_str;
}; void
symbol_msg_handler (pmt::pmt_t msg);
};
} // namespace satnogs } // namespace satnogs
} // namespace gr } // namespace gr
#endif /* INCLUDED_SATNOGS_MORSE_DECODER_IMPL_H */ #endif /* INCLUDED_SATNOGS_MORSE_DECODER_IMPL_H */
......
...@@ -37,13 +37,16 @@ hw_tx_settings = {'usrpb200' : {'rf_gain' : 60.0, 'if_gain' : 0.0, ...@@ -37,13 +37,16 @@ hw_tx_settings = {'usrpb200' : {'rf_gain' : 60.0, 'if_gain' : 0.0,
hw_rx_settings = {'usrpb200' : {'rf_gain' : 50.0, 'if_gain' : 0.0, hw_rx_settings = {'usrpb200' : {'rf_gain' : 50.0, 'if_gain' : 0.0,
'bb_gain' : 0.0, 'samp_rate' : 5e5, 'bb_gain' : 0.0, 'samp_rate' : 5e5,
'antenna' : 'TX/RX', 'dev_arg': 'uhd'}, 'antenna' : 'TX/RX', 'dev_arg': 'uhd'},
'usrp1' : {'rf_gain' : 500.0, 'if_gain' : 30.0,
'bb_gain' : 0.0, 'samp_rate' : 5e5,
'antenna' : 'RX', 'dev_arg': 'uhd'},
'usrp2' : {'rf_gain' : 50.0, 'if_gain' : 0.0, 'usrp2' : {'rf_gain' : 50.0, 'if_gain' : 0.0,
'bb_gain' : 0.0, 'samp_rate' : 5e5, 'bb_gain' : 0.0, 'samp_rate' : 5e5,
'antenna' : 'TX/RX', 'dev_arg': 'uhd'}, 'antenna' : 'TX/RX', 'dev_arg': 'uhd'},
'usrpx3x0' : {'rf_gain' : 26.0, 'if_gain' : 0.0, 'usrpx3x0' : {'rf_gain' : 26.0, 'if_gain' : 0.0,
'bb_gain' : 0.0, 'samp_rate' : 2e6, 'bb_gain' : 0.0, 'samp_rate' : 2e6,
'antenna' : 'TX/RX', 'dev_arg': 'uhd'}, 'antenna' : 'TX/RX', 'dev_arg': 'uhd'},
'airspy' : {'rf_gain' : 30.0, 'if_gain' : 0.0, 'airspy' : {'rf_gain' : 19.0, 'if_gain' : 0.0,
'bb_gain' : 0.0, 'samp_rate' : 10e6, 'bb_gain' : 0.0, 'samp_rate' : 10e6,
'antenna' : '', 'dev_arg': 'airspy'}, 'antenna' : '', 'dev_arg': 'airspy'},
'airspymini' : {'rf_gain' : 15.0, 'if_gain' : 0.0, 'airspymini' : {'rf_gain' : 15.0, 'if_gain' : 0.0,
......