ccsds
CCSDS Spacecraft Data Stream Decoding
The project provides tools for decoding spacecraft downlink telemetry streams conforming
to the CCSDS recommended specifications (Blue Books)
TM Synchronization and Channel Coding and Space Packet Protocol.
Supports:
- Framing
- Stream synchronization
- Pseudo-noise removal
- Reed-Solomon FEC
- Spacepacket decoding
- Telemetry packets, i.e., packets with type 0
- Sequencing
- Packet groups
- Limited support for secondary header timecodes
- CCSDS Day Segmented timecodes
- NASA EOS timecodes for Aqua and Terra spacecrafts
- Provided but not directly used
Examples
The following example shows how to decode an unsynchrozied byte stream of CADUs for
the Suomi-NPP spacecraft. This example code should work for any spacecraft data stream
that conforms to CCSDS TM Synchronization and Channel Coding and Space Packet Protocol
documents.
use File;
use BufReader;
use ;
// 1. Synchronize stream and extract blocks (CADUs w/o ASM)
let file = new;
let blocks = new
.into_iter
.filter_map;
// 2. Decode those blocks into Frames
let frames = default
.reed_solomon_interleave
.build;
// 3. Extract packets from Frames
// Suomi-NPP has 0 length izone and trailer
let packets = decode_framed_packets;
References:
CCSDSSpace Packet ProtocolTM Synchronization and Channel CodingTM Synchronization and Channel Coding - Summary of Concept and Rationale
License
GNU General Public License v3.0