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.
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.
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.
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.
- 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.
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>
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>
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>
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.
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.