Commit Graph
11132 Commits
Author SHA1 Message Date
Carles Fernandez 3fd4e16a3a Merge branch 'fix_cuda_incremental_build' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-fix_cuda_incremental_build 2026-09-24 10:02:45 +02:00
Carles Fernandez fb9d405022 Make clang-tidy happy 2026-09-24 10:00:28 +02:00
Carles Fernandez d067661806 Restore console precision when processing BeiDou B2a signals 2026-09-24 09:59:48 +02:00
Carles Fernandez aa71c06fc7 Merge branch 'pr1106-stacked' into next 2026-09-24 09:58:30 +02:00
Carles Fernandez e24868424f Fix satellite visibility test 2026-09-24 09:17:20 +02:00
Carles Fernandez 1110081459 Fix BeiDou Doppler source selection and reject non-finite predictions 2026-09-24 08:57:20 +02:00
Carles Fernandez 43d5981590 Update changelog 2026-09-23 21:29:45 +02:00
Carles Fernandez c5e7ab7a43 Add BeiDou B1C and B2a Doppler prediction from CNAV ephemerides 2026-09-23 20:44:08 +02:00
Carles Fernandez 3c50040c4c Add QZSS Doppler prediction 2026-09-23 20:25:56 +02:00
Carles Fernandez aa4c95ee88 Add GLONASS Doppler prediction 2026-09-23 20:15:01 +02:00
Vladislav P 3ce589b0d3 Fix imcremental builds with CUDA
Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
2026-09-23 20:24:11 +03:00
Carles Fernandez fcc770c1fa Fix BeiDou Doppler prediction and reject stale acquisition assistance
Use radian angles and the correct GEO inclination for BeiDou almanacs,
and convert GPST to BDT before propagating BeiDou navigation data.

Require a sample-clock-anchored PVT fix no older than one second for
Doppler prediction. Clear previous assistance when retrying acquisition
after tracking loss.
2026-09-23 19:09:23 +02:00
Carles Fernandez 4e91e99a8c Fix building in old environments 2026-09-23 16:16:36 +02:00
Carles Fernandez 3e3d730b13 Merge branch 'pr1097-merged' into pr1106-stacked 2026-09-23 10:54:51 +00:00
Carles Fernandez fd274fb891 Make acquisition dump readers skip noise-reference columns
With set_doppler_num_bins(), acq_grid holds the Doppler candidate columns
followed by 0, 1 or 2 noise-reference columns placed at doppler_center
+/- the configured doppler_max, outside the linear Doppler axis. Nothing
in the dump said how many columns were candidates, so the readers either
rejected the file (Acquisition_Dump_Reader) or plotted the reference
columns on a wrong Doppler axis (plot_acq_grid.py, plot_acq_grid.m).

Write a new doppler_num_candidates variable to the dump and use it in
the readers to keep only the candidate columns. Dumps without it are
read as before, except that the reference column of older narrowed
dumps is also skipped. The Python and MATLAB scripts plot a
single-candidate (narrowed) grid as a code-delay line instead of an
empty surface.

Add a regression test that reads back a full-grid dump with two
reference columns and a narrowed N = 5 dump.
2026-09-23 12:46:37 +02:00
Carles Fernandez d218f16b3d Merge PR #1106 (Doppler prediction as acquisition search center) on top of PR #1097 2026-09-23 10:24:28 +00:00
Carles Fernandez 5dd293ed0e Fix heap overflow in set_doppler_num_bins() for N = full grid - 1
A narrowed search of N < d_num_doppler_bins candidates adds up to two
noise-reference rows, so N = d_num_doppler_bins - 1 needs
d_num_doppler_bins + 1 rows. The step-1 grid buffers were sized to the
full grid's own row count, which has no reference rows when the
peak-ratio statistic is used or the CFAR wraparound distance suffices,
so that request wrote one row past the end of d_grid_doppler_wipeoffs
and d_magnitude_grid.

Size the step-1 buffers (and the CUDA engine) for d_num_doppler_bins + 2
rows, which covers every row count set_doppler_num_bins() can produce,
and add a regression test.
2026-09-23 12:11:27 +02:00
Carles Fernandez 1f4ad73f6f Merge PR #1097 (pcps-doppler-num-bins-unification) into next
Conflict resolution: keep next's CUDA engine hooks, sample-buffer renames
(d_buffer_sample_count) and full_grid_search option; adopt the PR's
set_doppler_num_bins() members. CUDA capacity now uses
d_num_doppler_bins_full_grid_active and update_grid_doppler_wipeoffs()
uploads the unified grid to the GPU.
2026-09-23 09:36:12 +00:00
Marc Majoral 87b9c7235b fix FPGA acquisition unit tests 2026-09-22 20:26:51 +02:00
Carles Fernandez 360f349209 Fix building in old setups 2026-09-22 08:15:11 +02:00
Carles Fernandez 78eed6db13 Merge branch 'phillipvu-jetson-cuda-acquisition' into next 2026-09-21 23:17:15 +02:00
Carles Fernandez 65cca85178 Fix CUDA acquisition upload ordering and validation
- Order code and carrier uploads on the compute stream and wait before
  returning so callers can safely reuse host buffers.
