Introduce the 5D signal chain: ICD BPSK(10) replica, PCPS acquisition,
DLL-PLL tracking (1 ms data component), and a first-cut B-CNAV2 decoder
(preamble + CRC-24Q, MT10/MT11/MT30, systematic 288 bits, no 64-ary
LDPC). GEO and BDS-2 PRNs are not assigned B2a channels. B2a-only SPP
remaps 5D onto RTKLIB slot 0 with lam[0]=c/FREQ5.
Signed-off-by: huangchuhan <huangchh37@mail2.sysu.edu.cn>
Covers Dll_Pll_Conf::SetFromConfiguration() parsing of f_error_step_num
(default disabled, odd values pass through, even values round up to
odd, zero stays disabled) and f_error_accumulation/f_error_doppler_step
pass-through, plus dll_pll_veml_tracking::f_error_bin_multiplier()'s
bin-index-to-Doppler-offset mapping, including that step_num=5
reproduces the original fixed 5-bin scan order.
f_error_bin_multiplier() is made public so it can be exercised
directly from the test.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: joebre <joel.brenner@saphyrion.ch>
- Rename doppler_uncertanty -> doppler_uncertainty throughout (interface,
adapter, block, comments, log message).
- Fix the out-of-bounds write and mis-detection in narrowed-mode
activation: track it with an explicit d_doppler_search_narrowed flag,
set directly in set_doppler_uncertainty() and guarded on
d_num_doppler_bins > 1, instead of inferring it from
"d_num_doppler_bins_active < d_num_doppler_bins". That inferred check
broke two ways: for a 1-bin full grid (a valid, already-accepted
config), it still forced 2 active bins, writing past the grid/wipeoff
allocations sized to d_num_doppler_bins; for a 2-bin full grid, an
actually-narrowed request computes the same active count as the full
grid (2 < 2 is false), so it silently searched the full grid's own
bin layout instead of the assisted {center, center + doppler_max}
pair. Reproduced the out-of-bounds write directly (temporarily
reverting to the inferred check crashes with "corrupted double-linked
list" under the new NarrowingEnabledOneBinGrid test) and the
mis-detection (NarrowingEnabledTwoBinGrid).
- Keep the noise-reference bin out of candidate selection: both
max_to_input_power_statistic() and first_vs_second_peak_statistic()
now take a separate candidate_count, used only for the peak-search
loop bound; the CFAR path's own num_doppler_bins (used for the
"opposite bin" reference lookup) is unchanged. In narrowed mode,
candidate_count is 1 -- the noise-reference bin can no longer win and
be reported as the acquisition result, regardless of its own power
(verified against a live signal deliberately placed in the reference
bin instead of the known/candidate bin: reverting this fix, both the
CFAR and peak-ratio statistic mistakenly report the reference bin's
Doppler as if it were the assisted center).
- Recalibrate the acceptance threshold for narrowed acquisition: adds
d_threshold_narrowed, computed like d_threshold but with
num_doppler_bins = 1 (the true candidate count in narrowed mode)
instead of the full grid's bin count, since compute_threshold() folds
the candidate count into the false-alarm probability and reusing the
full-grid threshold in narrowed mode was effectively far stricter
than the requested PFA. get_threshold() returns it whenever
d_doppler_search_narrowed is true.
- Fix narrowed dump layout/metadata: ensure_dump_grid_allocated() now
sizes acq_grid to d_num_doppler_bins_active (not the full grid width),
matching what copy_magnitude_grid_to_dump_grid() actually writes each
cycle -- this also makes narrow<->full transitions between dumps
self-correcting. dump_results() writes accurate, mode-appropriate
doppler_max/doppler_step (the same {0, doppler_max} encoding
compute_statistics() uses internally when narrowed), plus new
doppler_center and doppler_narrowed fields so offline post-processing
can tell which encoding is in effect. Verified end to end against a
live dump (NarrowedDumpMetadata).
- Strengthen Acq_Conf::enable_doppler_narrowing's doc comment (default,
which implementations it applies to, its dependency on the caller
passing doppler_uncertainty == 0) and add a commented usage example
next to GNSS-SDR.assist_dual_frequency_acq in a dual-frequency
Galileo E1B+E5a example config.
- Add tests/.../pcps_acquisition_doppler_narrowing_test.cc: 8 focused
tests (narrowing enabled/disabled, 1-bin and 2-bin full-grid
configurations, CFAR and peak-ratio statistics, a full-narrow-full
transition, two-step acquisition with step-1 narrowing, and narrowed
dump metadata), built on the same real-capture/known-ground-truth
pattern as gps_l1_ca_pcps_acquisition_test.cc. Confirmed each targeted
regression test actually fails without its corresponding fix before
finalizing them.
Signed-off-by: joebre <joel.brenner@saphyrion.ch>
GTEST_SKIP() does not exist before GoogleTest 1.10, which breaks the
build on Ubuntu 16.04 with the distro-provided GoogleTest. Wrap it in
a guarded macro that records a success and returns on older versions,
following the pattern already used in osnma_test_vectors.cc.¡
gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc still included
gps_l1_ca_pcps_opencl_acquisition.h, which was deleted when the old
per-variant custom acquisition adapters (OpenCL, QuickSync, Tong,
CCCWSR, 8ms) were consolidated into the generic
PcpsAcquisitionAdapterCustom. This broke any build combining
-DENABLE_UNIT_TESTING=ON with -DENABLE_OPENCL=ON, even though the
rest of the file already used the generic AcquisitionInterface /
block_factory::GetAcqBlock() pattern, matching its already-working
QuickSync/Tong siblings.
Drop the dead include. The test also called acquisition->opencl_ready(),
a method that only ever existed on the concrete GNU Radio block
(pcps_opencl_acquisition_cc), never on the generic AcquisitionInterface
returned by the factory; reach it instead via a dynamic_pointer_cast on
get_right_block(), the same pattern already used elsewhere in this
codebase to recover a concrete type from a generic block interface.
Fixes: 8f29c4f88e ("Cleanup custom acquisition adapters")
Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
Compensate the Viterbi traceback delay when timestamping decoded SBAS
messages by carrying per-sample reception timestamps through the sample
and symbol aligners (removes a ~140 ms bias), with a deterministic unit
test covering the FIFO pairing.
Protect decoder state with d_setlock in reset(), set_satellite(),
set_channel() and general_work(), following the convention of the other
telemetry decoders.
Share per-PRN EMS dump files through a per-run dump session: the first
open in a run truncates stale data, later opens append, so channel
reassignments no longer wipe previously decoded messages.
Wait until the continuous decoder has accumulated the requested traceback depth before advancing trellis iterators. Add a regression test for the 30-bit SBAS input block versus its 35-bit traceback depth.
Signed-off-by: miguekf <miguel.gomezlopez@uclm.es>
The symbol alignment term of compute_message_timestamp() used the
opposite sign convention to the sample alignment term. In both
aligners, true means the non-shifted hypothesis won (no correction)
and false means the shifted one won (-1 unit), so the symbol term
must be (symbol_aligned ? 0 : -1).
Two of the unit tests added along with that function were failing as
a result, which is what broke the check step of the CI on all three
platforms.
Also express the correction bound in whole code periods rather than
comparing doubles at an exact boundary: the worst case is 3 code
periods (1 from the sample-pairing ambiguity plus 2 from the
symbol-pairing one), not 2, and the floating-point comparison was
fragile at that boundary.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- gnss_satellite.cc: accept the full supported SBAS PRN range (120-138)
instead of a stale 6-PRN whitelist that rejected valid PRNs such as WAAS
PRN 133. Per-PRN satellite/service names are no longer hardcoded, since
that assignment changes over time and cannot be reliably kept up to date
here (fixes review comments on PRN support and outdated satellite info).
- SBAS_L1.h: cap SBAS_L1_MAX_COHERENT_INTEGRATION_SYMBOLS at 1 (1 ms). The
telemetry decoder performs its own unsynchronized sample/symbol pairing,
so extending tracking's coherent integration to 2 ms is unsafe and
corrupts that pairing.
- sbas_l1_telemetry_decoder_gs.{h,cc}: carry an absolute per-sample/per-bit
timestamp through the sample buffer and Frame_Detector, replacing the
buggy offset that anchored the message timestamp to whichever sample was
current when decoding happened, which could be off by up to a full
message duration. Add
sbas_l1_telemetry_decoder_gs::compute_message_timestamp() as a small,
independently testable helper for the residual sub-bit correction, and a
matching deterministic unit test.
- sbas_l1_telemetry_decoder_gs.{h,cc}: implement a real reset() that clears
all decoder buffers/aligners and closes the dump file, so a channel
reassigned to a different PRN never mixes messages into the previous
satellite's file.
- Remove the orphan sbas_l1_telemetry_decoder.cc adapter: it includes a
header that no longer exists and is not part of any CMake target (the
factory instantiates the GNU Radio block directly), so it silently never
compiled.
- Dump file: overwrite instead of append on each run, remove the hardcoded
GNSS-SDR version string, and document that the .ems output is an
EMS-like raw message dump, not a conformant EMS file.
- conf/File_input/SBAS/gnss-sdr_SBAS_EGNOS_rx.conf: drop the outdated
PRN/satellite table and per-channel satellite comments, correct the
coherent-integration note to 1 ms, and clarify that SBAS is not used as
a ranging source in this configuration.
Signed-off-by: miguekf <miguel.gomezlopez@uclm.es>