Commit Graph
2187 Commits
Author SHA1 Message Date
Carles Fernandez f42a0b1a9f Write the flow graph dump with std::ofstream
Replace the C stdio calls in the GNSS-SDR.dump_flowgraph code with
std::ofstream. This removes the reliance on <cstdio>, <cstring> and
<cerrno>, which were only included transitively, and closes the file
on every path.

A failure to open or write the file is now reported with a single
warning, and the success message is logged only if the file was
actually written.
2026-11-17 10:12:50 +01:00
Carles Fernandez 36297344d4 Merge branch 'dump_flowgraph' of https://github.com/edmondj/gnss-sdr into edmondj-dump_flowgraph 2026-11-17 09:06:59 +01:00
Carles Fernandez eadb45a411 Report the tracked data or pilot component in RINEX, RTCM, and Monitor 2026-11-14 12:31:21 +01:00
Carles Fernandez cf9053d481 Fix half-cycle and quarter-cycle offsets of the carrier phase 2026-11-14 08:36:28 +01:00
Julien Edmond afccf89c9a Added an option to dump the gnuradio's flowgraph to a file
Signed-off-by: Julien Edmond <julien@xonaspace.com>
2026-11-13 15:29:23 +00:00
Carles Fernandez f676953d05 Fix clang-tidy modernize-return-braced-init-list warning
With libc++, clang-tidy suggests replacing std::vector<float>(n, 0.0F)
with {n, 0.0F}, which would select the initializer_list constructor.
Return the zero-initialized LLR vector instead.
2026-11-09 13:51:13 +01:00
Carles Fernandez faa201281a Fix configuration with CMake < 3.6 2026-11-08 09:35:15 +01:00
Carles Fernandez 9b98569e55 Do not run clang-tidy on protoc-generated sources 2026-11-07 16:46:40 +01:00
Carles Fernandez c8a7ce26a5 Fix defects detected by Coverity Scan 2026-11-07 14:45:27 +01:00
Carles Fernandez e8750f88a4 Fix (unused) secondary codes in Galileo E5a 2026-11-05 15:42:23 +01:00
Carles Fernandez 0507d312de Fix defects detected by Coverity Scan 2026-11-01 13:56:58 +01:00
Carles Fernandez 724a17c429 Add a guard at GPS L1C TMBOC tracking against off-peak DLL locks
Add a configuration file for the FGI-GSRx GPS L1C dataset (Skydel simulation at 25 Msps)
2026-11-01 09:08:13 +01:00
Carles Fernandez 999a64ec56 Add the GPS L1C receiver chain with signal identifier 1S
Deterministic mode now accepts Galileo E6 channels together with E1, E5a or E5b
Fix CNAV MT33 UTC fields reading
2026-10-31 15:31:44 +01:00
Carles Fernandez 497c2a4492 Merge branch 'beidou_b2a_pilot' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-beidou_b2a_pilot 2026-10-27 12:43:59 +01:00
Carles Fernandez 422b2a6c36 Merge branch 'deterministic' into next 2026-10-26 14:46:42 +01:00
Carles Fernandez 7d4f65d863 Add a deterministic processing mode for recorded signals
Add a deterministic processing mode for recorded signals
Processing the same file twice was not repeatable, even with
Acquisition_XX.blocking=true: the control thread started searches,
assigned satellites and applied channel events at whatever sample
each block had reached, and the PVT and observables applied each
other's messages whenever they arrived.

With GNSS-SDR.deterministic=true (default: false), events and
messages carry the sample at which they happened, the control
thread handles channel events in sample order, and their effects
take place a fixed lookahead later (deterministic_lookahead_ms,
default 100 ms). A gate at the Signal Conditioner output keeps the
stream within that horizon, blocks take their stamped messages at
the start of each work call, maintenance runs on signal time
(deterministic_tick_ms), and the receiver stops once the whole
input has reached the PVT. Dumps, RINEX, NMEA, KML, GPX and GeoJSON
outputs are then bit-identical from run to run on the same machine
(same FFTW wisdom and VOLK configuration), whatever the CPU load.

