comnum.ccsds_cadu#

comnum.ccsds_cadu(marker, block, randomizer=None)#

A channel access data unit (CCSDS 131.0-B-5, Table 9-1): the bits of a marker, then the bits of a codeblock, randomized if randomizer is given (the marker never is).

Parameters:
  • marker (array_like) – the octets of the marker (ccsds_marker()).

  • block (array_like) – the bits of the codeblock, codeword or frame.

  • randomizer (str | None) – "long", "short" or None.

Returns:

the bits (uint8).

Return type:

numpy.ndarray

Raises:

ValueError – for another randomizer or a marker value above 255.

Examples

The randomized zeros carry the sequence; the receiver removes it from the LLRs by their sign:

>>> import comnum, numpy as np
>>> cadu = comnum.ccsds_cadu(comnum.ccsds_marker("asm"), np.zeros(40, np.uint8), "short")
>>> np.packbits(cadu).tobytes().hex()
'1acffc1dff480ec09a'