mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Last retouches of the new factory and flowgraph.
This commit is contained in:
parent
55da7e9716
commit
307ae28d50
@ -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));
|
||||
|
||||
|
@ -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<GNSSFlowgraph> flowgraph_;
|
||||
std::shared_ptr<ConfigurationInterface> configuration_;
|
||||
|
@ -139,7 +139,7 @@ std::unique_ptr<GNSSBlockInterface> 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<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
}
|
||||
|
||||
else if (implementation.compare("Galileo_E1B_Observables") == 0)
|
||||
{
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> 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<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Not very elegant, Acq, Ttk and Tlm blocks must be added here, too.
|
||||
* To be fixed!
|
||||
*/
|
||||
|
||||
std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
|
||||
std::shared_ptr<ConfigurationInterface> configuration,
|
||||
std::string role,
|
||||
@ -631,11 +636,11 @@ std::unique_ptr<AcquisitionInterface> 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<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
|
||||
{
|
||||
std::unique_ptr<TrackingInterface> block;
|
||||
|
||||
// TRACKING BLOCKS -------------------------------------------------------------
|
||||
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0)
|
||||
{
|
||||
std::unique_ptr<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TrackingInterface> 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<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
|
||||
{
|
||||
std::unique_ptr<TelemetryDecoderInterface> block;
|
||||
|
||||
// TELEMETRY DECODERS ----------------------------------------------------------
|
||||
if (implementation.compare("GPS_L1_CA_Telemetry_Decoder") == 0)
|
||||
{
|
||||
std::unique_ptr<TelemetryDecoderInterface> 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<TelemetryDecoderInterface> 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<TelemetryDecoderInterface> 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<TelemetryDecoderInterface> 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<TelemetryDecoderInterface> 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<TelemetryDecoderInterface> 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);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ 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);
|
||||
boost::shared_ptr<gr::msg_queue> 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<gr::msg_queue> queue);
|
||||
std::unique_ptr<TrackingInterface> GetTrkBlock(
|
||||
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);
|
||||
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);
|
||||
std::unique_ptr<TelemetryDecoderInterface> GetTlmBlock(
|
||||
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);
|
||||
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);
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_BLOCK_FACTORY_H_*/
|
||||
|
@ -487,7 +487,6 @@ void GNSSFlowgraph::set_signals_list()
|
||||
/*
|
||||
* Sets a sequential list of GNSS satellites
|
||||
*/
|
||||
|
||||
std::set<unsigned int>::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<unsigned int> 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<unsigned int> 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<unsigned int> available_sbas_prn = {120, 124, 126};
|
||||
{
|
||||
/*
|
||||
* Loop to create SBAS L1 C/A signals
|
||||
*/
|
||||
std::set<unsigned int> 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<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,
|
||||
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<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,
|
||||
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="<<default_system<<std::endl;
|
||||
//std::cout<<"default_signal="<<default_signal<<std::endl;
|
||||
// std::list<Gnss_Signal>::iterator available_gnss_list_iter;
|
||||
// for (available_gnss_list_iter = available_GNSS_signals_.begin(); available_gnss_list_iter
|
||||
// != available_GNSS_signals_.end(); available_gnss_list_iter++)
|
||||
// {
|
||||
// std::cout << *available_gnss_list_iter << std::endl;
|
||||
// }
|
||||
// std::list<Gnss_Signal>::iterator available_gnss_list_iter;
|
||||
// for (available_gnss_list_iter = available_GNSS_signals_.begin(); available_gnss_list_iter
|
||||
// != available_GNSS_signals_.end(); available_gnss_list_iter++)
|
||||
// {
|
||||
// std::cout << *available_gnss_list_iter << std::endl;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -109,15 +109,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void init();
|
||||
/*
|
||||
* \brief Populates the SV PRN list available for acquisition and tracking
|
||||
*/
|
||||
void init(); // Populates the SV PRN list available for acquisition and tracking
|
||||
void set_signals_list();
|
||||
/*
|
||||
* \brief Initializes the channels state (start acquisition or keep standby) using the configuration parameters (number of channels and max channels in acquisition)
|
||||
*/
|
||||
void set_channels_state();
|
||||
void set_channels_state(); // Initializes the channels state (start acquisition or keep standby)
|
||||
// using the configuration parameters (number of channels and max channels in acquisition)
|
||||
bool connected_;
|
||||
bool running_;
|
||||
unsigned int channels_count_;
|
||||
|
Loading…
Reference in New Issue
Block a user