pub fn msk_precode(bits: &[u8]) -> Vec<usize>Expand description
The differential precoder of MSK: the information bits $b_{1} \dots b_{N}$ give the boundary signs $d_{n} = 2 b_{n} - 1$ with $d_{0} = +1$, and the CPM symbols $a_{n} = d_{n} d_{n+1}$ (as indices, $i_{n} = (a_{n} + 1)/2$), so that the signal equals OQPSK with half-sinusoid pulses carrying $d_{n}$ on the in-phase component at even $n$ and on the quadrature component at odd $n$ (Proakis & Salehi, §3.3-2).
§Examples
use comnum_waveform::cpm::msk_precode;
assert_eq!(msk_precode(&[1, 1, 0, 0, 1]), vec![1, 1, 0, 1, 0]);