Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

CCSDS Spacecraft Data Stream Decoding

WARNING: This project is very much in development, and the API is very likely to change in ways that will break things. If you have comments or suggestions regarding the API feel free to file an issue.

The project provides tools for decoding spacecraft downlink telemetry streams conforming to the CCSDS recommended specifications (Blue Books) TM Synchronization and Channel Coding, AOS Space Data Link Protocol, and Space Packet Protocol.

Supports:

  • Framing
    • Supports AOS Transfer Frames (CCSDS 732.0-B-4)
      • TM Transfer Frames (CCSDS 132.0-B-3) are not currently supported
    • Stream synchronization
    • Deransomization (pseudo-noise removal)
    • Integrity checking/correcting
      • Reed-Solomon FEC
      • CRC
  • Spacepacket decoding
    • Telemetry packets
    • 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

Much of the functionality is wrapped around [Iterator]s, and as such most of the public API returns an [Iterator] of some sort.

Examples

The following example shows how to decode an unsynchronized 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, where the input data is a stream containing pseudo-randomized CADUs with Reed-Solomon FEC (including parity bytes).

use std::fs::File;
use std::io::BufReader;
use ccsds::framing::{Pipeline, packet_decoder, RsOpts};

let block_len = 1020; // CADU length - ASM length
let interleave: u8 = 4;
let virtual_fill: usize = 0;
let izone_len = 0;
let trailer_len = 0;

let rs_opts = RsOpts::new(interleave)
    .with_virtual_fill(virtual_fill)
    .with_correction(true)
    .with_detection(true)
    .with_num_threads(0); // use all CPUs

let file = BufReader::new(File::open("snpp.dat").unwrap());
let frames = Pipeline::new(block_len)
    .with_rs(rs_opts)
    .start(file);

let packets = packet_decoder(frames, izone_len, trailer_len);

Crate Features

  • default - The default features currently includes just merge
  • timecode - Include support for CCSDS timecode parsing utilizing hifitime. This is required for feature merge.
  • python - Include Python PyO3 support.
  • serde - Include serde serialize and deserialize support for core structs. Any structs that contain byte arrays make use of serde_bytes.

References

License

Licensed under either of

at your option.