mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	fix Gal. E5a
This commit is contained in:
		| @@ -255,9 +255,8 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut | |||||||
|     Gnss_Synchro* out = reinterpret_cast<Gnss_Synchro*>(output_items[0]);           // Get the output buffer pointer |     Gnss_Synchro* out = reinterpret_cast<Gnss_Synchro*>(output_items[0]);           // Get the output buffer pointer | ||||||
|     const Gnss_Synchro* in = reinterpret_cast<const Gnss_Synchro*>(input_items[0]); // Get the input buffer pointer |     const Gnss_Synchro* in = reinterpret_cast<const Gnss_Synchro*>(input_items[0]); // Get the input buffer pointer | ||||||
|  |  | ||||||
|     Gnss_Synchro current_sample; //structure to save the synchronization information and send the output object to the next block |  | ||||||
|     //1. Copy the current tracking output |     //1. Copy the current tracking output | ||||||
|     current_sample = in[0]; |     Gnss_Synchro current_sample = in[0]; | ||||||
|     d_symbol_counter++; |     d_symbol_counter++; | ||||||
|     if(flag_bit_start) |     if(flag_bit_start) | ||||||
|     { |     { | ||||||
| @@ -368,14 +367,8 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut | |||||||
|                     // 0. fetch the symbols into an array |                     // 0. fetch the symbols into an array | ||||||
|                     int frame_length = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; |                     int frame_length = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; | ||||||
|                     double corr_sign = 0.0; |                     double corr_sign = 0.0; | ||||||
|                     if(corr_value > 0) |                     if(corr_value > 0) { corr_sign = -1.0; } | ||||||
|                         { |                     else { corr_sign = 1.0; } | ||||||
|                             corr_sign = -1.0; |  | ||||||
|                         } |  | ||||||
|                     else |  | ||||||
|                         { |  | ||||||
|                             corr_sign = 1.0; |  | ||||||
|                         } |  | ||||||
|                     for (int i = 0; i < frame_length; i++) |                     for (int i = 0; i < frame_length; i++) | ||||||
|                         { |                         { | ||||||
|                             page_symbols[i] = corr_sign * d_symbol_history.at(i + GALILEO_FNAV_PREAMBLE_LENGTH_BITS).Prompt_I; // because last symbol of the preamble is just received now! |                             page_symbols[i] = corr_sign * d_symbol_history.at(i + GALILEO_FNAV_PREAMBLE_LENGTH_BITS).Prompt_I; // because last symbol of the preamble is just received now! | ||||||
| @@ -457,7 +450,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut | |||||||
|             current_sample.Flag_valid_word = false; |             current_sample.Flag_valid_word = false; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|     current_sample.TOW_at_current_symbol_s = floor(d_TOW_at_current_symbol*1000.0)/1000.0; |     current_sample.TOW_at_current_symbol_s = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0; | ||||||
|  |  | ||||||
|     if(d_dump) |     if(d_dump) | ||||||
|         { |         { | ||||||
| @@ -479,13 +472,14 @@ int galileo_e5a_telemetry_decoder_cc::general_work (int noutput_items __attribut | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     // remove used symbols from history |     // remove used symbols from history | ||||||
|     while (d_symbol_history.size() > required_symbols) |     while (d_symbol_history.size() > required_symbols) { d_symbol_history.pop_front(); } | ||||||
|         { |  | ||||||
|             d_symbol_history.pop_front(); |  | ||||||
|         } |  | ||||||
|     //3. Make the output |     //3. Make the output | ||||||
|     out[0] = current_sample; |     if(current_sample.Flag_valid_word) | ||||||
|     return 1; |         { | ||||||
|  |             out[0] = current_sample; | ||||||
|  |             return 1; | ||||||
|  |         } | ||||||
|  |     else { return 0; } | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -445,9 +445,8 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute | |||||||
|             current_synchro_data.Carrier_phase_rads = 0.0; |             current_synchro_data.Carrier_phase_rads = 0.0; | ||||||
|             current_synchro_data.CN0_dB_hz = 0.0; |             current_synchro_data.CN0_dB_hz = 0.0; | ||||||
|             current_synchro_data.fs = d_fs_in; |             current_synchro_data.fs = d_fs_in; | ||||||
|             *out[0] = current_synchro_data; |  | ||||||
|             consume_each(samples_offset); //shift input to perform alignment with local replica |             consume_each(samples_offset); //shift input to perform alignment with local replica | ||||||
|             return 1; |             return 0; | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|     case 2: |     case 2: | ||||||
| @@ -649,6 +648,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute | |||||||
|                     current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; |                     current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; | ||||||
|                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; |                     current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; | ||||||
|                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; |                     current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; | ||||||
|  |                     current_synchro_data.Flag_valid_symbol_output = true; | ||||||
|                 } |                 } | ||||||
|             else |             else | ||||||
|                 { |                 { | ||||||
| @@ -658,6 +658,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute | |||||||
|                     current_synchro_data.Tracking_sample_counter = d_sample_counter; |                     current_synchro_data.Tracking_sample_counter = d_sample_counter; | ||||||
|                     current_synchro_data.Carrier_phase_rads = 0.0; |                     current_synchro_data.Carrier_phase_rads = 0.0; | ||||||
|                     current_synchro_data.CN0_dB_hz = 0.0; |                     current_synchro_data.CN0_dB_hz = 0.0; | ||||||
|  |                     current_synchro_data.Flag_valid_symbol_output = false; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             break; |             break; | ||||||
| @@ -666,7 +667,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute | |||||||
|  |  | ||||||
|     current_synchro_data.fs = d_fs_in; |     current_synchro_data.fs = d_fs_in; | ||||||
|     current_synchro_data.correlation_length_ms = GALILEO_E5a_CODE_PERIOD_MS; |     current_synchro_data.correlation_length_ms = GALILEO_E5a_CODE_PERIOD_MS; | ||||||
|     *out[0] = current_synchro_data; |     if(current_synchro_data.Flag_valid_symbol_output) { *out[0] = current_synchro_data; } | ||||||
|  |  | ||||||
|     if(d_dump) |     if(d_dump) | ||||||
|         { |         { | ||||||
| @@ -731,15 +732,11 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribute | |||||||
|         } |         } | ||||||
|  |  | ||||||
|     d_secondary_delay = (d_secondary_delay + 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; |     d_secondary_delay = (d_secondary_delay + 1) % Galileo_E5a_Q_SECONDARY_CODE_LENGTH; | ||||||
|     d_sample_counter += d_current_prn_length_samples; //count for the processed samples |     d_sample_counter += d_current_prn_length_samples; | ||||||
|     consume_each(d_current_prn_length_samples); // this is necessary in gr::block derivates |     consume_each(d_current_prn_length_samples); | ||||||
|  |  | ||||||
|     if (current_synchro_data.Flag_valid_symbol_output) |     if(current_synchro_data.Flag_valid_symbol_output) { return 1; } | ||||||
|     { |     else { return 0; } | ||||||
|         return 1; |  | ||||||
|     }else{ |  | ||||||
|         return 0; |  | ||||||
|     } |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Antonio Ramos
					Antonio Ramos