From a5b0d58746f6d412a43af8d019a7cab0d6cb2ea9 Mon Sep 17 00:00:00 2001 From: Gastd Date: Wed, 29 Mar 2017 12:15:57 -0300 Subject: [PATCH] Add glonass svn in signals list --- src/core/receiver/gnss_flowgraph.cc | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 138140d34..23827ba70 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -573,6 +573,12 @@ void GNSSFlowgraph::set_signals_list() 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}; + /* + * Only 24 operational + */ + std::set available_glonass_prn = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}; + std::string sv_list = configuration_->property("Galileo.prns", std::string("") ); if( sv_list.length() > 0 ) @@ -621,6 +627,22 @@ void GNSSFlowgraph::set_signals_list() } } + sv_list = configuration_->property("Glonass.prns", std::string("") ); + + if( sv_list.length() > 0 ) + { + // Reset the available prns: + std::set< unsigned int > tmp_set; + boost::tokenizer<> tok( sv_list ); + std::transform( tok.begin(), tok.end(), std::inserter( tmp_set, tmp_set.begin() ), + boost::lexical_cast ); + + if( tmp_set.size() > 0 ) + { + available_glonass_prn = tmp_set; + } + } + if (configuration_->property("Channels_1C.count", 0) > 0 ) { /* @@ -691,6 +713,20 @@ void GNSSFlowgraph::set_signals_list() *available_gnss_prn_iter), std::string("5X"))); } } + + if (configuration_->property("Channels_1G.count", 0) > 0 ) + { + /* + * Loop to create the list of GLONASS L1 C/A signals + */ + for (available_gnss_prn_iter = available_glonass_prn.begin(); + available_gnss_prn_iter != available_glonass_prn.end(); + available_gnss_prn_iter++) + { + available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Glonass"), + *available_gnss_prn_iter), std::string("5X"))); + } + } /* * Ordering the list of signals from configuration file */ @@ -704,6 +740,7 @@ void GNSSFlowgraph::set_signals_list() 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"; + if((gnss_signal.compare("1G") == 0)/* or (gnss_signal.compare("") == 0)*/) gnss_system = "Glonass"; unsigned int sat = configuration_->property("Channel" + boost::lexical_cast(i) + ".satellite", 0); LOG(INFO) << "Channel " << i << " system " << gnss_system << ", signal " << gnss_signal <<", sat "<