1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-04 12:56:59 +00:00

Accelerate GPS L1 preamble correlation

This commit is contained in:
Carles Fernandez 2019-02-25 15:14:13 +01:00
parent 4fe976ba01
commit c3709567a2

View File

@ -336,14 +336,14 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
// ******* preamble correlation ******** // ******* preamble correlation ********
int32_t corr_value = 0; int32_t corr_value = 0;
if ((d_symbol_history.size() == GPS_CA_PREAMBLE_LENGTH_SYMBOLS)) // and (d_make_correlation or !d_flag_frame_sync)) if ((d_symbol_history.size() == GPS_CA_PREAMBLE_LENGTH_SYMBOLS))
{ {
// std::cout << "-------\n"; int i = 0;
for (uint32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_SYMBOLS; i++) for (const auto &iter : d_symbol_history)
{ {
if (d_symbol_history[i].Flag_valid_symbol_output == true) if (iter.Flag_valid_symbol_output == true)
{ {
if (d_symbol_history[i].Prompt_I < 0) // symbols clipping if (iter.Prompt_I < 0) // symbols clipping
{ {
corr_value -= d_preambles_symbols[i]; corr_value -= d_preambles_symbols[i];
} }
@ -352,6 +352,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
corr_value += d_preambles_symbols[i]; corr_value += d_preambles_symbols[i];
} }
} }
i += 1;
} }
} }