mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Integrate unified block for DLL/PLL Tracking
This commit is contained in:
		| @@ -51,7 +51,6 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     int f_if; | ||||
|     bool dump; | ||||
|     std::string dump_filename; | ||||
|     std::string item_type; | ||||
| @@ -64,11 +63,10 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|     float very_early_late_space_chips; | ||||
|     float early_late_space_narrow_chips; | ||||
|     float very_early_late_space_narrow_chips; | ||||
|  | ||||
|     unified_ = configuration->property(role + ".unified", false); | ||||
|     item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     f_if = configuration->property(role + ".if", 0); | ||||
|     dump = configuration->property(role + ".dump", false); | ||||
|     pll_bw_hz = configuration->property(role + ".pll_bw_hz", 5.0); | ||||
|     if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz); | ||||
| @@ -94,22 +92,44 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = galileo_e1_dll_pll_veml_make_tracking_cc( | ||||
|                 f_if, | ||||
|                 fs_in, | ||||
|                 vector_length, | ||||
|                 dump, | ||||
|                 dump_filename, | ||||
|                 pll_bw_hz, | ||||
|                 dll_bw_hz, | ||||
|                 pll_bw_narrow_hz, | ||||
|                 dll_bw_narrow_hz, | ||||
|                 early_late_space_chips, | ||||
|                 very_early_late_space_chips, | ||||
|                 early_late_space_narrow_chips, | ||||
|                 very_early_late_space_narrow_chips, | ||||
|                 extend_correlation_symbols, | ||||
|                 track_pilot); | ||||
|             if (unified_) | ||||
|                 { | ||||
|                     char sig_[3] = "1B"; | ||||
|                     tracking_unified_ = dll_pll_veml_make_tracking( | ||||
|                         fs_in, | ||||
|                         vector_length, | ||||
|                         dump, | ||||
|                         dump_filename, | ||||
|                         pll_bw_hz, | ||||
|                         dll_bw_hz, | ||||
|                         pll_bw_narrow_hz, | ||||
|                         dll_bw_narrow_hz, | ||||
|                         early_late_space_chips, | ||||
|                         very_early_late_space_chips, | ||||
|                         early_late_space_narrow_chips, | ||||
|                         very_early_late_space_narrow_chips, | ||||
|                         extend_correlation_symbols, | ||||
|                         track_pilot, 'E', sig_); | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     tracking_ = galileo_e1_dll_pll_veml_make_tracking_cc( | ||||
|                         0, | ||||
|                         fs_in, | ||||
|                         vector_length, | ||||
|                         dump, | ||||
|                         dump_filename, | ||||
|                         pll_bw_hz, | ||||
|                         dll_bw_hz, | ||||
|                         pll_bw_narrow_hz, | ||||
|                         dll_bw_narrow_hz, | ||||
|                         early_late_space_chips, | ||||
|                         very_early_late_space_chips, | ||||
|                         early_late_space_narrow_chips, | ||||
|                         very_early_late_space_narrow_chips, | ||||
|                         extend_correlation_symbols, | ||||
|                         track_pilot); | ||||
|                 } | ||||
|         } | ||||
|     else | ||||
|         { | ||||
| @@ -130,7 +150,10 @@ GalileoE1DllPllVemlTracking::~GalileoE1DllPllVemlTracking() | ||||
|  | ||||
| void GalileoE1DllPllVemlTracking::start_tracking() | ||||
| { | ||||
|     tracking_->start_tracking(); | ||||
|     if (unified_) | ||||
|         tracking_unified_->start_tracking(); | ||||
|     else | ||||
|         tracking_->start_tracking(); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -140,13 +163,19 @@ void GalileoE1DllPllVemlTracking::start_tracking() | ||||
| void GalileoE1DllPllVemlTracking::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     tracking_->set_channel(channel); | ||||
|     if (unified_) | ||||
|         tracking_unified_->set_channel(channel); | ||||
|     else | ||||
|         tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1DllPllVemlTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
|     if (unified_) | ||||
|         tracking_unified_->set_gnss_synchro(p_gnss_synchro); | ||||
|     else | ||||
|         tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -170,11 +199,17 @@ void GalileoE1DllPllVemlTracking::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GalileoE1DllPllVemlTracking::get_left_block() | ||||
| { | ||||
|     return tracking_; | ||||
|     if (unified_) | ||||
|         return tracking_unified_; | ||||
|     else | ||||
|         return tracking_; | ||||
| } | ||||
|  | ||||
|  | ||||
| gr::basic_block_sptr GalileoE1DllPllVemlTracking::get_right_block() | ||||
| { | ||||
|     return tracking_; | ||||
|     if (unified_) | ||||
|         return tracking_unified_; | ||||
|     else | ||||
|         return tracking_; | ||||
| } | ||||
|   | ||||
| @@ -39,6 +39,7 @@ | ||||
|  | ||||
| #include "tracking_interface.h" | ||||
| #include "galileo_e1_dll_pll_veml_tracking_cc.h" | ||||
| #include "dll_pll_veml_tracking.h" | ||||
| #include <string> | ||||
|  | ||||
|  | ||||
| @@ -95,11 +96,13 @@ public: | ||||
|  | ||||
| private: | ||||
|     galileo_e1_dll_pll_veml_tracking_cc_sptr tracking_; | ||||
|     dll_pll_veml_tracking_sptr tracking_unified_; | ||||
|     size_t item_size_; | ||||
|     unsigned int channel_; | ||||
|     std::string role_; | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     bool unified_; | ||||
| }; | ||||
|  | ||||
| #endif  // GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_ | ||||
|   | ||||
| @@ -52,41 +52,64 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|     //################# CONFIGURATION PARAMETERS ######################## | ||||
|     int fs_in; | ||||
|     int vector_length; | ||||
|     int f_if; | ||||
|     bool dump; | ||||
|     std::string dump_filename; | ||||
|     std::string item_type; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     float pll_bw_hz; | ||||
|     float dll_bw_hz; | ||||
|     float early_late_space_chips; | ||||
|     item_type = configuration->property(role + ".item_type", default_item_type); | ||||
|     int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     f_if = configuration->property(role + ".if", 0); | ||||
|     dump = configuration->property(role + ".dump", false); | ||||
|     pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); | ||||
|     unified_ = configuration->property(role + ".unified", false); | ||||
|     float pll_bw_hz = configuration->property(role + ".pll_bw_hz", 50.0); | ||||
|     if (FLAGS_pll_bw_hz != 0.0) pll_bw_hz = static_cast<float>(FLAGS_pll_bw_hz); | ||||
|     dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); | ||||
|     float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 20.0); | ||||
|     float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0); | ||||
|     float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0); | ||||
|     if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz); | ||||
|     early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); | ||||
|     float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5); | ||||
|     std::string default_dump_filename = "./track_ch"; | ||||
|     dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);  //unused! | ||||
|     vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1); | ||||
|     if (symbols_extended_correlator < 1) symbols_extended_correlator = 1; | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = gps_l1_ca_dll_pll_make_tracking_cc( | ||||
|                 f_if, | ||||
|                 fs_in, | ||||
|                 vector_length, | ||||
|                 dump, | ||||
|                 dump_filename, | ||||
|                 pll_bw_hz, | ||||
|                 dll_bw_hz, | ||||
|                 early_late_space_chips); | ||||
|             if (unified_) | ||||
|                 { | ||||
|                     char sig_[3] = "1C"; | ||||
|                     tracking_unified_ = dll_pll_veml_make_tracking( | ||||
|                         fs_in, | ||||
|                         vector_length, | ||||
|                         dump, | ||||
|                         dump_filename, | ||||
|                         pll_bw_hz, | ||||
|                         dll_bw_hz, | ||||
|                         pll_bw_narrow_hz, | ||||
|                         dll_bw_narrow_hz, | ||||
|                         early_late_space_chips, | ||||
|                         early_late_space_chips, | ||||
|                         early_late_space_narrow_chips, | ||||
|                         early_late_space_narrow_chips, | ||||
|                         symbols_extended_correlator, | ||||
|                         false, | ||||
|                         'G', sig_); | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                     tracking_ = gps_l1_ca_dll_pll_make_tracking_cc( | ||||
|                         0, | ||||
|                         fs_in, | ||||
|                         vector_length, | ||||
|                         dump, | ||||
|                         dump_filename, | ||||
|                         pll_bw_hz, | ||||
|                         dll_bw_hz, | ||||
|                         early_late_space_chips); | ||||
|                 } | ||||
|         } | ||||
|     else | ||||
|         { | ||||
| @@ -105,7 +128,10 @@ GpsL1CaDllPllTracking::~GpsL1CaDllPllTracking() | ||||
|  | ||||
| void GpsL1CaDllPllTracking::start_tracking() | ||||
| { | ||||
|     tracking_->start_tracking(); | ||||
|     if (unified_) | ||||
|         tracking_unified_->start_tracking(); | ||||
|     else | ||||
|         tracking_->start_tracking(); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -115,13 +141,19 @@ void GpsL1CaDllPllTracking::start_tracking() | ||||
| void GpsL1CaDllPllTracking::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     tracking_->set_channel(channel); | ||||
|     if (unified_) | ||||
|         tracking_unified_->set_channel(channel); | ||||
|     else | ||||
|         tracking_->set_channel(channel); | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
|     if (unified_) | ||||
|         tracking_unified_->set_gnss_synchro(p_gnss_synchro); | ||||
|     else | ||||
|         tracking_->set_gnss_synchro(p_gnss_synchro); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -145,11 +177,17 @@ void GpsL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GpsL1CaDllPllTracking::get_left_block() | ||||
| { | ||||
|     return tracking_; | ||||
|     if (unified_) | ||||
|         return tracking_unified_; | ||||
|     else | ||||
|         return tracking_; | ||||
| } | ||||
|  | ||||
|  | ||||
| gr::basic_block_sptr GpsL1CaDllPllTracking::get_right_block() | ||||
| { | ||||
|     return tracking_; | ||||
|     if (unified_) | ||||
|         return tracking_unified_; | ||||
|     else | ||||
|         return tracking_; | ||||
| } | ||||
|   | ||||
| @@ -40,6 +40,7 @@ | ||||
|  | ||||
| #include "tracking_interface.h" | ||||
| #include "gps_l1_ca_dll_pll_tracking_cc.h" | ||||
| #include "dll_pll_veml_tracking.h" | ||||
| #include <string> | ||||
|  | ||||
| class ConfigurationInterface; | ||||
| @@ -93,11 +94,13 @@ public: | ||||
|  | ||||
| private: | ||||
|     gps_l1_ca_dll_pll_tracking_cc_sptr tracking_; | ||||
|     dll_pll_veml_tracking_sptr tracking_unified_; | ||||
|     size_t item_size_; | ||||
|     unsigned int channel_; | ||||
|     std::string role_; | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|     bool unified_; | ||||
| }; | ||||
|  | ||||
| #endif  // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez