Commit Graph
2080 Commits
Author SHA1 Message Date
Carles Fernandez 1f9afe4431 Implement SBAS/EGNOS correction path 2026-08-09 07:55:04 +02:00
Carles Fernandez 23949ab517 Polish BeiDou GEO position/velocity computation
Use the Earth rotation rate directly (not its sine) in the GEO velocity
coupling terms, compute the common orbital position/velocity once and
apply the GK-to-BDCS rotation only for GEO satellites, and document the
GEO PRN gate (C01-C05, C59-C63) with its ICD reference.
2026-08-08 14:06:03 +02:00
Carles Fernandez 02ac2ff616 Merge branch 'fix_beidou_geo_posvel' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-fix_beidou_geo_posvel 2026-08-08 13:50:25 +02:00
Carles Fernandez 2d5fe34ba2 Fix misplaced widening casts 2026-08-08 13:26:51 +02:00
Vladslav P 5e5f190a19 Gnss_Ephemeris: fix BeiDou GEO pos/vel computation
Signed-off-by: Vladslav P <vladisslav2011@gmail.com>
2026-08-08 14:01:22 +03:00
Carles Fernandez f0e75ce558 Improve SBAS L1 telemetry decoder and simplify SBAS adapters
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.
2026-08-08 12:10:10 +02:00
Carles Fernandez 697f3fab66 Merge branch 'ft/sbas' of https://github.com/gnss-sdr/gnss-sdr-vtl into gnss-sdr-ft/sbas 2026-08-08 10:38:50 +02:00
Carles Fernandez af9821980b Fix for C++11 2026-08-08 09:31:47 +02:00
Carles Fernandez 0ea3c54429 Improve printing of BeiDou B1C data 2026-08-07 14:27:22 +02:00
Carles Fernandez 4e4692ce13 Merge branch 'contrib/beidou-b1c-clean' of https://github.com/OuWenhao16/gnss-sdr into OuWenhao16-contrib/beidou-b1c-clean 2026-08-07 12:33:51 +02:00
miguekf f129a4af8e Address PR #1059 review: PRN whitelist, SBAS coherent integration, timestamp, reset, dead code, config
- 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>
2026-08-04 23:05:33 +02:00
OuWenhao16 caaf102be1 Fix Gnss_Synchro move-assignment to copy Flag_cycle_slip.
The field was already handled in copy-assignment and move-from cleanup, but move-assignment omitted it and could drop a cycle-slip flag.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-08-04 07:41:32 +02:00
Carles Fernandez b596884e9e Merge upstream next into contrib/beidou-b1c-clean
Signed-off-by: Carles Fernandez <carles.fernandez@cttc.es>
2026-08-03 21:09:57 +02:00
Carles Fernandez 833bfb5dd1 Corrected RINEX 3/4 navigation and observation output 2026-08-03 11:47:34 +02:00
OuWenhao16 aa1ca2163d Fix SOH framing/sync-loss and other questions raised by the PM.
Keep BeiDou B1C/CNAV1-focused changes; remove B1I OPT_ACQ, outlier PR
gating, DNAV toe/sqrt(A) sanity, and Flag_cycle_slip move-assignment submitted separately.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-08-01 02:32:19 +08:00
OuWenhao16 97680490e0 Address Project Manager review feedback for BeiDou B1C/CNAV1.
Put B1C on RTKLIB slot 0 with prefer-B1C XOR and lam[0] override,
align QMBOC quadrature and BCH thresholds with the ICD, fix BDGIM
nearest-odd-hour t_p and CNAV1 ephemeris defaults, tighten math/constants
usage, and drop the non-reproducible LDPC generator script. Move replica,
LDPC, and navigation unit tests into the default test set.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-08-01 02:32:18 +08:00
OuWenhao16 da9eba4af2 Remove redundant BeiDou PVT pre-filters in the src/algorithms/PVT/libs/rtklib_solver.cc.
Update pseudorange outlier rejection
- Gate relative pseudorange rejection behind a new configuration flag
  `Observables.reject_outlier_pseudoranges` (default: true) to prevent
  premature PVT breakage and improve space compatibility.
