Skip to content
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

refactor snet support #508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Gioyik
Copy link

@Gioyik Gioyik commented Jul 24, 2023

As part of a university project, I got access to more information related to SNET satellites, this adds and introduces changes in telemetry to get closer to the specification of SNET.

@Gioyik
Copy link
Author

Gioyik commented Jul 24, 2023

I am not sure why the tests are failing, as it seems, they are not related to the changes I made.

@daniestevez
Copy link
Owner

I think the tests are failing because the satellites Python module cannot be imported due to the changes you made. The error message in the tests is not very helpful, though, but you can check what import satellites says on your machine.

Copy link
Owner

@daniestevez daniestevez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the main change is the addition of a MailboxTelemetry telemetry packet, as an alternative option to ADCSTelemetry and EPSTelemetry. This could be achieved without rewriting this much code, and at the moment I don't see a reason that justifies this rewrite. Can you clarify?

python/snet_deframer.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
grc/satellites_snet_deframer.block.yml Show resolved Hide resolved
grc/satellites_snet_deframer.block.yml Outdated Show resolved Hide resolved
@Gioyik Gioyik force-pushed the snet_tuberlin branch 5 times, most recently from b0cd572 to e26a62c Compare August 2, 2023 01:17
python/snet_deframer.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/snet_deframer.py Outdated Show resolved Hide resolved
python/snet_deframer.py Outdated Show resolved Hide resolved
@Gioyik
Copy link
Author

Gioyik commented Aug 8, 2023

@daniestevez I think I addressed most of your comments and requests for changes, could you please give it a check again?

This time, I added an Adapter for the MemData32 and changed the norad values accordingly to this reference: https://web.archive.org/web/20200106160215/http://dk3wn.info:80/blog/satelliten/s-net/

python/satyaml/S-NET_A.yml Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
python/telemetry/snet.py Outdated Show resolved Hide resolved
MemData32 = MemData32Adapter(BitsInteger(256))

MailboxReceiveTelemetry = Struct(
'SysTime' / BitsInteger(32),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why BitsInteger(32) instead of something like Int32sb?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong reason why, I have being using Bits* mostly, but Int32sb works too

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not interchangeable. BitsInteger is supposed to operate on a bitwise context, while Int32sb operates on bytes.

>>> Int32sb.build(2)
b'\x00\x00\x00\x02'
>>> BitsInteger(32).build(2)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00'

@daniestevez
Copy link
Owner

By the way, can you share how you're testing this code? The fact that BitsInteger(32) when not inside a bitwise context consumes 32 bytes instead of 4 makes me suspect that your test cases are not good enough.

daniestevez added a commit that referenced this pull request Oct 9, 2023
This fixes a typo in the SNET Deframer GRC block. The fix is extracted
from #508.
daniestevez added a commit that referenced this pull request Oct 9, 2023
This fixes a typo in the SNET Deframer GRC block. The fix is extracted
from #508.

(cherry picked from commit 7de329b)
daniestevez added a commit that referenced this pull request Oct 9, 2023
This fixes a typo in the SNET Deframer GRC block. The fix is extracted
from #508.

(cherry picked from commit 7de329b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants