Skip to content

Commit f90a315

Browse files
committed
Merge branch 'main' into maint-3.10
2 parents e26c1f9 + b617643 commit f90a315

File tree

89 files changed

+2660
-1582
lines changed

Some content is hidden

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

89 files changed

+2660
-1582
lines changed

.github/workflows/build-ubuntu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ jobs:
1212

1313
steps:
1414
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15-
- uses: actions/checkout@v3
16-
- uses: daniestevez/gr-satellites-ci-action@v2.0.6
15+
- uses: actions/checkout@v4
16+
- uses: daniestevez/gr-satellites-ci-action@v2.1.0

.github/workflows/clang-format-lint.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
1110
steps:
12-
- uses: actions/checkout@v2
13-
- uses: gnuradio/clang-format[email protected]
14-
with:
15-
source: '.'
16-
extensions: 'h,hpp,cpp,cc'
11+
- uses: actions/checkout@v4
12+
- name: Run clang-format
13+
run: |
14+
find . -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.cc' -o -name '*.c' | \
15+
xargs -exec clang-format -Werror --dry-run

.github/workflows/pycodestyle.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: pycodestyle
22

3-
# Controls when the action will run.
43
on:
54
push:
65
pull_request:
@@ -9,9 +8,9 @@ on:
98
jobs:
109
pycodestyle:
1110
runs-on: ubuntu-latest
12-
1311
steps:
14-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15-
- uses: actions/checkout@v2
16-
17-
- uses: daniestevez/[email protected]
12+
- uses: actions/checkout@v4
13+
- name: Install pycodestyle
14+
run: pip install pycodestyle
15+
- name: Run pycodestyle
16+
run: pycodestyle . --exclude python/ccsds,docs,tools,tests,examples,python/bindings

CHANGELOG.md

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

77
## Unreleased
88

9+
## [5.7.0], [4.14.0], [3.21.0] - 2025-02-10
10+
11+
### Added
12+
- Check Hex String block
13+
- OpenLST deframer
14+
- Repeater address matching to Check AX.25 Address block
15+
- Support for AEPEX
16+
- Support for ARTICSAT-1
17+
- Support for ASRTU-1
18+
- Support for BINAR-2, -3, and -4
19+
- Support for Bluebird-01 to -05
20+
- Support for COLIBRI-S
21+
- Support for DORA
22+
- Support for HADES-R
23+
- Support for HORIZON
24+
- Support for HYPERVIEW-1G
25+
- Support for MORDOVIA-IOT
26+
- Support for RTU-MIREA1
27+
- Support for RUZAEVKA-390
28+
- Support for TUSUR-GO
29+
- Support for VIZARD-ION
30+
- Support for ZIMSAT-2
31+
- TM KISS transport
32+
- Vector stream IO Reed-Solomon encoder block
33+
34+
## Fixed
35+
- Error when opening Doppler file fails in Doppler correction block
36+
37+
## Changed
38+
- Added frame length parameter to GEOSCAN deframer
39+
- Replaced erminaz_ssdv and jy1sat_ssdv by generic gr_satellites_ssdv script
40+
941
## [5.6.0], [4.13.0], [3.20.0] - 2024-09-03
1042

1143
### Added
@@ -767,15 +799,17 @@ Large refactor release bringing new functionality and improvements. This is an o
767799
## [1.0.0] - 2018-08-02
768800
First gr-satellites release using semantic versioning
769801

