astro

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

README

Astro

Go Reference License Go Report Card

Astro is an open-source Go library implementing CCSDS and ECSS space communication standards — the international protocols used by NASA, ESA, JAXA, and other space agencies for spacecraft communication and data systems.

Installation

Library
go get github.com/ravisuhag/astro
CLI
go install github.com/ravisuhag/astro@latest

Requires Go 1.26 or later.

CLI

The astro CLI provides commands for encoding, decoding, inspecting, and validating CCSDS data directly from the terminal.

# Encode a telemetry Space Packet
astro spp encode --apid 100 --type tm --data 68656c6c6f

# Inspect a packet with annotated hex dump
astro spp encode --apid 100 --type tm --data 68656c6c6f | astro spp inspect --input hex

# Validate a packet with CRC verification
astro spp encode --apid 100 --type tm --data a1b2c3d4 --crc | astro spp validate --input hex --crc
Command Description Docs
astro spp Space Packet Protocol — encode, decode, inspect, validate, stream, gen Reference
astro epp Encapsulation Packet Protocol — encode, decode, inspect, validate, stream, gen Reference
astro time CCSDS Time Code Formats — encode, decode, inspect, now Reference
astro tm TM Transfer Frames — encode, decode, inspect, gaps, demux, gen Reference
astro tc TC Transfer Frames — encode, decode, inspect, gen Reference
astro cadu Channel Access Data Units — wrap, unwrap, inspect, sync, gen Reference
astro cltu Command Link Transmission Units — wrap, unwrap, inspect, gen Reference
astro usdl USLP Transfer Frames — encode, decode, inspect, gen Reference
astro aos AOS Transfer Frames — encode, decode, inspect, gen Reference

Library Usage

import (
	"github.com/ravisuhag/astro/pkg/crc"
	"github.com/ravisuhag/astro/pkg/spp"
	"github.com/ravisuhag/astro/pkg/tmdl"
	"github.com/ravisuhag/astro/pkg/tmsc"
)

// Create and encode a telemetry packet
packet, _ := spp.NewTMPacket(123, []byte("temperature=22.5"))
encoded, _ := packet.Encode()

// Frame the packet with TM Data Link
frame, _ := tmdl.NewTMTransferFrame(0x1A, 1, encoded, nil, nil)
frameBytes, _ := frame.Encode()

// Wrap the frame as a Channel Access Data Unit (CADU)
cadu, _ := tmsc.NewCADU(frameBytes)
caduBytes, _ := cadu.Encode()

// Compute CRC for error detection
checksum := crc.CRC16CCITT(caduBytes)

Protocols

