mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Add forgotten options to GpsL2MPcpsAcquisition
This commit is contained in:
		| @@ -55,7 +55,6 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|     //float pfa =  configuration_->property(role + ".pfa", 0.0); | ||||
|  | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     if_ = configuration_->property(role + ".if", 0); | ||||
| @@ -238,8 +237,7 @@ void GpsL1CaPcpsAcquisition::init() | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::set_local_code() | ||||
| { | ||||
|     // if (item_type_.compare("gr_complex") == 0) | ||||
|     //   { | ||||
|  | ||||
|     std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
|     gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0); | ||||
| @@ -261,7 +259,6 @@ void GpsL1CaPcpsAcquisition::set_local_code() | ||||
|         } | ||||
|  | ||||
|     delete[] code; | ||||
|     //  } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -121,10 +121,14 @@ GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition() | ||||
| void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     //if (item_type_.compare("gr_complex") == 0) | ||||
|     //{ | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_channel(channel_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|     //} | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -147,20 +151,29 @@ void GpsL2MPcpsAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ <<" Threshold = " << threshold_; | ||||
|  | ||||
|     // if (item_type_.compare("gr_complex") == 0) | ||||
|     //    { | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_threshold(threshold_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|     //    } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|     //   if (item_type_.compare("gr_complex") == 0) | ||||
|     //  { | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|     // } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -169,50 +182,74 @@ void GpsL2MPcpsAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| void GpsL2MPcpsAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     //   if (item_type_.compare("gr_complex") == 0) | ||||
|     //      { | ||||
|     acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|     //     } | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     // if (item_type_.compare("gr_complex") == 0) | ||||
|     // { | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|     // } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| signed int GpsL2MPcpsAcquisition::mag() | ||||
| { | ||||
|     // //    if (item_type_.compare("gr_complex") == 0) | ||||
|     //        { | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             return acquisition_sc_->mag(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|     //       } | ||||
|     //   else | ||||
|     //       { | ||||
|     //           return 0; | ||||
|     //      } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::init() | ||||
| { | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->init(); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->init(); | ||||
|         } | ||||
|  | ||||
|     set_local_code(); | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_local_code() | ||||
| { | ||||
|     // if (item_type_.compare("gr_complex") == 0) | ||||
|     //   { | ||||
|  | ||||
|     gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_); | ||||
|      | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_local_code(code_); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_local_code(code_); | ||||
|         } | ||||
|          | ||||
| //    //debug | ||||
| //    std::ofstream d_dump_file; | ||||
| @@ -230,18 +267,26 @@ void GpsL2MPcpsAcquisition::set_local_code() | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::reset() | ||||
| { | ||||
|     //  if (item_type_.compare("gr_complex") == 0) | ||||
|     //  { | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_active(true); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|     //  } | ||||
|         } | ||||
| } | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_state(int state) | ||||
| { | ||||
|     //  if (item_type_.compare("gr_complex") == 0) | ||||
|     //  { | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|         { | ||||
|             acquisition_sc_->set_state(state); | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             acquisition_cc_->set_state(state); | ||||
|     //  } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Luis Esteve
					Luis Esteve