Newer
Older
PyCCSDS is a library to read a data packet coming from a space mission that follows the Consultative Committee for Space Data Systems (CCSDS) standard
dat = CCSDS('BepiColombo',packet)
```
wehre *packet* is a string with the HEX rappresentation of the pachet
The CCSDS Header is composed by two blocks:
+ the Source Packet Header
+ the Packet Data Field
The first one il long 48 bits the second one has a varble dimension and structure depending by the type and the content of the packet. in [Figure 1](#figure-1-telemetry-packet) is reported the structure for a Telemetry Packet.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
The structure of the CCSDS class follow the structure of the packet header.
```mermaid
classDiagram
CCSDS --|> SPH
CCSDS --|> PDF
SPH --|> packetID
SPH--|> sequenceControl
PDF --|> DFHeader
class CCSDS{
+ str Data
}
class DFHeader{
+ uint PUSVersion
+ uint ServiceType
+ uint ServiceSubType
+ uint DestinationId
+ uint Synchronization
+ uint CorseTime
+ uint FineTime
+ str SCET
+ str UTCTime
}
class SPH{
+ uint packetLength
}
class packetID{
+ uint VersionNum
+ uint packetType
+ uint dataFieldHeaderFlag
+ uint Apid
+ uint Pid
+ uint Pcat
}
class sequenceControl{
+ bin SegmentationFlag
+ uint SSC
}
class PDF{
+str Data
}
```
![TM packet](docs/TM_Packet_Header.png "Telemetry packet")