Protocol Standard Package Docs
Space Packet and Transport
Space Packet Protocol CCSDS 133.0-B-2 pkg/spp Guide | CLI | PICS
Encapsulation Packet Protocol CCSDS 133.1-B-3 pkg/epp Reference | CLI | PICS
CCSDS File Delivery Protocol CCSDS 727.0-B-5 pkg/cfdp Guide | PICS
Licklider Transmission Protocol CCSDS 734.1-B-1 pkg/ltp Guide | PICS
Bundle Protocol CCSDS 734.2-B-1 pkg/bp Guide | PICS
Space Data Link
TM Space Data Link Protocol CCSDS 132.0-B-3 pkg/tmdl Guide | CLI | PICS
Proximity-1 Data Link Layer CCSDS 211.0-B-6 pkg/pxdl Guide | PICS
TC Space Data Link Protocol CCSDS 232.0-B-4 pkg/tcdl Guide | CLI | PICS
Communications Operation Procedure-1 CCSDS 232.1-B-2 pkg/cop Guide | PICS
Space Data Link Security CCSDS 355.0-B-2 pkg/sdls Guide | PICS
AOS Space Data Link Protocol CCSDS 732.0-B-4 pkg/aos Guide | CLI | PICS
Unified Space Data Link Protocol CCSDS 732.1-B-3 pkg/usdl Guide | CLI | PICS
Synchronization and Channel Coding
TM Synchronization and Channel Coding CCSDS 131.0-B-5 pkg/tmsc Guide | CLI | PICS
Optical Communications Coding and Sync CCSDS 142.0-B-1 pkg/ocsc Guide | PICS
Proximity-1 Coding and Sync CCSDS 211.2-B-3 pkg/pxsc Guide | PICS
TC Synchronization and Channel Coding CCSDS 231.0-B-4 pkg/tcsc Guide | CLI | PICS
Space Link Extension
SLE Return All Frames CCSDS 911.1-B-5 pkg/sle Guide | PICS
SLE Return Channel Frames CCSDS 911.2-B-4 pkg/sle Guide | PICS
SLE Return Operational Control Fields CCSDS 911.5-B-4 pkg/sle Guide | PICS
SLE Forward CLTU CCSDS 912.1-B-5 pkg/sle Guide | PICS
SLE Internet Protocol for Transfer Services CCSDS 913.1-B-2 pkg/sle Guide | PICS
Data Compression
Lossless Data Compression CCSDS 121.0-B-3 pkg/ldc Guide | PICS
Image Data Compression CCSDS 122.0-B-2
Spectral Preprocessing Transform CCSDS 122.1-B-1
Low-Complexity Lossless Image Compression CCSDS 123.0-B-2
Robust Compression of Housekeeping Data CCSDS 124.0-B-1 pkg/rhc Guide | PICS
Time
Time Code Formats CCSDS 301.0-B-4 pkg/tcf Guide
Packet Utilization
Packet Utilization Standard ECSS-E-ST-70-41C pkg/pus Guide | PICS
Test and Operations Procedure Language ECSS-E-ST-70-32C
Space Data Links — Telemetry Transfer Frame Protocol ECSS-E-ST-50-03C pkg/tmdl Conformance
Mission Database
XML Telemetric and Command Exchange XTCE 1.2 / CCSDS 660.1-G-2 pkg/xtce Guide | Coverage
Shared Utilities
CRC-16-CCITT CCSDS 130.0-G-3 pkg/crc

Contributing

Contributions are welcome. Each protocol listed above without a package is open for implementation. To get started:

  1. Read the relevant CCSDS Blue Book or ECSS standard (linked in the table above).
  2. Look at pkg/spp, pkg/tmdl, pkg/tmsc, or pkg/crc for the established patterns — struct design, encode/decode, validation, options, and tests.
  3. Open an issue to discuss your approach before submitting a PR.

License

