Skip to content

Commit 2064a8f

Browse files
committed
Merge branch 'master' into maint-3.8
2 parents 6b8aaf1 + 308e354 commit 2064a8f

File tree

74 files changed

+3208
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3208
-105
lines changed

CHANGELOG.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [3.7.0] - 2021-02-19
10+
11+
### Added
12+
- Read sample rate from WAV files automatically
13+
- PDU Length Filter block
14+
- Example decoder for NEXUS 19k2 pi/4-DQPSK telemetry
15+
- Support for AALTO-1 CC1125 mode
16+
- Support for CAPE-3
17+
- Support for DELFI-C3
18+
- Support for EXOCUBE-2
19+
- Support for Grizu-263A
20+
- Support for IDEASSat
21+
- Support for MiTEE-1
22+
- Support for SOMP 2b
23+
- Support for UVSQ-SAT
24+
- Support for YUSAT-1
25+
26+
### Changed
27+
- Add filter before quadrature demod for IQ input FSK demodulator
28+
29+
### Fixed
30+
- Runtime error when the baudrate is too high for the sample rate
31+
- Errors about wrong Reed-Solomon message size with OPS-SAT deframer
32+
- Bug in SIDS submit URL encoding
33+
- Bug with SatYAML files in platforms not using UTF-8
34+
- Build problems with clang
35+
936
## [3.6.0] - 2020-12-04
1037

1138
### Added
@@ -318,7 +345,8 @@ Large refactor release bringing new functionality and improvements. This is an o
318345
## [1.0.0] - 2018-08-02
319346
First gr-satellites release using semantic versioning
320347

321-
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v3.6.0...master
348+
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v3.7.0...master
349+
[3.7.0]: https://github.com/daniestevez/gr-satellites/compare/v3.6.0...v3.7.0
322350
[3.6.0]: https://github.com/daniestevez/gr-satellites/compare/v3.5.2...v3.6.0
323351
[3.5.2]: https://github.com/daniestevez/gr-satellites/compare/v3.5.1...v3.5.2
324352
[3.5.1]: https://github.com/daniestevez/gr-satellites/compare/v3.5.0...v3.5.1

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
4343

4444
# Set the version information here
4545
set(VERSION_MAJOR 3)
46-
set(VERSION_API 6)
46+
set(VERSION_API 7)
4747
set(VERSION_ABI 0)
4848

4949
cmake_policy(SET CMP0011 NEW)

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,18 @@ gr-satellites:
5353
The repository is organized in the following branches:
5454

5555
* `master` is where the active development happens. From time to time, features
56-
will be frozen in a new release.
56+
will be frozen in a new release. This branch is compatible with GNU Radio 3.8.
5757

5858
* `maint-3.8` is the branch where releases in the current `v3.x.y` line are
5959
published. This branch is compatible with GNU Radio 3.8.
6060

61-
* `maint-3.8-v2` is the branch where releases in the `v2.x.y` line are
62-
published. This branch is compatible with GNU Radio 3.8.
61+
* `maint-3.8-v2` is the branch where releases in the `v2.x.y` line were
62+
published. This branch is compatible with GNU Radio 3.8. No changes
63+
happen in this branch any longer.
6364

64-
* `maint-3.7` is the branch where releases in the `v1.x.y` line are
65-
published. This branch is compatible with GNU Radio 3.7.
65+
* `maint-3.7` is the branch where releases in the `v1.x.y` line were
66+
published. This branch is compatible with GNU Radio 3.7. No changes happen
67+
in this branch any longer.
6668

6769
In general, pull requests should be submitted to `master`.
6870

apps/gr_satellites

100644100755
+46-10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def argument_parser():
4444

4545
p.add_argument('--version', action = 'version', version = version)
4646
p.add_argument('--list_satellites', action = ListSatellites, nargs = 0, help = 'list supported satellites and exit')
47+
p.add_argument('--ignore_unknown_args', action = 'store_true', help = 'Treat unknown arguments as warning')
4748

4849
p_input = p.add_argument_group('input')
4950

