Skip to content

Migrate to V2 packet format#113

Merged
EliasJRH merged 66 commits intomainfrom
packet-format
May 1, 2025
Merged

Migrate to V2 packet format#113
EliasJRH merged 66 commits intomainfrom
packet-format

Conversation

@EliasJRH
Copy link
Copy Markdown
Member

@EliasJRH EliasJRH commented Apr 5, 2025

Closes #109
Closes #110

ok there's quite a few commits

This PR implements and migrates the ground-station packet spec over to version 2 specified here. It also simplifies the telemetry buffer system of ye olden days and deprecates the json file which shall not be named. This PR adds a script logfile_converter.py to convert raw output from Josh into a replayable mission file for testing.

Edit: Moved all v1 missions into archive folder

khang-874 and others added 30 commits November 18, 2024 17:25
* updated some naming to be clearer for the new non-versioned spec
* add some updates for correctness
* removed the old spec as it won't be useful anymore with no versioning
* used a more dynamic approach for block parsing so we could get
  access to more useful data elsewhere
* combined the newer method with dataclasses to get benefits of both
* this new method will be slower, but should make it easier to
  understand what's happening. Blocks get parsed, blocks get converted
  to a big dict, big dict gets sent. Where measurements get put in the
  final product is up to the Blocks and very explicit in code
* also gives a good opportunity to do unit conversions in a easy to see
  place
* renamed the telemetry buffer class to reflect what it actually does
* removed the decoder, blocks are now directly responsible for deciding
  where their measurements end up
@EliasJRH EliasJRH requested review from AngusJull and linguini1 April 5, 2025 02:43
def test_metres_to_feet() -> None:
"""Test that metres are properly converted to feet."""
assert conv.metres_to_feet(5.0) == pytest.approx(16.4) # type: ignore
assert metres_to_feet(5.0) == pytest.approx(16.4) # type: ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did not know about this approx helper, gonna start using that from now on!

linguini1
linguini1 previously approved these changes Apr 6, 2025
@linguini1
Copy link
Copy Markdown
Collaborator

I guess we should fix the CI tests later

@EliasJRH EliasJRH merged commit 98a663d into main May 1, 2025
4 checks passed
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.

[ENHANCEMENT] Update packet parsing to V2 [ENHANCEMENT] Implement V2 packet spec

5 participants