Description

The Receiver is a communication component responsible for receiving, buffering, and decoding data packets transmitted over telemetry links. It extends the base Antenna class and provides the interface between the physical communication layer managed by the Telemetry System and higher-level data consumers. The receiver models realistic packet-based communication including propagation delays, bit error application, bandwidth-limited processing, and data reassembly from fragmented packets.


Example Use Cases

  • Spacecraft Command Reception: Receive uplinked commands from ground stations for onboard execution.
  • Ground Station Data Collection: Capture telemetry and science data downlinked from spacecraft.
  • Inter-Satellite Data Relay: Receive relayed data from other spacecraft in a constellation.
  • Communication Protocol Testing: Evaluate error detection and packet reassembly under realistic link conditions.

Module Implementation

The receiver operates as a packet-based communication endpoint with internal buffers for processing incoming data and storing reassembled output ready for consumption.

Data Flow Overview

Data flows through the receiver in distinct phases:

  1. Packet Reception: Packets are copied from connected transmitters and stamped with arrival times
  2. Delay Application: Light-time and transmission delays determine when packets become available
  3. Error Application: Bit errors are applied based on the link’s bit error rate
  4. Reassembly: Complete message groups are reconstructed from individual packets
  5. Output: Decoded data is made available through typed receive methods

Propagation Delay

Each received packet is assigned an arrival time that accounts for both light-time delay and transmission delay:

where:

  • is the time the packet was transmitted [s]
  • is the light-time delay [s]
  • is the distance between transmitter and receiver [m]
  • is the speed of light [m/s]

The transmission delay depends on the packet size and effective bit rate:

where is the packet size in bytes and is the effective bit rate in bits per second.

Effective Bit Rate

The effective bit rate for each link is determined by the minimum of the receiver’s configured bit rate and the link’s transmission rate, scaled by the connection fraction and distributed across active links:

where:

  • is the receiver’s configured bit rate [bps]
  • is the link’s transmission rate from the Telemetry System [bps]
  • is the number of active transmitting links
  • is the connection fraction [0-1]

Bit Error Application

The receiver applies bit errors to incoming packets based on the link’s calculated bit error rate (BER). For each packet, errors are introduced probabilistically.

For low BER (< 0.001), the expected number of bit errors is calculated and that many random bits are flipped:

where is the total number of bits in the packet.

For higher BER, each bit is tested individually:

The Poisson sampling for low BER uses Knuth’s algorithm for small expected values ():

where are uniform random samples. For larger expected values, a Gaussian approximation is used:

Buffer Management

The receiver maintains a processing buffer with a configurable maximum size. When the buffer is exceeded, the oldest packets are removed:

where is the configured buffer size in bytes.

Bandwidth-Limited Processing

The receiver can only process a limited amount of data per simulation step, determined by the effective bit rate:

where is the simulation time step. Packet groups are processed in order until the available bandwidth is exhausted.

Packet Reassembly

Packets belonging to the same message are grouped by their unique message identifier. A message group is considered complete and ready for reassembly when:

  1. All packets in the sequence have arrived (current time ≥ maximum arrival time)
  2. A terminal packet exists (indicated by NextPacket < 0)
  3. The packet count matches the expected sequence length

Complete groups are reassembled by concatenating packet data in sequence order.

Corruption Detection

When DeleteCorruptedPackets is enabled, the receiver validates each packet using checksum comparison:

where is the packet data and is the stored checksum. If any packet fails validation, the entire message group is discarded.

Data Decoding

The receiver provides typed methods for retrieving decoded data:

MethodOutput TypeDefault Key Prefix
ReceiveBytesbyte[]b_
ReceiveStringstrings_
ReceiveJSONJTokenj_
ReceiveMessageMessagem_ + type name

Each method dequeues the oldest complete data chunk for the specified key and removes it from the output buffer.

Signal Quality Metrics

The receiver tracks aggregate signal quality across all connected links:

This weighted average prioritizes links contributing more data throughput. The total received signal power is also accumulated:

Sensitivity Threshold

The receiver has a configurable sensitivity threshold in decibels. Links with an effective signal-to-noise ratio below this threshold cannot transfer data:

Doppler Shift

When enabled, the receiver frequency used for connection fraction calculations accounts for Doppler shift computed by the Telemetry System. This affects which transmitted signals fall within the receiver’s passband.

Interference Override

An interference override parameter allows external models to inject additional bit errors independent of the link budget calculations:

This enables testing of interference scenarios without modifying the underlying link parameters.


Assumptions/Limitations

  • Packets are processed in order of arrival time; out-of-order delivery is handled by the reassembly logic.
  • The buffer uses a simple oldest-first eviction policy; priority-based buffering is not supported.
  • Bit errors are applied independently to each bit; burst error patterns are not explicitly modelled.
  • Bandwidth is shared equally among active links; priority or weighted allocation is not available.
  • Checksum validation is all-or-nothing; partial message recovery is not supported.
  • The receiver does not implement automatic repeat request (ARQ) or other retransmission protocols.
  • Timing resolution depends on the simulation time step; sub-step packet arrivals are not modelled.
  • The Poisson approximation for bit errors may introduce minor statistical variations for very large packets.
  • Message reassembly requires all packets to arrive; partial message delivery

References

[1] J. R. Wertz and W. J. Larson, Space Mission Analysis and Design, 3rd ed., Space Technology Library, Dordrecht, NL: Springer, 1999. [2] D. E. Knuth, The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, Reading, MA, USA: Addison–Wesley, 1969, pp. 139–140. [3] M. Sugiyama, “Analytic approximation of marginal likelihood,” in Introduction to Statistical Machine Learning, M. Sugiyama, Ed. Cambridge, MA, USA: Morgan Kaufmann, 2016, pp. 197–204. doi: 10.1016/B978-0-12-802121-7.00029-7.