-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic HORS Satellites Support #722
Open
Foxiks
wants to merge
1
commit into
daniestevez:main
Choose a base branch
from
Foxiks:hors_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
41 changes: 41 additions & 0 deletions
41
grc/components/deframers/satellites_hors_deframer.block.yml
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,41 @@ | ||
id: satellites_hors_deframer | ||
label: HORS Deframer | ||
category: '[Satellites]/Deframers' | ||
|
||
parameters: | ||
- id: threshold | ||
label: Syncword threshold | ||
dtype: int | ||
default: 0 | ||
- id: options | ||
label: Command line options | ||
dtype: string | ||
default: '""' | ||
hide: part | ||
|
||
inputs: | ||
- domain: stream | ||
dtype: float | ||
|
||
outputs: | ||
- domain: message | ||
id: out | ||
|
||
templates: | ||
imports: import satellites.components.deframers | ||
make: satellites.components.deframers.hors_deframer(syncword_threshold = ${threshold}, options=${options}) | ||
|
||
documentation: |- | ||
Deframes HORS custom packets | ||
|
||
Input: | ||
A stream of soft symbols containing HORS packets | ||
|
||
Output: | ||
PDUs with the deframed HORS packets | ||
|
||
Parameters: | ||
Syncword threshold: number of bit errors to allow in syncword detection | ||
Command line options: options to pass down to the block, following the syntax of the gr_satellites command line tool | ||
|
||
file_format: 1 |
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,60 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 2022 Daniel Estevez <[email protected]> | ||
# Mod by Egor UB1QBJ | ||
# This file is part of gr-satellites | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# | ||
|
||
from gnuradio import gr, digital | ||
|
||
from ...hier.sync_to_pdu_packed import sync_to_pdu_packed | ||
from ...utils.options_block import options_block | ||
|
||
|
||
_syncword = '0100110000101101010001110111101111111011100001001000111001111111' | ||
|
||
|
||
class hors_deframer(gr.hier_block2, options_block): | ||
""" | ||
Hierarchical block to deframe the HORS custom framing | ||
|
||
The input is a float stream of soft symbols. The output are PDUs | ||
with frames. | ||
|
||
Args: | ||
syncword_threshold: number of bit errors allowed in syncword (int) | ||
options: Options from argparse | ||
""" | ||
def __init__(self, syncword_threshold=None, options=None): | ||
gr.hier_block2.__init__( | ||
self, | ||
'hors_deframer', | ||
gr.io_signature(1, 1, gr.sizeof_float), | ||
gr.io_signature(0, 0, 0)) | ||
options_block.__init__(self, options) | ||
|
||
self.message_port_register_hier_out('out') | ||
|
||
if syncword_threshold is None: | ||
syncword_threshold = self.options.syncword_threshold | ||
self.slicer = digital.binary_slicer_fb() | ||
self.deframer = sync_to_pdu_packed( | ||
packlen=71, sync=_syncword, threshold=syncword_threshold) | ||
|
||
self.connect(self, self.slicer, self.deframer) | ||
self.msg_connect((self.deframer, 'out'), (self, 'out')) | ||
|
||
_default_sync_threshold = 7 | ||
|
||
@classmethod | ||
def add_options(cls, parser): | ||
""" | ||
Adds HORS deframer specific options to the argparse parser | ||
""" | ||
parser.add_argument( | ||
'--syncword_threshold', type=int, | ||
default=cls._default_sync_threshold, | ||
help='Syncword bit errors [default=%(default)r]') |
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,16 @@ | ||
name: HORS-1 | ||
alternative_names: | ||
- RS55S | ||
- HORS | ||
norad: 57188 | ||
data: | ||
&tlm Telemetry: | ||
unknown | ||
transmitters: | ||
9k6 FSK downlink: | ||
frequency: 435.300e+6 | ||
modulation: FSK | ||
baudrate: 9600 | ||
framing: HORS | ||
data: | ||
- *tlm |
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,16 @@ | ||
name: HORS-2 | ||
alternative_names: | ||
- RS56S | ||
- HORS | ||
norad: 57196 | ||
data: | ||
&tlm Telemetry: | ||
unknown | ||
transmitters: | ||
9k6 FSK downlink: | ||
frequency: 435.500e+6 | ||
modulation: FSK | ||
baudrate: 9600 | ||
framing: HORS | ||
data: | ||
- *tlm |
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,23 @@ | ||
name: HORS-3 | ||
alternative_names: | ||
- RS81S | ||
- HORS | ||
norad: 61753 | ||
data: | ||
&tlm Telemetry: | ||
unknown | ||
transmitters: | ||
9k6 FSK downlink: | ||
frequency: 435.650e+6 | ||
modulation: FSK | ||
baudrate: 9600 | ||
framing: HORS | ||
data: | ||
- *tlm | ||
9k6 FSK downlink: | ||
frequency: 435.200e+6 | ||
modulation: FSK | ||
baudrate: 9600 | ||
framing: HORS | ||
data: | ||
- *tlm |
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,16 @@ | ||
name: HORS-4 | ||
alternative_names: | ||
- RS82S | ||
- HORS | ||
norad: 61754 | ||
data: | ||
&tlm Telemetry: | ||
unknown | ||
transmitters: | ||
9k6 FSK downlink: | ||
frequency: 435.700e+6 | ||
modulation: FSK | ||
baudrate: 9600 | ||
framing: HORS | ||
data: | ||
- *tlm |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no CRC, no scrambling, no FEC, no nothing? Just a 64-bit syncword and 71 bytes of packet data?
Is there documentation publicly available about the transmission format used by these satellites?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the correlation, it has a 64-bit sync word and 71 bytes of data. There is a PN pattern in the data, but since I have absolutely no documentation on these satellites, I don't know the PN generation polynomials. Otherwise, it doesn't have much else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is enough to constitute a deframer, especially because there is no way to check for bad decodes without a CRC.
Let me see if I got this right: through reverse-engineering you managed to identify that all the packets start by the same 64-bit sequence (which you are using here as syncword) and following that they have 71 * 8 bits. Moreover, you say that there is a PN pattern, so there might not be any data in these packets, or the data would need to be despread for further processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope will get at least some deeper info about packet structure, but it will be good to have ability to demodulate data from these sats