Crate rs2

Source
Expand description

Reed-Solomon Forward Error Correction for spacecraft data conforming to CCSDS TM SYNCHRONIZATION AND CHANNEL CODING (131.0-B-5.

This is only intended to perform RS as documented in the CCSDS document linked above. It is not a general purpose Reed-Solomon FEC implementation.

This has been ported and adopted from the Python code found in the excelent article Reed-Solomon Codes for Coders.

Modules§

dual_basis
gf

Structs§

Block

Enums§

RSState
Disposition of the RS process

Constants§

FCR
First consecutive root in g(x): 128-E
GEN
Primative element: alpha 11
J
Bits per symbol
N
Symbols per code word
PARITY_LEN
Number of bytes of parity for each message.
PRIM
Common irreducible primative polynomial x^8 + x^7 + x^2 + x + 1

Functions§

correct_message
Correct a Reed-Solomon 255 byte code block, where the last PARITY_LEN bytes are the parity/check bytes. The code block is also assumed to be in dual basis representation.
has_errors
Return true if the input code block contains 1 or more errors.