An implementation of the telemetry and telecommand packet utilization standard (PUS).
Project description
Puslib
Puslib is a Python library for working with the ECSS Packet Utilization Standard (PUS), a protocol widely used in the space industry.
PUS defines an application-level interface between ground and space, covering both segments. It specifies a binary packet format for telecommands and telemetry (based on CCSDS space packets) and a routing mechanism for those packets, as well as a software architecture built around application processes and a set of standard services.
Puslib covers two main use cases:
- TM/TC packet parsing — deserialize raw packet streams, inspect packet fields, and extract parameter data for post-processing or analysis.
- PUS application stack — implement a PUS-compliant backend that receives telecommands and emits telemetry, for use in EGSE equipment, simulators, or any system that communicates over TM/TC.
The PUS stack is designed from the perspective of the system being monitored and controlled. It receives telecommands and produces telemetry, making it better suited for simulators and EGSE than for mission control systems. It targets ground tooling and test equipment rather than flight software, but don't let the sky be the limit.
Install
pip install puslib
Python 3.10 or later is required.
Basic Example
from datetime import datetime
from functools import partial
from puslib import packet
from puslib import time
MyTmPacket = partial(packet.PusTmPacket.deserialize,
has_type_counter_field=False,
has_destination_field=False)
MyCucTime = partial(time.CucTime, 4, 2, has_preamble=False)
with open('telemetry.dump', 'rb') as f:
content = f.read()
data = memoryview(content)
offset = 0
cuc_time = MyCucTime()
while offset < len(data):
packet_length, packet = MyTmPacket(data[offset:],
cuc_time,
validate_fields=False,
validate_pec=False)
offset += packet_length
if packet.service == 3 and packet.subservice == 25:
print(packet)
Supported Features
- CCSDS packet handling (telecommands and telemetry packets)
- CCSDS Unsegmented Time Code (CUC) support
- Policy handling of mission specific or implementation specific configurations
- Simple abstraction of application processes
- Streams for telemetry and telecommand I/O access
- PUS Services:
- PUS 1: Request Verification
- PUS 3: Housekeeping (partial support)
- PUS 5: Event Reporting
- PUS 8: Function Management
- PUS 17: Test (partial support)
- PUS 20: On-board Parameter Management (partial support)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file puslib-0.4.0.tar.gz.
File metadata
- Download URL: puslib-0.4.0.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
505e68ccb3147968fb2b0f3802e9957624ce0ecfc2d688bc931ab3cdec2136a6
|
|
| MD5 |
a03b4a850149dd85968ec0643a380667
|
|
| BLAKE2b-256 |
459c6debd3a4bd93d74dd8acfc6e7873428a317be23e07429cc1a2a6eb509363
|
File details
Details for the file puslib-0.4.0-py3-none-any.whl.
File metadata
- Download URL: puslib-0.4.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f695f38ad4a07077f551c3f9bb28c1a0f1d2a30cd252cbc4ad8e4b229ca0218
|
|
| MD5 |
c7e3a0e0e46032eae4bc6061f50c5cb2
|
|
| BLAKE2b-256 |
731eff7ab76618d06fe81a12f38451a760bd59425c1bf9d6610380c3c50bd51a
|