Help us shape the future of Go! Take the 2026 Go Developer Survey

astro

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.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

go get github.com/ravisuhag/astro

Requires Go 1.26 or later.

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 | PICS
Encapsulation Packet Protocol CCSDS 133.1-B-3
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 | PICS
Proximity-1 Data Link Layer CCSDS 211.0-B-6
TC Space Data Link Protocol CCSDS 232.0-B-4 pkg/tcdl Guide | 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
Unified Space Data Link Protocol CCSDS 732.1-B-2
Synchronization and Channel Coding
TM Synchronization and Channel Coding CCSDS 131.0-B-5 pkg/tmsc Guide | 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
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.

Directories

Path Synopsis
examples
downlink command
Example: Spacecraft-to-Ground Station Telemetry Simulation
Example: Spacecraft-to-Ground Station Telemetry Simulation
lossy-link command
Example: Lossy RF Link — Error Handling in CCSDS Telemetry
Example: Lossy RF Link — Error Handling in CCSDS Telemetry
pkg
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 the CRC-16-CCITT checksum used across CCSDS standards.
Package crc provides the CRC-16-CCITT checksum used across CCSDS standards.
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.
spp
tcf
tmsc
Package tmsc implements the TM Synchronization and Channel Coding sublayer per CCSDS 131.0-B-4 (TM Synchronization and Channel Coding).
Package tmsc implements the TM Synchronization and Channel Coding sublayer per CCSDS 131.0-B-4 (TM Synchronization and Channel Coding).

Jump to

Keyboard shortcuts

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