- Verify CUDA readiness and completed grid counts in adapter tests,
  rejecting unexpected CPU fallback.
- Exercise host-buffer reuse in engine parity tests.
- Correct the Jetson helper's test executable path.
- Use ArgsProduct for compatibility with Google Benchmark 1.9.2–1.9.5.
2026-09-21 17:18:55 +02:00
Carles Fernandez a996687488 Merge branch 'jetson-cuda-acquisition' of https://github.com/phillipvu/gnss-sdr into phillipvu-jetson-cuda-acquisition 2026-09-21 16:03:16 +02:00
Phillip Vu 4e44e70cba docs: apply prettier to JETSON.md and changelog
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:41 -07:00
Phillip Vu a9c5876c1f docs/JETSON.md: receiver results on the next branch
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:41 -07:00
Phillip Vu 51b4f61e1b Port CUDA acquisition test to PcpsAcquisitionAdapter
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:41 -07:00
Phillip Vu 726cf2c455 Use American spelling and plain punctuation in CUDA docs and comments
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 0156f12403 docs/JETSON.md: test list update
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 3cdc5a43a6 Fix newline escapes in two-step CUDA test output
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu b24a261d09 GpsL1CaPcpsAcquisitionCudaTest: cover make_two_steps (STEP2_GRID) vs CPU
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 3965ab7e16 clang-format
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 205bbf1bfc docs/JETSON.md: end-to-end receiver results on the CTTC capture
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 6e7685ae75 CudaPcpsEngine: build the cuFFT plan and warm up when the grid is uploaded
Lazily creating the plan on the first dwell made the first acquisition of
each channel non-deterministically late in non-blocking mode (samples flow
past while the worker waits for cufftPlan1d), which shifted the time to
first fix by one subframe in 2 of 3 receiver runs on the Orin.

Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 8c4581e672 docs/JETSON.md: measured Orin Nano results, fix run_tests path
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Phillip Vu 388c818e84 cuda_multicorrelator: cudaDeviceProp::deviceOverlap was removed in CUDA 13
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Phillip Vu 06323e59d8 CudaPcpsEngine: drop cuFFT enumerators removed in CUDA 13
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Phillip Vu de99a17a89 CMake: read Jetson device-tree compatible string with file(STRINGS)
file(READ) stops at the first NUL byte of the NUL-separated property, so
the SoC was never matched and CMAKE_CUDA_ARCHITECTURES fell back to native.

Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Phillip Vu 3161b87cec Add utils/scripts/jetson-build.sh helper
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Phillip Vu 5a8e56ed02 CUDA: fix build on modern toolkits/Jetson, add GPU PCPS acquisition engine
Build system:
- Drop hardcoded sm_30 (Kepler) nvcc flags rejected by CUDA >= 11; honour
  CMAKE_CUDA_ARCHITECTURES, auto-detect Jetson SoCs from the device tree
  (Orin 87, Xavier 72, TX2 62, Nano 53) or use "native" with CMake >= 3.24.
- CUDA standard follows the host C++ standard (C++17).
- find_package(CUDAToolkit) and explicit CUDA::cudart / CUDA::cufft links.
- Define CUDA_GPU_ACCEL project-wide; keep -Wno-psabi away from nvcc.

Acquisition:
- New CudaPcpsEngine (acquisition/libs/cuda_pcps_engine.{h,cu}): batched
  cuFFT evaluation of the Doppler x code-phase grid, one stream per block.
- pcps_acquisition::doppler_grid() dispatches to the engine when
  Acquisition_XX.use_cuda=true (or GNSS-SDR.use_cuda_acquisition=true),
  falling back to the CPU loop on any failure. Peak search and statistics
  are unchanged.

Tracking (GPS_L1_CA_DLL_PLL_Tracking_GPU):
- Split the racy single-launch wipe-off + correlator kernel into two
  launches on the same stream.
- cudaHostAllocMapped || cudaHostAllocWriteCombined -> cudaHostAllocMapped.
- No cudaDeviceReset() in the per-channel teardown; do not cudaFree()
  device aliases of host-mapped buffers; const-correct GPU_Complex.

