File wfm_dsp.h¶
FileList > inc > wfm > wfm_dsp.h
Go to the source code of this file
DSSS spreading + root-raised-cosine pulse shaping (Phase B). More...
#include "clib_common.h"
Public Functions¶
| Type | Name |
|---|---|
| void | wfm_dsss_spread (const float _Complex * syms, size_t n_sym, const uint8_t * code, size_t sf, float _Complex * out) Spread n_sym complex data symbols by a binary PN code. |
| void | wfm_rrc_taps (double beta, int sps, int span, float * taps) Fill taps with a unit-energy root-raised-cosine impulse response. |
Public Static Functions¶
| Type | Name |
|---|---|
| size_t | wfm_rrc_ntaps (int sps, int span) Number of taps a wfm_rrc_taps call produces:2*span*sps + 1 . |
Detailed Description¶
Two pure DSP primitives the engine/composer use to build spread-spectrum and band-limited waveforms: * wfm_dsss_spread: multiply each data symbol by a PN chip code. * wfm_rrc_taps: a unit-energy root-raised-cosine FIR (matched-filter pulse shape), applied by upsample + FIR.
Public Functions Documentation¶
function wfm_dsss_spread¶
Spread n_sym complex data symbols by a binary PN code.
void wfm_dsss_spread (
const float _Complex * syms,
size_t n_sym,
const uint8_t * code,
size_t sf,
float _Complex * out
)
out[i*sf + j] = syms[i] * (code[j] ? -1 : +1) — each symbol is repeated across sf chips, sign-flipped per code chip. Output length is n_sym*sf. Works for BPSK (real syms) and QPSK (complex syms).
Parameters:
symscomplex data symbols;n_symtheir count.codePN chip code (0/1), lengthsf;sfspreading factor.outoutput chips, lengthn_sym * sf.
function wfm_rrc_taps¶
Fill taps with a unit-energy root-raised-cosine impulse response.
Length is wfm_rrc_ntaps(sps, span); the response is symmetric about the centre tap and normalised so sum(taps^2) == 1 (so cascading TX·RX gives a Nyquist raised cosine). The t = 0 and t = ±1/(4β) singularities are handled by their closed-form limits.
Parameters:
betaroll-off in[0, 1].spssamples per symbol (>= 1).spanone-sided span in symbols (>= 1).tapsoutput array of lengthwfm_rrc_ntaps(sps, span).
Public Static Functions Documentation¶
function wfm_rrc_ntaps¶
Number of taps a wfm_rrc_taps call produces:2*span*sps + 1 .
Parameters:
spssamples per symbol (>= 1).spanone-sided filter span in symbols (>= 1).
The documentation for this class was generated from the following file native/inc/wfm/wfm_dsp.h