| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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:
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.
pip install puslibPython 3.10 or later is required.
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)| Back | FazBrowse Home | New Git URL |