Skip to main content

gold_codes

Function gold_codes 

Source
pub fn gold_codes(n: u32) -> Result<Vec<Vec<u8>>, ErrorsJSL>
Expand description

Generates the Gold family for register length n (3..=20, not a multiple of 4).

Returns 2^n + 1 sequences of 2^n - 1 chips each, as bits (0/1): index 0 is the first m-sequence u, index 1 is the second m-sequence v (a decimation of u), and index 2 + τ is u ⊕ (v cyclically shifted by τ). Map bits to ±1 chips with 1 - 2 * bit for correlation.