Supported: all file sources (throttled or not, including LabSat,
EVK1029 and ION), all acquisitions except assisted and FPGA, and
the DLL/PLL VEML, KF and Gaussian trackers. Live front ends, HAS
and NTRIP corrections, strict OSNMA, Galileo E6 with the TOW map,
GNSS assistance and visibility-aware search are refused.
2026-10-26 08:21:51 +01:00
Carles Fernandez 002b41804e The SUPL client now verifies the server certificate and DNS name or IP address 2026-10-25 13:37:34 +01:00
Vladislav P 0d628166ef BeiDou B2a: Pilot tracking/acquisition
Implemented B2a pilot secondary code generation.
Added B2a pilot secondary code generation test.
Renamed beidou_b2a_code_gen_* to beidou_b2a_data_code_gen_*.
Updated DLL/PLL VEML tracking and PCPS acquisition blocks/adapters.

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
2026-10-25 05:20:25 +03:00
Carles Fernandez d60ddcbef8 Fix XB wrap-around in GPS L5 I5/Q5 code replicas. Fixes #1151 2026-10-19 18:06:37 +02:00
Carles Fernandez f7efcf54d9 Fix minor performance ineficiencies 2026-10-19 12:26:55 +02:00
Carles Fernandez ea533140aa Fix for GNU Radio 3.7 2026-10-18 14:27:52 +02:00
Carles Fernandez 66dcfe3f09 Bound configured batches by the observables timing budget
Replace the fixed 20 ms limit on SignalConditioner.batch_size_ms and
max_batch_latency_ms. A configured batch is accepted if it is no longer
than the automatic one (min(10 ms, observable_interval_ms)), or if the
buffer it needs (whole batches, with room for one on top of the largest
reader window) fits the alignment budget: the signal time channels can
trail the receiver clock before the observables miss epochs. Batches
are also limited to 4 MiB, since GNU Radio allocates two of them on
each side of the batching block.

At observable_interval_ms=20 and 4 MSps gr_complex this allows about
90 ms instead of 20 ms. At 5 ms it now rejects batches that the old
limit let through. In automatic mode, an explicit max_batch_latency_ms
sets the batch size, so that batch gets the same check. Defaults are
unchanged.
2026-10-17 15:04:10 +02:00
Carles Fernandez bb74c0f76d Add work on the new stream batcher 2026-10-14 20:08:59 +02:00
Carles Fernandez 297492f0e8 Make clang-tidy happy 2026-10-10 22:44:35 +02:00
Carles Fernandez 79f1247f44 Set 10 ms as default batch in the Signal Conditioner 2026-10-10 22:01:22 +02:00
Carles Fernandez dd077fa0d2 Set maximum of max_batch_latency_ms to 20 ms, fix building with old GNU Radio 2026-10-10 16:39:03 +02:00
Carles Fernandez 1dab504b09 Optimize Signal Conditioner scheduling with portable automatic batching
Select batch targets from sample rate, latency and memory limits, and
consumer buffer requirements. Replace eligible pass-through stages before
channel fan-out without machine-specific profiles or configuration edits.

