Astro~/0.3
** Conformance / TM Sync and Channel Coding * PAGE 14 / 23
** Astro * Conformance
** /conformance/tmsc

TM Sync and Channel Coding

PICS proforma: what this package implements, clause by clause.

Conformance Statement for pkg/tmsc, CCSDS 131.0-B-5


A2.1 GENERAL INFORMATION

A2.1.1 Identification of PICS

FieldValue
Date of Statement (DD/MM/YYYY)24/08/2026
PICS Serial NumberASTRO-TMSC-PICS-001
System Conformance Statement Cross-ReferenceThis document

A2.1.2 Identification of Implementation Under Test (IUT)

FieldValue
Implementation Nameastro/pkg/tmsc
Implementation VersionSee go.mod / latest commit on main
Special ConfigurationNone
Other InformationGo library implementing CCSDS TM Synchronization and Channel Coding sublayer. Provides Attached Sync Marker (ASM) framing, CCSDS pseudo-randomization (255-bit legacy sequence), Channel Access Data Unit (CADU) wrapping/unwrapping, and Reed-Solomon coding with RS(255,223) and RS(255,239), dual (Berlekamp) basis symbol representation, symbol interleaving, and shortened codeblocks via virtual fill.

A2.1.3 Identification of Supplier

FieldValue
SupplierRavi Suhag
Contact Point for QueriesGitHub, github.com/ravisuhag/astro
Implementation Name(s) and Version(s)astro/pkg/tmsc (Go package)
System Name(s)Astro

A2.1.4 Identification of Specification

FieldValue
SpecificationCCSDS 131.0-B-5 (TM Synchronization and Channel Coding, Blue Book, Issue 5, September 2023)
Have any exceptions been required?Yes [X] No [ ]

NOTE: Of the coding methods, only Reed-Solomon is implemented. Convolutional (section 3), concatenated (section 5), turbo (section 6), and LDPC (sections 7 and 8) coding are not implemented. Of the two pseudo-randomizer sequences, only the 255-bit legacy sequence (10.4.2) is implemented; the 131071-bit sequence (10.4.1) is not. Non-supported capabilities are identified in section A2.2.

Status Notation

StatusMeaning
MMandatory for every implementation of the selected options.
O.1Coding method. The coding method used on a Physical Channel is a mission-selected managed parameter (12.3, table 12-1); no individual method is mandatory, but at least one must be provided.
O.2Randomizer sequence. Long (131071-bit), short (255-bit), or absent is a mission-selected managed parameter (12.3, table 12-1).
O.3Shortened codeblock. The virtual fill length Q is a mission-selected managed parameter (12.5, table 12-3).

A2.2 REQUIREMENTS LIST

Table A-1: Frame Synchronization (section 9)

ItemDescriptionReferenceStatusSupportNotes
TMSC-1ASM bit pattern 0x1ACFFC1D for uncoded, convolutional, Reed-Solomon, concatenated, rate-7/8 LDPC (Transfer Frame), and all LDPC (stream of SMTFs) coded data9.2, 9.3.1MYesDefaultASM() returns the 32-bit pattern 0x1ACFFC1D. Fresh copy returned each call to prevent mutation.
TMSC-2ASM attachment: the ASM immediately precedes the codeblock or Transfer Frame, with no intervening bits9.4.1, 9.4.2MYesWrapCADU() prepends the ASM directly to the (optionally randomized) codeblock or frame data. Custom ASM supported via parameter.
TMSC-3ASM detection/stripping (receive)9.1, 9.4MYesUnwrapCADU() validates and strips the ASM. Returns ErrSyncMarkerMismatch if the ASM is not found at the expected position.
TMSC-4ASM excluded from the Reed-Solomon encoder/decoder data space9.5.1MYesThe ASM is handled by WrapCADU()/UnwrapCADU() entirely outside RSCodec; it is never randomized or encoded.
TMSC-5Scheme-specific ASMs (64-bit for rate-1/2 turbo and rates 1/2, 2/3, 4/5 LDPC; 96/128/192-bit for low-rate turbo)9.3.2-9.3.5O.1NoNot applicable: the corresponding turbo and LDPC coding schemes are not implemented (see table A-4).
TMSC-6ASM for embedded data stream (0x352EF853)9.6ONoNot implemented. A custom ASM can be passed to WrapCADU()/UnwrapCADU() if needed.

