Commit Graph
90 Commits
Author SHA1 Message Date
joebre af366bef1b Add runtime satellite-visibility-aware acquisition search
Today, GNSSFlowgraph picks the next satellite to acquire on an idle
channel from a single FIFO queue per signal type. Visibility only ever
affects that queue's initial order, computed once at hot/warm start;
after that, every satellite -- visible or not -- is just a FIFO entry,
and a satellite that fails acquisition goes to the back of the same
queue. On a receiver with a large candidate PRN pool relative to the
satellites actually in view, this means channels keep grinding through
acquisition attempts against satellites that were never going to be
found, burning CPU that could go toward satellites actually overhead.

This adds continuous visibility tracking instead: as the receiver gets
a fix (or an AGNSS reference position) and as ephemeris/almanac data
arrives, satellites are classified into "visible" (elevation computable
and above GNSS-SDR.search_elevation_mask), "excluded" (elevation
computable and at/below the mask), or implicitly "maybe visible" (no
data yet -- still searched, just at lower priority). Classification is
re-evaluated whenever the fix becomes valid, new/updated ephemeris or
almanac data arrives for a PRN, the receiver moves significantly, a
periodic interval elapses, or classified data ages past its staleness
threshold -- not just once at startup.

A satellite that's actually acquired or tracking is never torn down
because of this classification: the search mask exists purely to avoid
wasting CPU on unlikely candidates, not as a correctness gate --
PVT.elevation_mask remains the real gate on whether a tracked
satellite's observations get used in the fix. Only the search layer
(picking new acquisitions, and not retrying a specific satellite after
a genuine loss of lock) is scoped by visibility.

Whole feature is gated behind GNSS-SDR.enable_visibility_aware_search,
default false -- disabled, every existing code path is untouched.

Key pieces:
- New SatelliteVisibility class (src/core/receiver/satellite_visibility.cc/.h):
  owns the classification state and the recompute logic, including a
  targeted-recompute path that only touches the satellite(s) whose data
  actually changed instead of the whole constellation, when nothing else
  that could affect every satellite's elevation (receiver position,
  elapsed time) has changed.
- GNSSFlowgraph: new visible/maybe-visible queue selection in
  search_next_signal(), ratio-controlled via
  GNSS-SDR.visible_vs_mayvisible_search_ratio, plus reclassification
  handling when a channel's assigned-but-not-yet-started satellite
  becomes known excluded.
- ControlThread: MaybeUpdateVisibility() is called unconditionally from
  event_dispatcher(), not just its idle branch -- the search layer's own
  acquisition churn keeps the control queue busy enough that an
  idle-only trigger would starve for the entire run right when
  reclassifying satellites out of "maybe visible" is what would reduce
  that churn.
- rtklib_conversions/rtklib_ephemeris: resolve_truncated_week() and
  reference-week-aware alm_to_rtklib() overloads, needed to correctly
  resolve Galileo's 2-bit and GPS's 8-bit truncated almanac week numbers
  against an arbitrary query time rather than only the receiver's own
  current time.
