File burst_despreader_core.h¶
FileList > burst_despreader > burst_despreader_core.h
Go to the source code of this file
BurstDespreader component API. More...
#include "doppler/clib_common.h"#include "doppler/dp_state.h"#include "doppler/jm_perf.h"#include "doppler/loop_filter/loop_filter_core.h"
Classes¶
| Type | Name |
|---|---|
| struct | dp_burst_despreader_state_t BurstDespreader state. |
Public Functions¶
| Type | Name |
|---|---|
| size_t | dp_burst_despreader_bits (dp_burst_despreader_state_t * state, const float _Complex * x, size_t x_len, uint8_t * out, size_t max_out) Despread a CF32 block; emit one hard BPSK bit (0/1) per code period. |
| size_t | dp_burst_despreader_bits_max_out (dp_burst_despreader_state_t * state) Upper bound on bits dp_burst_despreader_bits can emit (0; see dp_burst_despreader_steps_max_out). |
| dp_burst_despreader_state_t * | dp_burst_despreader_create (const uint8_t * code, size_t code_len, size_t sf, size_t sps, double init_norm_freq, double init_chip_phase, double bn_carrier, double bn_code) Create a burst despreader instance. |
| void | dp_burst_despreader_destroy (dp_burst_despreader_state_t * state) Destroy a burst despreader instance and release all memory. |
| double | dp_burst_despreader_get_bn_carrier (const dp_burst_despreader_state_t * state) Carrier (Costas) loop noise bandwidth, normalized to the symbol rate. |
| double | dp_burst_despreader_get_bn_code (const dp_burst_despreader_state_t * state) Code (DLL) loop noise bandwidth, normalized to the symbol rate. |
| double | dp_burst_despreader_get_code_phase (const dp_burst_despreader_state_t * state) Current tracked code phase within the symbol, chips. |
| double | dp_burst_despreader_get_lock_metric (const dp_burst_despreader_state_t * state) Lock indicator in [0,1] : the mean of |Re prompt|/|prompt| over every prompt of the burst (cumulative, not EMA — a one-shot burst gives each prompt equal weight instead of spending the whole burst warming a smoother up). ~1 when phase-locked; ~2/pi (0.637) with no carrier (|cos theta|, uniform theta). |
| double | dp_burst_despreader_get_lock_stat (const dp_burst_despreader_state_t * state) Calibrated whole-burst lock statistic (the one-shot analog of the tracking loops' verify-counted detectors). |
| double | dp_burst_despreader_get_norm_freq (const dp_burst_despreader_state_t * state) Current carrier frequency estimate, cycles/sample. |
| double | dp_burst_despreader_get_snr_est (const dp_burst_despreader_state_t * state) Post-despread SNR estimate over the burst, accumulate-then-ratio: (sum Re^2 - sum Im^2) / sum Im^2, clamped >= 0. For BPSK the signal lives in Re and the noise splits evenly, so this estimates A^2/sigma^2 (per-component) directly — unlike a per-symbol Re^2/Im^2 ratio, whose heavy-tailed reciprocal chi-square makes the estimate biased high with enormous variance. This is the EFFECTIVE post-loop SNR: residual tracking-loop phase jitter rotates signal energy into Im, so the estimate sits below the AWGN-only value by the jitter term (converging as bn -> 0) — the quantity that actually predicts demodulation performance. |
| size_t | dp_burst_despreader_get_stat_n (const dp_burst_despreader_state_t * state) Number of prompts folded into the burst statistics so far. |
| void | dp_burst_despreader_get_state (const dp_burst_despreader_state_t * state, void * blob) Serialize state (loops, NCO, code phase, accumulators, burst statistics, bandwidths, preamble progress and acq code) intoblob . |
| void | dp_burst_despreader_reset (dp_burst_despreader_state_t * state) Re-seed the loops to the create-time phase/frequency and re-arm the burst statistics; preserve config. |
| int | dp_burst_despreader_set_acq (dp_burst_despreader_state_t * state, const uint8_t * acq_code, size_t acq_code_len, size_t acq_reps) Enable preamble-aided pull-in with a distinct acquisition code. |
| int | dp_burst_despreader_set_bn_carrier (dp_burst_despreader_state_t * state, double val) Set the carrier loop bandwidth (recomputes the loop gains). |
| int | dp_burst_despreader_set_bn_code (dp_burst_despreader_state_t * state, double val) Set the code loop bandwidth (recomputes the loop gains). |
| void | dp_burst_despreader_set_norm_freq (dp_burst_despreader_state_t * state, double val) Override the carrier frequency estimate, cycles/sample (re-seed). |
| int | dp_burst_despreader_set_state (dp_burst_despreader_state_t * state, const void * blob) Restore state fromblob , all or nothing. |
| size_t | dp_burst_despreader_state_bytes (const dp_burst_despreader_state_t * state) Byte size of state's blob: envelope + the state struct + the acq code (acq_sf bytes, 0 when no preamble is set). |
| size_t | dp_burst_despreader_steps (dp_burst_despreader_state_t * state, const float _Complex * x, size_t x_len, float _Complex * out, size_t max_out) Despread a CF32 block; emit one complex prompt symbol per code period. |
| size_t | dp_burst_despreader_steps_max_out (dp_burst_despreader_state_t * state) Upper bound on symbols dp_burst_despreader_steps can emit (0; the caller sizes the output buffer to the input length, which always suffices). |
Macros¶
| Type | Name |
|---|---|
| define | BURST_DESPREADER_STATE_MAGIC [**DP\_FOURCC**](dp__state_8h.md#define-dp_fourcc) ('B','D','S','P')Blob magic for a BurstDespreader state blob ("BDSP"). |
| define | BURST_DESPREADER_STATE_VERSION 3u /\* v3: the acq code travels; sizing keys checked first (#2041) \*/Blob layout version for a BurstDespreader state blob. |
Detailed Description¶
Lifecycle: create -> (steps / bits / reset)* -> destroy
This object despreads a BLOCK: one prompt sample per spread symbol, so there is no scalar step a single input chip is not a symbol.
Example:
static const uint8_t code[4] = { 1, 0, 1, 1 };
dp_burst_despreader_state_t *obj
= dp_burst_despreader_create (code, 4, 4, 2, 0.0, 0.0, 0.05, 0.01);
float _Complex in[8] = { 0 };
float _Complex out[8] = { 0 };
size_t n = dp_burst_despreader_steps (obj, in, 8, out,
dp_burst_despreader_steps_max_out (obj));
dp_burst_despreader_destroy (obj);
Public Functions Documentation¶
function dp_burst_despreader_bits¶
Despread a CF32 block; emit one hard BPSK bit (0/1) per code period.
size_t dp_burst_despreader_bits (
dp_burst_despreader_state_t * state,
const float _Complex * x,
size_t x_len,
uint8_t * out,
size_t max_out
)
Same streaming kernel as dp_burst_despreader_steps(), but emits the hard decision instead of the complex symbol.
Polarity is the library's one rule (mpsk_core.h, mpsk_bpsk_bit()): bit b is sent as 1 - 2b, so a bit is 1 when Re(prompt) is NEGATIVE and 0 when it is zero or positive the inverse of dp_bin_to_nrz(), and the same decision dp_nrz_to_bin() makes. The decisions are absolute relative to the carrier phase the loop locks at. With a dp_burst_despreader_set_acq() preamble a known +1 that phase is the preamble's, so the payload decodes as sent from any starting phase, seeded or not (#2664). With no preamble the caller's phase is the reference: a burst at phase 0 decodes as sent and one at pi decodes complemented.
Parameters:
stateMust be non-NULL.xInput CF32 samples, lengthx_len.x_lenNumber of input samples.outOutput buffer for bits (>= max_out).max_outCapacity ofoutin bits.
Returns:
Number of hard bits written into out.
>>> import numpy as np
>>> from doppler.dsss import BurstDespreader
>>> rng = np.random.default_rng(1)
>>> code = rng.integers(0, 2, 31).astype(np.uint8)
>>> bits = rng.integers(0, 2, 30).astype(np.uint8)
>>> chips = np.where(code & 1, -1.0, 1.0)
>>> syms = np.where(bits == 1, -1.0, 1.0)
>>> tx = np.concatenate(
... [np.repeat(s * chips, 4) for s in syms]).astype(np.complex64)
>>> d = BurstDespreader(code, sf=31, sps=4)
>>> rec = d.bits(tx) # hard 0/1 per symbol
>>> rec.shape
(30,)
>>> float(np.mean(rec != bits)) # raw: 1 - 2b at phase 0
0.0
>>> round(d.lock_metric, 3)
1.0
function dp_burst_despreader_bits_max_out¶
Upper bound on bits dp_burst_despreader_bits can emit (0; see dp_burst_despreader_steps_max_out).
Parameters:
stateUnused; may be any instance.
Returns:
Always 0, meaning "size the output from the input length".
function dp_burst_despreader_create¶
Create a burst despreader instance.
dp_burst_despreader_state_t * dp_burst_despreader_create (
const uint8_t * code,
size_t code_len,
size_t sf,
size_t sps,
double init_norm_freq,
double init_chip_phase,
double bn_carrier,
double bn_code
)
Parameters:
codeData spreading code (0/1 chips), lengthcode_len; the firstsfchips are copied (only bit 0 of each byte is read: 0 -> +1, 1 -> -1).code_lenLength ofcodein chips (>= sf); chips past sf are ignored.sfSpreading factor: chips integrated per prompt symbol (default: 1).spsSamples per chip (default: 2).init_norm_freqSeed carrier frequency, cycles/sample — the acquisition estimate; finite (default: 0.0).init_chip_phaseSeed code phase, chips; finite (default: 0.0).bn_carrierCarrier (Costas) loop noise bandwidth, normalized to the symbol rate (default: 0.05).bn_codeCode (DLL) loop noise bandwidth, normalized to the symbol rate (default: 0.01).
Returns:
Heap-allocated state, or NULL on allocation failure or an invalid argument: no code, code_len < sf, sf == 0, sps < 2, a non-finite seed, or a bandwidth outside the loop filter's domain (dp_loop_filter_params_ok).
Note:
Caller must call dp_burst_despreader_destroy() when done.
>>> import numpy as np
>>> from doppler.dsss import BurstDespreader
>>> rng = np.random.default_rng(1)
>>> code = rng.integers(0, 2, 31).astype(np.uint8) # length-31 code
>>> chips = np.where(code & 1, -1.0, 1.0) # 0 -> +1, 1 -> -1
>>> bits = rng.integers(0, 2, 30).astype(np.uint8) # payload bits
>>> syms = np.where(bits == 1, -1.0, 1.0) # BPSK symbols
>>> tx = np.concatenate(
... [np.repeat(s * chips, 4) for s in syms]).astype(np.complex64)
>>> b = BurstDespreader(code, sf=31, sps=4) # 31 chips/symbol
>>> sym = b.steps(tx) # one prompt/symbol
>>> sym.shape
(30,)
>>> hard = (sym.real < 0).astype(np.uint8) # BPSK decision
>>> float(np.mean(hard != bits)) # payload recovered
0.0
function dp_burst_despreader_destroy¶
Destroy a burst despreader instance and release all memory.
Parameters:
stateMay be NULL.
function dp_burst_despreader_get_bn_carrier¶
Carrier (Costas) loop noise bandwidth, normalized to the symbol rate.
Parameters:
stateMust be non-NULL.
Returns:
The carrier loop's Bn*T (create-time value, or the last value accepted by dp_burst_despreader_set_bn_carrier()).
function dp_burst_despreader_get_bn_code¶
Code (DLL) loop noise bandwidth, normalized to the symbol rate.
Parameters:
stateMust be non-NULL.
Returns:
The code loop's Bn*T (create-time value, or the last value accepted by dp_burst_despreader_set_bn_code()).
function dp_burst_despreader_get_code_phase¶
Current tracked code phase within the symbol, chips.
Parameters:
stateMust be non-NULL.
Returns:
The prompt code position in chips, nominally in [0, sf) ([0, acq_sf) during a set_acq preamble); init_chip_phase after create or reset.
function dp_burst_despreader_get_lock_metric¶
Lock indicator in [0,1] : the mean of |Re prompt|/|prompt| over every prompt of the burst (cumulative, not EMA — a one-shot burst gives each prompt equal weight instead of spending the whole burst warming a smoother up). ~1 when phase-locked; ~2/pi (0.637) with no carrier (|cos theta|, uniform theta).
Parameters:
stateMust be non-NULL.
Returns:
The mean lock indicator over the payload prompts so far; 0.0 before the first payload prompt (and after reset).
function dp_burst_despreader_get_lock_stat¶
Calibrated whole-burst lock statistic (the one-shot analog of the tracking loops' verify-counted detectors).
R = sqrt(stat_n * sum Re^2 / sum Im^2): the burst's coherent (in-phase) energy normalised by the noise power estimated from the quadrature arm. Because the noise reference is estimated from the SAME number of samples as the signal sum, the exact H0 law is R^2 = stat_n * F(stat_n, stat_n) — NOT chi-square (a chi-square gate assumes a known noise power and realizes tens of times the priced pfa here). The closed-form gate is
locked_burst = R > sqrt(stat_n * det_threshold_f(pfa, stat_n))
exact for every stat_n (odd included). Only payload prompts fold into the statistics — preamble prompts (different code length, pull-in transients) are excluded so the H0 law and the SNR calibration hold.
RETURNS 0 IN TWO CASES, and a caller must separate them with stat_n: before any payload prompt has been folded (stat_n == 0), and when the quadrature sum is exactly zero (stat_n > 0), where the ratio is undefined and there is no statistic to report. The second only happens on a perfectly noiseless input — which never occurs on the air and occurs constantly in tests, so it is worth knowing that the WORST possible reading of this statistic is what a synthetic clean burst produces. The example below therefore carries a noise floor, which is also the only condition under which a lock statistic means anything.
Parameters:
stateMust be non-NULL.
Returns:
R as defined above; 0.0 when stat_n == 0 or the quadrature sum is not positive.
>>> import numpy as np
>>> from doppler.dsss import BurstDespreader
>>> from doppler.detection import det_threshold_f
>>> code = (np.arange(31) % 2).astype(np.uint8)
>>> chips = 1.0 - 2.0 * (code % 2)
>>> clean = np.tile(np.repeat(chips, 2), 64)
>>> rng = np.random.default_rng(7)
>>> n = (rng.standard_normal(clean.size)
... + 1j * rng.standard_normal(clean.size)) / np.sqrt(2)
>>> b = BurstDespreader(code=code, sf=31, sps=2)
>>> _ = b.steps((clean + 0.3 * n).astype(np.complex64))
>>> eta = np.sqrt(b.stat_n * det_threshold_f(1e-3, b.stat_n))
>>> bool(b.lock_stat > eta) # this burst passes the pfa=1e-3 gate
True
function dp_burst_despreader_get_norm_freq¶
Current carrier frequency estimate, cycles/sample.
Parameters:
stateMust be non-NULL.
Returns:
The tracked carrier frequency in cycles/sample; equals init_norm_freq after create or reset, before any symbol has updated the carrier loop.
function dp_burst_despreader_get_snr_est¶
Post-despread SNR estimate over the burst, accumulate-then-ratio: (sum Re^2 - sum Im^2) / sum Im^2, clamped >= 0. For BPSK the signal lives in Re and the noise splits evenly, so this estimates A^2/sigma^2 (per-component) directly — unlike a per-symbol Re^2/Im^2 ratio, whose heavy-tailed reciprocal chi-square makes the estimate biased high with enormous variance. This is the EFFECTIVE post-loop SNR: residual tracking-loop phase jitter rotates signal energy into Im, so the estimate sits below the AWGN-only value by the jitter term (converging as bn -> 0) — the quantity that actually predicts demodulation performance.
Parameters:
stateMust be non-NULL.
Returns:
Linear (not dB) per-component SNR estimate over the payload prompts so far; 0.0 before the first payload prompt, after reset, when the quadrature sum is zero, or when sum Re^2 <= sum Im^2 (the clamp).
function dp_burst_despreader_get_stat_n¶
Number of prompts folded into the burst statistics so far.
Parameters:
stateMust be non-NULL.
Returns:
Count of payload prompts (preamble prompts excluded) since create or the last dp_burst_despreader_reset().
function dp_burst_despreader_get_state¶
Serialize state (loops, NCO, code phase, accumulators, burst statistics, bandwidths, preamble progress and acq code) intoblob .
Parameters:
stateMust be non-NULL; not modified.blobCaller-owned buffer of at least dp_burst_despreader_state_bytes() bytes.
function dp_burst_despreader_reset¶
Re-seed the loops to the create-time phase/frequency and re-arm the burst statistics; preserve config.
Restores the carrier NCO to the seed frequency and the code phase to the seed chip, zeroes the loop accumulators, and clears the cumulative burst read-backs (lock_metric / snr_est / lock_stat / stat_n) — the spreading code and bandwidths are kept. Call it between bursts so each burst's statistics start clean; a prior dp_burst_despreader_set_acq() preamble is also re-armed.
Parameters:
stateMust be non-NULL.>>> import numpy as np >>> from doppler.dsss import BurstDespreader >>> rng = np.random.default_rng(1) >>> code = rng.integers(0, 2, 31).astype(np.uint8) >>> chips = np.where(code & 1, -1.0, 1.0) >>> syms = np.where(rng.integers(0, 2, 30) == 1, -1.0, 1.0) >>> tx = np.concatenate( ... [np.repeat(s * chips, 4) for s in syms]).astype(np.complex64) >>> d = BurstDespreader(code, sf=31, sps=4) >>> first = d.bits(tx) >>> d.reset() # re-arm for a new burst >>> np.array_equal(first, d.bits(tx)) # same as a fresh object True
function dp_burst_despreader_set_acq¶
Enable preamble-aided pull-in with a distinct acquisition code.
int dp_burst_despreader_set_acq (
dp_burst_despreader_state_t * state,
const uint8_t * acq_code,
size_t acq_code_len,
size_t acq_reps
)
Track acq_reps periods of acq_code coherently (the unmodulated, repeated acquisition preamble — a full ±pi phase discriminator, so the loops pull in even a wide residual) before switching to the data code for the payload. Call before feeding the burst; the acq mode clears automatically once the preamble is consumed, and re-arms on dp_burst_despreader_reset(). The tracked carrier frequency carries over: the carrier loop's integrator is rescaled to the symbol period now in force (the acq code's, or the data code's when this disables the preamble). NB: set_acq re-arms the PREAMBLE only — the cumulative burst statistics (lock_metric / snr_est / lock_stat / stat_n) are re-armed by dp_burst_despreader_reset(); call it between bursts.
The preamble sets the payload's absolute phase. Every preamble symbol is the known +1 (bit 0 under 1 - 2b), so at the handover the NCO is turned to the last preamble prompt's phase, and the payload starts there from any starting phase and with no carrier seed (#2664). Without it, a preamble too short to pull an offset in left the payload's Costas detector, which cannot tell 0 from pi, to lock at pi and complement every bit. Turning the NCO, not flipping bits, corrects the soft symbols and statistics too. The alternative, differential encoding, needs no reference but is not free: about twice the bit error rate, decoded coherently (docs/design/mpsk.md, "A known reference resolves the
ambiguity"). A link with no preamble or sync word gets it from dp_mpsk_diff_map() / dp_mpsk_diff_demap() (Python: mpsk_diff_map / mpsk_diff_demap).
Parameters:
stateMust be non-NULL.acq_codeAcquisition code (0/1), length acq_code_len; copied.acq_code_lenAcquisition code length in chips.acq_repsNumber of acq-code periods in the preamble. A NULL/emptyacq_codeoracq_reps == 0disables the preamble (payload-only) and frees any previous acq code.
Returns:
DP_OK, the preamble set (or, for the disabling arguments above, cleared); DP_ERR_MEMORY when the copy of acq_code cannot be allocated, in which case nothing changes: the previous preamble, or its absence, stands. Python raises MemoryError on the failure.
>>> import numpy as np
>>> from doppler.dsss import BurstDespreader
>>> rng = np.random.default_rng(5)
>>> acq = rng.integers(0, 2, 128).astype(np.uint8) # long acq code
>>> data_code = rng.integers(0, 2, 32).astype(np.uint8)
>>> pbits = rng.integers(0, 2, 40).astype(np.uint8)
>>> asig = np.where(acq & 1, -1.0, 1.0)
>>> dch = np.where(data_code & 1, -1.0, 1.0)
>>> psyms = np.where(pbits == 1, -1.0, 1.0)
>>> pre = np.concatenate([np.repeat(asig, 4) for _ in range(4)])
>>> pay = np.concatenate([np.repeat(s * dch, 4) for s in psyms])
>>> burst = np.concatenate([pre, pay]).astype(np.complex64)
>>> t = np.arange(burst.size)
>>> rx = (burst * np.exp(1j * (np.pi + 2 * np.pi * 4e-5 * t))
... ).astype(np.complex64) # phase pi, offset NOT seeded
>>> d = BurstDespreader(data_code, sf=32, sps=4)
>>> d.set_acq(acq, 4) # 4 preamble reps, pulls loops in
>>> out = d.bits(rx) # preamble emits nothing
>>> out.shape # only the payload symbols come out
(40,)
>>> float(np.mean(out != pbits)) # raw: the preamble sets the phase
0.0
function dp_burst_despreader_set_bn_carrier¶
Set the carrier loop bandwidth (recomputes the loop gains).
Parameters:
stateMust be non-NULL.valNew noise bandwidth, normalized to the symbol rate.
Returns:
DP_OK, or DP_ERR_INVALID with the bandwidth unchanged when val is outside the loop filter's domain (finite and >= 0; dp_loop_filter_params_ok).
function dp_burst_despreader_set_bn_code¶
Set the code loop bandwidth (recomputes the loop gains).
Parameters:
stateMust be non-NULL.valNew noise bandwidth, normalized to the symbol rate.
Returns:
DP_OK, or DP_ERR_INVALID with the bandwidth unchanged when val is outside the loop filter's domain (finite and >= 0; dp_loop_filter_params_ok).
function dp_burst_despreader_set_norm_freq¶
Override the carrier frequency estimate, cycles/sample (re-seed).
Sets the NCO frequency and the carrier loop's integrator, scaled to the symbol period in force (the acq code's during a dp_burst_despreader_set_acq() preamble, the data code's otherwise), so tracking continues from val and dp_burst_despreader_get_norm_freq() reads val back after the next symbol's loop update absent any error. The create-time seed is not changed: dp_burst_despreader_reset() still returns to init_norm_freq.
The value is not validated.
Parameters:
stateMust be non-NULL.valNew carrier frequency, cycles/sample.
function dp_burst_despreader_set_state¶
Restore state fromblob , all or nothing.
Parameters:
stateMust be non-NULL; built with the same sf, sps and seeds, and holding an acq code of the same length, as the instance that wroteblob. The data code itself is not in the blob.blobBlob written by dp_burst_despreader_get_state().
Returns:
DP_OK, or DP_ERR_INVALID (with state untouched) for a bad envelope or any rejection listed above.
function dp_burst_despreader_state_bytes¶
Byte size of state's blob: envelope + the state struct + the acq code (acq_sf bytes, 0 when no preamble is set).
Parameters:
stateMust be non-NULL.
Returns:
Size in bytes; changes when dp_burst_despreader_set_acq() changes the acq-code length.
function dp_burst_despreader_steps¶
Despread a CF32 block; emit one complex prompt symbol per code period.
size_t dp_burst_despreader_steps (
dp_burst_despreader_state_t * state,
const float _Complex * x,
size_t x_len,
float _Complex * out,
size_t max_out
)
Streams: a partial symbol is carried in state across calls. Each emitted symbol is the complex prompt integrate-and-dump (carrier-wiped, code-stripped) — its sign is the BPSK decision, its phase/magnitude the soft information. During a dp_burst_despreader_set_acq preamble no symbols are emitted (the loops are pulling in); payload symbols follow.
Parameters:
stateMust be non-NULL.xInput CF32 samples, lengthx_len.x_lenNumber of input samples.outOutput buffer for prompt symbols (>= max_out).max_outCapacity ofoutin symbols.
Returns:
Number of prompt symbols written into out.
>>> import numpy as np
>>> from doppler.dsss import BurstDespreader
>>> rng = np.random.default_rng(1)
>>> code = rng.integers(0, 2, 31).astype(np.uint8) # length-31 code
>>> bits = rng.integers(0, 2, 30).astype(np.uint8) # payload bits
>>> chips = np.where(code & 1, -1.0, 1.0) # 0 -> +1, 1 -> -1
>>> syms = np.where(bits == 1, -1.0, 1.0) # BPSK symbols
>>> tx = np.concatenate(
... [np.repeat(s * chips, 4) for s in syms]).astype(np.complex64)
>>> d = BurstDespreader(code, sf=31, sps=4)
>>> sym = d.steps(tx) # one prompt/symbol
>>> sym.shape
(30,)
>>> hard = (sym.real < 0).astype(np.uint8) # BPSK decision
>>> float(np.mean(hard != bits)) # payload recovered
0.0
function dp_burst_despreader_steps_max_out¶
Upper bound on symbols dp_burst_despreader_steps can emit (0; the caller sizes the output buffer to the input length, which always suffices).
Parameters:
stateUnused; may be any instance.
Returns:
Always 0, meaning "size the output from the input length" (one symbol per sf*sps >= 2 input samples, so x_len is ample).
Macro Definition Documentation¶
define BURST_DESPREADER_STATE_MAGIC¶
Blob magic for a BurstDespreader state blob ("BDSP").
define BURST_DESPREADER_STATE_VERSION¶
Blob layout version for a BurstDespreader state blob.
#define BURST_DESPREADER_STATE_VERSION `3u /* v3: the acq code travels; sizing keys checked first (#2041) */`
The documentation for this class was generated from the following file native/inc/doppler/burst_despreader/burst_despreader_core.h