Implement GNSS-SDR.GPS_banned_prns, GNSS-SDR.Galileo_banned_prns, GNSS-SDR.Glonass_banned_prns, and GNSS-SDR.Beidou_banned_prns configuration parameters. The user can specify lists of satellites that will not be processed (e.g. GNSS-SDR.Galileo_banned_prns=14,18 since Galileo E14 and E18 satellites are not usable for PVT). Documented at https://gnss-sdr.org/docs/sp-blocks/global-parameters/\#banned-satellites Inspired by #397

This commit is contained in:
Carles Fernandez 2020-07-07 00:05:31 +02:00
parent 999ee6c623
commit 58853ace7d
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 129 additions and 0 deletions

View File

@ -14,6 +14,7 @@
;######### GLOBAL OPTIONS ##################
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
GNSS-SDR.internal_fs_sps=4000000
GNSS-SDR.Galileo_banned_prns=14,18
;######### SIGNAL_SOURCE CONFIG ############

View File

@ -12,6 +12,7 @@
;######### GLOBAL OPTIONS ##################
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
GNSS-SDR.internal_fs_sps=5000000
GNSS-SDR.Galileo_banned_prns=14,18
;######### SUPL RRLP GPS assistance configuration #####

View File

@ -85,6 +85,12 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
from the binary and can help to reduce its size and speed up the receiver. In
binaries with enabled logging, it can be still disabled by passing the command
line flag `--minloglevel=3` to `gnss-sdr`.
- Defined new `GNSS-SDR.GPS_banned_prns`, `GNSS-SDR.Galileo_banned_prns`,
`GNSS-SDR.Glonass_banned_prns` and `GNSS-SDR.Beidou_banned_prns` configuration
parameters. The user can specify lists of satellites that will not be
processed (e.g., `GNSS-SDR.Galileo_banned_prns=14,18` since Galileo E14 and
E18 satellites are not usable for PVT). Satellites on those lists will never
be assigned to a processing channel.
&nbsp;

View File

@ -53,6 +53,7 @@
#include <iterator> // for insert_iterator, inserter
#include <memory> // for std::shared_ptr
#include <set> // for set
#include <sstream> // for std::stringstream
#include <stdexcept> // for invalid_argument
#include <thread> // for std::thread
#include <utility> // for std::move
@ -1668,6 +1669,30 @@ void GNSSFlowgraph::set_signals_list()
}
}
std::string sv_banned = configuration_->property("GNSS-SDR.Galileo_banned_prns", std::string(""));
if (!sv_banned.empty())
{
std::stringstream ss(sv_banned);
while (ss.good())
{
std::string substr;
std::getline(ss, substr, ',');
try
{
auto banned = static_cast<unsigned int>(std::stoi(substr));
available_galileo_prn.erase(banned);
}
catch (const std::invalid_argument& ia)
{
std::cerr << "Invalid argument at GNSS-SDR.Galileo_banned_prns configuration parameter: " << ia.what() << '\n';
}
catch (const std::out_of_range& oor)
{
std::cerr << "Out of range at GNSS-SDR.Galileo_banned_prns configuration parameter: " << oor.what() << '\n';
}
}
}
sv_list = configuration_->property("GPS.prns", std::string(""));
if (sv_list.length() > 0)
@ -1684,6 +1709,30 @@ void GNSSFlowgraph::set_signals_list()
}
}
sv_banned = configuration_->property("GNSS-SDR.GPS_banned_prns", std::string(""));
if (!sv_banned.empty())
{
std::stringstream ss(sv_banned);
while (ss.good())
{
std::string substr;
std::getline(ss, substr, ',');
try
{
auto banned = static_cast<unsigned int>(std::stoi(substr));
available_gps_prn.erase(banned);
}
catch (const std::invalid_argument& ia)
{
std::cerr << "Invalid argument at GNSS-SDR.GPS_banned_prns configuration parameter: " << ia.what() << '\n';
}
catch (const std::out_of_range& oor)
{
std::cerr << "Out of range at GNSS-SDR.GPS_banned_prns configuration parameter: " << oor.what() << '\n';
}
}
}
sv_list = configuration_->property("SBAS.prns", std::string(""));
if (sv_list.length() > 0)
@ -1700,6 +1749,30 @@ void GNSSFlowgraph::set_signals_list()
}
}
sv_banned = configuration_->property("GNSS-SDR.SBAS_banned_prns", std::string(""));
if (!sv_banned.empty())
{
std::stringstream ss(sv_banned);
while (ss.good())
{
std::string substr;
std::getline(ss, substr, ',');
try
{
auto banned = static_cast<unsigned int>(std::stoi(substr));
available_sbas_prn.erase(banned);
}
catch (const std::invalid_argument& ia)
{
std::cerr << "Invalid argument at GNSS-SDR.SBAS_banned_prns configuration parameter: " << ia.what() << '\n';
}
catch (const std::out_of_range& oor)
{
std::cerr << "Out of range at GNSS-SDR.SBAS_banned_prns configuration parameter: " << oor.what() << '\n';
}
}
}
sv_list = configuration_->property("Glonass.prns", std::string(""));
if (sv_list.length() > 0)
@ -1716,6 +1789,30 @@ void GNSSFlowgraph::set_signals_list()
}
}
sv_banned = configuration_->property("GNSS-SDR.Glonass_banned_prns", std::string(""));
if (!sv_banned.empty())
{
std::stringstream ss(sv_banned);
while (ss.good())
{
std::string substr;
std::getline(ss, substr, ',');
try
{
auto banned = static_cast<unsigned int>(std::stoi(substr));
available_glonass_prn.erase(banned);
}
catch (const std::invalid_argument& ia)
{
std::cerr << "Invalid argument at GNSS-SDR.Glonass_banned_prns configuration parameter: " << ia.what() << '\n';
}
catch (const std::out_of_range& oor)
{
std::cerr << "Out of range at GNSS-SDR.Glonass_banned_prns configuration parameter: " << oor.what() << '\n';
}
}
}
sv_list = configuration_->property("Beidou.prns", std::string(""));
if (sv_list.length() > 0)
@ -1732,6 +1829,30 @@ void GNSSFlowgraph::set_signals_list()
}
}
sv_banned = configuration_->property("GNSS-SDR.Beidou_banned_prns", std::string(""));
if (!sv_banned.empty())
{
std::stringstream ss(sv_banned);
while (ss.good())
{
std::string substr;
std::getline(ss, substr, ',');
try
{
auto banned = static_cast<unsigned int>(std::stoi(substr));
available_beidou_prn.erase(banned);
}
catch (const std::invalid_argument& ia)
{
std::cerr << "Invalid argument at GNSS-SDR.Beidou_banned_prns configuration parameter: " << ia.what() << '\n';
}
catch (const std::out_of_range& oor)
{
std::cerr << "Out of range at GNSS-SDR.Beidou_banned_prns configuration parameter: " << oor.what() << '\n';
}
}
}
if (configuration_->property("Channels_1C.count", 0) > 0)
{
// Loop to create GPS L1 C/A signals