Skip to content

Struct dp_correlator_hit_t

ClassList > dp_correlator_hit_t

One detection, from any detector or search flavor's dp_correlator_push() .More...

  • #include <correlator_core.h>

Public Attributes

Type Name
uint32_t _pad
double chip_phase
float cn0_dbhz_est
size_t col
double doppler_rate_hz_s
float noise_est
float peak_mag
size_t row
uint64_t samples_consumed
float test_stat
float test_stat_peak

Detailed Description

docs/design/correlator.md section 2: the one hit record. The peak's flat index in the correlation map, decomposed into (row, col) so that a caller does not need the map's width. At one row (the 1-D detector) row is 0 and col is the lag. A search flavor's row is the Doppler bin and its col the code phase, and it fills every field; a detector flavor fills row through test_stat and writes the rest as 0. 64 bytes, with no unnamed padding.

Public Attributes Documentation

variable _pad

uint32_t dp_correlator_hit_t::_pad;

Alignment padding, named so the record has none unnamed; written as 0 (every builder's designated initializer zeroes it). A new field goes before it, which moves it, and test_correlator_search.c's layout assert goes red until the comparison names the field.


variable chip_phase

double dp_correlator_hit_t::chip_phase;

The code's own instantaneous phase at the hand-off instant, in chips, Dll's convention the seed a code loop wants for this hit. The same value dp_correlator_build_handoff() reports as dp_correlator_handoff_t::chip_phase: the inverted lag advanced by the dwell's dilation when a carrier is set (dp_correlator_set_carrier_freq_hz()). For an engine built by dp_correlator_create_burst(), one chip is one template sample, so chip_phase is in template samples over code_bins: a caller at s samples per chip divides by s. The burst search refuses a carrier setter, so its hits carry no dwell advance. Appended last so positional initialisers do not shift.


variable cn0_dbhz_est

float dp_correlator_hit_t::cn0_dbhz_est;

Estimated carrier-to-noise density (dB-Hz), backed out of test_stat via the same C/N0 <-> per-sample-amplitude-SNR relationship used to size the engine (see dp_correlator_create_burst()/ dp_correlator_create_continuous()). Tracks the true C/N0 while receiver AWGN dominates the CFAR noise estimate; saturates at the code's own autocorrelation-sidelobe floor once the true C/N0 exceeds what this code/geometry can resolve — a real ceiling, not a fault.


variable col

size_t dp_correlator_hit_t::col;

Column of the peak: the lag, at one row; a search flavor's code phase (0 … lag_bins-1), a lag of col * code_bins / lag_bins samples.


variable doppler_rate_hz_s

double dp_correlator_hit_t::doppler_rate_hz_s;

The Doppler rate, Hz/s, of the rate hypothesis that won this hit's dwell (dp_correlator_create_burst()'s rate_hypotheses); 0 without hypotheses, and 0 when the dwell's block is one or two epochs, which cannot see a rate (every hypothesis is then the same surface). A hypothesis, not a fit, and a reliable one only from a block WHOLLY inside the preamble and well above the design point. Then it names the hypothesis nearest the carrier's rate within half a spacing, doppler_rate/(n - 1) every time (validate_acq_rate_pd's reported-rate rows, N = 9, D = 10, design -13 dB, 23 dB over it: 119/119 at true rate 0, 121/121 at +R). Below that it is not: at the design point only 30% (rate 0) and 66% (+R) of the full-block hits name it, adjacent hypotheses differing by at most pi/4 of phase at the block's edges so that noise picks among neighbours; and about three hits in four come from dwells STRADDLING the preamble's edges, which often name +-R (39% of all hits at +10 dB-Hz name the nearest at true rate 0, 51% at +R). DETECTION is unaffected the surface that wins is a good one whichever neighbour it is. Treat the value as a seed, not a measurement, at the C/N0 the engine was sized for. With max_peaks > 1 one hypothesis's surface serves the whole dwell's list, so every hit of a dwell wears the winner's rate. The Doppler the hit reports is the carrier's at the middle of the dwell's block. Appended last so positional initialisers do not shift.


variable noise_est

float dp_correlator_hit_t::noise_est;

Noise estimate aggregated over noise_lo..noise_hi.


variable peak_mag

float dp_correlator_hit_t::peak_mag;

max |R| (linear magnitude, not power).


variable row

size_t dp_correlator_hit_t::row;

Row of the peak: 0 at one row; a search flavor's Doppler bin (0 … coherent_bins-1), or, in wideband mode, a bin of the uniform grid of window_bins*coherent_bins bins (window_bins tiles of coherent_bins each) — see the search flavors' section.


variable samples_consumed

uint64_t dp_correlator_hit_t::samples_consumed;

st->samples_consumed at the exact moment this hit was appended — the raw sample offset (since this engine's own stream start) this detection's epoch ended at. The per-hit anchor a caller needs to derive a precise timestamp (dp_sample_clock_stamp_at(), timing/timing_core.h) instead of reusing one message-level timestamp for every hit — a single push() call spanning multiple epochs can emit several hits at different sample offsets. Acquisition itself stays wall-clock-agnostic; this is the raw material a caller with a real clock converts.


variable test_stat

float dp_correlator_hit_t::test_stat;

peak_mag / noise_est; 0 if noise_est is not > 0. A search flavor's is scaled by sqrt(2*n_noncoh) once non-coherent looks are combined.


variable test_stat_peak

float dp_correlator_hit_t::test_stat_peak;

test_stat as the emitter would read on its own lag: the straddle a delay between two lag columns costs, put back. Estimated from the larger of the hit's two neighbouring columns under the mainlobe the engine models (a triangle shape.zone samples wide, as for a chip code): a centre c and neighbour n one column, s samples, apart give (c + n) / (2 - s / zone), exact on that triangle, clamped between c and c / (1 - s / (2 zone)) never below what was read, never past the worst straddle. Noise lifts the neighbour, so at low statistics it reads high, within that clamp. For a bound on what the emitter's sidelobes can reach (a sidelobe does not lose its straddle with the peak); detection reads test_stat. Appended last, like the field above.



The documentation for this class was generated from the following file native/inc/doppler/correlator/correlator_core.h