Table A-2: Pseudo-Randomizer (section 10)

ItemDescriptionReferenceStatusSupportNotes
TMSC-7Randomization method: exclusive-OR of each bit of the codeblock/frame with a standard pseudo-random sequence10.2.1, 10.2.2MYesRandomize(data) XORs data with the PN sequence. Returns a new slice; input not modified. Applied after RS encoding, ASM excluded.
TMSC-8Synchronization and application: sequence starts at the first bit after the ASM; generator reinitialized for each codeblock/frame; ASM itself never randomized10.3, 10.4.3MYesWrapCADU() randomizes before prepending the ASM; UnwrapCADU() de-randomizes after stripping it. The generator restarts on every call.
TMSC-9131071-bit pseudo-random sequence, h(x) = x^17 + x^14 + 110.4.1O.2NoNot implemented. This is the preferred sequence in Issue 5 for obviating spectral spikes on high-data-rate links.
TMSC-10255-bit legacy pseudo-random sequence, h(x) = x^8 + x^7 + x^5 + x^3 + 1, initialized to all ones10.4.2, 10.4.3O.2YesGeneratePNSequence(length) implements the 8-bit LFSR; Randomize() applies it. Kept in Issue 5 for backward compatibility with legacy systems.
TMSC-11De-randomization (receive) using the same sequence10.3.3, 10.3.4MYesSame Randomize() function, XOR is self-inverse. Integrated into UnwrapCADU() when randomize=true.

Table A-3: Reed-Solomon Coding (section 4)

ItemDescriptionReferenceStatusSupportNotes
TMSC-12Parameters: J = 8 bits per symbol; E = 16 (255,223)4.3.1MYesNewRS255_223(), 32 check symbols, corrects up to 16 symbol errors per codeword.
TMSC-13Parameters: J = 8 bits per symbol; E = 8 (255,239)4.3.1MYesNewRS255_239(), 16 check symbols, corrects up to 8 symbol errors per codeword. E is a mission-selected managed parameter (12.5, table 12-3).
TMSC-14General characteristics: n = 255 symbols per codeword, 2E check symbols, k = n - 2E information symbols4.3.2MYesDataLen() = 223 or 239; NRoots() = 32 or 16.
TMSC-15Field generator polynomial F(x) = x^8 + x^7 + x^2 + x + 1 over GF(2)4.3.3MYes0x187; lookup tables (gfExp[512], gfLog[256]) precomputed in init().
TMSC-16Code generator polynomial g(x) = ∏(x - α^11j) for j = 128-E ... 127+E; equivalently roots β^(112+j), j = 0 ... 2E-1, with β = α^114.3.4MYesGenerator built from roots β^112 ... β^(111+2E) with β = α^11 (rsFCR = 112, rsPrim = 11 in rs.go).
TMSC-17Systematic code: information symbols unchanged, check symbols appended4.3.4 NOTE 2MYesEncode() copies data and appends parity; data portion is byte-identical on the wire.
TMSC-18Symbol interleaving, depth I ∈ {1, 2, 3, 4, 5, 8}4.3.5.1MYesEncodeInterleaved() / DecodeInterleaved(). validInterleaveDepth() rejects other depths with ErrInvalidInterleaveDepth. I is a managed parameter (12.5).
TMSC-19Maximum codeblock length 255,I symbols4.3.6MYesEnforced by exact input length checks.
TMSC-20Shortened codeblock length via virtual fill4.3.7O.3YesEncodeShortened(data, depth, virtualFill) / DecodeShortened(...) logically prepend Q zero symbols before encoding and strip them after decoding; the fill is never transmitted.
TMSC-21Virtual fill constraints: all zeros, not transmitted, at the beginning of the codeblock only, an integer multiple of 8,I bits (Q a multiple of I), Q < kI, fixed per Mission Phase4.3.7.3, 4.3.8.2MYesValidated: Q must be a non-negative multiple of the depth and smaller than depth x DataLen(), else ErrInvalidVirtualFill. Q is a managed parameter that both ends must agree on (12.5, table 12-3).
TMSC-22Dual basis representation: symbols cross the channel in the dual (Berlekamp) basis, z0 transmitted first4.3.9MYesWire bytes are dual-basis; encoder/decoder arithmetic runs in the conventional basis. Transform per 4.3.9.3 and annex F in tal.go; verified against libfec-compatible golden vectors.
TMSC-23Codeblock synchronization achieved via the ASM4.3.10MYesFixed-length codeblocks delimited by the ASM through WrapCADU()/UnwrapCADU().
TMSC-24Error-correcting decoder4.1MYesThe Blue Book specifies the code, not a decoding algorithm. Implementation: syndromes, Berlekamp-Massey, Chien search, Forney, then a post-correction syndrome recheck; any inconsistency (including σ′(X^-1) = 0) returns ErrUncorrectable rather than silently mis-decoding.
TMSC-25Uncorrectable error detection4.1, 4.2.2MYesReturns ErrUncorrectable when errors exceed E per codeword or the corrected word fails the syndrome recheck.