Tests/docs:
- CudaPcpsEngineTest (GPU grid vs CPU reference incl. accumulation,
  bit-transition mode, 4 ms integration) and GpsL1CaPcpsAcquisitionCudaTest
  (full adapter on a real capture, CPU vs GPU estimates).
- benchmark_pcps_grid: CPU baseline vs GPU sweep.
- docs/JETSON.md build/verify/benchmark guide; README, changelog, sample
  config updates.

Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Carles Fernandez a6189031cb Merge branch 'joebre-acquisition-retry-cooldown' into next 2026-09-21 15:20:53 +02:00
Carles Fernandez f7faa501fa Summarize comments in source code 2026-09-21 14:40:21 +02:00
Carles Fernandez d68b5599c8 Merge branch 'acquisition-retry-cooldown' of https://github.com/joebre/gnss-sdr into joebre-acquisition-retry-cooldown 2026-09-21 14:36:02 +02:00
Carles Fernandez 7c7f03ba93 Merge branch 'joebre-gps-galileo-signal-status-fix' into next 2026-09-21 13:58:36 +02:00
Carles Fernandez 940eeea5b6 Fix the secondary-signal status gating of the assisted acquisition
GPS: compare only the three LSBs of the 4-bit term broadcast in page 25
of subframe 4. The MSB is the A-S flag (IS-GPS-200, 20.3.3.5.1.4), so
the former thresholds (>= 10 for L2C, >= 11 for L5) only held with A-S
on: with A-S off, every satellite was blocked for L2C and L5, and so was
a satellite reporting no configuration information with A-S on. Add
named constants for the masks and the configuration codes.

RTKLIB_PVT: an almanac from a channel that has not decoded page 25 yet
no longer erases the AS_status already stored for that satellite, which
made the gating fall back to permissive after each channel reassignment.

GLONASS: look up the health of the tracked satellite instead of the pool
entry matched by frequency channel, which can be another slot.

Galileo: do not gate E5a. E5a_HS is only broadcast in F/NAV on E5a, so it
cannot be learned from E1B, and a stored value could keep a satellite
blocked after it returned to service. E5b remains gated.

Shorten the comments introduced in this branch and remove the claims
that did not match the code.
2026-09-21 13:08:57 +02:00
Carles Fernandez affb9aa4af Merge branch 'gps-galileo-signal-status-fix' of https://github.com/joebre/gnss-sdr into joebre-gps-galileo-signal-status-fix 2026-09-21 12:21:49 +02:00
Carles Fernandez c285e006a8 Fix #1112 in a more GNU Radio scheduler friendly way 2026-09-21 08:35:42 +02:00
Carles Fernandez d247536f3d Merge branch 'joebre-joebre-fix-observables-history-capacity' into next 2026-09-20 09:55:59 +02:00
Carles Fernandez 8e512b82fd Make abseil logging sink thread-safe 2026-09-20 09:41:31 +02:00
Carles Fernandez 65aa3ba21c Fix false frame synchronization in the GPS L1 C/A telemetry decoder 2026-09-20 00:47:40 +02:00
Carles Fernandez 9f9868d86a Make the observables robust to wrong TOWs and size their history
Hybrid_Observables:
- Interpolate only between consecutive tracking samples whose TOW advanced
  as much as the receiver time: after a gap in the valid words of a
  channel, the last sample before it and the first one after it were used
  together, giving a meaningless carrier phase and, if the TOW had stepped,
  a first pseudorange off by up to hundreds of seconds. Fix the TOW
  rollover in the interpolation and in the pseudorange computation, which
  added a week to any travel time longer than 302.4 s.
- Set the receiver time from the largest group of channels agreeing on the
  TOW, and set it again when such a group contradicts it, instead of
  trusting the latest TOW of the first valid epoch. Channels contradicting
  the receiver time do not deliver valid pseudoranges. Make the clock
  correction from the PVT block safe at the TOW rollover.
- Size the tracking history from the receiver clock buffer and the
  observables interval instead of a fixed count, which was too short for
  1 ms symbols (Galileo E6) at long intervals and 4x too large at the
  default one. Find the nearest sample with a binary search.
- Use the mean Doppler of the epoch in the cycle-slip detector: the final
  value raised false slips with high Doppler rates and long intervals.
- Make the static helpers private and remove their unit test.

RTKLIB_PVT: do not count the epochs without enough satellites as solver
errors, and send the reset to the observables once per outage: each reset
emptied the tracking history of every channel every two seconds.
2026-09-19 15:40:30 +02:00