mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Bug fixes
This commit is contained in:
parent
9e534ab814
commit
9542cbb733
@ -618,7 +618,7 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
// Push back the channel to the vector of channels, if apply.
|
||||
if((channel_count > 0) and apply_)
|
||||
{
|
||||
channels->push_back(std::move(GetChannel_GPS(configuration,
|
||||
channels->push_back(std::move(GetChannel_2S(configuration,
|
||||
acquisition_implementation, tracking_implementation, telemetry_decoder_implementation, i, queue)));
|
||||
channel_absolute_id++;
|
||||
}
|
||||
|
@ -71,6 +71,18 @@ public:
|
||||
std::unique_ptr<GNSSBlockInterface> GetOutputFilter(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
/*
|
||||
* \brief Returns the block with the required configuration and implementation
|
||||
*/
|
||||
std::unique_ptr<GNSSBlockInterface> GetBlock(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
std::string role, std::string implementation,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
private:
|
||||
// DEPRECATED
|
||||
std::unique_ptr<GNSSBlockInterface> GetChannel_GPS(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
std::string acq, std::string trk, std::string tlm, int channel,
|
||||
@ -97,19 +109,6 @@ public:
|
||||
std::string acq, std::string trk, std::string tlm, int channel,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GetChannels(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
/*
|
||||
* \brief Returns the block with the required configuration and implementation
|
||||
*/
|
||||
std::unique_ptr<GNSSBlockInterface> GetBlock(std::shared_ptr<ConfigurationInterface> configuration,
|
||||
std::string role, std::string implementation,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
private:
|
||||
std::unique_ptr<AcquisitionInterface> GetAcqBlock(
|
||||
std::shared_ptr<ConfigurationInterface> configuration,
|
||||
std::string role,
|
||||
|
@ -396,8 +396,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
|
||||
available_GNSS_signals_.push_back(channels_.at(who)->get_signal());
|
||||
|
||||
//TODO: Optimize the channel and signal matching!
|
||||
while (//channels_.at(who)->get_signal().get_satellite().get_system() != available_GNSS_signals_.front().get_satellite().get_system()
|
||||
channels_.at(who)->get_signal().get_signal() != available_GNSS_signals_.front().get_signal() )
|
||||
while ( channels_.at(who)->get_signal().get_signal().compare(available_GNSS_signals_.front().get_signal()) != 0 )
|
||||
{
|
||||
available_GNSS_signals_.push_back(available_GNSS_signals_.front());
|
||||
available_GNSS_signals_.pop_front();
|
||||
@ -591,7 +590,7 @@ void GNSSFlowgraph::set_signals_list()
|
||||
std::set<unsigned int> available_sbas_prn = {120, 124, 126};
|
||||
|
||||
std::set<unsigned int> available_galileo_prn = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
||||
29, 30, 31, 32, 33, 34, 35, 36};
|
||||
|
||||
|
||||
@ -630,8 +629,6 @@ void GNSSFlowgraph::set_signals_list()
|
||||
/*
|
||||
* Loop to create SBAS L1 C/A signals
|
||||
*/
|
||||
|
||||
|
||||
for (available_gnss_prn_iter = available_sbas_prn.begin();
|
||||
available_gnss_prn_iter != available_sbas_prn.end();
|
||||
available_gnss_prn_iter++)
|
||||
@ -642,7 +639,6 @@ void GNSSFlowgraph::set_signals_list()
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((configuration_->property("Channels_1B.count", 0) > 0) or (default_system.find(std::string("Galileo")) != std::string::npos) or (default_signal.compare("1B") == 0) or (configuration_->property("Channels_Galileo.count", 0) > 0))
|
||||
{
|
||||
/*
|
||||
@ -680,21 +676,21 @@ void GNSSFlowgraph::set_signals_list()
|
||||
|
||||
for (unsigned int i = 0; i < total_channels; i++)
|
||||
{
|
||||
std::string gnss_system = (configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".system", default_system));
|
||||
|
||||
std::string gnss_signal = (configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".signal", default_signal));
|
||||
LOG(INFO) << "Channel " << i << " signal " << gnss_signal;
|
||||
std::string gnss_system;
|
||||
if((gnss_signal.compare("1C") == 0) or (gnss_signal.compare("2S") == 0) ) gnss_system = "GPS";
|
||||
if((gnss_signal.compare("1B") == 0) or (gnss_signal.compare("5X") == 0) ) gnss_system = "Galileo";
|
||||
|
||||
LOG(INFO) << "Channel " << i << " system " << gnss_system << ", signal " << gnss_signal;
|
||||
|
||||
unsigned int sat = configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".satellite", 0);
|
||||
|
||||
if (((sat == 0) || (sat == gnss_it->get_satellite().get_PRN())) and ( gnss_it->get_signal().compare(gnss_signal) == 0 ) ) // 0 = not PRN in configuration file and ( gnss_it->get_signal().compare(gnss_signal) == 0 )
|
||||
if (((sat == 0) || (sat == gnss_it->get_satellite().get_PRN())) and ( gnss_it->get_signal().compare(gnss_signal) == 0 ) ) // 0 = not PRN in configuration file
|
||||
{
|
||||
gnss_it++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if((gnss_signal.compare("1C") == 0) or (gnss_signal.compare("2S") == 0) ) gnss_system = "GPS";
|
||||
if((gnss_signal.compare("1B") == 0) or (gnss_signal.compare("5X") == 0) ) gnss_system = "Galileo";
|
||||
Gnss_Signal signal_value = Gnss_Signal(Gnss_Satellite(gnss_system, gnss_it->get_satellite().get_PRN()), gnss_signal);
|
||||
available_GNSS_signals_.remove(signal_value);
|
||||
available_GNSS_signals_.insert(gnss_it, signal_value);
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
Gnss_Signal();
|
||||
Gnss_Signal(const Gnss_Satellite& satellite_, const std::string& signal_);
|
||||
~Gnss_Signal();
|
||||
std::string get_signal() const; //!< Get the satellite system {"GPS", "GLONASS", "SBAS", "Galileo", "Compass"}
|
||||
std::string get_signal() const; //!< Get the satellite signal {"1C" for GPS L1 C/A, "2S" for GPS L2C (M), "1B" for Galileo E1B, "5X" for Galileo E5a}
|
||||
Gnss_Satellite get_satellite() const; //!< Get the Gnss_Satellite associated to the signal
|
||||
friend bool operator== (const Gnss_Signal &, const Gnss_Signal &); //!< operator== for comparison
|
||||
friend std::ostream& operator<<(std::ostream &, const Gnss_Signal &); //!< operator<< for pretty printing
|
||||
|
Loading…
Reference in New Issue
Block a user