daniestevez / gr-satellites

GNU Radio decoder for Amateur satellites
GNU General Public License v3.0
762 stars 155 forks source link

Changed CSP packet id to network endian #446

Closed Rakagami closed 1 year ago

Rakagami commented 1 year ago

In libcsp the Header ID is encoded as network/big-endian for csp 1 and csp 2.0:

Refer to:

daniestevez commented 1 year ago

The file python/csp_header.py is only used in some legacy code. We now have python/telemetry/csp.py, which uses construct and is used mostly everywhere.

I've checked where csp_header.py is still used, and saw the following:

The endianness of in csp.py was changed at some point because of #295. Your PR now changes csp_header.py to match the current state of csp.py, which seems good. Chances for breaking something else as a result of this change are slim, because csp_header.py isn't really used anywhere. Therefore, I'm happy to merge this PR, even though csp_header.py should be removed at some point. If you have code that is using csp_header.py, it probably makes sense to update it to use csp.py.

Rakagami commented 1 year ago

We are using print_header.py in our project which depended on csp_header.py. We will probably update to csp.py then if csp_header.py will be deleted anyway. What would you suggest as a replacement for print_header.py if we use csp.py?

daniestevez commented 1 year ago

It's possible to use the Telemetry Parser block with a telemetry definition of csp to replace print_header.py.

And now that I check, I see that the import for cspv2 is missing in __init__.py, so I'll go ahead and add this.