Align B1C with unified adapters.
- Fold B1C acquisition/tracking/telemetry into PcpsAcquisitionAdapter,
  DllPllTrackingAdapter, and TelemetryDecoderAdapter, and add SPDX author
  headers for the B1C/CNAV1 contribution files.
Fix B1C ICD alignment for eph, TGD, UTC, and PR gating.
Gate CNAV1 publish on IODE/IODC, fix gettgd SYS_BDS selection,
correct LS/LSF and UTC scales, and drop the MEO-biased PR median cut.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-08-01 02:32:17 +08:00
Vladslav P 5eeaec3f48 BeiDou B1C: improve position accuracy
Fix ecc scaling.
Fix af0 scaling.
Fix TGD_B2ap scaling.
Fix ISC_B1Cd scaling.
Fix Adot scaling.
Adapt Gnss_Ephemeris::satellitePosVelComputation to the position
calculation procedure from the ICD while keeping compatibility with
other navigation systems.
Slightly adjust CNAV1 ephemeris serialization order to improve
readability.

Signed-off-by: Vladslav P <vladisslav2011@gmail.com>
2026-08-01 02:32:16 +08:00
OuWenhao16 e633273448 Fix B1C PVT: separate B1I/B1C bands, isolate DNAV/CNAV1, and harden hybrid solving.
Map B1C to its own RTKLIB frequency/wavelength, apply correct TGD/ISC and BDGIM,
and define same-PRN mixed-signal policy with regression tests and conf notes.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-08-01 02:32:16 +08:00
OuWenhao16 77f2c18f01 Add BeiDou B1C (signal 1D) signal processing and CNAV1 support.
Integrate acquisition, pilot/data tracking, B-CNAV1 telemetry decoding, and
PVT/RINEX hooks on upstream/next with minimal changes to shared blocks.
Includes example configuration, code generators, and unit tests.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
Signed-off-by: Vladslav P <vladisslav2011@gmail.com>
2026-08-01 02:32:08 +08:00
Carles Fernandez 02b0ba6ee6 Make clang-tidy happy 2026-07-31 20:24:51 +02:00
Carles Fernandez 5454bc22ee Complete BeiDou D1/D2 DNAV decoding 2026-07-31 19:11:58 +02:00
Carles Fernandez f7fa1ff68e Merge branch 'fix-L2-L5-CNAV' of https://github.com/vladisslav2011/gnss-sdr into vladisslav2011-fix-L2-L5-CNAV 2026-07-31 16:51:51 +02:00
Vladslav P edaedcc9b2 GPS CNAV: suggested corrections
Set *fidx to zero at the beginning of prange function
Move mean motion average estimation to mean anomaly calculation
Use Ak to calculate rkdot
Update mean anomaly calculation in Gnss_Ephemeris::sv_clock_relativistic_term
Store delta_ndot to XML and bump BOOST_CLASS_VERSION to 2

Signed-off-by: Vladslav P <vladisslav2011@gmail.com>
2026-07-31 02:07:36 +03:00
Carles Fernandez 101b1e973a Fix formatting 2026-07-30 20:00:25 +02:00
kalmancito 81f4c8846b Add SBAS support 2026-07-30 17:40:43 +02:00
Carles Fernandez 1876133a71 Merge remote-tracking branch 'cf/rinex4' into next 2026-07-30 17:30:36 +02:00
OuWenhao16 51be7df31e Use a 4 MHz optimal acquisition rate for BeiDou B1I.
Lower BEIDOU_B1I_OPT_ACQ_FS_SPS to ~2 samples/chip (same ratio as GPS
L1 at 2 MHz) and apply it in the flowgraph acquisition resampler path,
without changing GLONASS or BeiDou B3 sampling behavior.

