mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Fix GPS L1 CA unit test
This commit is contained in:
		| @@ -35,24 +35,24 @@ bool tracking_dump_reader::read_binary_obs() | ||||
| { | ||||
|     try | ||||
|         { | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&abs_VE), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&abs_E), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&abs_P), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&abs_L), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&abs_VL), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&prompt_I), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&prompt_Q), sizeof(float)); | ||||
|  | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&PRN_start_sample_count), sizeof(unsigned long int)); | ||||
|  | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_freq_chips), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carr_error_hz), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carr_error_filt_hz), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_error_chips), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_error_filt_chips), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&CN0_SNV_dB_Hz), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carrier_lock_test), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&aux1), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&acc_carrier_phase_rad), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carrier_doppler_hz), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_freq_chips), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carr_error_hz), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carr_error_filt_hz), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_error_chips), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&code_error_filt_chips), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&CN0_SNV_dB_Hz), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&carrier_lock_test), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&aux1), sizeof(float)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&aux2), sizeof(double)); | ||||
|             d_dump_file.read(reinterpret_cast<char *>(&PRN), sizeof(unsigned int)); | ||||
|         } | ||||
| @@ -82,8 +82,8 @@ bool tracking_dump_reader::restart() | ||||
| long int tracking_dump_reader::num_epochs() | ||||
| { | ||||
|     std::ifstream::pos_type size; | ||||
|     int number_of_double_vars = 11; | ||||
|     int number_of_float_vars = 5; | ||||
|     int number_of_double_vars = 1; | ||||
|     int number_of_float_vars = 17; | ||||
|     int epoch_size_bytes = sizeof(unsigned long int) + sizeof(double) * number_of_double_vars + | ||||
|                            sizeof(float) * number_of_float_vars + sizeof(unsigned int); | ||||
|     std::ifstream tmpfile(d_dump_filename.c_str(), std::ios::binary | std::ios::ate); | ||||
|   | ||||
| @@ -45,10 +45,12 @@ public: | ||||
|     bool open_obs_file(std::string out_file); | ||||
|  | ||||
|     //tracking dump variables | ||||
|     // EPR | ||||
|     // VEPLVL | ||||
|     float abs_VE; | ||||
|     float abs_E; | ||||
|     float abs_P; | ||||
|     float abs_L; | ||||
|     float abs_VL; | ||||
|     // PROMPT I and Q (to analyze navigation symbols) | ||||
|     float prompt_I; | ||||
|     float prompt_Q; | ||||
| @@ -56,26 +58,26 @@ public: | ||||
|     unsigned long int PRN_start_sample_count; | ||||
|  | ||||
|     // accumulated carrier phase | ||||
|     double acc_carrier_phase_rad; | ||||
|     float acc_carrier_phase_rad; | ||||
|  | ||||
|     // carrier and code frequency | ||||
|     double carrier_doppler_hz; | ||||
|     double code_freq_chips; | ||||
|     float carrier_doppler_hz; | ||||
|     float code_freq_chips; | ||||
|  | ||||
|     // PLL commands | ||||
|     double carr_error_hz; | ||||
|     double carr_error_filt_hz; | ||||
|     float carr_error_hz; | ||||
|     float carr_error_filt_hz; | ||||
|  | ||||
|     // DLL commands | ||||
|     double code_error_chips; | ||||
|     double code_error_filt_chips; | ||||
|     float code_error_chips; | ||||
|     float code_error_filt_chips; | ||||
|  | ||||
|     // CN0 and carrier lock test | ||||
|     double CN0_SNV_dB_Hz; | ||||
|     double carrier_lock_test; | ||||
|     float CN0_SNV_dB_Hz; | ||||
|     float carrier_lock_test; | ||||
|  | ||||
|     // AUX vars (for debug purposes) | ||||
|     double aux1; | ||||
|     float aux1; | ||||
|     double aux2; | ||||
|  | ||||
|     unsigned int PRN; | ||||
|   | ||||
| @@ -225,6 +225,10 @@ void GpsL1CADllPllTrackingTest::configure_receiver() | ||||
|     config->set_property("Tracking_1C.pll_bw_hz", "20.0"); | ||||
|     config->set_property("Tracking_1C.dll_bw_hz", "2.0"); | ||||
|     config->set_property("Tracking_1C.early_late_space_chips", "0.5"); | ||||
|     config->set_property("Tracking_1C.pll_bw_narrow_hz", "20.0"); | ||||
|     config->set_property("Tracking_1C.dll_bw_narrow_hz", "2.0"); | ||||
|     config->set_property("Tracking_1C.early_late_space_narrow_chips", "0.5"); | ||||
|     config->set_property("Tracking_1C.unified", "true"); | ||||
|     config->set_property("Tracking_1C.extend_correlation_ms", "1"); | ||||
|     config->set_property("Tracking_1C.dump", "true"); | ||||
|     config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Antonio Ramos
					Antonio Ramos