Table A-4: Coding Methods (sections 3, 5-8; selection per table 12-1)

ItemDescriptionReferenceStatusSupportNotes
TMSC-26Basic convolutional coding (rate 1/2, K = 7, G1 = 171 octal, G2 = 133 octal, G2 inverted)3.3O.1NoNot implemented.
TMSC-27Punctured convolutional coding (rates 2/3, 3/4, 5/6, 7/8)3.4O.1NoNot implemented.
TMSC-28Reed-Solomon coding4O.1YesSee table A-3.
TMSC-29Concatenated coding (Reed-Solomon outer, convolutional inner)5O.1NoConvolutional inner code not implemented. The RS outer code is available.
TMSC-30Turbo coding (rates 1/2, 1/3, 1/4, 1/6)6O.1NoNot implemented.
TMSC-31LDPC coding of a Transfer Frame (rates 1/2, 2/3, 4/5, 7/8)7O.1NoNot implemented.
TMSC-32LDPC coding of a stream of Sync-Marked Transfer Frames8O.1NoNot implemented.

A2.3 CONFORMANCE SUMMARY

Overall Statistics

CategoryTotal ItemsSupportedNot Supported
Mandatory within supported options (M)18180
Coding methods (O.1)817
Randomizer sequences (O.2)211
Shortened codeblock (O.3)110
Other optional (O)101
Total30219

NOTE, TMSC-5 is counted with the coding methods it belongs to.

Non-Conformances (Mandatory Items Not Supported)

None. Every mandatory requirement of the supported options (Reed-Solomon coding with the 255-bit randomizer) is implemented, including the dual basis representation (4.3.9) and the virtual fill rules (4.3.8.2).

Non-Supported Optional Items

ItemDescriptionReason
TMSC-5Scheme-specific ASMsThe turbo/LDPC schemes they belong to are not implemented.
TMSC-6Embedded data stream ASMNot implemented; custom ASMs can be supplied by the caller.
TMSC-9131071-bit pseudo-randomizerNot implemented; the legacy 255-bit sequence is provided. Missions requiring ITU power-flux-density compliance at high data rates should note 10.4.2's caveats.
TMSC-26/27Convolutional codingNot implemented.
TMSC-29Concatenated codingRequires the convolutional inner code.
TMSC-30Turbo codingNot implemented. Specialized application.
TMSC-31/32LDPC codingNot implemented. Specialized application.

Fully Supported Areas

AreaItemsImplementation
Frame synchronizationTMSC-1-4DefaultASM(), WrapCADU(), UnwrapCADU(); ASM outside the coded/randomized data space.
Pseudo-randomization (255-bit)TMSC-7, 8, 10, 11GeneratePNSequence(), Randomize() (self-inverse), integrated into the CADU pipeline.
Reed-Solomon codingTMSC-12-25GF(2^8) over 0x187, roots β^(112+j) with β = α^11, dual-basis wire representation, systematic encode, full decode pipeline with post-correction syndrome recheck, shortened codeblocks via virtual fill, interleaving depths 1, 2, 3, 4, 5, 8.