Signed-off-by: OuWenhao16 <104730917+OuWenhao16@users.noreply.github.com>
2026-07-30 22:11:19 +08:00
Carles Fernandez cfc45fb8bf Store QZSS L5 CNAV UTC and iono parameters separately, log CNVX records
Extend the QZSS L1 C/A LNAV treatment to the L5 CNAV chain: the QZSS-
configured L5 telemetry decoder now publishes dedicated Qzss_CNAV_Iono
and Qzss_CNAV_Utc_Model objects instead of the shared GPS CNAV types,
and PVT keeps them in their own Rtklib_Solver members.

- RINEX 4.02 navigation files get "> STO J  CNVX" QZUT records with the
  UTC(NICT) identifier and "> ION J  CNVX WIDE" Klobuchar records. The
  WIDE subtype, compulsory for the QZSS CNVX ION message type, is
  correct because CNAV Message Type 30 broadcasts the Wide Area
  coefficient set (IS-QZSS-PNT-006; the Japan area set of Message Type
  61 is not decoded).
- QZSS CNAV parameters no longer overwrite the GPS CNAV ones in mixed
  configurations.
- The QZSS slots of the RTKLIB navigation structure take the LNAV
  values with CNAV as fallback, and QZSS-only configurations keep
  feeding the broadcast ionospheric model and the leap second count.
- The XML storage output gains qzss_cnav_utc_model.xml and
  qzss_cnav_iono.xml.
2026-07-30 12:55:28 +02:00
Carles FernandezandClaude Fable 5 4f570e7867 Store QZSS UTC and iono parameters separately and log RINEX 4 QZUT records
The Klobuchar coefficients and the UTC(NICT) offset broadcast by QZSS
satellites in LNAV subframe 4 (both the wide-area and Japan-area pages)
were stored in the shared GPS structures, overwriting the GPS-sourced
values in mixed GPS + QZSS configurations and making it impossible to
label them correctly in RINEX output.

New Qzss_Utc_Model and Qzss_Iono storage classes are now published by
the QZSS-configured L1 C/A telemetry decoder and kept in dedicated
Rtklib_Solver members. With this in place:

- RINEX 4.02 navigation files get "> STO J  LNAV" QZUT records with the
  UTC(NICT) identifier and "> ION J  LNAV" Klobuchar records, and the
  LEAP SECONDS header is updated from QZSS data in QZSS-only setups.
- QZSS-sourced parameters are no longer mislabeled as GPS corrections
  (GPUT / GPS ION or TIME SYSTEM CORR / IONOSPHERIC CORR lines).
- The QZSS slots of the RTKLIB navigation structure (utc_qzs, ion_qzs)
  are now populated; QZSS-only configurations keep feeding the broadcast
  ionospheric model and the leap second count as before.
- The XML storage output gains qzss_utc_model.xml and qzss_iono.xml.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 12:21:59 +02:00
Vladslav P 60501b53fa GPS CNAV: fix satellite position computation
Implement satellite positions computation following the procedure,
described on page 166 of IS-GPS-200 (08/01/2022)
Implement L2C/L5I group delay compensation following the procedure,
described on page 175 of IS-GPS-200 (08/01/2022)

