diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index efc2bd7..eb752bd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
variables:
- GITLAB_CI_IMAGE_DEBIAN: 'debian:buster'
+ GITLAB_CI_IMAGE_DEBIAN: 'debian:bullseye'
stages:
- style
- test
@@ -7,6 +7,7 @@ stages:
- deploy
style:
+ image: ${GITLAB_CI_IMAGE_DEBIAN}
stage: style
before_script:
- apt-get update -qq && apt-get install -y -qq astyle git
@@ -16,24 +17,26 @@ style:
- if (test $(astyle --dry-run --options=.astylerc --formatted include/satnogs/*.h | wc -l) -eq 0); then (exit 0); else (exit 1); fi
test:
+ image: ${GITLAB_CI_IMAGE_DEBIAN}
stage: test
before_script:
- - apt-get update -qq && apt-get install -y -qq gnuradio-dev libcppunit-dev libjsoncpp-dev libpng++-dev libvorbis-dev cmake swig pkg-config build-essential git
+ - apt-get update -qq && apt-get install -y -qq gnuradio-dev libboost-program-options-dev libjsoncpp-dev libpng++-dev libvorbis-dev cmake swig pkg-config build-essential git
script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr ..
- make
+ - make CTEST_OUTPUT_ON_FAILURE=1 test
- make install
- ldconfig
- - python -c "import satnogs"
+ - python3 -c "import satnogs"
- rm -rf *
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DINCLUDE_DEBUG_BLOCKS=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
- make
- make CTEST_OUTPUT_ON_FAILURE=1 test
- make install
- ldconfig
- - python -c "import satnogs"
+ - python3 -c "import satnogs"
debian:
stage: build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3bc729..9d7dcf1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,8 @@ set(Boost_ADDITIONAL_VERSIONS
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
)
-find_package(Boost "1.54" COMPONENTS filesystem system unit_test_framework thread chrono)
+find_package(Boost "1.54"
+ COMPONENTS filesystem system unit_test_framework thread chrono)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost required to compile satnogs")
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index 010e10f..07ede58 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -17,47 +17,46 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA
-add_subdirectory(satellites)
-
list(APPEND debug_blocks
- satnogs_morse_debug_source.xml
- satnogs_debug_msg_source.xml
- satnogs_debug_msg_source_raw.xml
- satnogs_cw_encoder.xml
+ satnogs_cw_encoder.block.yml
+ satnogs_cw_to_symbol.block.yml
+ satnogs_debug_msg_source_raw.block.yml
+ satnogs_debug_msg_source.block.yml
+ satnogs_morse_debug_source.block.yml
)
list(APPEND enabled_blocks
- satnogs_block_tree.xml
- satnogs_amsat_duv_decoder.xml
- satnogs_ax25_encoder_mb.xml
- satnogs_ax25_decoder.xml
- satnogs_frame_decoder.xml
- satnogs_frame_file_sink.xml
- satnogs_iq_sink.xml
- satnogs_json_converter.xml
- satnogs_lrpt_decoder.xml
- satnogs_lrpt_sync.xml
- satnogs_morse_decoder.xml
- satnogs_multi_format_msg_sink.xml
- satnogs_ogg_encoder.xml
- satnogs_cw_to_symbol.xml
- satnogs_udp_msg_source.xml
- satnogs_tcp_rigctl_msg_source.xml
- satnogs_doppler_correction_cc.xml
- satnogs_udp_msg_sink.xml
- satnogs_coarse_doppler_correction_cc.xml
- satnogs_waterfall_sink.xml
- satnogs_ogg_source.xml
- satnogs_noaa_apt_sink.xml
- satnogs_whitening.xml
- satnogs_whitening_ccsds.xml
- satnogs_ieee802_15_4_variant_decoder.xml
- satnogs_ax100_decoder.xml
+ satnogs_amsat_duv_decoder.block.yml
+ satnogs_ax25_decoder.block.yml
+ satnogs_ax25_encoder_mb.block.yml
+ satnogs_ax100_decoder.block.yml
+ satnogs_coarse_doppler_correction_cc.block.yml
+ satnogs_doppler_correction_cc.block.yml
+ satnogs_frame_decoder.block.yml
+ satnogs_frame_file_sink.block.yml
+ satnogs_ieee802_15_4_variant_decoder.block.yml
+ satnogs_iq_sink.block.yml
+ satnogs_json_converter.block.yml
+ satnogs_lrpt_decoder.block.yml
+ satnogs_lrpt_sync.block.yml
+ satnogs_morse_decoder.block.yml
+ satnogs_multi_format_msg_sink.block.yml
+ satnogs_noaa_apt_sink.block.yml
+ satnogs_ogg_encoder.block.yml
+ satnogs_ogg_source.block.yml
+ satnogs_tcp_rigctl_msg_source.block.yml
+ satnogs_udp_msg_sink.block.yml
+ satnogs_udp_msg_source.block.yml
+ satnogs_waterfall_sink.block.yml
+ satnogs_whitening_ccsds.block.yml
+ satnogs_whitening.block.yml
+ satnogs.tree.yml
)
if(${INCLUDE_DEBUG_BLOCKS})
list(APPEND enabled_blocks ${debug_blocks})
endif()
+
install(FILES
${enabled_blocks}
DESTINATION share/gnuradio/grc/blocks
diff --git a/grc/satellites/CMakeLists.txt b/grc/satellites/CMakeLists.txt
deleted file mode 100644
index ce8e44c..0000000
--- a/grc/satellites/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-
-
diff --git a/grc/satnogs.tree.yml b/grc/satnogs.tree.yml
new file mode 100644
index 0000000..865c519
--- /dev/null
+++ b/grc/satnogs.tree.yml
@@ -0,0 +1,36 @@
+'[SatNOGS]':
+ - Decoders:
+ - variable_amsat_duv_decoder
+ - variable_ax25_decoder
+ - variable_ax100_decoder
+ - variable_ieee802_15_4_variant_decoder
+ - satnogs_morse_decoder
+ - Satellites:
+ - NOAA:
+ - satnogs_noaa_apt_sink
+ - METEOR:
+ - satnogs_lrpt_decoder
+ - satnogs_lrpt_sync
+ - satnogs_ax25_encoder_mb
+ - satnogs_coarse_doppler_correction_cc
+ - satnogs_doppler_correction_cc
+ - satnogs_frame_decoder
+ - satnogs_frame_file_sink
+ - satnogs_iq_sink
+ - satnogs_json_converter
+ - satnogs_ogg_encoder
+ - satnogs_ogg_source
+ - satnogs_tcp_rigctl_msg_source
+ - satnogs_udp_msg_sink
+ - satnogs_udp_msg_source
+ - satnogs_waterfall_sink
+ - satnogs_whitening_ccsds
+ - satnogs_whitening
+ - Debug:
+ - satnogs_cw_encoder
+ - satnogs_cw_to_symbol
+ - satnogs_debug_msg_source_raw
+ - satnogs_debug_msg_source
+ - satnogs_morse_debug_source
+ - satnogs_multi_format_msg_sink
+
diff --git a/grc/satnogs_amsat_duv_decoder.block.yml b/grc/satnogs_amsat_duv_decoder.block.yml
new file mode 100644
index 0000000..6880b79
--- /dev/null
+++ b/grc/satnogs_amsat_duv_decoder.block.yml
@@ -0,0 +1,22 @@
+id: variable_amsat_duv_decoder
+label: AMSAT DUV Decoder Definition
+flags: [show_id]
+
+parameters:
+- id: control_symbol
+ label: Control symbol
+ dtype: string
+ default: '0011111010'
+
+- id: frame_len
+ label: Maximum Frame Length
+ dtype: int
+ default: 96
+
+value: ${satnogs.amsat_duv_decoder_make(control_symbol, frame_len)}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.amsat_duv_decoder_make(${control_symbol}, ${frame_len})
+
+file_format: 1
diff --git a/grc/satnogs_amsat_duv_decoder.xml b/grc/satnogs_amsat_duv_decoder.xml
deleted file mode 100644
index a2650f6..0000000
--- a/grc/satnogs_amsat_duv_decoder.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
- AMSAT DUV Decoder Definition
- variable_amsat_duv_decoder
- import satnogs
- self.$(id) = $(id) = satnogs.amsat_duv_decoder_make($control_symbol, $frame_len)
- satnogs.amsat_duv_decoder_make($control_symbol, $frame_len)
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
-
- Control symbols
- control_symbol
- 0011111010
- string
-
-
-
- Maximum Frame Length
- frame_len
- 96
- int
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_ax100_decoder.block.yml b/grc/satnogs_ax100_decoder.block.yml
new file mode 100644
index 0000000..276f846
--- /dev/null
+++ b/grc/satnogs_ax100_decoder.block.yml
@@ -0,0 +1,49 @@
+id: variable_ax100_decoder
+label: AX.100 Decoder Definition
+flags: [show_id]
+
+parameters:
+- id: preamble
+ label: Preamble
+ dtype: raw
+ default: [0x55, 0x55, 0x55, 0x55, 0x55]
+
+- id: preamble_thrsh
+ label: Preamble Threshold
+ dtype: int
+ default: 5
+
+- id: sync_word
+ label: Synchronization Word
+ dtype: raw
+ default: [0x31, 0xe5]
+
+- id: sync_thrsh
+ label: Synchronization Word Threshold
+ dtype: int
+ default: 3
+
+- id: crc
+ label: CRC
+ dtype: raw
+ default: 'satnogs.crc.CRC_NONE'
+
+- id: whitening
+ label: Whitening
+ dtype: raw
+ default: 'satnogs.whitening_sptr(None)'
+
+- id: rs
+ label: Reed Solomon
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+value: ${satnogs.ax100_decoder_make(preamble, preamble_thrsh, sync_word, sync_thrsh, crc, whitening, rs)}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.ax100_decoder_make(${preamble}, ${preamble_thrsh}, ${sync_word}, ${sync_thrsh}, ${crc}, ${whitening}, ${rs)}
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_ax100_decoder.xml b/grc/satnogs_ax100_decoder.xml
deleted file mode 100644
index 0ba042e..0000000
--- a/grc/satnogs_ax100_decoder.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
- AX.100 Decoder Definition
- variable_ax100_decoder
- import satnogs
- self.$(id) = $(id) = satnogs.ax100_decoder_make($preamble, $preamble_thrsh, $sync_word, $sync_thrsh, $crc, $whitening, $rs)
- satnogs.ax100_decoder_make($preamble, $preamble_thrsh, $sync_word, $sync_thrsh, $crc, $whitening, $rs)
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
-
- Frame Preamble
- preamble
- [0x55, 0x55, 0x55, 0x55, 0x55]
- raw
-
-
-
- Preamble Threshold
- preamble_thrsh
- 5
- int
-
-
-
- Synchronization Word
- sync_word
- [0x31, 0xe5]
- raw
-
-
-
- Synchronization Word Threshold
- sync_thrsh
- 3
- int
-
-
-
- CRC
- crc
- None
- raw
-
-
-
- Whitening
- whitening
- None
- raw
-
-
-
- Reed Solomon
- rs
- True
- enum
-
-
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_ax25_decoder.block.yml b/grc/satnogs_ax25_decoder.block.yml
new file mode 100644
index 0000000..48dfc0d
--- /dev/null
+++ b/grc/satnogs_ax25_decoder.block.yml
@@ -0,0 +1,48 @@
+id: variable_ax25_decoder
+label: AX.25 Decoder Definition
+flags: [show_id]
+
+parameters:
+- id: addr
+ label: Receiver Callsign
+ dtype: string
+ default: 'GND'
+
+- id: ssid
+ label: Receiver SSID
+ dtype: int
+ default: 0
+
+- id: descrambling
+ label: G3RUH Descrambling
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+- id: promisc
+ label: Promiscuous mode
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+- id: crc_check
+ label: Perform CRC check
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+- id: frame_len
+ label: Maximum Frame Length
+ dtype: int
+ default: 512
+
+value: ${satnogs.ax25_decoder_make(addr, ssid, promisc, descrambling, crc_check, frame_len)}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.ax25_decoder_make(${addr}, ${ssid}, ${promisc}, ${descrambling}, ${crc_check}, ${frame_len})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_ax25_decoder.xml b/grc/satnogs_ax25_decoder.xml
deleted file mode 100644
index 268c1de..0000000
--- a/grc/satnogs_ax25_decoder.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
- AX.25 Decoder Definition
- variable_ax25_decoder
- import satnogs
- self.$(id) = $(id) = satnogs.ax25_decoder_make($addr, $ssid, $promisc, $descrambling, $crc_check, $frame_len)
- satnogs.ax25_decoder_make($addr, $ssid, $promisc, $descrambling, $crc_check, $frame_len)
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
-
- Receiver Callsign
- addr
- 'GND'
- string
-
-
-
- Receiver SSID
- ssid
- 0
- int
-
-
-
-
- Promiscuous mode
- promisc
- enum
-
-
-
-
-
- G3RUH descrambling
- descrambling
- enum
-
-
-
-
-
- Perform CRC
- crc_check
- enum
-
-
-
-
-
- Maximum Frame Length
- frame_len
- 512
- int
-
-
\ No newline at end of file
diff --git a/grc/satnogs_ax25_encoder_mb.block.yml b/grc/satnogs_ax25_encoder_mb.block.yml
new file mode 100644
index 0000000..0367d71
--- /dev/null
+++ b/grc/satnogs_ax25_encoder_mb.block.yml
@@ -0,0 +1,50 @@
+id: satnogs_ax25_encoder_mb
+label: AX25 Encoder
+
+parameters:
+- id: dest_addr
+ label: Destination Callsign
+ dtype: string
+
+- id: dest_ssid
+ label: Destination SSID
+ dtype: int
+ default: 0
+
+- id: src_addr
+ label: Source Callsign
+ dtype: string
+
+- id: src_ssid
+ label: Source SSID
+ dtype: int
+ default: 0
+
+- id: preamble_len
+ label: Preamble Length
+ dtype: int
+ default: 16
+
+- id: postamble_len
+ label: Postamble Length
+ dtype: int
+ default: 16
+
+- id: scramble
+ label: G3RUH Scrambling
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+outputs:
+- label: out
+ domain: stream
+ dtype: byte
+
+templates:
+ imports: import satnogs
+ make: satnogs.ax25_encoder_mb(${dest_addr}, ${dest_ssid}, ${src_addr}, ${src_ssid},
+ ${preamble_len}, ${postamble_len}, ${scramble})
+
+file_format: 1
diff --git a/grc/satnogs_ax25_encoder_mb.xml b/grc/satnogs_ax25_encoder_mb.xml
deleted file mode 100644
index 9f04f5b..0000000
--- a/grc/satnogs_ax25_encoder_mb.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
- AX.25 Encoder
- satnogs_ax25_encoder_mb
- import satnogs
- satnogs.ax25_encoder_mb($dest_addr, $dest_ssid, $src_addr, $src_ssid, $preamble_len, $postamble_len, $scramble)
-
-
- Destination Callsign
- dest_addr
- string
-
-
-
- Destination SSID
- dest_ssid
- int
-
-
-
- Source Callsign
- src_addr
- string
-
-
-
- Source SSID
- src_ssid
- int
-
-
-
- Preamble Length
- preamble_len
- 16
- int
-
-
-
- Postamble Length
- postamble_len
- 16
- int
-
-
-
- G3RUH Scrambling
- scramble
- enum
-
-
-
-
-
- info
- message
-
-
-
-
diff --git a/grc/satnogs_block_tree.xml b/grc/satnogs_block_tree.xml
deleted file mode 100644
index 3d26ba9..0000000
--- a/grc/satnogs_block_tree.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
- [SatNOGS]
-
- Decoders
- variable_ax25_decoder
- variable_amsat_duv_decoder
- variable_ieee802_15_4_variant_decoder
- variable_ax100_decoder
-
-
- Satellites
-
- NOAA
- satnogs_noaa_apt_sink
-
-
- UPSat
- satnogs_upsat_fsk_frame_encoder
- satnogs_upsat_transmitter
- satnogs_qb50_deframer
-
-
- METOP
- satnogs_lrpt_sync
- satnogs_lrpt_decoder
-
-
- satnogs_cw_matched_filter_ff
- satnogs_morse_decoder
- satnogs_multi_format_msg_sink
- satnogs_iq_sink
- satnogs_json_converter
- satnogs_ogg_encoder
- satnogs_ogg_source
- satnogs_cw_to_symbol
- satnogs_udp_msg_source
- satnogs_tcp_rigctl_msg_source
- satnogs_doppler_correction_cc
- satnogs_udp_msg_sink
- satnogs_coarse_doppler_correction_cc
- satnogs_ax25_encoder_mb
- satnogs_waterfall_sink
- variable_whitening
- variable_whitening_ccsds
- satnogs_frame_decoder
-
\ No newline at end of file
diff --git a/grc/satnogs_coarse_doppler_correction_cc.block.yml b/grc/satnogs_coarse_doppler_correction_cc.block.yml
new file mode 100644
index 0000000..6ce7a69
--- /dev/null
+++ b/grc/satnogs_coarse_doppler_correction_cc.block.yml
@@ -0,0 +1,30 @@
+id: satnogs_coarse_doppler_correction_cc
+label: Doppler Correction (Coarse)
+
+parameters:
+- id: target_freq
+ label: Target frequency
+ dtype: real
+
+- id: sampling_rate
+ label: Sample Rate
+ dtype: real
+ default: samp_rate
+
+inputs:
+- label: in
+ domain: stream
+ dtype: complex
+
+outputs:
+- label: out
+ domain: stream
+ dtype: complex
+
+templates:
+ imports: import satnogs
+ make: satnogs.coarse_doppler_correction_cc(${target_freq}, ${sampling_rate})
+ callbacks:
+ - set_new_freq_locked(${target_freq})
+
+file_format: 1
diff --git a/grc/satnogs_coarse_doppler_correction_cc.xml b/grc/satnogs_coarse_doppler_correction_cc.xml
deleted file mode 100644
index 99dbcf3..0000000
--- a/grc/satnogs_coarse_doppler_correction_cc.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- Coarse Doppler Correction
- satnogs_coarse_doppler_correction_cc
- import satnogs
- satnogs.coarse_doppler_correction_cc($target_freq, $sampling_rate)
- set_new_freq_locked($target_freq)
-
-
- Target Frequency
- target_freq
- real
-
-
-
- Sample Rate
- sampling_rate
- samp_rate
- real
-
-
-
- freq
- message
-
-
-
- in
- complex
-
-
-
-
diff --git a/grc/satnogs_cw_encoder.block.yml b/grc/satnogs_cw_encoder.block.yml
new file mode 100644
index 0000000..db54acf
--- /dev/null
+++ b/grc/satnogs_cw_encoder.block.yml
@@ -0,0 +1,34 @@
+id: satnogs_cw_encoder
+label: CW Encoder
+
+parameters:
+
+- id: samp_rate
+ label: Sample Rate
+ dtype: real
+ default: samp_rate
+
+- id: cw_freq
+ label: CW Tone Frequency
+ dtype: real
+ default: 700
+
+- id: wpm
+ label: Words per minute
+ dtype: int
+ default: 20
+
+inputs:
+- domain: message
+ id: symbol
+
+outputs:
+- label: out
+ domain: stream
+ dtype: complex
+
+templates:
+ imports: import satnogs
+ make: satnogs.cw_encoder(${samp_rate}, ${cw_freq}, ${wpm})
+
+file_format: 1
diff --git a/grc/satnogs_cw_encoder.xml b/grc/satnogs_cw_encoder.xml
deleted file mode 100644
index 6ac5c15..0000000
--- a/grc/satnogs_cw_encoder.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- CW Encoder
- satnogs_cw_encoder
- [SatNOGS]/Debug
- import satnogs
- satnogs.cw_encoder($samp_rate, $cw_freq, $wpm)
-
-
- Sample Rate
- samp_rate
- samp_rate
- real
-
-
-
- CW Frequency
- cw_freq
- 700
- real
-
-
-
- Words per minute
- wpm
- 20
- int
-
-
-
- symbol
- message
-
-
-
-
diff --git a/grc/satnogs_cw_to_symbol.block.yml b/grc/satnogs_cw_to_symbol.block.yml
new file mode 100644
index 0000000..375e5fb
--- /dev/null
+++ b/grc/satnogs_cw_to_symbol.block.yml
@@ -0,0 +1,48 @@
+id: satnogs_cw_to_symbol
+label: CW to Symbol
+
+parameters:
+- id: samp_rate
+ label: Sample Rate
+ dtype: real
+ default: samp_rate
+
+- id: threshold
+ label: Activation Threshold
+ dtype: real
+
+- id: conf_level
+ label: Confidence Level
+ dtype: real
+ default: 0.9
+
+- id: wpm
+ label: Words per Minute
+ dtype: int
+ default: 20
+
+- id: hysteresis
+ label: Hysteresis
+ dtype: int
+ default: 0
+
+inputs:
+- domain: message
+ id: act_threshold
+ optiona: true
+
+- label: in
+ domain: stream
+ dtype: float
+
+outputs:
+- domain: message
+ id: out
+
+templates:
+ imports: import satnogs
+ make: satnogs.cw_to_symbol(${sampling_rate}, ${threshold}, ${conf_level}, ${wpm}, ${hysteresis})
+ callbacks:
+ - set_act_threshold(${threshold})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_cw_to_symbol.xml b/grc/satnogs_cw_to_symbol.xml
deleted file mode 100644
index 89ea992..0000000
--- a/grc/satnogs_cw_to_symbol.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
- CW to Symbols
- satnogs_cw_to_symbol
- import satnogs
- satnogs.cw_to_symbol($sampling_rate, $threshold, $conf_level, $wpm, $hysteresis)
- set_act_threshold($threshold)
-
-
- Sampling Rate
- sampling_rate
- samp_rate
- real
-
-
-
- Activation Threshold
- threshold
- real
-
-
-
- Confidence Level
- conf_level
- 0.9
- real
-
-
-
- Words per Minute
- wpm
- 20
- int
-
-
-
- Hysteresis
- hysteresis
- 0
- int
-
-
-
- act_threshold
- message
- 1
-
-
-
- in
- float
-
-
-
-
diff --git a/grc/satnogs_debug_msg_source.block.yml b/grc/satnogs_debug_msg_source.block.yml
new file mode 100644
index 0000000..bc2c20c
--- /dev/null
+++ b/grc/satnogs_debug_msg_source.block.yml
@@ -0,0 +1,30 @@
+id: satnogs_debug_msg_source
+label: Message Source (String)
+
+parameters:
+- id: msg
+ label: Message
+ dtype: string
+ default: 'HELLO WORLD'
+
+- id: Delay (seconds)
+ label: delay
+ dtype: real
+ default: 0.01
+
+- id: repeat
+ label: Repeat
+ dtype: bool
+ default: 'False'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+outputs:
+- id: msg
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.debug_msg_source(${msg}, ${delay}, ${repeat})
+
+file_format: 1
diff --git a/grc/satnogs_debug_msg_source.xml b/grc/satnogs_debug_msg_source.xml
deleted file mode 100644
index 1980ac5..0000000
--- a/grc/satnogs_debug_msg_source.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
- Debug Message Source
- satnogs_debug_msg_source
- [SatNOGS]/Debug
- import satnogs
- satnogs.debug_msg_source($msg, $delay, $repeat)
-
-
- Message
- msg
- "HELLO WORLD"
- string
-
-
-
- Delay (seconds)
- delay
- 0.01
- real
-
-
-
- Repeat
- repeat
- enum
-
-
-
-
-
-
diff --git a/grc/satnogs_debug_msg_source_raw.block.yml b/grc/satnogs_debug_msg_source_raw.block.yml
new file mode 100644
index 0000000..c449eeb
--- /dev/null
+++ b/grc/satnogs_debug_msg_source_raw.block.yml
@@ -0,0 +1,30 @@
+id: satnogs_debug_msg_source_raw
+label: Message Source (Raw bytes)
+
+parameters:
+- id: msg
+ label: Message
+ dtype: raw
+ default: [0x33, 0x44, 0x55, 0x66]
+
+- id: Delay (seconds)
+ label: delay
+ dtype: real
+ default: 0.01
+
+- id: repeat
+ label: Repeat
+ dtype: bool
+ default: 'False'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+outputs:
+- id: msg
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.debug_msg_source_raw(${msg}, ${delay}, ${repeat})
+
+file_format: 1
diff --git a/grc/satnogs_debug_msg_source_raw.xml b/grc/satnogs_debug_msg_source_raw.xml
deleted file mode 100644
index d668df3..0000000
--- a/grc/satnogs_debug_msg_source_raw.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
- Debug Message Source Raw
- satnogs_debug_msg_source_raw
- [SatNOGS]/Debug
- import satnogs
- satnogs.debug_msg_source_raw($msg, $delay, $repeat)
-
-
- Message
- msg
- [0x33, 0x44, 0x55, 0x66]
- raw
-
-
-
- Delay (seconds)
- delay
- 0.01
- real
-
-
-
- Repeat
- repeat
- enum
-
-
-
-
-
-
diff --git a/grc/satnogs_doppler_correction_cc.block.yml b/grc/satnogs_doppler_correction_cc.block.yml
new file mode 100644
index 0000000..427a8f9
--- /dev/null
+++ b/grc/satnogs_doppler_correction_cc.block.yml
@@ -0,0 +1,41 @@
+id: satnogs_doppler_correction_cc
+label: Doppler Correction
+
+parameters:
+- id: target_freq
+ label: Target frequency
+ dtype: real
+
+- id: sampling_rate
+ label: Sample Rate
+ dtype: real
+ default: samp_rate
+
+- id: corrections_per_sec
+ label: Corrections per Second
+ dtype: int
+ default: 1000
+
+
+inputs:
+- id: freq
+ domain: message
+
+- id: reset
+ domain: message
+ optional: true
+
+- label: in
+ domain: stream
+ dtype: complex
+
+outputs:
+- label: out
+ domain: stream
+ dtype: complex
+
+templates:
+ imports: import satnogs
+ make: satnogs.doppler_correction_cc(${target_freq}, ${sampling_rate}, ${corrections_per_sec})
+
+file_format: 1
diff --git a/grc/satnogs_doppler_correction_cc.xml b/grc/satnogs_doppler_correction_cc.xml
deleted file mode 100644
index 1649d3e..0000000
--- a/grc/satnogs_doppler_correction_cc.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
- Doppler Correction
- satnogs_doppler_correction_cc
- import satnogs
- satnogs.doppler_correction_cc($target_freq, $sampling_rate, $corrections_per_sec)
-
-
- Target Frequency
- target_freq
- real
-
-
-
- Sample Rate
- sampling_rate
- samp_rate
- real
-
-
-
- Corrections per Second
- corrections_per_sec
- 1000
- int
-
-
-
- freq
- message
-
-
-
- reset
- message
- 1
-
-
-
- in
- complex
-
-
-
-
diff --git a/grc/satnogs_frame_decoder.block.yml b/grc/satnogs_frame_decoder.block.yml
new file mode 100644
index 0000000..9eb0dd0
--- /dev/null
+++ b/grc/satnogs_frame_decoder.block.yml
@@ -0,0 +1,46 @@
+id: satnogs_frame_decoder
+label: Frame Decoder
+
+parameters:
+- id: itype
+ label: IO Type
+ dtype: enum
+ default: complex
+ options: [complex, float, int, short, byte]
+ option_attributes:
+ size: [8, 4, 4, 2, 1]
+ hide: part
+
+- id: vlen
+ label: Vec Length
+ dtype: int
+ default: '1'
+ hide: ${ 'part' if vlen == 1 else 'none' }
+
+- id: decoder_object
+ label: Decoder_object
+ dtype: raw
+ default: None
+
+inputs:
+- label: in
+ domain: stream
+ dtype: ${itype}
+ vlen: ${vlen}
+
+- id: reset
+ domain: message
+ optional: true
+
+outputs:
+- id: out
+ domain: message
+
+asserts:
+- ${vlen > 0}
+
+templates:
+ imports: import satnogs
+ make: satnogs.frame_decoder(${decoder_object}, ${itype.size} * ${vlen})
+
+file_format: 1
diff --git a/grc/satnogs_frame_decoder.xml b/grc/satnogs_frame_decoder.xml
deleted file mode 100644
index 1c07c46..0000000
--- a/grc/satnogs_frame_decoder.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- Frame Decoder
- satnogs_frame_decoder
- import satnogs
- satnogs.frame_decoder($decoder_object, $itype.size)
-
-
- Input Type
- itype
-
- enum
-
-
-
-
-
-
-
-
- Decoder object
- decoder_object
- None
- raw
-
-
-
- in
- $itype
-
-
-
- reset
- message
- 1
-
-
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_frame_file_sink.block.yml b/grc/satnogs_frame_file_sink.block.yml
new file mode 100644
index 0000000..6f7d0ba
--- /dev/null
+++ b/grc/satnogs_frame_file_sink.block.yml
@@ -0,0 +1,25 @@
+id: satnogs_frame_file_sink
+label: Frame File Sink
+
+parameters:
+- id: prefix_name
+ label: Prefix
+ dtype: string
+ default: 'test'
+
+- id: output_type
+ label: Output Type
+ dtype: int
+ options: [0, 1, 2]
+ option_labels: ['Binary', 'Hex annotation', 'Binary annotation']
+ default: 0
+
+inputs:
+- id: frame
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.frame_file_sink(${prefix_name}, ${output_type})
+
+file_format: 1
diff --git a/grc/satnogs_frame_file_sink.xml b/grc/satnogs_frame_file_sink.xml
deleted file mode 100644
index 3bbcecd..0000000
--- a/grc/satnogs_frame_file_sink.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- Frame File Sink
- satnogs_frame_file_sink
- [SatNOGS]
- import satnogs
- satnogs.frame_file_sink($prefix_name, $output_type)
-
-
-
- Prefix name
- prefix_name
- test
- string
-
-
-
- Output type
- output_type
- enum
-
-
-
-
-
-
- frame
- message
-
-
-
diff --git a/grc/satnogs_ieee802_15_4_variant_decoder.block.yml b/grc/satnogs_ieee802_15_4_variant_decoder.block.yml
new file mode 100644
index 0000000..7746f11
--- /dev/null
+++ b/grc/satnogs_ieee802_15_4_variant_decoder.block.yml
@@ -0,0 +1,54 @@
+id: variable_ieee802_15_4_variant_decoder
+label: IEEE 802.15.4 Decoder Definition
+flags: [show_id]
+
+parameters:
+- id: var_len
+ label: Variable Length
+ dtype: bool
+ default: 'True'
+ options: ['True', 'False']
+ option_labels: ['Enable', 'Disable']
+
+- id: preamble
+ label: Preamble
+ dtype: raw
+ default: [0x55, 0x55, 0x55, 0x55, 0x55]
+
+- id: preamble_thrsh
+ label: Preamble Threshold
+ dtype: int
+ default: 5
+
+- id: sync_word
+ label: Synchronization Word
+ dtype: raw
+ default: [0x31, 0xe5]
+
+- id: sync_thrsh
+ label: Synchronization Word Threshold
+ dtype: int
+ default: 3
+
+- id: frame_len
+ label: (Maximum) Frame Length
+ dtype: int
+ default: 240
+
+- id: crc
+ label: CRC
+ dtype: raw
+ default: 'satnogs.crc.CRC_NONE'
+
+- id: whitening
+ label: Whitening
+ dtype: raw
+ default: 'satnogs.whitening_sptr(None)'
+
+value: ${satnogs.ieee802_15_4_variant_decoder_make(preamble, preamble_thrsh, sync_word, sync_thrsh, crc, whitening, var_len, frame_len)}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.ieee802_15_4_variant_decoder_make(${preamble}, ${preamble_thrsh}, ${sync_word}, ${sync_thrsh}, ${crc}, ${whitening}, ${var_len}, ${frame_len})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_ieee802_15_4_variant_decoder.xml b/grc/satnogs_ieee802_15_4_variant_decoder.xml
deleted file mode 100644
index f3455cd..0000000
--- a/grc/satnogs_ieee802_15_4_variant_decoder.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
- IEEE 802.15.4 Decoder Definition
- variable_ieee802_15_4_variant_decoder
- import satnogs
- self.$(id) = $(id) = satnogs.ieee802_15_4_variant_decoder_make($preamble, $preamble_thrsh, $sync_word, $sync_thrsh, $crc, $whitening, $var_len, $frame_len)
- satnogs.ieee802_15_4_variant_decoder_make($preamble, $preamble_thrsh, $sync_word, $sync_thrsh, $crc, $whitening, $var_len, $frame_len)
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
-
- Variable Length
- var_len
- enum
-
-
-
-
-
- Frame Preamble
- preamble
- [0x55, 0x55, 0x55, 0x55, 0x55]
- raw
-
-
-
- Preamble Threshold
- preamble_thrsh
- 5
- int
-
-
-
- Synchronization Word
- sync_word
- [0x31, 0xe5]
- raw
-
-
-
- Synchronization Word Threshold
- sync_thrsh
- 3
- int
-
-
-
- Maximum Frame Length
- frame_len
- 254
- int
-
-
-
- CRC
- crc
- None
- raw
-
-
-
- Whitening
- whitening
- None
- raw
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_iq_sink.block.yml b/grc/satnogs_iq_sink.block.yml
new file mode 100644
index 0000000..b3cb30d
--- /dev/null
+++ b/grc/satnogs_iq_sink.block.yml
@@ -0,0 +1,39 @@
+id: satnogs_iq_sink
+label: IQ Sink
+
+parameters:
+- id: filename
+ label: File
+ dtype: file_save
+
+- id: activate
+ label: Activate
+ dtype: int
+ options: [0, 1]
+ option_labels: ['Off', 'On']
+ default: 1
+
+- id: scale
+ label: Scale
+ dtype: real
+ default: 32767.0
+
+- id: append
+ label: Append File
+ dtype: bool
+ options: [False, True]
+ option_labels: ['False', 'True']
+ default: False
+
+inputs:
+- label: in
+ domain: stream
+ dtype: complex
+
+templates:
+ imports: import satnogs
+ make: satnogs.iq_sink(${scale}, ${filename}, ${append}, ${activate})
+ callbacks:
+ - open(${filename})
+
+file_format: 1
diff --git a/grc/satnogs_iq_sink.xml b/grc/satnogs_iq_sink.xml
deleted file mode 100644
index 3527995..0000000
--- a/grc/satnogs_iq_sink.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
- IQ Sink
- satnogs_iq_sink
- import satnogs
- satnogs.iq_sink($scale, $filename, $append, $status)
- open($file)
-
-
- File
- filename
-
- file_save
-
-
-
- Status
- status
- 0
- int
- part
-
-
-
- Scale
- scale
- 32767
- float
-
-
-
- Append file
- append
- False
- bool
-
-
-
-
-
- in
- complex
-
-
-
diff --git a/grc/satnogs_json_converter.block.yml b/grc/satnogs_json_converter.block.yml
new file mode 100644
index 0000000..1ea17ff
--- /dev/null
+++ b/grc/satnogs_json_converter.block.yml
@@ -0,0 +1,21 @@
+id: satnogs_json_converter
+label: Telemetry to JSON
+
+parameters:
+- id: extra
+ label: Extra JSON field
+ dtype: raw
+
+inputs:
+- id: in
+ domain: message
+
+outputs:
+- id: out
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.json_converter(${extra})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_json_converter.xml b/grc/satnogs_json_converter.xml
deleted file mode 100644
index b8a7f70..0000000
--- a/grc/satnogs_json_converter.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- Telemetry to JSON
- satnogs_json_converter
- import satnogs
- satnogs.json_converter($extra)
-
-
- Extra JSON field
- extra
-
- raw
-
-
-
- in
- message
-
-
-
-
diff --git a/grc/satnogs_lrpt_decoder.block.yml b/grc/satnogs_lrpt_decoder.block.yml
new file mode 100644
index 0000000..0185d8a
--- /dev/null
+++ b/grc/satnogs_lrpt_decoder.block.yml
@@ -0,0 +1,16 @@
+id: satnogs_lrpt_decoder
+label: LRPT Frame Decoder
+
+inputs:
+- id: cadu
+ domain: message
+
+outputs:
+- id: frame
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.lrpt_decoder()
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_lrpt_decoder.xml b/grc/satnogs_lrpt_decoder.xml
deleted file mode 100644
index b107eb3..0000000
--- a/grc/satnogs_lrpt_decoder.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- LRPT Frame Decoder
- satnogs_lrpt_decoder
- import satnogs
- satnogs.lrpt_decoder()
-
-
- cadu
- message
-
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_lrpt_sync.block.yml b/grc/satnogs_lrpt_sync.block.yml
new file mode 100644
index 0000000..44b2cc5
--- /dev/null
+++ b/grc/satnogs_lrpt_sync.block.yml
@@ -0,0 +1,23 @@
+id: satnogs_lrpt_sync
+label: LRPT Frame Sync
+
+parameters:
+- id: thresh
+ label: Threshold
+ dtype: int
+ default: 2
+
+inputs:
+- label: in
+ domain: stream
+ dtype: complex
+
+outputs:
+- id: cadu
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.lrpt_sync(${thresh})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_lrpt_sync.xml b/grc/satnogs_lrpt_sync.xml
deleted file mode 100644
index 6b20259..0000000
--- a/grc/satnogs_lrpt_sync.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- LRPT Frame Sync
- satnogs_lrpt_sync
- import satnogs
- satnogs.lrpt_sync($thresh)
-
-
- Threshold
- thresh
- 2
- int
-
-
-
- in
- complex
-
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_morse_debug_source.block.yml b/grc/satnogs_morse_debug_source.block.yml
new file mode 100644
index 0000000..45db23f
--- /dev/null
+++ b/grc/satnogs_morse_debug_source.block.yml
@@ -0,0 +1,39 @@
+id: satnogs_morse_debug_source
+label: Morse code Debug Source
+
+parameters:
+- id: wpm
+ label: Words per Minute
+ dtype: int
+ default: 20
+
+- id: debug_seq
+ label: Sentence
+ dtype: string
+ default: 'HELLO WORLD'
+
+- id: Inject Errors
+ label: errors
+ dtype: bool
+ default: 'False'
+ options: ['True', 'False']
+
+- id: Error probability
+ label: p
+ dtype: real
+ default: 0.1
+
+- id: Delay (millis)
+ label: seq_pause_ms
+ dtype: int
+ default: 1000
+
+outputs:
+- id: out
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.morse_debug_source(${wpm}, ${debug_seq}, ${errors}, ${p}, ${seq_pause_ms})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_morse_debug_source.xml b/grc/satnogs_morse_debug_source.xml
deleted file mode 100644
index a6db658..0000000
--- a/grc/satnogs_morse_debug_source.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
- Morse code Debug Source
- satnogs_morse_debug_source
- [SatNOGS]/Debug
- import satnogs
- satnogs.morse_debug_source($wpm, $debug_seq, $errors, $p, $seq_pause_ms)
-
-
- WPM
- wpm
- 20
- int
-
-
-
- Sentence
- debug_seq
- "HELLO WORLD"
- string
-
-
-
- Inject Errors
- errors
- enum
-
-
-
-
-
- Error probability
- p
- 0.1
- real
-
-
-
- Sequence Pause (millis)
- seq_pause_ms
- 1000
- int
-
-
-
-
diff --git a/grc/satnogs_morse_decoder.block.yml b/grc/satnogs_morse_decoder.block.yml
new file mode 100644
index 0000000..580a88d
--- /dev/null
+++ b/grc/satnogs_morse_decoder.block.yml
@@ -0,0 +1,27 @@
+id: satnogs_morse_decoder
+label: Morse Decoder
+
+parameters:
+- id: unrecognized_char
+ label: Unrecognized character
+ dtype: int
+ default: ord('#')
+
+- id: min_frame_len
+ label: Minimum Message Length
+ dtype: int
+ default: 5
+
+inputs:
+- id: in
+ domain: message
+
+outputs:
+- id: out
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.morse_decoder(${unrecognized_char}, ${min_frame_len})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_morse_decoder.xml b/grc/satnogs_morse_decoder.xml
deleted file mode 100644
index c404402..0000000
--- a/grc/satnogs_morse_decoder.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- Morse Decoder
- satnogs_morse_decoder
- import satnogs
- satnogs.morse_decoder($unrecognized_char, $min_frame_len)
-
-
- Unrecognized character
- unrecognized_char
- ord('#')
- int
-
-
-
- Minimum frame length
- min_frame_len
- 3
- int
-
-
-
-
- in
- message
-
-
-
-
diff --git a/grc/satnogs_multi_format_msg_sink.block.yml b/grc/satnogs_multi_format_msg_sink.block.yml
new file mode 100644
index 0000000..c9aadec
--- /dev/null
+++ b/grc/satnogs_multi_format_msg_sink.block.yml
@@ -0,0 +1,37 @@
+id: satnogs_multi_format_msg_sink
+label: Message Sink
+
+parameters:
+- id: format
+ label: Output Format
+ dtype: int
+ options: [0, 1, 2]
+ option_labels: ['Binary', 'Hex annotation', 'Binary annotation']
+ default: 0
+
+- id: timestamp
+ label: Timestamping
+ dtype: bool
+ default: False
+
+- id: outstream
+ label: Output
+ dtype: enum
+ options: ['False', 'True']
+ option_labels: ['File', 'STDOUT']
+ default: 'True'
+
+- id: filepath
+ label: File
+ dtype: file_save
+ hide: ${ 'all' if outstream == 'True' else 'none' }
+
+inputs:
+- id: in
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.multi_format_msg_sink(${format}, ${timestamp}, ${outstream}, ${filepath})
+
+file_format: 1
diff --git a/grc/satnogs_multi_format_msg_sink.xml b/grc/satnogs_multi_format_msg_sink.xml
deleted file mode 100644
index 4fb0f49..0000000
--- a/grc/satnogs_multi_format_msg_sink.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- Multi Format Message Sink
- satnogs_multi_format_msg_sink
- import satnogs
- satnogs.multi_format_msg_sink($format, $timestamp, $outstream, $filename)
-
-
- Output format
- format
- enum
-
-
-
-
-
-
- Output Timestamp
- timestamp
- enum
-
-
-
-
- Output Result
- outstream
- enum
-
-
-
-
- File
- filename
-
- file_save
- #if $outstream.t == "file" then 'none' else 'all'#
-
-
- in
- message
-
-
diff --git a/grc/satnogs_noaa_apt_sink.block.yml b/grc/satnogs_noaa_apt_sink.block.yml
new file mode 100644
index 0000000..44f136a
--- /dev/null
+++ b/grc/satnogs_noaa_apt_sink.block.yml
@@ -0,0 +1,38 @@
+id: satnogs_noaa_apt_sink
+label: NOAA APT Sink
+
+parameters:
+- id: filename_png
+ label: Output PNG Filename
+ dtype: file_save
+
+- id: width
+ label: Image Width
+ dtype: int
+ default: 2080
+
+- id: height
+ label: Image Height
+ dtype: int
+ default: 1800
+
+- id: sync
+ label: Synchronize
+ dtype: bool
+ default: True
+
+- id: flip
+ label: Flip Image
+ dtype: bool
+ default: False
+
+inputs:
+- label: in
+ domain: stream
+ dtype: float
+
+templates:
+ imports: import satnogs
+ make: satnogs.noaa_apt_sink(${filename_png}, ${width}, ${height}, ${sync}, ${flip})
+
+file_format: 1
diff --git a/grc/satnogs_noaa_apt_sink.xml b/grc/satnogs_noaa_apt_sink.xml
deleted file mode 100644
index 661cd7e..0000000
--- a/grc/satnogs_noaa_apt_sink.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
- NOAA APT Sink
- satnogs_noaa_apt_sink
- import satnogs
- satnogs.noaa_apt_sink($filename_png, $width, $height, $sync, $flip)
-
- Output PNG Filename
- filename_png
-
- file_save
-
-
- PNG width
- width
- 2080
- int
-
-
- PNG height
- height
- 1800
- int
-
-
- Synchronize
- sync
- False
- bool
-
-
-
-
- Flip Image
- flip
- False
- bool
-
-
-
-
- in
- float
-
-
-
diff --git a/grc/satnogs_ogg_encoder.block.yml b/grc/satnogs_ogg_encoder.block.yml
new file mode 100644
index 0000000..e78df9d
--- /dev/null
+++ b/grc/satnogs_ogg_encoder.block.yml
@@ -0,0 +1,28 @@
+id: satnogs_ogg_encoder
+label: OGG Encoder
+
+parameters:
+- id: filename
+ label: File
+ dtype: file_save
+
+- id: samp_rate
+ label: Sampling Rate
+ dtype: int
+ default: 48000
+
+- id: Quality
+ label: Image Height
+ dtype: real
+ default: 0.8
+
+inputs:
+- label: in
+ domain: stream
+ dtype: float
+
+templates:
+ imports: import satnogs
+ make: satnogs.ogg_encoder(${filename}, ${samp_rate}, ${quality})
+
+file_format: 1
diff --git a/grc/satnogs_ogg_encoder.xml b/grc/satnogs_ogg_encoder.xml
deleted file mode 100644
index 6154ded..0000000
--- a/grc/satnogs_ogg_encoder.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- OGG Encoder
- satnogs_ogg_encoder
- import satnogs
- satnogs.ogg_encoder($filename, $samp_rate, $quality)
-
-
- File
- filename
-
- file_save
-
-
-
- Sampling rate
- samp_rate
- real
-
-
-
- Quality
- quality
- 0.8
- real
-
-
-
- in
- float
-
-
diff --git a/grc/satnogs_ogg_source.block.yml b/grc/satnogs_ogg_source.block.yml
new file mode 100644
index 0000000..4ba567d
--- /dev/null
+++ b/grc/satnogs_ogg_source.block.yml
@@ -0,0 +1,29 @@
+id: satnogs_ogg_source
+label: OGG Source
+
+parameters:
+- id: filename
+ label: File
+ dtype: file_save
+
+- id: channels
+ label: Channels
+ dtype: int
+ default: 1
+
+- id: repeat
+ label: Repeat
+ dtype: bool
+ default: False
+
+outputs:
+- label: out
+ domain: stream
+ dtype: float
+ multiplicity: ${channels}
+
+templates:
+ imports: import satnogs
+ make: satnogs.ogg_source(${filename}, ${channels}, ${repeat})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_ogg_source.xml b/grc/satnogs_ogg_source.xml
deleted file mode 100644
index 66289b2..0000000
--- a/grc/satnogs_ogg_source.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- OGG File Source
- satnogs_ogg_source
- [satnogs]
- import satnogs
- satnogs.ogg_source($filename, $channels, $repeat)
-
-
- File
- filename
-
- file_open
-
-
-
- Channels
- channels
- 1
- int
-
-
-
- Repeat
- repeat
- enum
-
-
-
-
-
-
diff --git a/grc/satnogs_tcp_rigctl_msg_source.block.yml b/grc/satnogs_tcp_rigctl_msg_source.block.yml
new file mode 100644
index 0000000..b6518a4
--- /dev/null
+++ b/grc/satnogs_tcp_rigctl_msg_source.block.yml
@@ -0,0 +1,40 @@
+id: satnogs_tcp_rigctl_msg_source
+label: Rigctl Message Source (TCP)
+
+parameters:
+- id: addr
+ label: IP Address
+ dtype: string
+ default: '127.0.0.1'
+
+- id: port
+ label: Port
+ dtype: int
+ default: 16886
+
+- id: mode
+ label: Mode
+ dtype: enum
+ options: ['False', 'True']
+ option_labels: ['Client', 'Server']
+ default: 'False'
+
+- id: interval
+ label: Update Interval (milliseconds)
+ dtype: int
+ default: 1000
+
+- id: mtu
+ label: MTU
+ dtype: int
+ default: 1500
+
+outputs:
+- id: freq
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.tcp_rigctl_msg_source(${addr}, ${port}, ${mode}, ${interval}, ${mtu})
+
+file_format: 1
diff --git a/grc/satnogs_tcp_rigctl_msg_source.xml b/grc/satnogs_tcp_rigctl_msg_source.xml
deleted file mode 100644
index 367bf9e..0000000
--- a/grc/satnogs_tcp_rigctl_msg_source.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- TCP rigctl Message Source
- satnogs_tcp_rigctl_msg_source
- import satnogs
- satnogs.tcp_rigctl_msg_source($addr, $port, $mode, $interval, $mtu)
-
-
- IP Address
- addr
- "127.0.0.1"
- string
-
-
-
- Port
- port
- 16886
- int
-
-
-
- Mode
- mode
- enum
-
-
-
-
-
- Update interval (ms)
- interval
- 1000
- int
-
-
-
- MTU
- mtu
- 1500
- int
-
-
-
-
\ No newline at end of file
diff --git a/grc/satnogs_udp_msg_sink.block.yml b/grc/satnogs_udp_msg_sink.block.yml
new file mode 100644
index 0000000..594f41f
--- /dev/null
+++ b/grc/satnogs_udp_msg_sink.block.yml
@@ -0,0 +1,28 @@
+id: satnogs_udp_msg_sink
+label: UDP Message Sink
+
+parameters:
+- id: addr
+ label: IP Address
+ dtype: string
+ default: '127.0.0.1'
+
+- id: port
+ label: Port
+ dtype: int
+ default: 16886
+
+- id: mtu
+ label: MTU
+ dtype: int
+ default: 1500
+
+inputs:
+- id: in
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.udp_msg_sink(${addr}, ${port}, ${mtu})
+
+file_format: 1
diff --git a/grc/satnogs_udp_msg_sink.xml b/grc/satnogs_udp_msg_sink.xml
deleted file mode 100644
index 13ec74e..0000000
--- a/grc/satnogs_udp_msg_sink.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- UDP Message Sink
- satnogs_udp_msg_sink
- import satnogs
- satnogs.udp_msg_sink($addr, $port, $mtu)
-
- IP Address
- addr
- "127.0.0.1"
- string
-
-
-
- UDP port
- port
- 16886
- int
-
-
-
- MTU
- mtu
- 1500
- int
-
-
-
- in
- message
-
-
diff --git a/grc/satnogs_udp_msg_source.block.yml b/grc/satnogs_udp_msg_source.block.yml
new file mode 100644
index 0000000..cc06699
--- /dev/null
+++ b/grc/satnogs_udp_msg_source.block.yml
@@ -0,0 +1,35 @@
+id: satnogs_udp_msg_source
+label: UDP Message Source
+
+parameters:
+- id: addr
+ label: IP Address
+ dtype: string
+ default: '127.0.0.1'
+
+- id: port
+ label: Port
+ dtype: int
+ default: 16886
+
+- id: mtu
+ label: MTU
+ dtype: int
+ default: 1500
+
+- id: msg_type
+ label: Message Type
+ dtype: enum
+ options: ['0', '1', '2']
+ option_labels: ['Raw', 'uint32_t', 'int32_t']
+ default: '0'
+
+outputs:
+- id: msg
+ domain: message
+
+templates:
+ imports: import satnogs
+ make: satnogs.udp_msg_source(${addr}, ${port}, ${mtu}, ${msg_type})
+
+file_format: 1
diff --git a/grc/satnogs_udp_msg_source.xml b/grc/satnogs_udp_msg_source.xml
deleted file mode 100644
index 10a8eec..0000000
--- a/grc/satnogs_udp_msg_source.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
- UDP Message Source
- satnogs_udp_msg_source
- import satnogs
- satnogs.udp_msg_source($addr, $port, $mtu, $msg_type)
-
-
- IP Address
- addr
- "127.0.0.1"
- string
-
-
-
- UDP port
- port
- 16886
- int
-
-
-
- MTU
- mtu
- 1500
- int
-
-
-
- Message Type
- msg_type
- enum
-
-
-
-
-
-
-
diff --git a/grc/satnogs_waterfall_sink.block.yml b/grc/satnogs_waterfall_sink.block.yml
new file mode 100644
index 0000000..4577380
--- /dev/null
+++ b/grc/satnogs_waterfall_sink.block.yml
@@ -0,0 +1,47 @@
+id: satnogs_waterfall_sink
+label: Waterfall Sink
+
+parameters:
+- id: samp_rate
+ label: Sampling Rate
+ dtype: real
+ default: samp_rate
+
+- id: fft_size
+ label: FFT Size
+ dtype: int
+ default: 1024
+
+- id: rps
+ label: Rows per Second
+ dtype: int
+ default: 10
+
+- id: mode
+ label: Mode
+ dtype: enum
+ options: ['0', '1', '2']
+ option_labels: ['Decimation', 'Max Hold', 'Mean']
+ default: '1'
+
+- id: center_freq
+ label: Center Frequency
+ dtype: real
+ default: 0.0
+
+- id: filename
+ label: File
+ dtype: file_save
+
+
+inputs:
+- label: in
+ domain: stream
+ dtype: complex
+
+templates:
+ imports: import satnogs
+ make: satnogs.waterfall_sink(${samp_rate}, ${center_freq}, ${rps}, ${fft_size},
+ ${filename}, ${mode})
+
+file_format: 1
diff --git a/grc/satnogs_waterfall_sink.xml b/grc/satnogs_waterfall_sink.xml
deleted file mode 100644
index 9bf1e90..0000000
--- a/grc/satnogs_waterfall_sink.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
- Waterfall Sink
- satnogs_waterfall_sink
- import satnogs
- satnogs.waterfall_sink($samp_rate, $center_freq, $pps, $fft_size, $filename, $mode)
-
-
- Sample Rate
- samp_rate
- samp_rate
- real
-
-
-
- FFT Size
- fft_size
- 1024
- int
-
-
-
-
- Pixel Rows per Second
- pps
- 10
- int
-
-
-
- Mode
- mode
- enum
-
-
-
-
-
-
- Center Frequency
- center_freq
- 0.0
- real
-
-
-
- File
- filename
-
- file_save
-
-
-
- in
- complex
-
-
-
diff --git a/grc/satnogs_whitening.block.yml b/grc/satnogs_whitening.block.yml
new file mode 100644
index 0000000..19197ec
--- /dev/null
+++ b/grc/satnogs_whitening.block.yml
@@ -0,0 +1,24 @@
+id: variable_whitening
+label: Whitening
+flags: [show_id]
+
+parameters:
+- id: mask
+ label: Mask
+ dtype: int
+
+- id: seed
+ label: Seed
+ dtype: int
+
+- id: order
+ label: Order
+ dtype: int
+
+value: ${satnogs.whitening_make(mask, seed, order)}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.whitening_make(${mask}, ${seed}, ${order})
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_whitening.xml b/grc/satnogs_whitening.xml
deleted file mode 100644
index d166aea..0000000
--- a/grc/satnogs_whitening.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- Whitening
- variable_whitening
- import satnogs
- self.$(id) = $(id) = satnogs.whitening_make($mask, $seed, $order)
- satnogs.whitening_make($mask, $seed, $order)
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
-
- Mask
- mask
- int
-
-
-
- Seed
- seed
- int
-
-
-
- Order
- order
- int
-
-
-
diff --git a/grc/satnogs_whitening_ccsds.block.yml b/grc/satnogs_whitening_ccsds.block.yml
new file mode 100644
index 0000000..66a0edc
--- /dev/null
+++ b/grc/satnogs_whitening_ccsds.block.yml
@@ -0,0 +1,11 @@
+id: variable_whitening_ccsds
+label: Whitening (CCSDS)
+flags: [show_id]
+
+value: ${satnogs.whitening.make_ccsds()}
+
+templates:
+ imports: import satnogs
+ var_make: self.${id} = ${id} = satnogs.whitening.make_ccsds()
+
+file_format: 1
\ No newline at end of file
diff --git a/grc/satnogs_whitening_ccsds.xml b/grc/satnogs_whitening_ccsds.xml
deleted file mode 100644
index af64907..0000000
--- a/grc/satnogs_whitening_ccsds.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- CCSDS Whitening
- variable_whitening_ccsds
- import satnogs
- self.$(id) = $(id) = satnogs.whitening.make_ccsds()
- satnogs.whitening.make_ccsds()
-
-
- Ignore Me
- value
- 'ok'
- raw
- all
-
-
diff --git a/include/satnogs/CMakeLists.txt b/include/satnogs/CMakeLists.txt
index f3bc1ad..b56563e 100644
--- a/include/satnogs/CMakeLists.txt
+++ b/include/satnogs/CMakeLists.txt
@@ -22,56 +22,55 @@
# Install public header files
########################################################################
list(APPEND DEBUG_HEADER_FILES
- morse_debug_source.h
+ cw_encoder.h
debug_msg_source_raw.h
debug_msg_source.h
- cw_encoder.h
+ morse_debug_source.h
)
list(APPEND HEADER_FILES
- ax100_decoder.h
amsat_duv_decoder.h
api.h
ax25.h
+ ax25_decoder.h
+ ax25_encoder_mb.h
+ ax100_decoder.h
base64.h
+ coarse_doppler_correction_cc.h
config.h
convolutional_deinterleaver.h
- log.h
- metadata.h
- morse_tree.h
- morse.h
- morse_decoder.h
- multi_format_msg_sink.h
- ogg_encoder.h
+ crc.h
cw_to_symbol.h
- utils.h
- udp_msg_source.h
- tcp_rigctl_msg_source.h
decoder.h
- frame_decoder.h
- frame_encoder.h
doppler_correction_cc.h
doppler_fit.h
- freq_drift.h
- upsat_fsk_frame_encoder.h
- whitening.h
- udp_msg_sink.h
- coarse_doppler_correction_cc.h
- ax25_encoder_mb.h
- qb50_deframer.h
- waterfall_sink.h
- ogg_source.h
- noaa_apt_sink.h
+ frame_decoder.h
frame_file_sink.h
- iq_sink.h
- lrpt_sync.h
- lrpt_decoder.h
- shift_reg.h
+ freq_drift.h
golay24.h
- ax25_decoder.h
- json_converter.h
ieee802_15_4_variant_decoder.h
- crc.h
+ iq_sink.h
+ json_converter.h
+ log.h
+ lrpt_decoder.h
+ lrpt_sync.h
+ metadata.h
+ morse.h
+ morse_decoder.h
+ morse_tree.h
+ multi_format_msg_sink.h
+ noaa_apt_sink.h
+ ogg_encoder.h
+ ogg_source.h
+ qb50_deframer.h
+ shift_reg.h
+ tcp_rigctl_msg_source.h
+ udp_msg_sink.h
+ udp_msg_source.h
+ upsat_fsk_frame_encoder.h
+ utils.h
+ waterfall_sink.h
+ whitening.h
)
if(${INCLUDE_DEBUG_BLOCKS})
diff --git a/include/satnogs/frame_encoder.h b/include/satnogs/frame_encoder.h
deleted file mode 100644
index 2c55300..0000000
--- a/include/satnogs/frame_encoder.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- c++ -*- */
-/*
- * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
- *
- * Copyright (C) 2016, Libre Space Foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef INCLUDED_SATNOGS_FRAME_ENCODER_H
-#define INCLUDED_SATNOGS_FRAME_ENCODER_H
-
-#include
-#include
-
-namespace gr {
-namespace satnogs {
-
-/*!
- * \brief <+description of block+>
- * \ingroup satnogs
- *
- */
-class SATNOGS_API frame_encoder : virtual public gr::sync_block {
-public:
- typedef boost::shared_ptr sptr;
-
- /*!
- * \brief Return a shared_ptr to a new instance of satnogs::frame_encoder.
- *
- * To avoid accidental use of raw pointers, satnogs::frame_encoder's
- * constructor is in a private implementation
- * class. satnogs::frame_encoder::make is the public interface for
- * creating new instances.
- */
- static sptr
- make(bool append_preamble, bool ecss_encap,
- const std::string &dest_addr, uint8_t dest_ssid, const std::string &src_addr,
- uint8_t src_ssid);
-};
-
-} // namespace satnogs
-} // namespace gr
-
-#endif /* INCLUDED_SATNOGS_FRAME_ENCODER_H */
-
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6579e57..8638216 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,7 +55,6 @@ list(APPEND satnogs_sources
doppler_correction_cc_impl.cc
doppler_fit.cc
frame_decoder_impl.cc
- frame_encoder_impl.cc
frame_file_sink_impl.cc
freq_drift.cc
golay24.cc
@@ -96,6 +95,7 @@ add_dependencies(gnuradio-satnogs fec)
target_link_libraries(gnuradio-satnogs PUBLIC
${Boost_LIBRARIES}
+ Boost::chrono
gnuradio::gnuradio-runtime
gnuradio::gnuradio-fft
gnuradio::gnuradio-blocks
@@ -144,7 +144,7 @@ list(APPEND test_satnogs_sources
qa_golay24.cc
)
# Anything we need to link to for the unit tests go here
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-satnogs Boost::chrono)
+list(APPEND GR_TEST_TARGET_DEPS gnuradio-satnogs)
if(NOT test_satnogs_sources)
MESSAGE(STATUS "No C++ unit tests... skipping")
diff --git a/lib/frame_encoder_impl.cc b/lib/frame_encoder_impl.cc
deleted file mode 100644
index bad1ce7..0000000
--- a/lib/frame_encoder_impl.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- c++ -*- */
-/*
- * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
- *
- * Copyright (C) 2016, Libre Space Foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include
-#include "frame_encoder_impl.h"
-
-namespace gr {
-namespace satnogs {
-
-frame_encoder::sptr
-frame_encoder::make(bool append_preamble, bool ecss_encap,
- const std::string &dest_addr, uint8_t dest_ssid,
- const std::string &src_addr, uint8_t src_ssid)
-{
- return gnuradio::get_initial_sptr(
- new frame_encoder_impl(append_preamble, ecss_encap, dest_addr,
- dest_ssid, src_addr, src_ssid));
-}
-
-/*
- * The private constructor
- */
-frame_encoder_impl::frame_encoder_impl(bool append_preamble,
- bool ecss_encap,
- const std::string &dest_addr,
- uint8_t dest_ssid,
- const std::string &src_addr,
- uint8_t src_ssid) :
- gr::sync_block("frame_encoder", gr::io_signature::make(0, 0, 0),
- gr::io_signature::make(0, 0, 0))
-{
-}
-
-/*
- * Our virtual destructor.
- */
-frame_encoder_impl::~frame_encoder_impl()
-{
-}
-
-int
-frame_encoder_impl::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- // Do <+signal processing+>
-
- // Tell runtime system how many output items we produced.
- return noutput_items;
-}
-
-} /* namespace satnogs */
-} /* namespace gr */
-
diff --git a/lib/frame_encoder_impl.h b/lib/frame_encoder_impl.h
deleted file mode 100644
index 10fed34..0000000
--- a/lib/frame_encoder_impl.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
- *
- * Copyright (C) 2016, Libre Space Foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef INCLUDED_SATNOGS_FRAME_ENCODER_IMPL_H
-#define INCLUDED_SATNOGS_FRAME_ENCODER_IMPL_H
-
-#include
-
-namespace gr {
-namespace satnogs {
-
-class frame_encoder_impl : public frame_encoder {
-private:
- // Nothing to declare in this block.
-
-public:
- frame_encoder_impl(bool append_preamble, bool ecss_encap,
- const std::string &dest_addr, uint8_t dest_ssid,
- const std::string &src_addr, uint8_t src_ssid);
- ~frame_encoder_impl();
-
- // Where all the action really happens
- int
- work(int noutput_items, gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-} // namespace satnogs
-} // namespace gr
-
-#endif /* INCLUDED_SATNOGS_FRAME_ENCODER_IMPL_H */
-
diff --git a/python/__init__.py b/python/__init__.py
index ad758e8..c67bd4e 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -22,14 +22,15 @@
This is the GNU Radio SATNOGS module. Place your Python package
description here (python/__init__.py).
'''
+from __future__ import unicode_literals
import sys
# import swig generated symbols into the satnogs namespace
try:
# this might fail if the module is python-only
- from satnogs_swig import *
- from hw_settings import *
- from utils import *
+ from .satnogs_swig import *
+ from .hw_settings import *
+ from .utils import *
except ImportError as err:
sys.stderr.write("Failed to import SatNOGS ({})\n".format(err))
sys.stderr.write("Consider first to run 'sudo ldconfig'\n")
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 656a4ba..d9c201b 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -39,7 +39,10 @@ include(GrPython)
########################################################################
# Setup swig generation
########################################################################
-set(GR_SWIG_INCLUDE_DIRS $)
+set(GR_SWIG_INCLUDE_DIRS
+ $
+)
+
set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig)
set(GR_SWIG_LIBRARIES gnuradio-satnogs)
@@ -50,6 +53,11 @@ else()
set(INCLUDE_DEBUG_BLOCKS_BOOL_VAL 0)
endif()
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/satnogs_swig.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig.py
+@ONLY)
+
if(${INCLUDE_DEBUG_BLOCKS})
set(SATONGS_SWIG_FILES
satnogs_swig0
@@ -61,13 +69,24 @@ else()
)
endif()
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
+
+
foreach(swigfile ${SATONGS_SWIG_FILES})
- set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
- GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
- GR_SWIG_INSTALL(TARGETS ${swigfile} DESTINATION ${GR_PYTHON_DIR}/satnogs)
- list(APPEND SWIGFILES ${swigfile}.i)
- list(APPEND SWIGDOCFILES ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
+ set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
+ set(GR_SWIG_DOC_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_BINARY_DIR}/../include
+ )
+
+ set(GR_SWIG_LIBRARIES gnuradio-satnogs)
+
+ GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
+ GR_SWIG_INSTALL(
+ TARGETS ${swigfile}
+ DESTINATION ${GR_PYTHON_DIR}/satnogs
+ )
+ list(APPEND SWIGFILES ${swigfile}.i)
+ list(APPEND SWIGDOCFILES ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
endforeach(swigfile)
install(
@@ -75,4 +94,9 @@ install(
${SWIGFILES}
${SWIGDOCFILES}
DESTINATION ${GR_INCLUDE_DIR}/satnogs/swig
+)
+
+GR_PYTHON_INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/satnogs_swig.py
+ DESTINATION ${GR_PYTHON_DIR}/satnogs
)
\ No newline at end of file
diff --git a/swig/satnogs_swig.py.in b/swig/satnogs_swig.py.in
index afd0a98..a237557 100644
--- a/swig/satnogs_swig.py.in
+++ b/swig/satnogs_swig.py.in
@@ -1,8 +1,8 @@
-#! /usr/bin/python
+#! /usr/bin/python3
#
# gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
#
-# Copyright (C) 2018
+# Copyright (C) 2018, 2019
# Libre Space Foundation
#
# This program is free software: you can redistribute it and/or modify
@@ -19,6 +19,6 @@
# along with this program. If not, see
#
-from satnogs_swig0 import *
+from .satnogs_swig0 import *
if @INCLUDE_DEBUG_BLOCKS_BOOL_VAL@:
- from satnogs_debug_swig import *
\ No newline at end of file
+ from .satnogs_debug_swig import *
\ No newline at end of file
diff --git a/swig/satnogs_swig0.i b/swig/satnogs_swig0.i
index fbd219e..044230d 100644
--- a/swig/satnogs_swig0.i
+++ b/swig/satnogs_swig0.i
@@ -26,13 +26,10 @@
#include "satnogs/decoder.h"
#include "satnogs/doppler_correction_cc.h"
#include "satnogs/frame_decoder.h"
-#include "satnogs/frame_encoder.h"
-#include "satnogs/upsat_fsk_frame_encoder.h"
#include "satnogs/whitening.h"
#include "satnogs/udp_msg_sink.h"
#include "satnogs/coarse_doppler_correction_cc.h"
#include "satnogs/ax25_encoder_mb.h"
-#include "satnogs/qb50_deframer.h"
#include "satnogs/waterfall_sink.h"
#include "satnogs/ogg_encoder.h"
#include "satnogs/ogg_source.h"
@@ -78,15 +75,9 @@ GR_SWIG_BLOCK_MAGIC2(satnogs, tcp_rigctl_msg_source);
%include "satnogs/frame_decoder.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, frame_decoder);
-%include "satnogs/frame_encoder.h"
-GR_SWIG_BLOCK_MAGIC2(satnogs, frame_encoder);
-
%include "satnogs/doppler_correction_cc.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, doppler_correction_cc);
-%include "satnogs/upsat_fsk_frame_encoder.h"
-GR_SWIG_BLOCK_MAGIC2(satnogs, upsat_fsk_frame_encoder);
-
%include "satnogs/udp_msg_sink.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, udp_msg_sink);
@@ -96,9 +87,6 @@ GR_SWIG_BLOCK_MAGIC2(satnogs, coarse_doppler_correction_cc);
%include "satnogs/ax25_encoder_mb.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, ax25_encoder_mb);
-%include "satnogs/qb50_deframer.h"
-GR_SWIG_BLOCK_MAGIC2(satnogs, qb50_deframer);
-
%include "satnogs/waterfall_sink.h"
GR_SWIG_BLOCK_MAGIC2(satnogs, waterfall_sink);