mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Fix naming in fgpa and extra unit test implementations
This commit is contained in:
		| @@ -89,7 +89,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     //   dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); |     //   dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); | ||||||
|     //   acq_parameters.dump_filename = dump_filename_; |     //   acq_parameters.dump_filename = dump_filename_; | ||||||
|     //--- Find number of samples per spreading code (4 ms)  ----------------- |     //--- Find number of samples per spreading code (4 ms)  ----------------- | ||||||
|     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); |     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS))); | ||||||
|     //acq_parameters.samples_per_code = code_length_; |     //acq_parameters.samples_per_code = code_length_; | ||||||
|     //int samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001)); |     //int samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001)); | ||||||
|     //acq_parameters.samples_per_ms = samples_per_ms; |     //acq_parameters.samples_per_ms = samples_per_ms; | ||||||
| @@ -101,8 +101,8 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     //        } |     //        } | ||||||
|  |  | ||||||
|     //printf("fs_in = %d\n", fs_in); |     //printf("fs_in = %d\n", fs_in); | ||||||
|     //printf("Galileo_E1_B_CODE_LENGTH_CHIPS = %f\n", Galileo_E1_B_CODE_LENGTH_CHIPS); |     //printf("GALILEO_E1_B_CODE_LENGTH_CHIPS = %f\n", GALILEO_E1_B_CODE_LENGTH_CHIPS); | ||||||
|     //printf("Galileo_E1_CODE_CHIP_RATE_HZ = %f\n", Galileo_E1_CODE_CHIP_RATE_HZ); |     //printf("GALILEO_E1_CODE_CHIP_RATE_HZ = %f\n", GALILEO_E1_CODE_CHIP_RATE_HZ); | ||||||
|     //printf("acq adapter code_length = %d\n", code_length); |     //printf("acq adapter code_length = %d\n", code_length); | ||||||
|     acq_parameters.code_length = code_length; |     acq_parameters.code_length = code_length; | ||||||
|     // The FPGA can only use FFT lengths that are a power of two. |     // The FPGA can only use FFT lengths that are a power of two. | ||||||
| @@ -123,12 +123,12 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|     auto* fft_if = new gr::fft::fft_complex(nsamples_total, true);  // Direct FFT |     auto* fft_if = new gr::fft::fft_complex(nsamples_total, true);  // Direct FFT | ||||||
|     auto* code = new std::complex<float>[nsamples_total];           // buffer for the local code |     auto* code = new std::complex<float>[nsamples_total];           // buffer for the local code | ||||||
|     auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment())); |     auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment())); | ||||||
|     d_all_fft_codes_ = new lv_16sc_t[nsamples_total * Galileo_E1_NUMBER_OF_CODES];  // memory containing all the possible fft codes for PRN 0 to 32 |     d_all_fft_codes_ = new lv_16sc_t[nsamples_total * GALILEO_E1_NUMBER_OF_CODES];  // memory containing all the possible fft codes for PRN 0 to 32 | ||||||
|     float max;                                                                      // temporary maxima search |     float max;                                                                      // temporary maxima search | ||||||
|  |  | ||||||
|     //int tmp_re, tmp_im; |     //int tmp_re, tmp_im; | ||||||
|  |  | ||||||
|     for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++) |     for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++) | ||||||
|         { |         { | ||||||
|             //code_ = new gr_complex[vector_length_]; |             //code_ = new gr_complex[vector_length_]; | ||||||
|  |  | ||||||
| @@ -258,7 +258,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | |||||||
|         } |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|     //    for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++) |     //    for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++) | ||||||
|     //        { |     //        { | ||||||
|     //                    // debug |     //                    // debug | ||||||
|     //                    char filename2[25]; |     //                    char filename2[25]; | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|             acq_pilot_ = false; |             acq_pilot_ = false; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS))); |     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS))); | ||||||
|     acq_parameters.code_length = code_length; |     acq_parameters.code_length = code_length; | ||||||
|     // The FPGA can only use FFT lengths that are a power of two. |     // The FPGA can only use FFT lengths that are a power of two. | ||||||
|     float nbits = ceilf(log2f((float)code_length)); |     float nbits = ceilf(log2f((float)code_length)); | ||||||
| @@ -111,13 +111,13 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | |||||||
|     auto* fft_if = new gr::fft::fft_complex(nsamples_total, true);  // Direct FFT |     auto* fft_if = new gr::fft::fft_complex(nsamples_total, true);  // Direct FFT | ||||||
|     auto* code = new std::complex<float>[nsamples_total];           // buffer for the local code |     auto* code = new std::complex<float>[nsamples_total];           // buffer for the local code | ||||||
|     auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment())); |     auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment())); | ||||||
|     d_all_fft_codes_ = new lv_16sc_t[nsamples_total * Galileo_E5a_NUMBER_OF_CODES];  // memory containing all the possible fft codes for PRN 0 to 32 |     d_all_fft_codes_ = new lv_16sc_t[nsamples_total * GALILEO_E5A_NUMBER_OF_CODES];  // memory containing all the possible fft codes for PRN 0 to 32 | ||||||
|     float max;                                                                       // temporary maxima search |     float max;                                                                       // temporary maxima search | ||||||
|  |  | ||||||
|     //printf("creating the E5A acquisition CONT"); |     //printf("creating the E5A acquisition CONT"); | ||||||
|     //printf("nsamples_total = %d\n", nsamples_total); |     //printf("nsamples_total = %d\n", nsamples_total); | ||||||
|  |  | ||||||
|     for (unsigned int PRN = 1; PRN <= Galileo_E5a_NUMBER_OF_CODES; PRN++) |     for (unsigned int PRN = 1; PRN <= GALILEO_E5A_NUMBER_OF_CODES; PRN++) | ||||||
|         { |         { | ||||||
|             //    gr_complex* code = new gr_complex[code_length_]; |             //    gr_complex* code = new gr_complex[code_length_]; | ||||||
|             char signal_[3]; |             char signal_[3]; | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | |||||||
|     //dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); |     //dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); | ||||||
|     //acq_parameters.dump_filename = dump_filename_; |     //acq_parameters.dump_filename = dump_filename_; | ||||||
|     //--- Find number of samples per spreading code ------------------------- |     //--- Find number of samples per spreading code ------------------------- | ||||||
|     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GPS_L5i_CODE_RATE_HZ / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS)))); |     auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)))); | ||||||
|     acq_parameters.code_length = code_length; |     acq_parameters.code_length = code_length; | ||||||
|     // The FPGA can only use FFT lengths that are a power of two. |     // The FPGA can only use FFT lengths that are a power of two. | ||||||
|     float nbits = ceilf(log2f((float)code_length)); |     float nbits = ceilf(log2f((float)code_length)); | ||||||
|   | |||||||
| @@ -107,7 +107,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | |||||||
|     trk_param_fpga.track_pilot = track_pilot; |     trk_param_fpga.track_pilot = track_pilot; | ||||||
|     d_track_pilot = track_pilot; |     d_track_pilot = track_pilot; | ||||||
|     trk_param_fpga.extend_correlation_symbols = extend_correlation_symbols; |     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.vector_length = vector_length; | ||||||
|     trk_param_fpga.system = 'E'; |     trk_param_fpga.system = 'E'; | ||||||
|     char sig_[3] = "1B"; |     char sig_[3] = "1B"; | ||||||
| @@ -136,26 +136,26 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | |||||||
|  |  | ||||||
|     //################# PRE-COMPUTE ALL THE CODES ################# |     //################# PRE-COMPUTE ALL THE CODES ################# | ||||||
|     unsigned int code_samples_per_chip = 2; |     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* ca_codes_f; | ||||||
|     float* data_codes_f; |     float* data_codes_f; | ||||||
|  |  | ||||||
|     if (trk_param_fpga.track_pilot) |     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) |     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); |     //printf("pppppppp trk_param_fpga.track_pilot = %d\n", trk_param_fpga.track_pilot); | ||||||
|  |  | ||||||
|     //int kk; |     //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"; |             char data_signal[3] = "1B"; | ||||||
|             if (trk_param_fpga.track_pilot) |             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(ca_codes_f, pilot_signal, PRN); | ||||||
|                     galileo_e1_code_gen_sinboc11_float(data_codes_f, data_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_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]); |                             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("%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"); |                     //printf("\n next \n"); | ||||||
|                     //scanf ("%d",&kk); |                     //scanf ("%d",&kk); | ||||||
| @@ -179,10 +179,10 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | |||||||
|                     //printf("no tracking pilot\n"); |                     //printf("no tracking pilot\n"); | ||||||
|                     galileo_e1_code_gen_sinboc11_float(ca_codes_f, data_signal, PRN); |                     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]); |                             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("%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"); |                     //printf("\n next \n"); | ||||||
|                     //scanf ("%d",&kk); |                     //scanf ("%d",&kk); | ||||||
| @@ -196,7 +196,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( | |||||||
|         } |         } | ||||||
|     trk_param_fpga.ca_codes = d_ca_codes; |     trk_param_fpga.ca_codes = d_ca_codes; | ||||||
|     trk_param_fpga.data_codes = d_data_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 |     trk_param_fpga.code_samples_per_chip = code_samples_per_chip;  // 2 sample per chip | ||||||
|     //################# MAKE TRACKING GNURadio object ################### |     //################# MAKE TRACKING GNURadio object ################### | ||||||
|     tracking_fpga_sc = dll_pll_veml_make_tracking_fpga(trk_param_fpga); |     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; |     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); |     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; |     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; |     trk_param_fpga.vector_length = vector_length; | ||||||
|     int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); |     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); |     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; |             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; |             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; |             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)) |     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 ################# |     //################# PRE-COMPUTE ALL THE CODES ################# | ||||||
|     unsigned int code_samples_per_chip = 1; |     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())); |     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())); |     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) |     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 *>(trk_param_fpga.signal.c_str())); | ||||||
|             galileo_e5_a_code_gen_complex_primary(aux_code, PRN, const_cast<char *>(sig_)); |             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; |     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); |     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; |     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; |     trk_param_fpga.vector_length = vector_length; | ||||||
|     int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); |     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); |     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; |             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; |             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; |             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)) |     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 ################# |     //################# PRE-COMPUTE ALL THE CODES ################# | ||||||
|     unsigned int code_samples_per_chip = 1; |     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); |     //printf("TRK code_length_chips = %d\n", code_length_chips); | ||||||
|  |  | ||||||
|     float *tracking_code; |     float *tracking_code; | ||||||
|   | |||||||
| @@ -124,7 +124,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|                     // preamble bits to sampled symbols |                     // preamble bits to sampled symbols | ||||||
|                     d_gps_l1ca_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int32_t), volk_gnsssdr_get_alignment())); |                     d_gps_l1ca_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int32_t), volk_gnsssdr_get_alignment())); | ||||||
|                     int32_t n = 0; |                     int32_t n = 0; | ||||||
|                     for (unsigned short preambles_bit : preambles_bits) |                     for (uint16_t preambles_bit : preambles_bits) | ||||||
|                         { |                         { | ||||||
|                             for (uint32_t j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++) |                             for (uint32_t j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++) | ||||||
|                                 { |                                 { | ||||||
| @@ -159,8 +159,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|             else if (signal_type == "L5") |             else if (signal_type == "L5") | ||||||
|                 { |                 { | ||||||
|                     d_signal_carrier_freq = GPS_L5_FREQ_HZ; |                     d_signal_carrier_freq = GPS_L5_FREQ_HZ; | ||||||
|                     d_code_period = GPS_L5i_PERIOD; |                     d_code_period = GPS_L5I_PERIOD; | ||||||
|                     d_code_chip_rate = GPS_L5i_CODE_RATE_HZ; |                     d_code_chip_rate = GPS_L5I_CODE_RATE_HZ; | ||||||
|                     d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL; |                     d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL; | ||||||
|                     d_correlation_length_ms = 1; |                     d_correlation_length_ms = 1; | ||||||
|                     //d_code_samples_per_chip = 1; |                     //d_code_samples_per_chip = 1; | ||||||
| @@ -169,15 +169,15 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|                     //                   interchange_iq = false; |                     //                   interchange_iq = false; | ||||||
|                     if (trk_parameters.track_pilot) |                     if (trk_parameters.track_pilot) | ||||||
|                         { |                         { | ||||||
|                             d_secondary_code_length = static_cast<uint32_t>(GPS_L5q_NH_CODE_LENGTH); |                             d_secondary_code_length = static_cast<uint32_t>(GPS_L5Q_NH_CODE_LENGTH); | ||||||
|                             d_secondary_code_string = const_cast<std::string *>(&GPS_L5q_NH_CODE_STR); |                             d_secondary_code_string = const_cast<std::string *>(&GPS_L5Q_NH_CODE_STR); | ||||||
|                             signal_pretty_name = signal_pretty_name + "Q"; |                             signal_pretty_name = signal_pretty_name + "Q"; | ||||||
|                             interchange_iq = true; |                             interchange_iq = true; | ||||||
|                         } |                         } | ||||||
|                     else |                     else | ||||||
|                         { |                         { | ||||||
|                             d_secondary_code_length = static_cast<uint32_t>(GPS_L5i_NH_CODE_LENGTH); |                             d_secondary_code_length = static_cast<uint32_t>(GPS_L5I_NH_CODE_LENGTH); | ||||||
|                             d_secondary_code_string = const_cast<std::string *>(&GPS_L5i_NH_CODE_STR); |                             d_secondary_code_string = const_cast<std::string *>(&GPS_L5I_NH_CODE_STR); | ||||||
|                             signal_pretty_name = signal_pretty_name + "I"; |                             signal_pretty_name = signal_pretty_name + "I"; | ||||||
|                             interchange_iq = false; |                             interchange_iq = false; | ||||||
|                         } |                         } | ||||||
| @@ -201,9 +201,9 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|             systemName = "Galileo"; |             systemName = "Galileo"; | ||||||
|             if (signal_type == "1B") |             if (signal_type == "1B") | ||||||
|                 { |                 { | ||||||
|                     d_signal_carrier_freq = Galileo_E1_FREQ_HZ; |                     d_signal_carrier_freq = GALILEO_E1_FREQ_HZ; | ||||||
|                     d_code_period = Galileo_E1_CODE_PERIOD; |                     d_code_period = GALILEO_E1_CODE_PERIOD; | ||||||
|                     d_code_chip_rate = Galileo_E1_CODE_CHIP_RATE_HZ; |                     d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ; | ||||||
|                     //d_code_length_chips = static_cast<uint32_t >(Galileo_E1_B_CODE_LENGTH_CHIPS); |                     //d_code_length_chips = static_cast<uint32_t >(Galileo_E1_B_CODE_LENGTH_CHIPS); | ||||||
|                     d_symbols_per_bit = 1; |                     d_symbols_per_bit = 1; | ||||||
|                     d_correlation_length_ms = 4; |                     d_correlation_length_ms = 4; | ||||||
| @@ -212,8 +212,8 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|                     if (trk_parameters.track_pilot) |                     if (trk_parameters.track_pilot) | ||||||
|                         { |                         { | ||||||
|                             d_secondary = true; |                             d_secondary = true; | ||||||
|                             d_secondary_code_length = static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); |                             d_secondary_code_length = static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH); | ||||||
|                             d_secondary_code_string = const_cast<std::string *>(&Galileo_E1_C_SECONDARY_CODE); |                             d_secondary_code_string = const_cast<std::string *>(&GALILEO_E1_C_SECONDARY_CODE); | ||||||
|                             signal_pretty_name = signal_pretty_name + "C"; |                             signal_pretty_name = signal_pretty_name + "C"; | ||||||
|                         } |                         } | ||||||
|                     else |                     else | ||||||
| @@ -225,9 +225,9 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|                 } |                 } | ||||||
|             else if (signal_type == "5X") |             else if (signal_type == "5X") | ||||||
|                 { |                 { | ||||||
|                     d_signal_carrier_freq = Galileo_E5a_FREQ_HZ; |                     d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ; | ||||||
|                     d_code_period = GALILEO_E5a_CODE_PERIOD; |                     d_code_period = GALILEO_E5A_CODE_PERIOD; | ||||||
|                     d_code_chip_rate = Galileo_E5a_CODE_CHIP_RATE_HZ; |                     d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ; | ||||||
|                     d_symbols_per_bit = 20; |                     d_symbols_per_bit = 20; | ||||||
|                     d_correlation_length_ms = 1; |                     d_correlation_length_ms = 1; | ||||||
|                     //d_code_samples_per_chip = 1; |                     //d_code_samples_per_chip = 1; | ||||||
| @@ -236,14 +236,14 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga & | |||||||
|                     //interchange_iq = false; |                     //interchange_iq = false; | ||||||
|                     if (trk_parameters.track_pilot) |                     if (trk_parameters.track_pilot) | ||||||
|                         { |                         { | ||||||
|                             d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_Q_SECONDARY_CODE_LENGTH); |                             d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_Q_SECONDARY_CODE_LENGTH); | ||||||
|                             signal_pretty_name = signal_pretty_name + "Q"; |                             signal_pretty_name = signal_pretty_name + "Q"; | ||||||
|                             interchange_iq = true; |                             interchange_iq = true; | ||||||
|                         } |                         } | ||||||
|                     else |                     else | ||||||
|                         { |                         { | ||||||
|                             d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_I_SECONDARY_CODE_LENGTH); |                             d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_I_SECONDARY_CODE_LENGTH); | ||||||
|                             d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_I_SECONDARY_CODE); |                             d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_I_SECONDARY_CODE); | ||||||
|                             signal_pretty_name = signal_pretty_name + "I"; |                             signal_pretty_name = signal_pretty_name + "I"; | ||||||
|                             interchange_iq = false; |                             interchange_iq = false; | ||||||
|                         } |                         } | ||||||
| @@ -537,7 +537,7 @@ void dll_pll_veml_tracking_fpga::start_tracking() | |||||||
|         { |         { | ||||||
|             if (trk_parameters.track_pilot) |             if (trk_parameters.track_pilot) | ||||||
|                 { |                 { | ||||||
|                     d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]); |                     d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]); | ||||||
|                     for (uint32_t i = 0; i < d_code_length_chips; i++) |                     for (uint32_t i = 0; i < d_code_length_chips; i++) | ||||||
|                         { |                         { | ||||||
|                             // nothing to compute : the local codes are pre-computed in the adapter class |                             // nothing to compute : the local codes are pre-computed in the adapter class | ||||||
|   | |||||||
| @@ -95,15 +95,15 @@ class AcqPerfTest_msg_rx; | |||||||
|  |  | ||||||
| typedef boost::shared_ptr<AcqPerfTest_msg_rx> AcqPerfTest_msg_rx_sptr; | typedef boost::shared_ptr<AcqPerfTest_msg_rx> AcqPerfTest_msg_rx_sptr; | ||||||
|  |  | ||||||
| AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(concurrent_queue<int>& queue); | AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(Concurrent_Queue<int>& queue); | ||||||
|  |  | ||||||
| class AcqPerfTest_msg_rx : public gr::block | class AcqPerfTest_msg_rx : public gr::block | ||||||
| { | { | ||||||
| private: | private: | ||||||
|     friend AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(concurrent_queue<int>& queue); |     friend AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(Concurrent_Queue<int>& queue); | ||||||
|     void msg_handler_events(pmt::pmt_t msg); |     void msg_handler_events(pmt::pmt_t msg); | ||||||
|     AcqPerfTest_msg_rx(concurrent_queue<int>& queue); |     AcqPerfTest_msg_rx(Concurrent_Queue<int>& queue); | ||||||
|     concurrent_queue<int>& channel_internal_queue; |     Concurrent_Queue<int>& channel_internal_queue; | ||||||
|  |  | ||||||
| public: | public: | ||||||
|     int rx_message; |     int rx_message; | ||||||
| @@ -111,7 +111,7 @@ public: | |||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
| AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(concurrent_queue<int>& queue) | AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(Concurrent_Queue<int>& queue) | ||||||
| { | { | ||||||
|     return AcqPerfTest_msg_rx_sptr(new AcqPerfTest_msg_rx(queue)); |     return AcqPerfTest_msg_rx_sptr(new AcqPerfTest_msg_rx(queue)); | ||||||
| } | } | ||||||
| @@ -133,7 +133,7 @@ void AcqPerfTest_msg_rx::msg_handler_events(pmt::pmt_t msg) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| AcqPerfTest_msg_rx::AcqPerfTest_msg_rx(concurrent_queue<int>& queue) : gr::block("AcqPerfTest_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), channel_internal_queue(queue) | AcqPerfTest_msg_rx::AcqPerfTest_msg_rx(Concurrent_Queue<int>& queue) : gr::block("AcqPerfTest_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), channel_internal_queue(queue) | ||||||
| { | { | ||||||
|     this->message_port_register_in(pmt::mp("events")); |     this->message_port_register_in(pmt::mp("events")); | ||||||
|     this->set_msg_handler(pmt::mp("events"), boost::bind(&AcqPerfTest_msg_rx::msg_handler_events, this, _1)); |     this->set_msg_handler(pmt::mp("events"), boost::bind(&AcqPerfTest_msg_rx::msg_handler_events, this, _1)); | ||||||
| @@ -323,7 +323,7 @@ protected: | |||||||
|     void check_results(); |     void check_results(); | ||||||
|     void plot_results(); |     void plot_results(); | ||||||
|  |  | ||||||
|     concurrent_queue<int> channel_internal_queue; |     Concurrent_Queue<int> channel_internal_queue; | ||||||
|  |  | ||||||
|     gr::msg_queue::sptr queue; |     gr::msg_queue::sptr queue; | ||||||
|     gr::top_block_sptr top_block; |     gr::top_block_sptr top_block; | ||||||
| @@ -779,7 +779,7 @@ void AcquisitionPerformanceTest::plot_results() | |||||||
|  |  | ||||||
| TEST_F(AcquisitionPerformanceTest, ROC) | TEST_F(AcquisitionPerformanceTest, ROC) | ||||||
| { | { | ||||||
|     tracking_true_obs_reader true_trk_data; |     Tracking_True_Obs_Reader true_trk_data; | ||||||
|  |  | ||||||
|     if (boost::filesystem::exists(path_str)) |     if (boost::filesystem::exists(path_str)) | ||||||
|         { |         { | ||||||
| @@ -872,7 +872,7 @@ TEST_F(AcquisitionPerformanceTest, ROC) | |||||||
|  |  | ||||||
|                                     for (int execution = 1; execution <= num_executions; execution++) |                                     for (int execution = 1; execution <= num_executions; execution++) | ||||||
|                                         { |                                         { | ||||||
|                                             acquisition_dump_reader acq_dump(basename, |                                             Acquisition_Dump_Reader acq_dump(basename, | ||||||
|                                                 observed_satellite, |                                                 observed_satellite, | ||||||
|                                                 config->property("Acquisition.doppler_max", 0), |                                                 config->property("Acquisition.doppler_max", 0), | ||||||
|                                                 config->property("Acquisition.doppler_step", 0), |                                                 config->property("Acquisition.doppler_step", 0), | ||||||
|   | |||||||
| @@ -181,7 +181,7 @@ void GpsL2MPcpsAcquisitionTest::plot_grid() | |||||||
|     auto sat = static_cast<unsigned int>(gnss_synchro.PRN); |     auto sat = static_cast<unsigned int>(gnss_synchro.PRN); | ||||||
|  |  | ||||||
|     auto samples_per_code = static_cast<unsigned int>(floor(static_cast<double>(sampling_frequency_hz) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); |     auto samples_per_code = static_cast<unsigned int>(floor(static_cast<double>(sampling_frequency_hz) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)))); | ||||||
|     acquisition_dump_reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1); |     Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1); | ||||||
|     if (!acq_dump.read_binary_acq()) |     if (!acq_dump.read_binary_acq()) | ||||||
|         { |         { | ||||||
|             std::cout << "Error reading files" << std::endl; |             std::cout << "Error reading files" << std::endl; | ||||||
|   | |||||||
| @@ -493,10 +493,10 @@ bool HybridObservablesTest::acquire_signal() | |||||||
|                     opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ; |                     opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGAL_1B: |                 case evGAL_1B: | ||||||
|                     opt_fs = Galileo_E1_OPT_ACQ_FS_HZ; |                     opt_fs = GALILEO_E1_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGAL_5X: |                 case evGAL_5X: | ||||||
|                     opt_fs = Galileo_E5a_OPT_ACQ_FS_HZ; |                     opt_fs = GALILEO_E5A_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGLO_1G: |                 case evGLO_1G: | ||||||
|                     opt_fs = baseband_sampling_freq; |                     opt_fs = baseband_sampling_freq; | ||||||
| @@ -1687,9 +1687,9 @@ TEST_F(HybridObservablesTest, ValidationOfResults) | |||||||
|                 { |                 { | ||||||
|                     //based on true observables metadata (for custom sdr generator) |                     //based on true observables metadata (for custom sdr generator) | ||||||
|                     //open true observables log file written by the simulator or based on provided RINEX obs |                     //open true observables log file written by the simulator or based on provided RINEX obs | ||||||
|                     std::vector<std::shared_ptr<tracking_true_obs_reader>> true_reader_vec; |                     std::vector<std::shared_ptr<Tracking_True_Obs_Reader>> true_reader_vec; | ||||||
|                     //read true data from the generator logs |                     //read true data from the generator logs | ||||||
|                     true_reader_vec.push_back(std::make_shared<tracking_true_obs_reader>()); |                     true_reader_vec.push_back(std::make_shared<Tracking_True_Obs_Reader>()); | ||||||
|                     std::cout << "Loading true observable data for PRN " << n.PRN << std::endl; |                     std::cout << "Loading true observable data for PRN " << n.PRN << std::endl; | ||||||
|                     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); |                     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); | ||||||
|                     true_obs_file.append(std::to_string(n.PRN)); |                     true_obs_file.append(std::to_string(n.PRN)); | ||||||
| @@ -1837,7 +1837,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) | |||||||
|     if (!FLAGS_enable_external_signal_file) |     if (!FLAGS_enable_external_signal_file) | ||||||
|         { |         { | ||||||
|             //load the true values |             //load the true values | ||||||
|             true_observables_reader true_observables; |             True_Observables_Reader true_observables; | ||||||
|             ASSERT_NO_THROW({ |             ASSERT_NO_THROW({ | ||||||
|                 if (true_observables.open_obs_file(std::string("./obs_out.bin")) == false) |                 if (true_observables.open_obs_file(std::string("./obs_out.bin")) == false) | ||||||
|                     { |                     { | ||||||
| @@ -1885,7 +1885,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) | |||||||
|                 } |                 } | ||||||
|         } |         } | ||||||
|     //read measured values |     //read measured values | ||||||
|     observables_dump_reader estimated_observables(tracking_ch_vec.size()); |     Observables_Dump_Reader estimated_observables(tracking_ch_vec.size()); | ||||||
|     ASSERT_NO_THROW({ |     ASSERT_NO_THROW({ | ||||||
|         if (estimated_observables.open_obs_file(std::string("./observables.dat")) == false) |         if (estimated_observables.open_obs_file(std::string("./observables.dat")) == false) | ||||||
|             { |             { | ||||||
| @@ -2040,7 +2040,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             arma::vec receiver_time_offset_ref_channel_s; |             arma::vec receiver_time_offset_ref_channel_s; | ||||||
|             receiver_time_offset_ref_channel_s = (true_obs_vec.at(min_pr_ch_id).col(1)(0) - measured_obs_vec.at(min_pr_ch_id).col(4)(0)) / GPS_C_m_s; |             receiver_time_offset_ref_channel_s = (true_obs_vec.at(min_pr_ch_id).col(1)(0) - measured_obs_vec.at(min_pr_ch_id).col(4)(0)) / GPS_C_M_S; | ||||||
|             std::cout << "Ref. channel initial Receiver time offset " << receiver_time_offset_ref_channel_s(0) * 1e3 << " [ms]" << std::endl; |             std::cout << "Ref. channel initial Receiver time offset " << receiver_time_offset_ref_channel_s(0) * 1e3 << " [ms]" << std::endl; | ||||||
|  |  | ||||||
|             for (unsigned int n = 0; n < measured_obs_vec.size(); n++) |             for (unsigned int n = 0; n < measured_obs_vec.size(); n++) | ||||||
|   | |||||||
| @@ -396,12 +396,12 @@ TEST(RTKLibSolverTest, test1) | |||||||
|     bool save_to_mat = false; |     bool save_to_mat = false; | ||||||
|     rtk_t rtk = configure_rtklib_options(); |     rtk_t rtk = configure_rtklib_options(); | ||||||
|  |  | ||||||
|     std::unique_ptr<rtklib_solver> d_ls_pvt(new rtklib_solver(nchannels, dump_filename, flag_dump_to_file, save_to_mat, rtk)); |     std::unique_ptr<Rtklib_Solver> d_ls_pvt(new Rtklib_Solver(nchannels, dump_filename, flag_dump_to_file, save_to_mat, rtk)); | ||||||
|     d_ls_pvt->set_averaging_depth(1); |     d_ls_pvt->set_averaging_depth(1); | ||||||
|  |  | ||||||
|     // load ephemeris |     // load ephemeris | ||||||
|     std::string eph_xml_filename = path + "data/rtklib_test/eph_GPS_L1CA_test1.xml"; |     std::string eph_xml_filename = path + "data/rtklib_test/eph_GPS_L1CA_test1.xml"; | ||||||
|     gnss_sdr_supl_client supl_client_ephemeris_; |     Gnss_Sdr_Supl_Client supl_client_ephemeris_; | ||||||
|  |  | ||||||
|     std::cout << "SUPL: Try read GPS ephemeris from XML file " << eph_xml_filename << std::endl; |     std::cout << "SUPL: Try read GPS ephemeris from XML file " << eph_xml_filename << std::endl; | ||||||
|     if (supl_client_ephemeris_.load_ephemeris_xml(eph_xml_filename) == true) |     if (supl_client_ephemeris_.load_ephemeris_xml(eph_xml_filename) == true) | ||||||
|   | |||||||
| @@ -343,7 +343,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults) | |||||||
|     configure_receiver(); |     configure_receiver(); | ||||||
|  |  | ||||||
|     //open true observables log file written by the simulator |     //open true observables log file written by the simulator | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|     int test_satellite_PRN = FLAGS_test_satellite_PRN; |     int test_satellite_PRN = FLAGS_test_satellite_PRN; | ||||||
|     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; |     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; | ||||||
|     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); |     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); | ||||||
| @@ -440,7 +440,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults) | |||||||
|         } |         } | ||||||
|  |  | ||||||
|     //load the measured values |     //load the measured values | ||||||
|     tlm_dump_reader tlm_dump; |     Tlm_Dump_Reader tlm_dump; | ||||||
|     ASSERT_NO_THROW({ |     ASSERT_NO_THROW({ | ||||||
|         if (tlm_dump.open_obs_file(std::string("./telemetry0.dat")) == false) |         if (tlm_dump.open_obs_file(std::string("./telemetry0.dat")) == false) | ||||||
|             { |             { | ||||||
|   | |||||||
| @@ -447,7 +447,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) | |||||||
|     int test_satellite_PRN = 0; |     int test_satellite_PRN = 0; | ||||||
|     double acq_delay_samples = 0.0; |     double acq_delay_samples = 0.0; | ||||||
|     double acq_doppler_hz = 0.0; |     double acq_doppler_hz = 0.0; | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|  |  | ||||||
|  |  | ||||||
|     // CONFIG PARAM SWEEP LOOP |     // CONFIG PARAM SWEEP LOOP | ||||||
| @@ -645,7 +645,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) | |||||||
|  |  | ||||||
|                     //check results |                     //check results | ||||||
|                     //load the measured values |                     //load the measured values | ||||||
|                     tracking_dump_reader trk_dump; |                     Tracking_Dump_Reader trk_dump; | ||||||
|                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) |                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) | ||||||
|                         << "Failure opening tracking dump file"; |                         << "Failure opening tracking dump file"; | ||||||
|  |  | ||||||
| @@ -751,7 +751,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) | |||||||
|                                             code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error, rmse); |                                             code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error, rmse); | ||||||
|                                             for (double code_phase_error_chip : code_phase_error_chips) |                                             for (double code_phase_error_chip : code_phase_error_chips) | ||||||
|                                                 { |                                                 { | ||||||
|                                                     code_phase_error_meters.push_back(GPS_L1_CA_CHIP_PERIOD * code_phase_error_chip * GPS_C_m_s); |                                                     code_phase_error_meters.push_back(GPS_L1_CA_CHIP_PERIOD * code_phase_error_chip * GPS_C_M_S); | ||||||
|                                                 } |                                                 } | ||||||
|                                             mean_code_phase_error.push_back(mean_error); |                                             mean_code_phase_error.push_back(mean_error); | ||||||
|                                             std_dev_code_phase_error.push_back(std_dev_error); |                                             std_dev_code_phase_error.push_back(std_dev_error); | ||||||
|   | |||||||
| @@ -453,7 +453,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) | |||||||
|     configure_receiver(); |     configure_receiver(); | ||||||
|  |  | ||||||
|     //open true observables log file written by the simulator |     //open true observables log file written by the simulator | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|     int test_satellite_PRN = FLAGS_test_satellite_PRN; |     int test_satellite_PRN = FLAGS_test_satellite_PRN; | ||||||
|     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; |     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; | ||||||
|     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); |     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); | ||||||
| @@ -566,7 +566,7 @@ TEST_F(GpsL1CADllPllTrackingTestFpga, ValidationOfResultsFpga) | |||||||
|         } |         } | ||||||
|  |  | ||||||
|     //load the measured values |     //load the measured values | ||||||
|     tracking_dump_reader trk_dump; |     Tracking_Dump_Reader trk_dump; | ||||||
|     ASSERT_NO_THROW( |     ASSERT_NO_THROW( | ||||||
|         { |         { | ||||||
|             if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false) |             if (trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")) == false) | ||||||
|   | |||||||
| @@ -375,7 +375,7 @@ TEST_F(GpsL1CAKfTrackingTest, ValidationOfResults) | |||||||
|     configure_receiver(); |     configure_receiver(); | ||||||
|  |  | ||||||
|     // open true observables log file written by the simulator |     // open true observables log file written by the simulator | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|     int test_satellite_PRN = FLAGS_test_satellite_PRN; |     int test_satellite_PRN = FLAGS_test_satellite_PRN; | ||||||
|     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; |     std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; | ||||||
|     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); |     std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); | ||||||
| @@ -459,7 +459,7 @@ TEST_F(GpsL1CAKfTrackingTest, ValidationOfResults) | |||||||
|         } |         } | ||||||
|  |  | ||||||
|     //load the measured values |     //load the measured values | ||||||
|     tracking_dump_reader trk_dump; |     Tracking_Dump_Reader trk_dump; | ||||||
|  |  | ||||||
|     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) |     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) | ||||||
|         << "Failure opening tracking dump file"; |         << "Failure opening tracking dump file"; | ||||||
|   | |||||||
| @@ -514,10 +514,10 @@ bool TrackingPullInTest::acquire_signal(int SV_ID) | |||||||
|                     opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ; |                     opt_fs = GPS_L1_CA_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGAL_1B: |                 case evGAL_1B: | ||||||
|                     opt_fs = Galileo_E1_OPT_ACQ_FS_HZ; |                     opt_fs = GALILEO_E1_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGAL_5X: |                 case evGAL_5X: | ||||||
|                     opt_fs = Galileo_E5a_OPT_ACQ_FS_HZ; |                     opt_fs = GALILEO_E5A_OPT_ACQ_FS_HZ; | ||||||
|                     break; |                     break; | ||||||
|                 case evGLO_1G: |                 case evGLO_1G: | ||||||
|                     opt_fs = baseband_sampling_freq; |                     opt_fs = baseband_sampling_freq; | ||||||
| @@ -750,7 +750,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults) | |||||||
|     double true_acq_delay_samples = 0.0; |     double true_acq_delay_samples = 0.0; | ||||||
|     uint64_t acq_samplestamp_samples = 0; |     uint64_t acq_samplestamp_samples = 0; | ||||||
|  |  | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|     if (!FLAGS_enable_external_signal_file) |     if (!FLAGS_enable_external_signal_file) | ||||||
|         { |         { | ||||||
|             test_satellite_PRN = FLAGS_test_satellite_PRN; |             test_satellite_PRN = FLAGS_test_satellite_PRN; | ||||||
| @@ -783,9 +783,9 @@ TEST_F(TrackingPullInTest, ValidationOfResults) | |||||||
|     // create the msg queue for valve |     // create the msg queue for valve | ||||||
|  |  | ||||||
|     queue = gr::msg_queue::make(0); |     queue = gr::msg_queue::make(0); | ||||||
|     boost::shared_ptr<gnss_sdr_valve> reseteable_valve; |     boost::shared_ptr<Gnss_Sdr_Valve> reseteable_valve; | ||||||
|     long long int acq_to_trk_delay_samples = ceil(static_cast<double>(FLAGS_fs_gen_sps) * FLAGS_acq_to_trk_delay_s); |     long long int acq_to_trk_delay_samples = ceil(static_cast<double>(FLAGS_fs_gen_sps) * FLAGS_acq_to_trk_delay_s); | ||||||
|     boost::shared_ptr<gnss_sdr_valve> resetable_valve_(new gnss_sdr_valve(sizeof(gr_complex), acq_to_trk_delay_samples, queue, false)); |     boost::shared_ptr<Gnss_Sdr_Valve> resetable_valve_(new Gnss_Sdr_Valve(sizeof(gr_complex), acq_to_trk_delay_samples, queue, false)); | ||||||
|  |  | ||||||
|     std::shared_ptr<ControlMessageFactory> control_message_factory_; |     std::shared_ptr<ControlMessageFactory> control_message_factory_; | ||||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages_; |     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages_; | ||||||
| @@ -910,7 +910,7 @@ TEST_F(TrackingPullInTest, ValidationOfResults) | |||||||
|                             if (FLAGS_plot_detail_level >= 2 and FLAGS_show_plots) |                             if (FLAGS_plot_detail_level >= 2 and FLAGS_show_plots) | ||||||
|                                 { |                                 { | ||||||
|                                     //load the measured values |                                     //load the measured values | ||||||
|                                     tracking_dump_reader trk_dump; |                                     Tracking_Dump_Reader trk_dump; | ||||||
|                                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) |                                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) | ||||||
|                                         << "Failure opening tracking dump file"; |                                         << "Failure opening tracking dump file"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -627,7 +627,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults) | |||||||
|     double true_acq_delay_samples = 0.0; |     double true_acq_delay_samples = 0.0; | ||||||
|     uint64_t acq_samplestamp_samples = 0; |     uint64_t acq_samplestamp_samples = 0; | ||||||
|  |  | ||||||
|     tracking_true_obs_reader true_obs_data; |     Tracking_True_Obs_Reader true_obs_data; | ||||||
|     if (!FLAGS_enable_external_signal_file) |     if (!FLAGS_enable_external_signal_file) | ||||||
|         { |         { | ||||||
|             test_satellite_PRN = FLAGS_test_satellite_PRN; |             test_satellite_PRN = FLAGS_test_satellite_PRN; | ||||||
| @@ -739,7 +739,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults) | |||||||
|                             if (FLAGS_plot_detail_level >= 2 and FLAGS_show_plots) |                             if (FLAGS_plot_detail_level >= 2 and FLAGS_show_plots) | ||||||
|                                 { |                                 { | ||||||
|                                     //load the measured values |                                     //load the measured values | ||||||
|                                     tracking_dump_reader trk_dump; |                                     Tracking_Dump_Reader trk_dump; | ||||||
|                                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) |                                     ASSERT_EQ(trk_dump.open_obs_file(std::string("./tracking_ch_0.dat")), true) | ||||||
|                                         << "Failure opening tracking dump file"; |                                         << "Failure opening tracking dump file"; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez