Python library to read the SCOS-2000 header
Project description
SCOSpy
SCOSpy is a python library for the Satellite Control and Operation System 2000 (SCOS-2000) header written as hexadecimal string.
Current version is 0.2.2
Library Installation
$ pip install SCOSpy
Usage
from SCOS.SCOS import *
a = SCOS(packet)
where packet is the hexadecimal string rapresentation of the Telemetry packet.
Limitation
at the moment the software works only for Telemetry and Telecommand packets (Packet Types 1 and 2) for the BepiColombo ESA Mission. In the next versions other missions will be implemented.
Data Structure
The SCOS object contain:
- Common Packet Header Structure (CPH)
and one of the following sub-object:
- Telemetry Packet Header (TMPH)
- Telecommand Packet Header (TCPH)
- Event Packet Header (EPH)
Common Packet Header Structure (CHP)
In the CHP are present the following fields.
| Field | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CTree | Used in earlier version of SCOS-2000 by c-tree to support packets storing in files and be kept for backward compatibility. | ||||||||||||||||||||||
| AccessF | Storing mode, values are:
| ||||||||||||||||||||||
| SimFlag | Simulated packet, values are:
| ||||||||||||||||||||||
| FilingTime | Filing Time. For TM this is the timestamp. For TCs, this is the release time. | ||||||||||||||||||||||
| CreationTime | Creation Time (in seconds since 1st Jan 1970 00:00:00) – this is a secondary retrieval key and for TM is the time at which the SCOS-2000 packet was
created, which is also approximately the time that the packet was received by the MCS and stored.
For TCs, this is its (estimated) execution time | ||||||||||||||||||||||
| CreateID | Used by the old SCOS-2000 archive for generating a retrieval key and set by the application which generated the packet | ||||||||||||||||||||||
| SCID | In the case of telemetry, Spacecraft ID. It has two fields:
| ||||||||||||||||||||||
| GSID | In the case of telemetry, the ID and name of the ground station which receives the frame containing this packet. It has two fields:
| ||||||||||||||||||||||
| PSize | Packet Size. Size of the entire SCOS-2000 packet, including all headers and the packet data. | ||||||||||||||||||||||
| PType | Determines the type of SCOS-2000 packet. See :ref:packet_type for details.
| ||||||||||||||||||||||
| Version | The version of this packet structure. | ||||||||||||||||||||||
| FilingFlag | Set to **1** if this packet is to be filed in the MCS archive, otherwise **0**. | ||||||||||||||||||||||
| DistFlag | Set to : **1** if this packet is to be distributed to the MCS applications, otherwise **0**. | ||||||||||||||||||||||
| TSPolicy | Determines the timestamp policy for spacecraft TM, i.e. what will be set in the Filing Time fields above:
| ||||||||||||||||||||||
| TQ | Time quality of the timestamp, used only if the TsPolicy is set to 2:
| ||||||||||||||||||||||
| StreamID | The datastream identifier in the MCS, which for TM maps to VCs:
| ||||||||||||||||||||||
| SeqCounter | Internal MCS counter used for detecting gaps – not related to the spacecraft source sequence count value in the PUS header | ||||||||||||||||||||||
| SPID | the numerical packet ID which identifies the packet structure, and maps to packet definitions in the TM/TC MIB database. Note: For TC packets, SPIDs 100 and 200 are used. | ||||||||||||||||||||||
| MissionID | For telemetry, the MCS mission identifier.
| ||||||||||||||||||||||
Telemetry Packet Header (TMPH)
If the CHP.PType is equal to 1, the packet is a telemetry. In this case is present the TMPH onject.
The object has the following structure:
| Attribute | Description |
|---|---|
|
TPSD | Structure identifier for variable length packets. |
| **RouteID** | The LSB of the RouteID field is used by SCOS-2000 to identify the Data Unit Type of Telemetry packet and its qualifier |
| **PUSAPID** | The value of the 11-bit Application Process ID, copied from the spacecraft source packet’s primary header |
| **PUSSSC** | The value of the 14-bit Source Sequence Count, copied from the spacecraft source packet’s primary header |
| **PUSST** | The value of the 8-bit Service Type, copied from the spacecraft source packet’s secondary data field header |
| **PUSSST** | The value of the 8-bit Service Sub-type, copied from the spacecraft source packet’s secondary data field header |
Telecommand Packet Header (TCPH)
If the CHP.PType is equal to 2, the packet is a telecommand. In this case is present the TCPH onject.
The object has the following structure:
| Attribute | Descriprion | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
UplinkTime | Uplink Time – initially set to the release time (FT), but updated with the timestamp copied from the radiation ground station response message providing the actual time of uplink from the antenna | ||||||||
| **ExecTime** | Execution Time – For time-tagged commands this is the UTC user provided execution time. For immediate commands this is the release time + propagation delay and later updated to be Uplink time + propagation delay | ||||||||
| **LUTime** | Last Update Time, this is the MCS system time at which the TC packet was last updated with a change of status | ||||||||
| **RequestID** | Internal MCS identifier. | ||||||||
| **ReqElemIdx** | Internal MCS sub-identifier. | ||||||||
| **VarAddSz** | Combined size of the fixed and variable parts of the command details data. | ||||||||
| **PUSAPID** | The value of the 11-bit Application Process ID, copied from the spacecraft source packet’s primary header | ||||||||
| **PID** | Process ID | ||||||||
| **PCAT** | Packet Category | ||||||||
| **PUSSSC** | The value of the 14-bit Sequence Count, copied from the spacecraft source packet’s primary header | ||||||||
| **PUSST** | Service Type - The value of the 8-bit Service Type, copied from the spacecraft source packet’s secondary data field header. | ||||||||
| **PUSSST** | Sub-Service Type - The value of the 8-bit Service Sub-type, copied from the spacecraft source packet’s secondary data field header | ||||||||
| **PUSAck** | The value of the 4-bit Ack, copied from the spacecraft source packet’s secondary data field header
| ||||||||
| **UplinkFlag** |
| ||||||||
| **SourceHost** | Numerical ID of the MCS machine running the command source. | ||||||||
| **SourceType** | Enumeration providing the type of the command source | ||||||||
| **ReqDetFixedSize** | Size of the fixed part of the command details data. |
Event Packet Header (EPH)
If the CHP.PType is equal to 3, the packet is a event. In this case is present the EPH onject.
NB: the EPH is not yet implemented.
Change Log
Version 0.2.2
- bug fix, old call to database removed
- update of the user manual
Version 0.2.1
- minor bugs fixed
Version 0.2.0
- Introduced the TCHP
- First version of the README file.
Project details
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 SCOSpy-0.2.2.tar.gz.
File metadata
- Download URL: SCOSpy-0.2.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e30ce7e5e1f4c48c00e8439f2ed1f45991bb49786ff81c13319267e19973b812
|
|
| MD5 |
a25366b1466a042be9358ca8ccf0d0a5
|
|
| BLAKE2b-256 |
3c3036620ce6b0bf13104ce8bdada7a02dc48d984b319c11e96cddb1da9b1d49
|
File details
Details for the file SCOSpy-0.2.2-py2-none-any.whl.
File metadata
- Download URL: SCOSpy-0.2.2-py2-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13067f2814c45e96afb4dd94807626c216e9dab7cd40318fdba2a90cf34cd974
|
|
| MD5 |
b02791ee768d79e4af4ecfe4580df813
|
|
| BLAKE2b-256 |
f547e8f1e3f633df3541e3f57c07417416d394945c0e38f1c475d6cbc906885f
|