Struct dp_dll_state_t¶
DLL state. More...
#include <dll_core.h>
Public Attributes¶
| Type | Name |
|---|---|
| float _Complex | acc_e |
| float _Complex | acc_l |
| float _Complex | acc_o |
| float _Complex | acc_p |
| double | aid_alpha |
| size_t | aid_best |
| uint64_t | aid_count |
| uint64_t | aid_last_end |
| size_t | aid_len |
| size_t | aid_nhyp |
| double * | aid_power |
| size_t | aid_ring |
| float _Complex * | aid_ring_e |
| float _Complex * | aid_ring_l |
| float _Complex * | aid_ring_o |
| float _Complex * | aid_ring_p |
| double | bn |
| double | chip_pos |
| float _Complex * | chunk_e |
| float _Complex * | chunk_l |
| float _Complex * | chunk_p |
| int | coast |
| const uint8_t * | code |
| dp_nco_state_t | code_nco |
| double | code_rate |
| double | ctrl_i |
| double | ctrl_p |
| uint64_t | err_n |
| double | err_sum |
| int | have_prev_epoch |
| uint32_t | held_inc |
| dp_loop_filter_state_t | held_lf |
| double | inv_sps |
| double | inv_tsamps |
| double | inv_tsamps2 |
| double | inv_tsamps_sf |
| double | inv_upd |
| float _Complex * | last_backward_p |
| float _Complex * | last_e |
| double | last_error |
| float _Complex * | last_l |
| dp_loop_filter_state_t | lf |
| dp_lockdet_state_t | lock |
| double | lock_alpha |
| size_t | lock_count |
| size_t | lock_nz |
| double | lock_stat |
| double | lock_sum |
| size_t | n_looks |
| double | noise_ema |
| double | noise_guard |
| double | off_chips |
| double | out_level |
| uint32_t | out_level_n |
| int | owns_code |
| double | rate_aid |
| double | rate_i |
| double | rate_p |
| uint32_t | rng |
| double | seed_chip |
| double | seg_chips |
| size_t | seg_idx |
| double | seg_norm |
| size_t | segments |
| size_t | sf |
| double | spacing |
| size_t | sps |
| float _Complex * | sums |
| double | sym_period |
| uint32_t | tap_grid |
| uint32_t | tap_off |
| uint32_t | tap_spacing |
| dll_tlm_t | tlm |
| int | wrap_await |
| int | wrap_pending |
| double | zeta |
Detailed Description¶
Allocate with dp_dll_create() (copies the code), or embed by value and dp_dll_init() (borrows the caller's code). The loop filter lf is a public sub-component so the inline composition helpers can drive it; treat the correlator accumulators and code-phase fields as internal.
Public Attributes Documentation¶
variable acc_e¶
early correlator accumulator.
variable acc_l¶
late correlator accumulator.
variable acc_o¶
offset (noise) correlator accumulator.
variable acc_p¶
prompt correlator accumulator.
variable aid_alpha¶
EMA over symbols of each window's power.
variable aid_best¶
current best hypothesis (the timing).
variable aid_count¶
partials seen since enable (ring index).
variable aid_last_end¶
one past the last look's last partial; the next look's window must start there or later, so no two looks share noise (the best hypothesis flips between overlapping neighbours on noise, #1264).
variable aid_len¶
coherent window length L, partials.
variable aid_nhyp¶
boundary-phase hypotheses Q = ceil(P).
variable aid_power¶
per-hypothesis window-power EMA (Q).
variable aid_ring¶
ring capacity, partials (power of two).
variable aid_ring_e¶
last aid_ring early partials.
variable aid_ring_l¶
last aid_ring late partials.
variable aid_ring_o¶
last aid_ring offset (noise) partials.
variable aid_ring_p¶
last aid_ring partial prompts.
variable bn¶
loop noise bandwidth (retained).
variable chip_pos¶
current prompt code phase, chips; DERIVED from code_nco.phase on every dll_accumulate, never independently accumulated.
variable chunk_e¶
this epoch's per-chunk early sums.
variable chunk_l¶
this epoch's per-chunk late sums.
variable chunk_p¶
this epoch's per-chunk prompt sums; Python's partial_sums.
variable coast¶
1: the loop holds the discriminator is not filtered and phase_inc is not steered, the NCO advances at the rate of the last dp_dll_hold_here() (its filter restored on entry), the lock detector still looks. See dp_dll_set_coast().
variable code¶
spreading code, one period (0/1 chips).
variable code_nco¶
fixed-point code-phase NCO (phase/phase_inc).
variable code_rate¶
the loop's own rate, chips per nominal chip (~1.0): 1 + the loop filter output (its integrator alone at segments == 1), without the rate aid, so the code runs at code_rate + rate_aid. It is read before the NCO truncates its command to a whole phase step of sf*sps/2^32 chips per chip, so a settled reading sits up to one step above the rate the loop carries.
variable ctrl_i¶
integrator -> phase_inc, per inv_upd.
variable ctrl_p¶
kp*e -> phase_inc, per inv_upd.
variable err_n¶
steers in err_sum.
variable err_sum¶
the discriminator summed since the last dp_dll_take_error(): every steer, coasting or not the block-mean read a holder corrects a coasting loop on (ยง12.22).
variable have_prev_epoch¶
0 until one full epoch has completed.
variable held_inc¶
phase_inc as of the last dp_dll_hold_here().
variable held_lf¶
the filter as of the last dp_dll_hold_here().
variable inv_sps¶
1 / sps (per-sample chip advance scale).
variable inv_tsamps¶
1 / (sf*sps) the nominal phase_inc, cycles/sample; precomputed once (sf/sps are create-time invariants) so the tracking loop never divides by tsamps.
variable inv_tsamps2¶
1 / (sf*sps)^2 segments>1's ctrl scale.
variable inv_tsamps_sf¶
1 / (sf*sps*sf) segments<=1's kp*e/(sf) ctrl term's scale.
variable inv_upd¶
1 / lf.t: one over the loop's update interval in epochs (1 per epoch; the symbol period in epochs once the aid is on). The filter's output is a correction per update; this turns it into the rate held over the interval. Precomputed with the gains, never in the loop.
variable last_backward_p¶
prev epoch's reversed-cumsum prompt; Python's backward_sums, saved from the PREVIOUS epoch's call.
variable last_e¶
prev epoch's per-chunk early sums.
variable last_error¶
last discriminator output (loop stress).
variable last_l¶
prev epoch's per-chunk late sums.
variable lf¶
2nd-order code PI loop.
variable lock¶
decision rule: thresholds + verify counters stepped on R at each N-look decision.
variable lock_alpha¶
EMA coefficient 1/L_eff (L_eff >> n_looks).
variable lock_count¶
looks accumulated in the current window.
variable lock_nz¶
noise looks folded in (cumulative-mean boot).
variable lock_stat¶
last statistic R = sqrt(2 sum|P|^2/E|O|^2).
variable lock_sum¶
running sum|P_k|^2 over the current window.
variable n_looks¶
non-coherent integration depth N.
variable noise_ema¶
EMA of offset power; estimates E|O|^2.
variable noise_guard¶
chips around P/E/L the offset must avoid.
variable off_chips¶
this look's offset code phase, whole chips.
variable out_level¶
Running: the slowly tracked level the output is divided by, a mean of the look-back magnitude over DLL_OUT_LEVEL_PERIODS periods (#2495).
variable out_level_n¶
Running: periods in out_level, saturating at DLL_OUT_LEVEL_PERIODS (its plain-mean start). Beside the int above, so the double below needs no padding.
variable owns_code¶
1 if dp_dll_destroy() frees code.
variable rate_aid¶
carrier-aiding code-rate deviation (ratio, 0 = off): a fixed fractional bias summed into the sample-and-hold phase_inc every epoch, on top of the loop's own ctrl. For physically-coupled Doppler, the caller sets this to carrier_offset/carrier_freq so the code NCO rides the code-rate dilation the code discriminator alone can't pull in at low SNR. See dp_dll_set_rate_aid().
variable rate_i¶
integrator -> code_rate - 1, per inv_upd.
variable rate_p¶
kp*e -> code_rate - 1, per inv_upd.
variable rng¶
xorshift32 state for the random offset.
variable seed_chip¶
create-time code phase, for reset.
variable seg_chips¶
code phase per partial segment = sf/segments.
variable seg_idx¶
samples integrated into the current chunk.
variable seg_norm¶
nominal samples per segment (prompt scale).
variable segments¶
partial correlations per epoch (1 = full).
variable sf¶
code length (chips per period).
variable spacing¶
early/late tap offset, chips (e.g. 0.5).
variable sps¶
samples per chip.
variable sums¶
this epoch's running cumulative sum of chunk_p; Python's partial_sums .cumsum(). Pure scratch (rebuilt every epoch boundary, never read across calls) not part of the serialized state.
variable sym_period¶
data-symbol period, partials (0 = off).
variable tap_grid¶
the grid origin, a quarter chip.
variable tap_off¶
off_chips.
variable tap_spacing¶
spacing.
variable tlm¶
live telemetry attachment; zeroed in blobs
variable wrap_await¶
1: a put moved the phase BACKWARD across the wrap, so the samples up to the next wrap are the tail of an epoch already closed the kernel dumps nothing until that wrap, discards the tail there and starts the epoch clean (#1287).
variable wrap_pending¶
1: a dp_dll_set_code_phase() moved the phase FORWARD across the period wrap, so the wrap the epoch in progress was waiting for has in effect happened the kernel closes that epoch on the next sample instead of folding a second period into it (#1287).
variable zeta¶
damping factor (retained).
The documentation for this class was generated from the following file native/inc/doppler/dll/dll_core.h