.. _spac-kit: ******** SPaC-Kit ******** **SPaC-Kit** is a collection of Python tools for working with **CCSDS Space Packets** built on top of `CCSDSPy `_. It provides command-line tools and workflows for parsing CCSDS files to Excel, generating test packets, and working with mission-specific or instrument-specific packet definitions via **plugin** packages. Plugins should follow the `SPaC-Kit plugin template `_. Overview ======== SPaC-Kit provides command-line tools and Python APIs for: - :doc:`Parsing ` CCSDS data files into Pandas DataFrames or Excel spreadsheets - :doc:`Generating ` CCSDS packets with random or zero-initialized fields for testing - :doc:`Documenting ` packet definitions automatically using a Sphinx extension .. admonition:: Acknowledgements This library started development in tandem with the Europa-Clipper Science Data System. Sample data, documentation generation feature, and packaging of this code was funded through a NASA ROSES 2024 call. Quick Start =========== Installation ------------ Install a plugin library first (e.g., Europa Clipper): .. code-block:: bash pip install spac-kit-europa-clipper pip install spac-kit Parse CCSDS Data ---------------- The CCSDS Space Packet definition found in the Europa-Clipper plugin will be used to parse the input file. .. code-block:: bash spac-parse --file downlink.bin Generate Test Packets --------------------- See the list of packet definitions available in your environment: .. code-block:: bash spac-ls This should return something like: .. code-block:: bash APID PACKET NAME DESCRIPTION ------------------------------------------------------------------------------------------------------------------------------- 1025 europa_clipper.radmon.metadata_radmon metadata_radmon RADMON Metadata packet structure 1089 europa_clipper.pimsu.metadata_pimsu metadata_pimsu PIMSU Metadata packet structure. ... Select the APID of the packets you want to generate data for and the number of packets expected: .. code-block:: bash spac-generate --output test.bin --apid 1025 --count 200 Auto-Generate Documentation --------------------------- An example of generated documentation can be found for the `Europa-Clipper packets `_. To get the generated documentation for your CCSDS packets, add to your Sphinx ``conf.py``: .. code-block:: python extensions = ['spac_kit.autodocs'] spacdocs_packet_modules = ['ccsds.packets.your_mission'] Want to start your own CCSDS packet library for your mission or instrument ? ============================================================================ Use the `SPac-Kit plugin template `_. Details ======== .. toctree:: :maxdepth: 2 installation parser generator autodocs api