Preserve samples and tags across partial batches, deadlines, and EOF.
Handle conditioned output ports consistently and clean up stream and
message connections on disconnect or connection failure.
2026-10-10 15:56:55 +02:00
Carles Fernandez 6ea188a8ee Remove old channel count 2026-10-01 22:17:17 +02:00
Carles Fernandez 190979945d Fix reading of GNSS-SDR.SUPL_MNC config parameter 2026-10-01 21:25:53 +02:00
Carles Fernandez c6405d824a Improve BeiDou B-CNAV1 decoding sensitivity 2026-09-30 12:08:49 +02:00
Carles Fernandez 28e14a3c7c Merge branch 'b1c_enable_sumproduct' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-b1c_enable_sumproduct 2026-09-30 09:10:53 +00:00
Vladislav P b24f930abc BeiDou B1C: Enable sum-product algorithm in LDPC decoder
This reduces minimum CN0 for stable telemetry decoding from ~28 dB*Hz to
~21 dB*Hz.

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
2026-09-29 23:27:47 +03:00
Carles Fernandez 2e682cce8e Update to new BeiDou PRN assignments
See http://www.beidou.gov.cn/yw/xwzx/202603/t20260320_29266.html
2026-09-29 13:01:30 +02:00
Carles Fernandez d971f6080e Merge branch 'enable_B2a_PRN6_18' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-enable_B2a_PRN6_18 2026-09-29 10:11:04 +02:00
Carles Fernandez 88fea3099a Harden pre-fix Doppler prediction bounds and grid sizing 2026-09-29 10:07:18 +02:00
Vladislav P b27cf0a1d5 Enable BeiDou B2a PRN6...PRN18
Contrary to ICD, these satellites actually broadcast B2a (OTA upgraded
in the orbit).
Verified by decoding live signal in realtime configuration.

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
2026-09-29 03:55:05 +03:00
Carles Fernandez 6f108b7497 Merge branch 'alm-ephe-secondary-doppler-aiding' of https://github.com/joebre/gnss-sdr into joebre-alm-ephe-secondary-doppler-aiding 2026-09-28 23:50:19 +02:00
Carles Fernandez 7050b48564 Add loading of QZSS L5 assistance 2026-09-28 23:44:52 +02:00
joebre f74ed54ee9 Extend almanac/ephemeris Doppler prediction to secondary signals and to before a fix
SatelliteVisibility::PredictedDopplerHz() previously required a live PVT
fix and was only used for a satellite's primary signal
(GNSSFlowgraph::acquisition_manager()). Two extensions:

1. Secondary signals (e.g. GPS L5, Galileo E5a) can now use the same
   geometric prediction, opt-in per acquisition role via
   <acq role>.alm_ephe_assisted_doppler_narrowing (default false). It's
   only reached at all when dual-frequency assist is unavailable or
   disabled (GNSS-SDR.assist_dual_frequency_acq=false), and is a distinct,
   less-proven Doppler source than that dual-frequency projection, hence
   opt-in rather than defaulted on.

2. Before a live fix exists, PredictedDopplerHz() can now predict from the
   AGNSS reference position (zero assumed velocity) and the configured
   nominal clock offset, opt-in via GNSS-SDR.doppler_prediction_before_fix
   (default false). A new PredictedDopplerUncertaintyHz() reports the
   Doppler spread implied by GNSS-SDR.receiver_max_velocity_m_s and
   GNSS-SDR.clock_frequency_max_error_ppm for this pre-fix case (zero once
   a fix exists, since position/velocity/clock are all solved then, not
   assumed) -- the caller widens its acquisition Doppler-bin search by this
   amount instead of trusting a single, possibly-wrong bin.

Verified against an EVK1029 GPS L5 capture (single-band, so every L5
channel is a secondary signal): with both flags enabled, the almanac-based
prediction narrows acquisition Doppler search before and after the fix,
logged via a new low-noise [alm_ephe_doppler] line; with them left at
their defaults, behavior is unchanged from before this change.
2026-09-28 16:00:42 +02:00
joebre 17bd8a4860 Fix stale fix-freshness check ordering in visibility-aware Doppler prediction
SatelliteVisibility::PredictedDopplerHz() gates its live-fix path on a
freshness check against last_fix_time_s_/last_fix_receiver_time_s_, both of
which are only stamped by SatelliteVisibility::Tick() (called from
GNSSFlowgraph::MaybeUpdateVisibility()).

In ControlThread::event_dispatcher(), acquisition_manager() -- which calls
PredictedDopplerHz() -- ran before MaybeUpdateVisibility() in the same
iteration. Since PVT updates roughly once per second, PredictedDopplerHz()
was therefore always comparing against a timestamp exactly one PVT epoch
stale, failing its own freshness check on every single call once a live
fix existed. The prediction only ever succeeded in the brief window right
after a periodic full visibility recompute happened to re-trigger a fresh
pick synchronously within the same call.

