Skip to content

Latest commit

 

History

131 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-2 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.

About

Astro is an open-source Go (Golang) library that aims to implement all space protocols including CCSDS (Consultative Committee for Space Data Systems) protocols, PUS and others.

Topics

Resources

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages