Various CCSDS and ECSS packet implementations
Project description
ECSS and CCSDS Spacepackets
This package contains generic implementations for various CCSDS (Consultative Committee for Space Data Systems) and ECSS (European Cooperation for Space Standardization) packet standards.
Currently, this includes the following components:
- Space Packet implementation according to CCSDS Blue Book 133.0-B-2
- PUS Telecommand and PUS Telemetry implementation according to the ECSS-E-ST-70-41C standard. It supports PUS A as well.
- CCSDS File Delivery Protcol (CFDP) packet implementations according to CCSDS Blue Book 727.0-B-5.
Install
You can install this package from PyPI
Linux:
python3 -m pip install spacepackets
Windows:
py -m pip install spacepackets
Examples
You can find all examples listed here in the example
folder as well.
ECSS PUS Packets
This examples shows how to generate PUS packets using the PUS ping telecommand and a PUS ping telemetry reply.
from spacepackets.ecss.tc import PusTelecommand
from spacepackets.ecss.tm import PusTelemetry
from spacepackets.util import get_printable_data_string, PrintFormats
def main():
ping_cmd = PusTelecommand(
service=17,
subservice=1,
apid=0x01
)
cmd_as_bytes = ping_cmd.pack()
print_string = get_printable_data_string(print_format=PrintFormats.HEX, data=cmd_as_bytes)
print(f'Ping telecommand [17,1]: {print_string}')
ping_reply = PusTelemetry(
service=17,
subservice=2,
apid=0x01
)
tm_as_bytes = ping_reply.pack()
print_string = get_printable_data_string(print_format=PrintFormats.HEX, data=tm_as_bytes)
print(f'Ping reply [17,2]: {print_string}')
if __name__ == "__main__":
main()
CCSDS Space Packet
This example shows how to generate a space packet header
from spacepackets.ccsds.spacepacket import SpacePacketHeader, PacketTypes
from spacepackets.util import get_printable_data_string, PrintFormats
def main():
spacepacket_header = SpacePacketHeader(
packet_type=PacketTypes.TC,
apid=0x01,
source_sequence_count=0,
data_length=0
)
header_as_bytes = spacepacket_header.pack()
print_string = get_printable_data_string(print_format=PrintFormats.HEX, data=header_as_bytes)
print(f'Space packet header: {print_string}')
if __name__ == "__main__":
main()
License
Copyright 2019-2021 Robin Mueller, KSat e.V. Stuttgart
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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
Hashes for spacepackets-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 123f5a9c1ac0ef24a683078ec10e6f4ab128ef00370fe9ae49d6fae8bbd679c9 |
|
MD5 | 77db196f5af04739d17e3c6068e0e67e |
|
BLAKE2b-256 | 93f61c4e0daea860a6a338690561227b29509ee157a3b6caafc48c292ebe41a4 |