Reordering so MaybeUpdateVisibility() (and therefore Tick()'s stamping)
runs before acquisition_manager() each iteration fixes this: the timestamp
PredictedDopplerHz() checks is always current for the epoch it's
evaluating. acquisition_manager()'s existing "only when idle" gate is
preserved exactly (previously the implicit else of the valid_event check,
now an explicit !valid_event condition).

Verified against an EVK1029 GPS L5 capture with visibility-aware search
and almanac-based Doppler prediction enabled: before this fix, the
prediction log line never appeared after the first fix except in narrow
bursts tied to the ~120s full-recompute interval; after, it fires
continuously for every still-unlocked visible satellite each cycle.
2026-09-28 15:59:53 +02:00
joebre bf8df18ba5 Load GPS assistance XML for L5/L2C-only configurations too
GPS/QZSS UTC model, ionosphere and almanac data are broadcast system-wide
parameters, not specific to the L1 C/A signal -- L5 and L2C channels rely on
the exact same almanac (via the PRN-keyed map PVT and the visibility/
Doppler-assist logic read from) for visibility classification and Doppler
prediction just as much as L1 C/A does.

read_assistance_from_XML() gated the whole GPS ephemeris/UTC/iono/almanac
block on Channels_1C.count/Channels_J1.count alone. A configuration running
only L5 and/or L2C channels (no L1 C/A) never even attempted to load its
almanac, UTC or iono XML files -- not because those files were missing or
invalid, but because the code never asked for them, unconditionally reporting
"Error reading XML files" / "Disabling GNSS assistance" even with perfectly
valid assistance data on disk.

Broaden the gate to also fire when Channels_2S.count (L2C) or
Channels_L5.count is > 0, matching the same OR-together-all-constellation-
signals pattern already used for the Galileo block just below it. The L1 C/A
LNAV ephemeris load stays in this same block; L5/L2C use their own
separately-gated CNAV ephemeris further down, and requesting the LNAV
ephemeris is harmless when no L1 C/A channel exists to use it.
2026-09-28 09:11:02 +02:00
Carles Fernandez 044aee9bc2 Keep a separate logfile for each run with Abseil logging, as google-glog did 2026-09-27 18:26:57 +02:00
Marc Majoral 61d4447657 Enable FPGA acceleration for Galileo E6 2026-09-25 21:26:20 +02:00
Carles Fernandez 041a174921 Resolve the acquisition role when reading dual_freq_assisted_doppler_narrowing
The flowgraph read Acquisition_<signal>.dual_freq_assisted_doppler_narrowing
unconditionally, but GetChannel() instantiates the acquisition block from
Acquisition_<signal><channel> whenever that per-channel role defines an
.implementation, so a receiver configured with per-channel acquisition
roles would have had the flag read from a role the block was never built
from.

Expose get_role_name() from block_factory and use it in
acquisition_manager() to look the property up on the same role the block
was instantiated with, so the opt-out can be set per signal or, with a
per-channel role, per channel.
2026-09-24 21:43:35 +02:00
joebre 58e30deb54 Reintroduce dual_freq_assisted_doppler_narrowing as an opt-out for cross-signal Doppler narrowing
Acquisition_<signal>.dual_freq_assisted_doppler_narrowing (default
true, preserving current behavior) lets a specific signal's
acquisition be forced back to a full, unaided Doppler search even
while GNSS-SDR.assist_dual_frequency_acq is enabled for the other
signals. Knowingly reintroduces part of what f7948f4af retired under
#1097, under a clearer name -- see PR description for the regression
and spoofing-resilience evidence motivating it.
2026-09-24 17:16:42 +02:00
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 1110081459 Fix BeiDou Doppler source selection and reject non-finite predictions 2026-09-24 08:57:20 +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