Signed-off-by: Vladslav P <vladisslav2011@gmail.com>
2026-07-28 14:06:36 +03:00
Carles Fernandez 5451c100b6 Fix malformed XML ephemeris handling
Validate GPS and QZSS ephemeris map keys and PRNs when loading XML assistance. Restore QZSS system and satellite block metadata after deserialization, and load LNAV assistance for QZSS-only configurations. Guard RINEX generation against malformed records and missing satellite block metadata to prevent exceptions in the PVT worker.
2026-07-21 09:12:36 +02:00
Carles Fernandez a042c214a7 Make clang-tidy happy 2026-07-20 20:02:52 +02:00
Carles Fernandez 1d1154fc25 Fix week rollover in Galileo UTC parameters 2026-07-20 18:48:43 +02:00
Carles Fernandez ebf2e402e7 Improve Galileo alert page handling 2026-07-20 18:35:14 +02:00
Carles Fernandez 899bcfe110 Fix formatting 2026-07-20 13:01:36 +02:00
Carles Fernandez 0d1246b1f0 Add block for two new Galileo satellites 2026-07-20 12:29:09 +02:00
Carles Fernandez 6e5590420d Fix Galileo ephemeris handling across PVT outputs 2026-07-19 22:43:48 +02:00
Carles Fernandez a7e72cd522 Fix Galileo reduced CED handling 2026-07-19 10:10:56 +02:00
Carles Fernandez 4ca75aaa6e Fix handling of Galileo alert page 2026-07-19 00:51:16 +02:00
Carles Fernandez 091452251d Fix Galileo UTC model flag 2026-07-19 00:33:23 +02:00
Carles Fernandez f0482371fe Fix ISM mask 2026-07-18 07:46:04 +02:00
Carles Fernandez 07fb80e132 Fix GGTO handling (see ICD 5.1.8) 2026-07-17 21:29:38 +02:00
Carles Fernandez 289096ae8e Fix t0_ISM overflow 2026-07-17 20:58:17 +02:00
Carles Fernandez cec340f4aa Propagate broadcast SISA and NAPA to PVT 2026-07-17 20:49:00 +02:00
Carles Fernandez 7bcaab8e57 Make clang-tidy happy 2026-07-16 14:45:41 +02:00
Carles Fernandez 93967135ff Fix date in old files processing 2026-07-16 13:41:00 +02:00
Carles Fernandez 64075065a9 Fix building in old compilers 2026-07-04 16:13:56 +02:00
Carles Fernandez 028ebe433d QZSS: refine L1 C/B support
- Restore true chip semantics for L1: QZSS_L1_CHIP_RATE is 1.023 Mcps and
  QZSS_L1_CODE_LENGTH is 1023 chips again. The replica carries
  QZSS_L1_SAMPLES_PER_CHIP = 2 samples per chip (L1 C/A chips duplicated,
  L1 C/B sinBOC(1,1) subchips), following the Galileo E1 approach. The
  generated waveform is unchanged, but Tracking_1J.early_late_space_chips
  is expressed in chips again, consistently with all other signals.
- Normalize the DLL discriminator with the sinBOC(1,1) correlation
  function when the tracked PRN broadcasts L1 C/B, selected per PRN in
  start_tracking(); warn if the configured correlator spacing falls
  outside the BOC(1,1) correlation main peak (> 0.33 chips).
- Attribute L1 C/B observables and ephemerides (PRN 203-206) to the PRN
  of the satellite's nominal PNT signals (RINEX 4.00, Table 6), so RINEX,
  RTCM and rtklib identify the transmitting satellite correctly and
  multi-frequency observations of the same satellite are paired instead
  of counted twice.
- Do not search QZSS L5 signals for PRNs above 202, which have no L5
  PRN code assigned in IS-QZSS-PNT.
- Remove reserved, non-operational PRNs 198 and 202 from the default
  QZSS search list; they remain selectable via the QZSS.prns option.
- Fix a potential std::out_of_range in
  GNSSFlowgraph::priorize_satellites() when assisted acquisition
  prioritizes satellites of a constellation with only a subset of its
  signals configured.
2026-07-04 15:31:03 +02:00
Vladislav P 1146a5285c QZSS: L1C/B implementation
Increase QZSS L1 chip rate to 2.046MHz to handle L1 C/B BOC(1,1)
sequences
Increase QZSS L1 code length to 2046 to handle L1 C/B BOC(1,1)
sequences
Increase maximum QZSS PRN to 206
Implement optional BOC(1,1) sequence generation

Signed-off-by: Vladislav P <vladisslav2011@gmail.com>
2026-07-03 20:27:37 +03:00