770-
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v5.6.0...main
771-
[5.5.0]: https://github.com/daniestevez/gr-satellites/compare/v5.5.0...v5.6.0
802+
[Unreleased]: https://github.com/daniestevez/gr-satellites/compare/v5.7.0...main
803+
[5.7.0]: https://github.com/daniestevez/gr-satellites/compare/v5.6.0...v5.7.0
804+
[5.6.0]: https://github.com/daniestevez/gr-satellites/compare/v5.5.0...v5.6.0
772805
[5.5.0]: https://github.com/daniestevez/gr-satellites/compare/v5.4.0...v5.5.0
773806
[5.4.0]: https://github.com/daniestevez/gr-satellites/compare/v5.3.0...v5.4.0
774807
[5.3.0]: https://github.com/daniestevez/gr-satellites/compare/v5.2.0...v5.3.0
775808
[5.2.0]: https://github.com/daniestevez/gr-satellites/compare/v5.1.1...v5.2.0
776809
[5.1.1]: https://github.com/daniestevez/gr-satellites/compare/v5.1.0...v5.1.1
777810
[5.1.0]: https://github.com/daniestevez/gr-satellites/compare/v5.0.0...v5.1.0
778811
[5.0.0]: https://github.com/daniestevez/gr-satellites/compare/v4.6.0...v5.0.0
812+
[4.14.0]: https://github.com/daniestevez/gr-satellites/compare/v4.13.0...v4.14.0
779813
[4.13.0]: https://github.com/daniestevez/gr-satellites/compare/v4.12.0...v4.13.0
780814
[4.12.0]: https://github.com/daniestevez/gr-satellites/compare/v4.11.0...v4.12.0
781815
[4.11.0]: https://github.com/daniestevez/gr-satellites/compare/v4.10.0...v4.11.0
@@ -793,6 +827,7 @@ First gr-satellites release using semantic versioning
793827
[4.1.0]: https://github.com/daniestevez/gr-satellites/compare/v4.0.0...v4.1.0
794828
[4.0.0]: https://github.com/daniestevez/gr-satellites/compare/v4.0.0-rc1...v4.0.0
795829
[4.0.0-rc1]: https://github.com/daniestevez/gr-satellites/compare/v3.7.0...v4.0.0-rc1
830+
[3.21.0]: https://github.com/daniestevez/gr-satellites/compare/v3.20.0...v3.21.0
796831
[3.20.0]: https://github.com/daniestevez/gr-satellites/compare/v3.19.0...v3.20.0
797832
[3.19.0]: https://github.com/daniestevez/gr-satellites/compare/v3.18.0...v3.19.0
798833
[3.18.0]: https://github.com/daniestevez/gr-satellites/compare/v3.17.0...v3.18.0

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 5)
46-
set(VERSION_API 6)
46+
set(VERSION_API 7)
4747
set(VERSION_ABI 0)
4848
set(VERSION_PATCH 0)
4949

README.md

