-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
139 changed files
with
6,076 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 2019-2020, 2024 Daniel Estevez <[email protected]> | ||
# | ||
# This file is part of gr-satellites | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
import subprocess | ||
import sys | ||
|
||
import numpy as np | ||
|
||
from satellites.kiss import * | ||
from satellites.telemetry.erminaz import * | ||
|
||
|
||
def print_usage(): | ||
print(f'Usage {sys.argv[0]} <erminaz_frames.kss> <output_path>') | ||
|
||
|
||
def seqnum(packet): | ||
return packet[8]*256 + packet[9] | ||
|
||
|
||
def read_kiss_file(path): | ||
frames = list() | ||
frame = list() | ||
transpose = False | ||
with open(path, 'rb') as f: | ||
for c in f.read(): | ||
if c == FEND: | ||
if len(frame) > 1 and (frame[0] & 0x0f) == 0: | ||
frames.append(frame[1:]) | ||
frame = list() | ||
elif transpose: | ||
if c == TFEND: | ||
frame.append(FEND) | ||
elif c == TFESC: | ||
frame.append(FESC) | ||
transpose = False | ||
elif c == FESC: | ||
transpose = True | ||
else: | ||
frame.append(c) | ||
return np.array(frames, dtype='uint8') | ||
|
||
|
||
def main(): | ||
if len(sys.argv) != 3: | ||
print_usage() | ||
sys.exit(1) | ||
|
||
input_file = sys.argv[1] | ||
output_file = sys.argv[2] | ||
|
||
# Read frames | ||
x = read_kiss_file(input_file) | ||
|
||
# Filter out by virtual channel | ||
vcid = 4 | ||
headers = [TMPrimaryHeader.parse(y) for y in x] | ||
x = np.array([y for h, y in zip(headers, x) | ||
if h.virtual_channel_id == vcid]) | ||
if x.size == 0: | ||
# there are no SSDV packets | ||
return | ||
|
||
# Extract SSDV packets | ||
x = x[:, TMPrimaryHeader.sizeof() + 2:] | ||
id_idx = 6 | ||
ids = set(x[:, id_idx]) | ||
|
||
for i in ids: | ||
L = list(x[x[:, id_idx] == i, :]) | ||
L.sort(key=seqnum) | ||
ssdv = '{}_{:03}.ssdv'.format(output_file, i) | ||
jpeg = '{}_{:03}.jpg'.format(output_file, i) | ||
np.array(L).tofile(ssdv) | ||
print('Calling SSDV decoder for image {}'.format(hex(i))) | ||
subprocess.call(['ssdv', '-d', '-l', str(x.shape[1]), ssdv, jpeg]) | ||
print() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# gr-satellites policy for commercial satellites | ||
|
||
The main mission of the gr-satellites project is to provide GNU Radio decoders | ||
for all (or most) satellites that transmit on amateur radio spectrum. This is in | ||
agreement with the self-training and technical experimentation purposes that | ||
define the amateur service in the ITU Radio Regulations, and with the principle | ||
of not encoding amateur transmissions with the purpose of obscuring their | ||
meaning. | ||
|
||
gr-satellites can also be a useful tool for commercial satellite missions, and | ||
it is in fact used in several such missions. However, the gr-satellites project | ||
reckons and respects that some commercial satellite operators might not be | ||
approving of amateur radio operators and amateur satellite observers decoding | ||
data transmitted by their satellites (and this act might be illegal in some | ||
jurisdictions). | ||
|
||
The gr-satellites project will only accept code contributions (whether in the | ||
form of SatYAML files or GNU Radio blocks) specifically intended for the | ||
reception of a commercial satellite if those contributions are endorsed or | ||
acknowledged by the satellite operator or owner. This restriction only affects | ||
amateurs using gr-satellites to receive commercial satellites. Commercial | ||
satellite operators are encouraged and welcome to upstream code contributions to | ||
gr-satellites regarding their own satellites, if they wish to do so. | ||
|
||
Code contributions which are generic in nature, such as GNU Radio blocks that | ||
implement support for a radio that could potentially be used in amateur and | ||
commercial missions, are not affected by this restriction and are always | ||
accepted in gr-satellites. | ||
|
||
The gr-satellites project also acknowledges that there exist many satellites | ||
that transmit on amateur radio spectrum that are not amateur in nature, and that | ||
these satellites should not be using amateur spectrum. Some of these satellites | ||
are fully supported by gr-satellites. This is in line with the common practice | ||
of self-monitoring of amateur radio spectrum by amateur operators. Hopefully the | ||
existence of these decoders and a community that uses them to monitor the | ||
missions will be another incentive that makes non-amateur missions avoid using | ||
amateur spectrum in the future. For this reason, gr-satellites will continue | ||
trying to support any satellite that transmits on amateur radio spectrum, | ||
regardless of the nature of the mission, and accepts all contributions to this | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
gr-satellites (5.6.0-0) noble; urgency=medium | ||
|
||
* Mainstream release v5.6.0 | ||
|
||
-- <[email protected]> Tue, 3 Sep 2024 16:00:00 +0000 | ||
|
||
gr-satellites (5.5.0-1) mantic; urgency=medium | ||
|
||
* Mainstream release v5.5.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Sphinx>=5,<6 | ||
sphinx_rtd_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# pip-compile requirements.in | ||
# | ||
alabaster==0.7.13 | ||
# via sphinx | ||
babel==2.14.0 | ||
# via sphinx | ||
certifi==2023.11.17 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
docutils==0.19 | ||
# via | ||
# sphinx | ||
# sphinx-rtd-theme | ||
idna==3.6 | ||
# via requests | ||
imagesize==1.4.1 | ||
# via sphinx | ||
jinja2==3.1.2 | ||
# via sphinx | ||
markupsafe==2.1.3 | ||
# via jinja2 | ||
packaging==23.2 | ||
# via sphinx | ||
pygments==2.17.2 | ||
# via sphinx | ||
requests==2.31.0 | ||
# via sphinx | ||
snowballstemmer==2.2.0 | ||
# via sphinx | ||
sphinx==5.3.0 | ||
# via | ||
# -r requirements.in | ||
# sphinx-rtd-theme | ||
# sphinxcontrib-applehelp | ||
# sphinxcontrib-devhelp | ||
# sphinxcontrib-htmlhelp | ||
# sphinxcontrib-jquery | ||
# sphinxcontrib-qthelp | ||
# sphinxcontrib-serializinghtml | ||
sphinx-rtd-theme==2.0.0 | ||
# via -r requirements.in | ||
sphinxcontrib-applehelp==1.0.7 | ||
# via sphinx | ||
sphinxcontrib-devhelp==1.0.5 | ||
# via sphinx | ||
sphinxcontrib-htmlhelp==2.0.4 | ||
# via sphinx | ||
sphinxcontrib-jquery==4.1 | ||
# via sphinx-rtd-theme | ||
sphinxcontrib-jsmath==1.0.1 | ||
# via sphinx | ||
sphinxcontrib-qthelp==1.0.6 | ||
# via sphinx | ||
sphinxcontrib-serializinghtml==1.1.9 | ||
# via sphinx | ||
urllib3==2.1.0 | ||
# via requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.