Classes / Systems class / Systems Department
Systems Track: Spacecraft Links and Flight Software Basics · Module 4 of 4 · about 30 min
Packets and protocols: how the data is packaged
Spacecraft and ground systems from different companies and countries need to understand each other, so the industry uses shared standards. Most come from the Consultative Committee for Space Data Systems (CCSDS), a group of space agencies including NASA and ESA. Their standards are called Recommended Standards and are published as "Blue Books", free to download.
The workhorse is the Space Packet, defined in CCSDS 133.0-B. Every packet starts with a primary header of exactly 6 bytes (48 bits). Inside it, a 3-bit version number, a 1-bit packet type (0 for telemetry, 1 for telecommand), a 1-bit flag saying whether a secondary header follows, and an 11-bit Application Process Identifier, or APID. Then come sequence flags, a 14-bit sequence count and a 16-bit length field. After the header comes the data.
The APID tells the ground which application or data stream a packet belongs to: say, power telemetry versus camera data. With 11 bits there are 2,048 values, and the all-ones value, 2047, is reserved for idle packets that just fill time on the link. The sequence count lets the ground spot dropped or out-of-order packets. If you have ever looked at a network packet in Wireshark, this will feel familiar, and that is a useful bridge to mention if you are coming from IT or networking.
Packets ride inside larger frames defined by other CCSDS standards for the link layer, much like IP packets ride inside Ethernet frames. Ground software then unpacks frames into packets, packets into named telemetry points, and shows them on operators' screens. Engineers who can trace a value from a sensor, through a packet, to a plot on the ground are valuable in testing and operations.
Security has become part of the job. Commands sent to a spacecraft need to be authenticated so nobody else can send them, and many newer missions encrypt links as well. CCSDS publishes security standards for space links alongside its packet and frame standards. We review who could send a command as well as whether the packet parses, because a well-formed packet alone does not establish an authorized sender.
We inspect a packet at the layer its fields describe. An application identifier routes application data; a packet sequence count orders that application's packets; a transfer frame transports data across a link. These are not interchangeable identities. A packet can cross a frame boundary, so losing a frame is not necessarily the same as losing exactly one complete packet. We keep the mission's interface definition beside the standard rather than assume that all applications use the same data layout.
CCSDS 133.0-B-2 defines a six-octet primary header and a sixteen-bit Packet Data Length field. That field is the number of octets in the Packet Data Field minus one, not the total packet length. In a fictional desk example with twenty-four data-field octets, the field value is twenty-three and the full packet occupies thirty octets. Any optional secondary header is inside that data field. Counting it again outside the field would corrupt the boundary for the next packet.
The standard makes telemetry sequence counts independent per APID and continuous modulo 16,384. A counter going from 16,383 to zero is therefore expected wraparound, not automatically a reset or missing packet. Interleaved application streams can have very different counts without a fault. Within one stream, an unexpected gap is useful evidence to investigate, but it does not by itself locate the cause in an instrument rather than recording, transport or processing. We preserve the trace and its context.
Worked example, fictional parser review: the length field says fifteen, so sixteen octets of data follow the six-octet header. A captured record holds only eighteen octets altogether. It is four octets short of the declared twenty-two. We mark this record incomplete rather than reinterpret its last bytes as a valid following packet. A complete, correctly shaped record would still not authenticate its sender or authorize the action it represents. Syntax validation, source trust and operational permission are separate checks.
Practice, on paper: we make three mock records with declared lengths, available bytes, APIDs and counts. We identify one complete record, one truncated record and one normal counter wrap. Our review note shows the arithmetic, the application's expected interpretation and the unanswered questions. We use invented bytes only, do not transmit telecommands and avoid treating the exercise as a universal flight interface. The source edition is recorded so another reviewer can reproduce the interpretation.
Sources
Module quiz
10 questions, 8 correct to pass. You'll see what you missed and why, and you can retake it.