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:

  • Parsing CCSDS data files into Pandas DataFrames or Excel spreadsheets

  • Generating CCSDS packets with random or zero-initialized fields for testing

  • Documenting packet definitions automatically using a Sphinx extension

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):

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.

spac-parse --file downlink.bin

Generate Test Packets

See the list of packet definitions available in your environment:

spac-ls

This should return something like:

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:

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:

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