From 99104bc8bc0d8c9f12854cf2ae5d2ab89d622ba1 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 cf1788cc0..7e41acb9f 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -596,6 +596,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 ) @@ -644,6 +650,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 ) { /* @@ -714,6 +736,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 */ @@ -727,6 +763,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 "<