This project is licensed under the Apache 2.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
examples
downlink command
Example: Spacecraft-to-Ground Station Telemetry Simulation
Example: Spacecraft-to-Ground Station Telemetry Simulation
lossylink command
Example: Lossy RF Link — Error Handling in CCSDS Telemetry
Example: Lossy RF Link — Error Handling in CCSDS Telemetry
uplink command
Example: Ground Station-to-Spacecraft Telecommand Simulation
Example: Ground Station-to-Spacecraft Telecommand Simulation
internal
cmac
Package cmac implements the AES-CMAC message authentication code of NIST SP 800-38B, also published as RFC 4493.
Package cmac implements the AES-CMAC message authentication code of NIST SP 800-38B, also published as RFC 4493.
pn
Package pn generates the CCSDS pseudo-randomizer sequence shared by the TM and TC synchronization and channel coding layers.
Package pn generates the CCSDS pseudo-randomizer sequence shared by the TM and TC synchronization and channel coding layers.
pkg
aos
Package aos implements the CCSDS Advanced Orbiting Systems (AOS) Space Data Link Protocol per CCSDS 732.0-B-4.
Package aos implements the CCSDS Advanced Orbiting Systems (AOS) Space Data Link Protocol per CCSDS 732.0-B-4.
bp
Package bp implements the Bundle Protocol version 6 per RFC 5050, profiled for space missions by CCSDS 734.2-B-1.
Package bp implements the Bundle Protocol version 6 per RFC 5050, profiled for space missions by CCSDS 734.2-B-1.
cfdp
Package cfdp implements the CCSDS File Delivery Protocol per CCSDS 727.0-B-5 (July 2020).
Package cfdp implements the CCSDS File Delivery Protocol per CCSDS 727.0-B-5 (July 2020).
cop
Package cop implements the Communications Operation Procedure-1 (COP-1) per CCSDS 232.1-B-2.
Package cop implements the Communications Operation Procedure-1 (COP-1) per CCSDS 232.1-B-2.
crc
Package crc provides CRC checksums used across CCSDS standards.
Package crc provides CRC checksums used across CCSDS standards.
epp
ldc
Package ldc implements CCSDS Lossless Data Compression per CCSDS 121.0-B-3, the Rice adaptive entropy coder.
Package ldc implements CCSDS Lossless Data Compression per CCSDS 121.0-B-3, the Rice adaptive entropy coder.
ltp
Package ltp implements the Licklider Transmission Protocol per RFC 5326, profiled for space links by CCSDS 734.1-B-1.
Package ltp implements the Licklider Transmission Protocol per RFC 5326, profiled for space links by CCSDS 734.1-B-1.
ocsc
Package ocsc implements the data-conditioning chain of the CCSDS optical communications coding and synchronization standard, CCSDS 142.0-B-1 (August 2019).
Package ocsc implements the data-conditioning chain of the CCSDS optical communications coding and synchronization standard, CCSDS 142.0-B-1 (August 2019).
pus
Package pus implements the ECSS Packet Utilization Standard, PUS-C, per ECSS-E-ST-70-41C (15 April 2016).
Package pus implements the ECSS Packet Utilization Standard, PUS-C, per ECSS-E-ST-70-41C (15 April 2016).
pxdl
Package pxdl implements the Proximity-1 Space Data Link Protocol per CCSDS 211.0-B-6 (July 2020), Data Link Layer.
Package pxdl implements the Proximity-1 Space Data Link Protocol per CCSDS 211.0-B-6 (July 2020), Data Link Layer.
pxsc
Package pxsc implements the Proximity-1 Coding and Synchronization Sublayer per CCSDS 211.2-B-3 (October 2019).
Package pxsc implements the Proximity-1 Coding and Synchronization Sublayer per CCSDS 211.2-B-3 (October 2019).
rhc
Package rhc implements Robust Compression of Fixed-Length Housekeeping Data per CCSDS 124.0-B-1, the POCKET+ algorithm.
Package rhc implements Robust Compression of Fixed-Length Housekeeping Data per CCSDS 124.0-B-1, the POCKET+ algorithm.
sdl
Package sdl provides shared data link primitives used by both TM (tmdl) and TC (tcdl) Space Data Link Protocol implementations.
Package sdl provides shared data link primitives used by both TM (tmdl) and TC (tcdl) Space Data Link Protocol implementations.
sdls
Package sdls implements the Space Data Link Security Protocol per CCSDS 355.0-B-2 (July 2022).
Package sdls implements the Space Data Link Security Protocol per CCSDS 355.0-B-2 (July 2022).
sdnv
Package sdnv encodes and decodes Self-Delimiting Numeric Values.
Package sdnv encodes and decodes Self-Delimiting Numeric Values.
sle
Package sle implements the foundation of the CCSDS Space Link Extension transfer services: the Internet SLE Protocol One transport, a BER codec for SLE protocol data units, ISP1 credentials, and the association handshake.
Package sle implements the foundation of the CCSDS Space Link Extension transfer services: the Internet SLE Protocol One transport, a BER codec for SLE protocol data units, ISP1 credentials, and the association handshake.
spp
tcf
Package tcf implements CCSDS Time Code Formats per CCSDS 301.0-B-4.
Package tcf implements CCSDS Time Code Formats per CCSDS 301.0-B-4.
tcsc
Package tcsc implements the TC Synchronization and Channel Coding sublayer per CCSDS 231.0-B-4 (TC Synchronization and Channel Coding).
Package tcsc implements the TC Synchronization and Channel Coding sublayer per CCSDS 231.0-B-4 (TC Synchronization and Channel Coding).
tmsc
Package tmsc implements the TM Synchronization and Channel Coding sublayer per CCSDS 131.0-B-5 (TM Synchronization and Channel Coding).
Package tmsc implements the TM Synchronization and Channel Coding sublayer per CCSDS 131.0-B-5 (TM Synchronization and Channel Coding).
usdl
Package usdl implements the CCSDS Unified Space Data Link Protocol (USLP) per CCSDS 732.1-B-3.
Package usdl implements the CCSDS Unified Space Data Link Protocol (USLP) per CCSDS 732.1-B-3.
xtce
Package xtce implements the XML Telemetric and Command Exchange format, version 1.2, as published by the OMG and described by CCSDS 660.1-G-2.
Package xtce implements the XML Telemetric and Command Exchange format, version 1.2, as published by the OMG and described by CCSDS 660.1-G-2.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL