1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-09 15:35:27 +00:00

Avoid tracking the same PRN in multiple channels (Fixes: #885)

This commit is contained in:
Carles Fernandez 2025-07-11 11:30:33 +02:00
parent 49fd39d2b6
commit 72a4ed3878
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 23 additions and 3 deletions

View File

@ -14,6 +14,11 @@ All notable changes to GNSS-SDR will be documented in this file.
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
### Improvements in Interoperability:
- Enabled multi-band processing off-loading to the FPGA when using the MAX2771
RF front-end.
### Improvements in Maintainability:
- Added a CI job to detect lines longer than 512 characters (avoid this
@ -27,7 +32,7 @@ All notable changes to GNSS-SDR will be documented in this file.
### Improvements in Portability:
- Fix building option `-DENABLE_ION=ON` when using CMake >= 4.0.
- Fixed building option `-DENABLE_ION=ON` when using CMake >= 4.0.
- Updated `gsl-lite` to v1.0.1. See the
[gsl-lite release](https://github.com/gsl-lite/gsl-lite/releases/tag/v1.0.1).
@ -38,6 +43,9 @@ All notable changes to GNSS-SDR will be documented in this file.
PDF format. It requires `numpy` and `matplotlib`.
- `File_Signal_Source` fixed file length and sample skip calculations on 32-bit
systems.
- Fixed tracking the same PRN in multiple channels. Previously, this could
happen when the number of acquisition channels was close to the number of
available PRNs for a given signal.
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/

View File

@ -2192,6 +2192,14 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
std::string assist_signal = "";
auto& available_signals = available_signals_map_.at(searched_signal);
if (available_signals.empty())
{
const auto& entry = signal_mapping.at(searched_signal);
const auto& gnss_system_str = entry.first;
const auto& signal_pretty_str = entry.second;
throw std::runtime_error("More ACQUISITION channels than PRNs for signal " + gnss_system_str + " " + signal_pretty_str);
}
switch (mapStringValues_[searched_signal])
{
case evGPS_2S:
@ -2250,8 +2258,12 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal
{
result = available_signals.front();
available_signals.pop_front();
const std::string sys = result.get_satellite().get_system();
if ((sys == "Glonass") || (sys == "Beidou"))
{
available_signals.push_back(result);
}
}
return result;
}

View File

@ -54,7 +54,7 @@ public:
void update_PRN(uint32_t PRN); //!< Updates the PRN Number when information is decoded, only applies to GLONASS GNAV messages
uint32_t get_PRN() const; //!< Gets satellite's PRN
int32_t get_rf_link() const; //!< Gets the satellite's rf link
std::string get_system() const; //!< Gets the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Beidou"}
std::string get_system() const; //!< Gets the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}
std::string get_system_short() const; //!< Gets the satellite system {"G", "R", "SBAS", "E", "C"}
std::string get_block() const; //!< Gets the satellite block. If GPS, returns {"IIA", "IIR", "IIR-M", "IIF"}
std::string what_block(const std::string& system_, uint32_t PRN_); //!< Gets the block of a given satellite