@@ -59,6 +60,7 @@ def argument_parser():
5960
p_input.add_argument('--udp_ip', default = '::', help = 'UDP input listen IP [default=%(default)r]')
6061
p_input.add_argument('--udp_port', default = '7355', type = int, help = 'UDP input listen port [default=%(default)r]')
6162
p_input.add_argument('--iq', action = 'store_true', help = 'Use IQ input')
63+
p_input.add_argument('--udp_raw', action = 'store_true', help = 'Use RAW UDP input (float32 or complex64)')
6264
p_input.add_argument('--input_gain', type = float, default = 1, help = 'Input gain (can be negative to invert signal) [default=%(default)r]')
6365
p_input.add_argument('--start_time', type = str, default = '', help = 'Recording start timestamp')
6466
p_input.add_argument('--throttle', action = 'store_true', help = 'Throttle recording input to 1x speed')
@@ -74,8 +76,8 @@ def argument_parser():
7476
return p
7577

7678
def check_options(options, parser):
77-
if options.kiss_in is None and options.samp_rate is None:
78-
print('Need to specify --samp_rate unless --kiss_in is used', file = sys.stderr)
79+
if options.kiss_in is None and options.wavfile is None and options.samp_rate is None:
80+
print('Need to specify --samp_rate unless --wavfile or --kiss_in is used', file = sys.stderr)
7981
parser.print_usage(file = sys.stderr)
8082
sys.exit(1)
8183

@@ -91,8 +93,24 @@ class gr_satellites_top_block(gr.top_block):
9193
def __init__(self, parser):
9294
gr.top_block.__init__(self, 'gr-satellites top block')
9395
sat = parse_satellite(sys.argv[1])
94-
satellites.core.gr_satellites_flowgraph.add_options(parser, **sat)
95-
options = parser.parse_args(sys.argv[2:])
96+
try:
97+
satellites.core.gr_satellites_flowgraph.add_options(parser, **sat)
98+
except ValueError as e:
99+
if e.args[0] == 'satellite not found':
100+
print(f'Satellite {sys.argv[1]} not found')
101+
exit(1)
102+
else:
103+
raise e
104+
except FileNotFoundError as e:
105+
print('Could not open SatYAML file:')
106+
print(e)
107+
exit(1)
108+
if '--ignore_unknown_args' in sys.argv[2:]:
109+
options, unknown = parser.parse_known_args(sys.argv[2:])
110+
if len(unknown) > 0:
111+
print('Warning: unknown arguments passed {}'.format(unknown), file = sys.stderr)
112+
else:
113+
options = parser.parse_args(sys.argv[2:])
96114
if options.list_satellites:
97115
list_satellites()
98116
sys.exit(0)
@@ -103,11 +121,25 @@ class gr_satellites_top_block(gr.top_block):
103121
pdu_in = options.kiss_in is not None
104122

105123
self.config = open_config()
106-
107-
self.flowgraph = satellites.core.gr_satellites_flowgraph(samp_rate = options.samp_rate, iq = self.options.iq,
108-
pdu_in = pdu_in, options = options, config = self.config,
109-
dump_path = options.dump_path, **sat)
124+
110125
self.setup_input()
126+
127+
# set appropriate sample rate
128+
if options.samp_rate:
129+
samp_rate = options.samp_rate
130+
elif options.wavfile:
131+
samp_rate = self.wavfile_source.sample_rate()
132+
else:
133+
raise ValueError('sample rate not set')
134+
135+
self.flowgraph = satellites.core.gr_satellites_flowgraph(samp_rate = samp_rate,
136+
iq = self.options.iq,
137+
pdu_in = pdu_in,
138+
options = options,
139+
config = self.config,
140+
dump_path = options.dump_path,
141+
**sat)
142+
111143
if pdu_in:
112144
self.msg_connect((self.input, 'out'), (self.flowgraph, 'in'))
113145
else:
@@ -166,8 +198,12 @@ class gr_satellites_top_block(gr.top_block):
166198
self.input = self.audio_source
167199

168200
def setup_udp_input(self):
169-
self.input_int16 = blocks.udp_source(gr.sizeof_short, self.options.udp_ip, self.options.udp_port, 1472, False)
170-
self.setup_input_int16()
201+
if self.options.udp_raw:
202+
size = gr.sizeof_gr_complex if self.options.iq else gr.sizeof_float
203+
self.input = blocks.udp_source(size, self.options.udp_ip, self.options.udp_port, 1472, False)
204+
else:
205+
self.input_int16 = blocks.udp_source(gr.sizeof_short, self.options.udp_ip, self.options.udp_port, 1472, False)
206+
self.setup_input_int16()
171207