-11
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,6 @@ channels such as email. Please understand this when asking for support.
9898
Take a look [here](https://github.com/daniestevez/gr-satellites/discussions/304) to
9999
check whether a new topic fits better in the issues page or in the discussions page.
100100

101-
## Known problems
102-
103-
The AVX2 Viterbi decoder in [Volk](https://github.com/gnuradio/volk) versions
104-
earlier than 1.5.0 is broken (the decoder
105-
[was disabled in Volk 1.5.0](https://github.com/gnuradio/volk/commit/61497d115aead301850453d418415f5ad346ee25)).
106-
If using an older version of Volk on a machine that supports AVX2, the
107-
gr-satellites decoders for the satellites that use convolutional coding will not
108-
work. To solve this, the AVX2 kernel should be disabled in `~/.volk/volk_config` or by using
109-
the `VOLK_GENERIC=1` environment variable. See
110-
[issue #217](https://github.com/daniestevez/gr-satellites/issues/217)).
111-
112101
## Satellite teams
113102

114103
Satellite teams interested in using gr-satellites for your groundstation

apps/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ include(GrPython)
2323
GR_PYTHON_INSTALL(
2424
PROGRAMS
2525
gr_satellites
26-
erminaz_ssdv
27-
jy1sat_ssdv
26+
gr_satellites_ssdv
2827
smog_p_spectrum
2928
DESTINATION bin
3029
)

apps/erminaz_ssdv

-88
This file was deleted.

apps/gr_satellites_ssdv

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
# Copyright 2019-2020, 2024 Daniel Estevez <[email protected]>
5+
#
6+
# This file is part of gr-satellites
7+
#
8+
# SPDX-License-Identifier: GPL-3.0-or-later
9+
#
10+
11+
import argparse
12+
from enum import Enum
13+
import struct
14+
import subprocess
15+
import sys
16+
17+
import numpy as np
18+
19+
from satellites.kiss import *
20+
from satellites.telemetry.by02 import TMPrimaryHeader as TMPrimaryHeaderShort
21+
from satellites.telemetry.erminaz import TMPrimaryHeader
22+
23+
24+
class Satellite(Enum):
25+
JY1SAT = 'JY1SAT'
26+
ERMINAZ = 'ERMINAZ'
27+
DSLWP = 'DSLWP'
28+
29+
def __str__(self):
30+
return self.value
31+
32+
33+
def parse_args():
34+
parser = argparse.ArgumentParser()
35+
parser.add_argument(
36+
'--satellite', type=Satellite, choices=list(Satellite),
37+
help='Satellite')
38+
parser.add_argument('input', help='Input KISS file')
39+
parser.add_argument(
40+
'output',
41+
help='Output filenames (start of filenames)')
42+
return parser.parse_args()
43+
44+
45+
def seqnum(packet, satellite):
46+
offsets = {
47+
Satellite.JY1SAT: 3,
48+
Satellite.ERMINAZ: 8,
49+
Satellite.DSLWP: 1,
50+
}
51+
off = offsets[satellite]
52+
return struct.unpack('>H', packet[off:off+2])[0]
53+
54+
55+
def read_kiss_file(path, framesize=None):
56+
frames = list()
57+
frame = list()
58+
transpose = False
59+
with open(path, 'rb') as f:
60+
for c in f.read():
61+
if c == FEND:
62+
if ((framesize is None or len(frame) == framesize + 1)
63+
and len(frame) > 1
64+
and (frame[0] & 0x0f) == 0):
65+
frames.append(frame[1:])
66+
frame = list()
67+
elif transpose:
68+
if c == TFEND:
69+
frame.append(FEND)
70+
elif c == TFESC:
71+
frame.append(FESC)
72+
transpose = False
73+
elif c == FESC:
74+
transpose = True
75+
else:
76+
frame.append(c)
77+
return np.array(frames, dtype='uint8')
78+
79+
80+
def main():
81+
args = parse_args()
82+
83+
# Read frames
84+
framesizes = {Satellite.JY1SAT: 256}
85+
framesize = framesizes.get(args.satellite)
86+
x = read_kiss_file(args.input, framesize)
87+
88+
if args.satellite == Satellite.JY1SAT:
89+
# Filter out by frame id and trim to payload
90+
x = x[((x[:, 0] == 0xe0) | (x[:, 0] == 0xe1)) & (x[:, 1] == 0x10), 56:]
91+
92+
# Filter SSDV packets
93+
x = x[(x[:, 0] == 0x55) & (x[:, 1] == 0x68), :]
94+
elif args.satellite == Satellite.ERMINAZ:
95+
vcid = 4
96+
headers = [TMPrimaryHeader.parse(y) for y in x]
97+
x = np.array([y for h, y in zip(headers, x)
98+
if h.virtual_channel_id == vcid])
99+
x = x[:, TMPrimaryHeader.sizeof() + 2:]
100+
elif args.satellite == Satellite.DSLWP:
101+
vcid = 1
102+
headers = [TMPrimaryHeaderShort.parse(y) for y in x]
103+
x = np.array([y for h, y in zip(headers, x)
104+
if h.virtual_channel_id == vcid])
105+
x = x[:, TMPrimaryHeaderShort.sizeof():]
106+
107+
if x.size == 0:
108+
# there are no SSDV packets
109+
return
110+
111+
id_idxs = {
112+
Satellite.JY1SAT: 2,
113+
Satellite.ERMINAZ: 6,
114+
Satellite.DSLWP: 0,
115+
}
116+
id_idx = id_idxs[args.satellite]
117+
ids = set(x[:, id_idx])
118+
119+
decoder_args = {
120+
Satellite.JY1SAT: ['-J'],
121+
Satellite.ERMINAZ: ['-l', str(x.shape[1])],
122+
Satellite.DSLWP: ['-D'],
123+
}[args.satellite]
124+
for i in ids:
125+
L = list(x[x[:, id_idx] == i, :])
126+
L.sort(key=lambda x: seqnum(x, satellite=args.satellite))
127+
ssdv = '{}_{}.ssdv'.format(args.output, i)
128+
jpeg = '{}_{}.jpg'.format(args.output, i)
129+
np.array(L).tofile(ssdv)
130+
print('Calling SSDV decoder for image {}'.format(hex(i)))
131+
subprocess.call(['ssdv', '-d'] + decoder_args + [ssdv, jpeg])
132+
print()
133+
134+
135+
if __name__ == '__main__':
136+
main()

0 commit comments

Comments
 (0)