2026-09-07 15:07:08 +02:00
Carles Fernandez 93967135ff Fix date in old files processing 2026-07-16 13:41:00 +02:00
Carles Fernandez cfb56d35d6 Replace the System V queues by boost::interprocess 2024-12-21 13:20:00 +01:00
Carles Fernandez 707c7826fb Move signal handler after the constructor 2023-10-05 17:47:13 +02:00
Carles Fernandez d487e4ce2c Update changelog, fix formatting defects and typos 2023-10-01 09:03:14 +02:00
Javier Arribas b971b61eed Adding standard UNIX/POSIX signals listener. GNSS-SDR now can be safely stopped using CTL+C 2023-09-30 14:48:04 +02:00
Carles Fernandez cd1c9e46ba Add some basic configuration checks
Avoid some segmentation faults caused by ill-formatted configuration files
2021-01-25 00:49:36 +01:00
Carles Fernandez 21352a80d1 Apply and add clang-tidy ckecks readability-make-member-function-const and readability-qualified-auto 2020-12-30 21:49:29 +01:00
Carles Fernandez 7308745f05 Apply more concise file header format
Re-license CMake scripts with BSD-3-Clause
2020-12-30 13:35:06 +01:00
Carles Fernandez 287284261c Make use of Doxygen grouping feature
Improve Modules page in generated HTML documentation
2020-11-01 13:37:19 +01:00
Carles Fernandez 499de7a9f1 Update file headers 2020-07-28 16:57:15 +02:00
Carles Fernandez c0f81dd9e2 Improve const correctness. Improve usage of typeid 2020-07-19 09:39:32 +02:00
Carles Fernandez 8666ff7706 Include what you use 2020-07-14 20:12:08 +02:00
Carles Fernandez c784dfe125 Fix a bug that could cause a crash on receiver stopping
If a channel event was happening after flowgraph stop and before flowgraph disconnection, it caused a crash. This was avoided by sleeping the control thread during 500 ms after disconnection and before the block destructors were called, so the event could be processed, but this was not a robust solution.
2020-06-27 09:52:59 +02:00
Carles Fernandez 5a3db5a53d Add debug internal logging for destructors. Sort destructor order 2020-06-25 02:50:07 +02:00
Carles Fernandez 3fcc7b7f85 Remove unused data member 2020-06-24 11:45:01 +02:00
Carles Fernandez 037a1fcb5f Improve headers, large data members first. Improve nav message interfaces 2020-06-23 09:47:58 +02:00
Carles Fernandez 0d5b5894b4 Sort header files 2020-06-19 12:39:28 +02:00
Carles Fernandez 955348b080 Remove trailing underscore in header guards 2020-02-08 10:10:46 +01:00
Carles Fernandez 4d0d263280 Make the software package compliant with the REUSE Specification v3.0 (see https://reuse.software/spec/)
Update license headers to SPDX format (see https://spdx.org/)
Add license to all files
Add CI job in GitHub Actions to ensure compliance
2020-02-08 01:20:02 +01:00
Carles Fernandez 0c2efce10a Replace custom_year parameter name and type by bool pre_2009_file to process files dated from 1999 to 2009 2019-09-18 18:25:07 +02:00
Carles Fernandez 837dcc6859 Improve formatting 2019-09-17 16:25:17 +02:00
Javier ad51654fbf Adding global configuration option to specify a custom year in order to postprocess old GNSS captures and avoid wrong week rollover 2019-09-13 16:36:41 +02:00
Carles Fernandez e80122f4ff Apply clang tidy checks and clang-format 2019-09-13 08:56:37 +02:00
Carles Fernandez 0520d400b3 Apply clang-tidy 2019-09-11 22:31:34 +00:00
Carles Fernandez 95f688dcb0 Mark all constructors callable with one argument as explicit 2019-08-23 21:25:44 +02:00
Carles Fernandez 1a11b5a2ec Remove unnecessary links and includes to boost::thread 2019-08-03 19:51:50 +02:00
Javier Arribas c45257a26b Bug fix: Restore telecommand functionality 2019-07-25 16:38:19 +02:00
Carles Fernandez 37fdfca5ec Miscellaneous improvements
Improve modularity of CMake design
Improve building speed in multicore processors
Files command_event.* moved to core/libs
Remove Armadillo from public core_receiver interface
Uniformize name format for classes
Apply some fixes by clang-tidy
Improve documentation
2019-07-21 12:55:59 +02:00
Javier Arribas 504a22d6bb Introducing the new satellite dispatcher with optional assistance from primary frequencies to secondary frequencies 2019-07-19 18:49:42 +02:00
Javier Arribas aeabfb7c3c Replacing the old gnuradio message queue with the new ConcurrentQueue 2019-07-17 15:56:30 +02:00
Javier Arribas 1313edd716 Partial implementation of the new event queue and its dependencies. Still NOT usable 2019-07-16 17:41:12 +02:00
Carles Fernandez c82c7225dd Improve includes with the aid of include-what-you-use (IWYU)
See rationale at https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
2019-03-05 08:59:04 +01:00
Carles Fernandez 7c71ed9404 Merge branch 'fpga' of https://github.com/gnss-sdr/gnss-sdr into merge-fpga
Applied checks and formatting
2019-02-28 21:45:30 +01:00
Marc Majoral c32e0b427a coding style + removed some unnecessary memory arrays in the FPGA E5A tracking adapter class. 2019-02-27 17:27:31 +01:00
Marc Majoral cf0a37300a Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga 2019-02-25 19:21:00 +01:00
Carles Fernandez 08b0a7cd82 Fix thread termination
Some boost::threads replaced by std::threads
2019-02-24 13:22:52 +01:00
Carles Fernandez f01f90695e Apply clang-format 2019-02-22 13:30:18 +01:00
Carles Fernandez 62a7e54359 Introduce readability-identifier-naming check
This commit enforces naming style for Classes and global constants:
Camel_Snake_Case for Classes
UPPER_CASE for global constants
CamelCase for abstract classes
2019-02-22 10:47:24 +01:00
Carles Fernandez 719af13a33 Remove google-runtime-references check 2019-02-14 12:51:43 +01:00
Marc Majoral fd3eb2a80e The termination process is now done correctly when using the FPGA. 2019-02-13 17:48:14 +01:00
Carles Fernandez 54237770a6 Apply fixes by clang-tidy 2018-12-10 22:59:10 +01:00
Carles Fernandez 5f79053d65 Sort includes automatically with clang-format
Order:
1.- Main header
2.- Local headers
3.- Third-party library headers
4.- System headers

each category sorted lexicographically
2018-12-09 22:00:09 +01:00
Carles Fernandez ea59abee77 Add work on warm start 2018-11-20 09:28:47 +01:00
Carles Fernandez a544112a84 Fix defects detected by Coverity Scan 2018-11-08 15:34:58 +01:00
Javier 01a1954b15 Adding the Hotstart telecommand implementation to predict visible satellites for GPS and Galileo constellations 2018-11-05 17:53:53 +01:00
Carles Fernandez bc058d33da Read GPS almanac file if present 2018-10-25 11:01:29 +02:00
Carles Fernandez c4b2aa8cc4 Read Galileo almamac xml file if present 2018-10-25 00:43:25 +02:00
Javier 966d935fbc Adding the restart telecommand functionality by using external helper startup script 2018-10-23 16:54:06 +02:00
Javier ae7be10325 Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next 2018-10-21 19:20:30 +02:00