172208
def setup_input_int16(self):
173209
self.short_to_float = blocks.short_to_float(1, 32767)

debian/copyright

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ License: LGPL-2.1
5252
License (LGPL) version 2.1 can be found in the file
5353
'/usr/share/common-licenses/LGPL-2.1'.
5454

55+
Files: lib/viterbi/*
56+
Copyright: Min Xu <[email protected]>
57+
License: Apache-2.0
58+
5559
Files: python/ccsds/*
5660
Copyright: 2019 Athanasios Theocharis <[email protected]>
5761
License: GPL-3+

docs/source/command_line.rst

+22-6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ basic information about the arguments it allows.
1818
1919
$ gr_satellites
2020
usage: gr_satellites satellite [-h] [--version] [--list_satellites]
21+
[--ignore_unknown_args]
2122
(--wavfile WAVFILE | --rawfile RAWFILE | --rawint16 RAWINT16 | --audio [DEVICE] | --udp | --kiss_in KISS_IN)
2223
[--samp_rate SAMP_RATE] [--udp_ip UDP_IP]
23-
[--udp_port UDP_PORT] [--iq]
24+
[--udp_port UDP_PORT] [--iq] [--udp_raw]
2425
[--input_gain INPUT_GAIN]
2526
[--start_time START_TIME] [--throttle]
2627
[--kiss_out KISS_OUT] [--kiss_append]
@@ -91,7 +92,8 @@ Besides specifying the satellite to use for decoding, it is mandatory to specify
9192
the input source by using exactly one of the following options:
9293

9394
* ``--wavfile`` can be used to read a recording in WAV format. The sample rate
94-
of the recording needs to be specified with the ``--samp_rate`` argument.
95+
is obtained from the WAV header, but it can be overriden using the the
96+
``--samp_rate`` argument if necessary.
9597

9698
By default, the WAV file is interpreted as a one-channel file containing real
9799
RF samples. To read a two-channel file containing IQ RF samples, the ``--iq``
@@ -106,7 +108,7 @@ the input source by using exactly one of the following options:
106108

107109
.. code-block:: console
108110
109-
$ gr_satellites FUNcube-1 --wavfile satellite-recordings/ao73.wav --samp_rate 48e3
111+
$ gr_satellites FUNcube-1 --wavfile satellite-recordings/ao73.wav
110112
111113
* ``--rawfile`` can be used to read a recording in ``complex64`` or ``float32``
112114
format (depending on whether the ``--iq`` argument is used or not). The sample rate
@@ -156,6 +158,7 @@ the input source by using exactly one of the following options:
156158
The streaming format is the same as for the ``--rawint16`` and both real
157159
samples (by default) and IQ samples (using the ``--iq`` argument) are
158160
supported.
161+
If the ``--udp_raw`` is used the format will be the same as for ``--rawfile``.
159162

160163
By default, ``gr_satellites`` will listen on the IP address ``::`` (all
161164
addresses) and the UDP port 7355. A different IP address or port can be
@@ -225,6 +228,7 @@ For example, this shows all the options allowed by the FUNcube-1 decoder:
225228
-h, --help show this help message and exit
226229
--version show program's version number and exit
227230
--list_satellites list supported satellites and exit
231+
--ignore_unknown_args Treat unknown arguments as warning
228232
229233
input:
230234
--wavfile WAVFILE WAV input file
@@ -331,7 +335,7 @@ An example of the use of this option can be seen here:
331335
.. code-block:: console
332336
333337
$ gr_satellites FUNcube-1 --wavfile ~/gr-satellites/satellite-recordings/ao73.wav \
334-
--samp_rate 48e3 --hexdump
338+
--hexdump
335339
* MESSAGE DEBUG PRINT PDU VERBOSE *
336340
()
337341
pdu_length = 256
@@ -445,7 +449,7 @@ internal signals produced by decoding a sample recording of AU02.
445449
446450
$ mkdir -p /tmp/fsk
447451
$ gr_satellites AU02 --wavfile satellite-recordings/au02.wav \
448-
--samp_rate 48e3 --dump_path /tmp/fsk
452+
--dump_path /tmp/fsk
449453
450454
We see that we do not get any decoded packets. Then, we can plot the FSK symbols
451455
with the following Python code:
@@ -496,7 +500,9 @@ certain satellite projects:
496500
* `Harbin Institute of Technology`_, which connects to the telemetry proxy included in
497501
`gr-lilacsat`_ and `gr-dslwp`_.
498502

499-
* Any custom server using the SIDS protocol.
503+
* Any custom server using the SIDS protocol. The `SIDS protocol`_ is an HTTP-based protocol
504+
that was first developed by the ESTCube team and later used by the UWE-3 team. It is the
505+
basis of the SatNOGS DB server and other telemetry servers.
500506

501507
To enable telemetry submission, it is necessary to edit some parameters in
502508
``gr_satellites``'s config file, which is located in
@@ -736,6 +742,15 @@ limit playback speed to 1x and use the ``--start_time`` parameter followed by th
736742
timestamp in ISO 8601 format (``YYYY-MM-DDTHH:MM:SS``) to indicate the start time
737743
of the recording.
738744

745+
Treating unknown args as warning
746+
""""""""""""""""""""""""""""""""
747+
748+
Using the argument ``--ignore_unknown_args`` will change the behaviour on unknown
749+
arguments to a warning instead of exiting with an error. This can be useful when
750+
running in automated scripts and some options may not be available on that satellite.
751+
For example the ``--f_offset`` and ``--use_agc``
752+
753+
739754
.. _GQRX: https://gqrx.dk/
740755
.. _gr-frontends: https://github.com/daniestevez/gr-frontends
741756
.. _Message Debug: https://wiki.gnuradio.org/index.php/Message_Debug
@@ -755,3 +770,4 @@ of the recording.
755770
.. _gr-dslwp: https://github.com/bg2bhc/gr-dslwp
756771
.. _pyqt5 branch of gr-lilacsat: https://github.com/daniestevez/gr-lilacsat/tree/pyqt5
757772
.. _Audio Source: https://wiki.gnuradio.org/index.php/Audio_Source
773+
.. _SIDS protocol: https://github.com/janvgils/sids

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '3.6.0'
29+
release = '3.7.0'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/source/installation.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,14 @@ After running ``make``, you can run the tests by doing ``make test`` in the
9797
``build/`` directory.
9898

9999
.. note::
100-
There are systems where the AO-73 and similar decoders fail if
100+
There are systems where the AO-73 and similar decoders fail to decode correctly if
101101
``volk_profile`` has not been run ever in the system. This seems to be caused
102102
by the Viterbi decoder chosen by Volk by default when there is no
103103
``~/.volk/volk_config`` file. If problems with these decoders are seen, it
104-
is recommended to run ``volk_profile`` to see if it fixes the problems.
104+
is recommended to run ``volk_profile`` to see if it fixes the problems. Additionally,
105+
it is recommended to check if in ``~/.volk/volk_config`` there is a line that
106+
contains ``volk_8u_x4_conv_k7_r2_8u avx2 avx2`` and replace both occurences
107+
of ``avx2`` by either ``spiral`` or ``generic``.
105108

106109

107110
PYTHONPATH

docs/source/satyaml.rst

+17
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,23 @@ The framings allowed in the ``framing`` field are the following:
203203
* ``FOSSATSAT``, a custom protocol used by FOSSASAT
204204

205205
* ``AISTECHSAT-2``, a custom CCSDS-like protocol used by AISTECHSAT-2
206+
207+
* ``AALTO-1``, custom framing used by AALTO-1. It uses a
208+
Texas Intruments CC1125 transceiver with a PN9 scrambler and a CRC-16 CCITT
209+
(as in AX.25)
210+
211+
* ``Grizu-263A``, custom framing used by Grizu-263A. It uses a Semtech SX1268
212+
with a PN9 scrambler and CRC-16.
213+
214+
* ``IDEASSat``, custom framing used by IDEASSat. It uses NRZI encoding,
215+
an 1N8 UART-like encoding with MSB-bit-ordering,
216+
and HDLC ``0x7e`` flags to mark the frame boundaries.
217+
218+
* ``YUSAT``, custom framing used by YUSAT-1. It is like AX.25 but without
219+
bit stuffing, LSB byte endianness, and NRZ-I.
220+
221+
* ``AX5043``, FEC framing used by the AX5043 transceiver IC. This uses a convolutional
222+
code, a 4x4 interleaver, and HDLC framing with the CRC16-USB.
206223

207224
Some framings, such as the CCSDS protocols need the additional field
208225
``frame size`` to indicate the frame size.

0 commit comments

Comments
 (0)