mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-29 06:27:44 +00:00 
			
		
		
		
	Fix naming in fgpa and extra unit test implementations
This commit is contained in:
		| @@ -107,7 +107,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|     trk_param_fpga.track_pilot = track_pilot; | ||||
|     d_track_pilot = track_pilot; | ||||
|     trk_param_fpga.extend_correlation_symbols = extend_correlation_symbols; | ||||
|     int vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); | ||||
|     int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)); | ||||
|     trk_param_fpga.vector_length = vector_length; | ||||
|     trk_param_fpga.system = 'E'; | ||||
|     char sig_[3] = "1B"; | ||||
| @@ -136,26 +136,26 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     unsigned int code_samples_per_chip = 2; | ||||
|     d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * Galileo_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|     d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * GALILEO_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|     float* ca_codes_f; | ||||
|     float* data_codes_f; | ||||
|  | ||||
|     if (trk_param_fpga.track_pilot) | ||||
|         { | ||||
|             d_data_codes = static_cast<int*>(volk_gnsssdr_malloc((static_cast<unsigned int>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * Galileo_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|             d_data_codes = static_cast<int*>(volk_gnsssdr_malloc((static_cast<unsigned int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * GALILEO_E1_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|         } | ||||
|     ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|     ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|  | ||||
|     if (trk_param_fpga.track_pilot) | ||||
|         { | ||||
|             data_codes_f = static_cast<float*>(volk_gnsssdr_malloc((static_cast<unsigned int>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|             data_codes_f = static_cast<float*>(volk_gnsssdr_malloc((static_cast<unsigned int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * code_samples_per_chip * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|         } | ||||
|  | ||||
|     //printf("pppppppp trk_param_fpga.track_pilot = %d\n", trk_param_fpga.track_pilot); | ||||
|  | ||||
|     //int kk; | ||||
|  | ||||
|     for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++) | ||||
|     for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++) | ||||
|         { | ||||
|             char data_signal[3] = "1B"; | ||||
|             if (trk_param_fpga.track_pilot) | ||||
| @@ -165,11 +165,11 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|                     galileo_e1_code_gen_sinboc11_float(ca_codes_f, pilot_signal, PRN); | ||||
|                     galileo_e1_code_gen_sinboc11_float(data_codes_f, data_signal, PRN); | ||||
|  | ||||
|                     for (unsigned int s = 0; s < 2 * Galileo_E1_B_CODE_LENGTH_CHIPS; s++) | ||||
|                     for (unsigned int s = 0; s < 2 * GALILEO_E1_B_CODE_LENGTH_CHIPS; s++) | ||||
|                         { | ||||
|                             d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]); | ||||
|                             d_data_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(data_codes_f[s]); | ||||
|                             //printf("%f %d | ", data_codes_f[s], d_data_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]); | ||||
|                             d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]); | ||||
|                             d_data_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(data_codes_f[s]); | ||||
|                             //printf("%f %d | ", data_codes_f[s], d_data_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]); | ||||
|                         } | ||||
|                     //printf("\n next \n"); | ||||
|                     //scanf ("%d",&kk); | ||||
| @@ -179,10 +179,10 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|                     //printf("no tracking pilot\n"); | ||||
|                     galileo_e1_code_gen_sinboc11_float(ca_codes_f, data_signal, PRN); | ||||
|  | ||||
|                     for (unsigned int s = 0; s < 2 * Galileo_E1_B_CODE_LENGTH_CHIPS; s++) | ||||
|                     for (unsigned int s = 0; s < 2 * GALILEO_E1_B_CODE_LENGTH_CHIPS; s++) | ||||
|                         { | ||||
|                             d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]); | ||||
|                             //printf("%f %d | ", ca_codes_f[s], d_ca_codes[static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]); | ||||
|                             d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * 2 * (PRN - 1) + s] = static_cast<int>(ca_codes_f[s]); | ||||
|                             //printf("%f %d | ", ca_codes_f[s], d_ca_codes[static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)* 2 * (PRN - 1) + s]); | ||||
|                         } | ||||
|                     //printf("\n next \n"); | ||||
|                     //scanf ("%d",&kk); | ||||
| @@ -196,7 +196,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | ||||
|         } | ||||
|     trk_param_fpga.ca_codes = d_ca_codes; | ||||
|     trk_param_fpga.data_codes = d_data_codes; | ||||
|     trk_param_fpga.code_length_chips = Galileo_E1_B_CODE_LENGTH_CHIPS; | ||||
|     trk_param_fpga.code_length_chips = GALILEO_E1_B_CODE_LENGTH_CHIPS; | ||||
|     trk_param_fpga.code_samples_per_chip = code_samples_per_chip;  // 2 sample per chip | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); | ||||
|   | ||||
| @@ -84,7 +84,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|     trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz; | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); | ||||
|     trk_param_fpga.early_late_space_chips = early_late_space_chips; | ||||
|     int vector_length = std::round(fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)); | ||||
|     int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)); | ||||
|     trk_param_fpga.vector_length = vector_length; | ||||
|     int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); | ||||
|     float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); | ||||
| @@ -96,9 +96,9 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|             extend_correlation_symbols = 1; | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl; | ||||
|         } | ||||
|     else if (!track_pilot and extend_correlation_symbols > Galileo_E5a_I_SECONDARY_CODE_LENGTH) | ||||
|     else if (!track_pilot and extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH) | ||||
|         { | ||||
|             extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH; | ||||
|             extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH; | ||||
|             std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl; | ||||
|         } | ||||
|     if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) | ||||
| @@ -136,7 +136,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     unsigned int code_samples_per_chip = 1; | ||||
|     auto code_length_chips = static_cast<unsigned int>(Galileo_E5a_CODE_LENGTH_CHIPS); | ||||
|     auto code_length_chips = static_cast<unsigned int>(GALILEO_E5A_CODE_LENGTH_CHIPS); | ||||
|  | ||||
|     auto *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * code_length_chips * code_samples_per_chip, volk_gnsssdr_get_alignment())); | ||||
|  | ||||
| @@ -149,15 +149,15 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( | ||||
|         } | ||||
|     tracking_code = static_cast<float *>(volk_gnsssdr_malloc(code_samples_per_chip * code_length_chips * sizeof(float), volk_gnsssdr_get_alignment())); | ||||
|  | ||||
|     d_ca_codes = static_cast<int *>(volk_gnsssdr_malloc(static_cast<int>(code_length_chips) * code_samples_per_chip * Galileo_E5a_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|     d_ca_codes = static_cast<int *>(volk_gnsssdr_malloc(static_cast<int>(code_length_chips) * code_samples_per_chip * GALILEO_E5A_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|  | ||||
|     if (trk_param_fpga.track_pilot) | ||||
|         { | ||||
|             d_data_codes = static_cast<int *>(volk_gnsssdr_malloc((static_cast<unsigned int>(code_length_chips)) * code_samples_per_chip * Galileo_E5a_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|             d_data_codes = static_cast<int *>(volk_gnsssdr_malloc((static_cast<unsigned int>(code_length_chips)) * code_samples_per_chip * GALILEO_E5A_NUMBER_OF_CODES * sizeof(int), volk_gnsssdr_get_alignment())); | ||||
|         } | ||||
|  | ||||
|  | ||||
|     for (unsigned int PRN = 1; PRN <= Galileo_E5a_NUMBER_OF_CODES; PRN++) | ||||
|     for (unsigned int PRN = 1; PRN <= GALILEO_E5A_NUMBER_OF_CODES; PRN++) | ||||
|         { | ||||
|             //galileo_e5_a_code_gen_complex_primary(aux_code, PRN, const_cast<char *>(trk_param_fpga.signal.c_str())); | ||||
|             galileo_e5_a_code_gen_complex_primary(aux_code, PRN, const_cast<char *>(sig_)); | ||||
|   | ||||
| @@ -84,7 +84,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|     trk_param_fpga.dll_bw_narrow_hz = dll_bw_narrow_hz; | ||||
|     float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); | ||||
|     trk_param_fpga.early_late_space_chips = early_late_space_chips; | ||||
|     int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5i_CODE_RATE_HZ) / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS))); | ||||
|     int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))); | ||||
|     trk_param_fpga.vector_length = vector_length; | ||||
|     int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); | ||||
|     float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); | ||||
| @@ -95,9 +95,9 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|             extend_correlation_symbols = 1; | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl; | ||||
|         } | ||||
|     else if (!track_pilot and extend_correlation_symbols > GPS_L5i_NH_CODE_LENGTH) | ||||
|     else if (!track_pilot and extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH) | ||||
|         { | ||||
|             extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH; | ||||
|             extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH; | ||||
|             std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl; | ||||
|         } | ||||
|     if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) | ||||
| @@ -136,7 +136,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga( | ||||
|  | ||||
|     //################# PRE-COMPUTE ALL THE CODES ################# | ||||
|     unsigned int code_samples_per_chip = 1; | ||||
|     auto code_length_chips = static_cast<unsigned int>(GPS_L5i_CODE_LENGTH_CHIPS); | ||||
|     auto code_length_chips = static_cast<unsigned int>(GPS_L5I_CODE_LENGTH_CHIPS); | ||||
|     //printf("TRK code_length_chips = %d\n", code_length_chips); | ||||
|  | ||||
|     float *tracking_code; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez