mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-26 21:17:38 +00:00 
			
		
		
		
	reading new configuration
This commit is contained in:
		| @@ -222,8 +222,18 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(std::shared | |||||||
|     std::string default_implementation = "GPS_L1_CA_Observables"; |     std::string default_implementation = "GPS_L1_CA_Observables"; | ||||||
|     std::string implementation = configuration->property("Observables.implementation", default_implementation); |     std::string implementation = configuration->property("Observables.implementation", default_implementation); | ||||||
|     LOG(INFO) << "Getting Observables with implementation " << implementation; |     LOG(INFO) << "Getting Observables with implementation " << implementation; | ||||||
|     unsigned int Galileo_channels = configuration->property("Channels_Galileo.count", 0); |     unsigned int Galileo_channels = configuration->property("Channels_Galileo.count", 0); // DEPRECATED | ||||||
|     unsigned int GPS_channels = configuration->property("Channels_GPS.count", 0); |     if(Galileo_channels == 0) | ||||||
|  |         { | ||||||
|  |             Galileo_channels = configuration->property("Channels_1B.count", 0); | ||||||
|  |         } | ||||||
|  |     Galileo_channels += configuration->property("Channels_5I.count", 0); | ||||||
|  |     unsigned int GPS_channels = configuration->property("Channels_GPS.count", 0); // DEPRECATED | ||||||
|  |     if(GPS_channels == 0) | ||||||
|  |         { | ||||||
|  |             GPS_channels = configuration->property("Channels_1C.count", 0); | ||||||
|  |         } | ||||||
|  |     GPS_channels += configuration->property("Channels_2S.count", 0); | ||||||
|     return GetBlock(configuration, "Observables", implementation, Galileo_channels + GPS_channels, Galileo_channels + GPS_channels, queue); |     return GetBlock(configuration, "Observables", implementation, Galileo_channels + GPS_channels, Galileo_channels + GPS_channels, queue); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -235,8 +245,18 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetPVT(std::shared_ptr<Con | |||||||
|     std::string default_implementation = "Pass_Through"; |     std::string default_implementation = "Pass_Through"; | ||||||
|     std::string implementation = configuration->property("PVT.implementation", default_implementation); |     std::string implementation = configuration->property("PVT.implementation", default_implementation); | ||||||
|     LOG(INFO) << "Getting PVT with implementation " << implementation; |     LOG(INFO) << "Getting PVT with implementation " << implementation; | ||||||
|     unsigned int Galileo_channels = configuration->property("Channels_Galileo.count", 0); |     unsigned int Galileo_channels = configuration->property("Channels_Galileo.count", 0); // DEPRECATED | ||||||
|     unsigned int GPS_channels = configuration->property("Channels_GPS.count", 0); |     if(Galileo_channels == 0) | ||||||
|  |         { | ||||||
|  |             Galileo_channels = configuration->property("Channels_1B.count", 0); | ||||||
|  |         } | ||||||
|  |     Galileo_channels += configuration->property("Channels_5I.count", 0); | ||||||
|  |     unsigned int GPS_channels = configuration->property("Channels_GPS.count", 0); // DEPRECATED | ||||||
|  |     if(GPS_channels == 0) | ||||||
|  |         { | ||||||
|  |             GPS_channels = configuration->property("Channels_1C.count", 0); | ||||||
|  |         } | ||||||
|  |     GPS_channels += configuration->property("Channels_2S.count", 0); | ||||||
|     return GetBlock(configuration, "PVT", implementation, Galileo_channels + GPS_channels, 1, queue); |     return GetBlock(configuration, "PVT", implementation, Galileo_channels + GPS_channels, 1, queue); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -263,9 +283,9 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_GPS( | |||||||
|  |  | ||||||
|     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); |     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); | ||||||
|     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_GPS", acq, 1, 1, queue); |     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_GPS", acq, 1, 1, queue); | ||||||
|     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_GPS" +boost::lexical_cast<std::string>(channel), trk, 1, 1, queue); |     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_GPS" + boost::lexical_cast<std::string>(channel), trk, 1, 1, queue); | ||||||
|  |  | ||||||
|     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_GPS"+boost::lexical_cast<std::string>(channel)  , tlm, 1, 1, queue); |     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_GPS" + boost::lexical_cast<std::string>(channel), tlm, 1, 1, queue); | ||||||
|  |  | ||||||
|     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), |     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), | ||||||
|             acq_.release(), |             acq_.release(), | ||||||
| @@ -276,6 +296,55 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_GPS( | |||||||
|     return channel_; |     return channel_; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | //********* GPS L1 C/A CHANNEL ***************** | ||||||
|  | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1C( | ||||||
|  |         std::shared_ptr<ConfigurationInterface> configuration, | ||||||
|  |         std::string acq, std::string trk, std::string tlm, int channel, | ||||||
|  |         boost::shared_ptr<gr::msg_queue> queue) | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " | ||||||
|  |               << acq << ", Tracking Implementation: " << trk  << ", Telemetry Decoder implementation: " << tlm; | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); | ||||||
|  |     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_1C", acq, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_1C", trk, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1C", tlm, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), | ||||||
|  |             acq_.release(), | ||||||
|  |             trk_.release(), | ||||||
|  |             tlm_.release(), | ||||||
|  |             "Channel", "1C", queue)); | ||||||
|  |  | ||||||
|  |     return channel_; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //********* GPS L2C (M) CHANNEL ***************** | ||||||
|  | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_2S( | ||||||
|  |         std::shared_ptr<ConfigurationInterface> configuration, | ||||||
|  |         std::string acq, std::string trk, std::string tlm, int channel, | ||||||
|  |         boost::shared_ptr<gr::msg_queue> queue) | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     LOG(INFO) << "Instantiating Channel " << channel << " with Acquisition Implementation: " | ||||||
|  |               << acq << ", Tracking Implementation: " << trk  << ", Telemetry Decoder implementation: " << tlm; | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); | ||||||
|  |     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_2S", acq, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_2S", trk, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_2S", tlm, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), | ||||||
|  |             acq_.release(), | ||||||
|  |             trk_.release(), | ||||||
|  |             tlm_.release(), | ||||||
|  |             "Channel", "2S", queue)); | ||||||
|  |  | ||||||
|  |     return channel_; | ||||||
|  | } | ||||||
|  |  | ||||||
| //********* GALILEO CHANNEL ***************** | //********* GALILEO CHANNEL ***************** | ||||||
| std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_Galileo( | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_Galileo( | ||||||
| @@ -303,6 +372,59 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_Galileo( | |||||||
|     return channel_; |     return channel_; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | //********* GALILEO E1 B CHANNEL ***************** | ||||||
|  | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_1B( | ||||||
|  |         std::shared_ptr<ConfigurationInterface> configuration, | ||||||
|  |         std::string acq, std::string trk, std::string tlm, int channel, | ||||||
|  |         boost::shared_ptr<gr::msg_queue> queue) | ||||||
|  | { | ||||||
|  |     std::stringstream stream; | ||||||
|  |     stream << channel; | ||||||
|  |     std::string id = stream.str(); | ||||||
|  |     LOG(INFO) << "Instantiating Channel " << id << " with Acquisition Implementation: " | ||||||
|  |               << acq << ", Tracking Implementation: " << trk  << ", Telemetry Decoder implementation: " << tlm; | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); | ||||||
|  |     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_1B", acq, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_1B", trk, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_1B", tlm, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), | ||||||
|  |             acq_.release(), | ||||||
|  |             trk_.release(), | ||||||
|  |             tlm_.release(), | ||||||
|  |             "Channel", "1B", queue)); | ||||||
|  |  | ||||||
|  |     return channel_; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | //********* GALILEO E5a  CHANNEL ***************** | ||||||
|  | std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_5I( | ||||||
|  |         std::shared_ptr<ConfigurationInterface> configuration, | ||||||
|  |         std::string acq, std::string trk, std::string tlm, int channel, | ||||||
|  |         boost::shared_ptr<gr::msg_queue> queue) | ||||||
|  | { | ||||||
|  |     std::stringstream stream; | ||||||
|  |     stream << channel; | ||||||
|  |     std::string id = stream.str(); | ||||||
|  |     LOG(INFO) << "Instantiating Channel " << id << " with Acquisition Implementation: " | ||||||
|  |               << acq << ", Tracking Implementation: " << trk  << ", Telemetry Decoder implementation: " << tlm; | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> pass_through_ = GetBlock(configuration, "Channel", "Pass_Through", 1, 1, queue); | ||||||
|  |     std::unique_ptr<AcquisitionInterface> acq_ = GetAcqBlock(configuration, "Acquisition_5I", acq, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TrackingInterface> trk_ = GetTrkBlock(configuration, "Tracking_5I", trk, 1, 1, queue); | ||||||
|  |     std::unique_ptr<TelemetryDecoderInterface> tlm_ = GetTlmBlock(configuration, "TelemetryDecoder_5I", tlm, 1, 1, queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> channel_(new Channel(configuration.get(), channel, pass_through_.release(), | ||||||
|  |             acq_.release(), | ||||||
|  |             trk_.release(), | ||||||
|  |             tlm_.release(), | ||||||
|  |             "Channel", "5I", queue)); | ||||||
|  |  | ||||||
|  |     return channel_; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFactory::GetChannels( | std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFactory::GetChannels( | ||||||
|         std::shared_ptr<ConfigurationInterface> configuration, boost::shared_ptr<gr::msg_queue> queue) |         std::shared_ptr<ConfigurationInterface> configuration, boost::shared_ptr<gr::msg_queue> queue) | ||||||
| { | { | ||||||
|   | |||||||
| @@ -93,6 +93,10 @@ public: | |||||||
|             std::string acq, std::string trk, std::string tlm, int channel, |             std::string acq, std::string trk, std::string tlm, int channel, | ||||||
|             boost::shared_ptr<gr::msg_queue> queue); |             boost::shared_ptr<gr::msg_queue> queue); | ||||||
|  |  | ||||||
|  |     std::unique_ptr<GNSSBlockInterface> GetChannel_5I(std::shared_ptr<ConfigurationInterface> configuration, | ||||||
|  |             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, |     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); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez