Skip to content

Latest commit

 

History

History
134 lines (107 loc) · 8.24 KB

File metadata and controls

134 lines (107 loc) · 8.24 KB

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 Reference
astro epp Encapsulation Packet Protocol — encode, decode, inspect, validate, stream Reference
astro time CCSDS Time Code Formats — encode, decode, inspect, now Reference
astro tm TM Transfer Frames — encode, decode, inspect, gaps, demux Reference
astro tc TC Transfer Frames — encode, decode, inspect Reference
astro cadu Channel Access Data Units — wrap, unwrap, inspect, sync Reference
astro cltu Command Link Transmission Units — wrap, unwrap, inspect 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 Guide | CLI | PICS
CCSDS File Delivery Protocol CCSDS 727.0-B-5
Licklider Transmission Protocol CCSDS 734.1-B-1
Bundle Protocol CCSDS 734.2-B-1
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
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
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
Proximity-1 Coding and Sync CCSDS 211.2-B-3
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-4
SLE Return Channel Frames CCSDS 911.2-B-3
SLE Forward CLTU CCSDS 912.1-B-4
SLE Return Operational Control Fields CCSDS 913.1-B-2
SLE Internet Protocol for Transfer Services CCSDS 914.0-B-2
Data Compression
Lossless Data Compression CCSDS 121.0-B-3
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
Time
Time Code Formats CCSDS 301.0-B-4 pkg/tcf Guide
Packet Utilization
Packet Utilization Standard ECSS-E-ST-70-41C
Test and Operations Procedure Language ECSS-E-ST-70-32C
Space Data Links — Service Specification ECSS-E-ST-50-03C
Mission Database
XML Telemetric and Command Exchange XTCE / CCSDS 660.1-G-2
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.