diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index aa4669e18..fad855655 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -179,6 +179,7 @@ void ControlThread::run() galileo_ephemeris_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); galileo_iono_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); galileo_utc_model_data_collector_thread_.timed_join(boost::posix_time::seconds(1)); + //Join keyboard threads keyboard_thread_.timed_join(boost::posix_time::seconds(1)); diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h index a46ad5335..f20e09a57 100644 --- a/src/core/receiver/control_thread.h +++ b/src/core/receiver/control_thread.h @@ -109,7 +109,6 @@ public: return flowgraph_; } - private: //SUPL assistance classes gnss_sdr_supl_client supl_client_acquisition_; @@ -172,7 +171,6 @@ private: void galileo_iono_data_collector(); - void apply_action(unsigned int what); std::shared_ptr flowgraph_; std::shared_ptr configuration_; diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 098753e03..7e49115f0 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -139,7 +139,7 @@ std::unique_ptr GNSSBlockFactory::GetSignalConditioner( input_filter = configuration->property( "InputFilter.implementation", default_implementation); resampler = configuration->property( - "Resampler.implementation", default_implementation); + "Resampler.implementation", default_implementation); } LOG(INFO) << "Getting SignalConditioner with DataTypeAdapter implementation: " @@ -517,11 +517,11 @@ std::unique_ptr GNSSBlockFactory::GetBlock( } else if (implementation.compare("Galileo_E1B_Observables") == 0) - { + { std::unique_ptr block_(new GalileoE1Observables(configuration.get(), role, in_streams, - out_streams, queue)); + out_streams, queue)); block = std::move(block_); - } + } // PVT ------------------------------------------------------------------------- else if (implementation.compare("GPS_L1_CA_PVT") == 0) @@ -558,6 +558,11 @@ std::unique_ptr GNSSBlockFactory::GetBlock( } +/* + * Not very elegant, Acq, Ttk and Tlm blocks must be added here, too. + * To be fixed! + */ + std::unique_ptr GNSSBlockFactory::GetAcqBlock( std::shared_ptr configuration, std::string role, @@ -631,11 +636,11 @@ std::unique_ptr GNSSBlockFactory::GetAcqBlock( block = std::move(block_); } else - { - // Log fatal. This causes execution to stop. - LOG(ERROR) << implementation << ": Undefined implementation for block"; - } - return std::move(block); + { + // Log fatal. This causes execution to stop. + LOG(ERROR) << implementation << ": Undefined implementation for block"; + } + return std::move(block); } @@ -647,49 +652,49 @@ std::unique_ptr GNSSBlockFactory::GetTrkBlock( { std::unique_ptr block; -// TRACKING BLOCKS ------------------------------------------------------------- - if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0) - { - std::unique_ptr block_(new GpsL1CaDllPllTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else if (implementation.compare("GPS_L1_CA_DLL_PLL_Optim_Tracking") == 0) - { - std::unique_ptr block_(new GpsL1CaDllPllOptimTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else if (implementation.compare("GPS_L1_CA_DLL_FLL_PLL_Tracking") == 0) - { - std::unique_ptr block_(new GpsL1CaDllFllPllTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else if (implementation.compare("GPS_L1_CA_TCP_CONNECTOR_Tracking") == 0) - { - std::unique_ptr block_(new GpsL1CaTcpConnectorTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking") == 0) - { - std::unique_ptr block_(new GalileoE1DllPllVemlTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else if (implementation.compare("Galileo_E1_TCP_CONNECTOR_Tracking") == 0) - { - std::unique_ptr block_(new GalileoE1TcpConnectorTracking(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } - else - { - // Log fatal. This causes execution to stop. - LOG(ERROR) << implementation << ": Undefined implementation for block"; - } - return std::move(block); + // TRACKING BLOCKS ------------------------------------------------------------- + if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0) + { + std::unique_ptr block_(new GpsL1CaDllPllTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("GPS_L1_CA_DLL_PLL_Optim_Tracking") == 0) + { + std::unique_ptr block_(new GpsL1CaDllPllOptimTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("GPS_L1_CA_DLL_FLL_PLL_Tracking") == 0) + { + std::unique_ptr block_(new GpsL1CaDllFllPllTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("GPS_L1_CA_TCP_CONNECTOR_Tracking") == 0) + { + std::unique_ptr block_(new GpsL1CaTcpConnectorTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking") == 0) + { + std::unique_ptr block_(new GalileoE1DllPllVemlTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("Galileo_E1_TCP_CONNECTOR_Tracking") == 0) + { + std::unique_ptr block_(new GalileoE1TcpConnectorTracking(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else + { + // Log fatal. This causes execution to stop. + LOG(ERROR) << implementation << ": Undefined implementation for block"; + } + return std::move(block); } @@ -701,29 +706,29 @@ std::unique_ptr GNSSBlockFactory::GetTlmBlock( { std::unique_ptr block; -// TELEMETRY DECODERS ---------------------------------------------------------- - if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0) - { - std::unique_ptr block_(new GpsL1CaTelemetryDecoder(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } -else if (implementation.compare("Galileo_E1B_Telemetry_Decoder") == 0) - { - std::unique_ptr block_(new GalileoE1BTelemetryDecoder(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } -else if (implementation.compare("SBAS_L1_Telemetry_Decoder") == 0) - { - std::unique_ptr block_(new SbasL1TelemetryDecoder(configuration.get(), role, in_streams, - out_streams, queue)); - block = std::move(block_); - } -else - { - // Log fatal. This causes execution to stop. - LOG(ERROR) << implementation << ": Undefined implementation for block"; - } - return std::move(block); + // TELEMETRY DECODERS ---------------------------------------------------------- + if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0) + { + std::unique_ptr block_(new GpsL1CaTelemetryDecoder(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("Galileo_E1B_Telemetry_Decoder") == 0) + { + std::unique_ptr block_(new GalileoE1BTelemetryDecoder(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else if (implementation.compare("SBAS_L1_Telemetry_Decoder") == 0) + { + std::unique_ptr block_(new SbasL1TelemetryDecoder(configuration.get(), role, in_streams, + out_streams, queue)); + block = std::move(block_); + } + else + { + // Log fatal. This causes execution to stop. + LOG(ERROR) << implementation << ": Undefined implementation for block"; + } + return std::move(block); } diff --git a/src/core/receiver/gnss_block_factory.h b/src/core/receiver/gnss_block_factory.h index 11c21b96f..7a56f5d46 100644 --- a/src/core/receiver/gnss_block_factory.h +++ b/src/core/receiver/gnss_block_factory.h @@ -70,7 +70,7 @@ public: std::string acq, std::string trk, std::string tlm, int channel, boost::shared_ptr queue); std::unique_ptr>> GetChannels(std::shared_ptr configuration, - boost::shared_ptr queue); + boost::shared_ptr queue); /* * \brief Returns the block with the required configuration and implementation */ @@ -85,15 +85,15 @@ private: std::string implementation, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); std::unique_ptr GetTrkBlock( - std::shared_ptr configuration, - std::string role, - std::string implementation, unsigned int in_streams, - unsigned int out_streams, boost::shared_ptr queue); + std::shared_ptr configuration, + std::string role, + std::string implementation, unsigned int in_streams, + unsigned int out_streams, boost::shared_ptr queue); std::unique_ptr GetTlmBlock( - std::shared_ptr configuration, - std::string role, - std::string implementation, unsigned int in_streams, - unsigned int out_streams, boost::shared_ptr queue); + std::shared_ptr configuration, + std::string role, + std::string implementation, unsigned int in_streams, + unsigned int out_streams, boost::shared_ptr queue); }; #endif /*GNSS_SDR_BLOCK_FACTORY_H_*/ diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 7f63547d2..8ad49ee4f 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -487,7 +487,6 @@ void GNSSFlowgraph::set_signals_list() /* * Sets a sequential list of GNSS satellites */ - std::set::iterator available_gnss_prn_iter; /* @@ -498,7 +497,6 @@ void GNSSFlowgraph::set_signals_list() /* * Read GNSS-SDR default GNSS system and signal */ - std::string default_system = configuration_->property("Channel.system", std::string("GPS")); std::string default_signal = configuration_->property("Channel.signal", std::string("1C")); @@ -506,60 +504,59 @@ void GNSSFlowgraph::set_signals_list() * Loop to create the list of GNSS Signals * To add signals from other systems, add another loop 'for' */ - if (default_system.compare(std::string("GPS")) == 0) - { - /* - * Loop to create GPS L1 C/A signals - */ - std::set available_gps_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, - 29, 30, 31, 32 }; + { + /* + * Loop to create GPS L1 C/A signals + */ + std::set available_gps_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, + 29, 30, 31, 32 }; - for (available_gnss_prn_iter = available_gps_prn.begin(); - available_gnss_prn_iter != available_gps_prn.end(); - available_gnss_prn_iter++) - { - available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("GPS"), - *available_gnss_prn_iter), std::string("1C"))); - } - } + for (available_gnss_prn_iter = available_gps_prn.begin(); + available_gnss_prn_iter != available_gps_prn.end(); + available_gnss_prn_iter++) + { + available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("GPS"), + *available_gnss_prn_iter), std::string("1C"))); + } + } if (default_system.compare(std::string("SBAS")) == 0) - { - /* - * Loop to create SBAS L1 C/A signals - */ - std::set available_sbas_prn = {120, 124, 126}; + { + /* + * Loop to create SBAS L1 C/A signals + */ + std::set available_sbas_prn = {120, 124, 126}; - for (available_gnss_prn_iter = available_sbas_prn.begin(); - available_gnss_prn_iter != available_sbas_prn.end(); - available_gnss_prn_iter++) - { - available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("SBAS"), - *available_gnss_prn_iter), std::string("1C"))); - } - } + for (available_gnss_prn_iter = available_sbas_prn.begin(); + available_gnss_prn_iter != available_sbas_prn.end(); + available_gnss_prn_iter++) + { + available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("SBAS"), + *available_gnss_prn_iter), std::string("1C"))); + } + } if (default_system.compare(std::string("Galileo")) == 0) - { - /* - * Loop to create the list of Galileo E1 B signals - */ - std::set 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, - 29, 30, 31, 32, 33, 34, 35, 36}; - - for (available_gnss_prn_iter = available_galileo_prn.begin(); - available_gnss_prn_iter != available_galileo_prn.end(); - available_gnss_prn_iter++) { - available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Galileo"), - *available_gnss_prn_iter), std::string("1B"))); + /* + * Loop to create the list of Galileo E1 B signals + */ + std::set 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, + 29, 30, 31, 32, 33, 34, 35, 36}; + + for (available_gnss_prn_iter = available_galileo_prn.begin(); + available_gnss_prn_iter != available_galileo_prn.end(); + available_gnss_prn_iter++) + { + available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Galileo"), + *available_gnss_prn_iter), std::string("1B"))); + } } - } /* * Ordering the list of signals from configuration file @@ -594,16 +591,16 @@ void GNSSFlowgraph::set_signals_list() available_GNSS_signals_.insert(gnss_it, signal_value); } } -// **** FOR DEBUGGING THE LIST OF GNSS SIGNALS **** -// + // **** FOR DEBUGGING THE LIST OF GNSS SIGNALS **** + // //std::cout<<"default_system="<