[hamradio-commits] [gnss-sdr] 51/251: Bug fixes

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit 9542cbb7337318a733bcc535f15dd0cd67077a54
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sun May 10 12:35:49 2015 +0200

    Bug fixes
---
 src/core/receiver/gnss_block_factory.cc  |  2 +-
 src/core/receiver/gnss_block_factory.h   | 25 ++++++++++++-------------
 src/core/receiver/gnss_flowgraph.cc      | 22 +++++++++-------------
 src/core/system_parameters/gnss_signal.h |  2 +-
 4 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc
index 18f1772..9d0fe65 100644
--- a/src/core/receiver/gnss_block_factory.cc
+++ b/src/core/receiver/gnss_block_factory.cc
@@ -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++;
                 }
diff --git a/src/core/receiver/gnss_block_factory.h b/src/core/receiver/gnss_block_factory.h
index 5ca34ce..5fa3b61 100644
--- a/src/core/receiver/gnss_block_factory.h
+++ b/src/core/receiver/gnss_block_factory.h
@@ -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,
diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc
index 4092c44..18755f2 100644
--- a/src/core/receiver/gnss_flowgraph.cc
+++ b/src/core/receiver/gnss_flowgraph.cc
@@ -392,12 +392,11 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
     switch (what)
     {
     case 0:
-        LOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite()<<", Signal " << channels_.at(who)->get_signal().get_signal();
+        LOG(INFO) << "Channel " << who << " ACQ FAILED satellite " << channels_.at(who)->get_signal().get_satellite() << ", Signal " << channels_.at(who)->get_signal().get_signal();
         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);
diff --git a/src/core/system_parameters/gnss_signal.h b/src/core/system_parameters/gnss_signal.h
index 1bf0c58..e07d050 100644
--- a/src/core/system_parameters/gnss_signal.h
+++ b/src/core/system_parameters/gnss_signal.h
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list