1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-30 16:00:51 +00:00

New correlation procedure

This commit is contained in:
Antonio Ramos 2018-04-12 11:03:52 +02:00
parent 6de28277ed
commit f92dd4dc83
2 changed files with 13 additions and 2 deletions

View File

@ -107,6 +107,8 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
d_TOW_at_current_symbol_ms = 0;
d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS + 1); // Change fixed buffer size
d_symbol_history.clear(); // Clear all the elements in the buffer
d_make_correlation = true;
d_symbol_counter_corr = 0;
}
@ -170,7 +172,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
unsigned int required_symbols = GPS_CA_PREAMBLE_LENGTH_SYMBOLS;
d_flag_preamble = false;
if (d_symbol_history.size() > required_symbols)
if (d_symbol_history.size() > required_symbols and d_make_correlation)
{
//******* preamble correlation ********
for (unsigned int i = 0; i < GPS_CA_PREAMBLE_LENGTH_SYMBOLS; i++)
@ -186,7 +188,12 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
corr_value += d_preambles_symbols[i] * d_symbol_history.at(i).correlation_length_ms;
}
}
if (corr_value >= GPS_CA_PREAMBLE_LENGTH_SYMBOLS) break;
if (corr_value >= GPS_CA_PREAMBLE_LENGTH_SYMBOLS)
{
d_symbol_counter_corr = 0;
d_make_correlation = false;
break;
}
}
}

View File

@ -84,6 +84,10 @@ private:
double d_symbol_accumulator;
short int d_symbol_accumulator_counter;
// symbol counting
bool d_make_correlation;
unsigned int d_symbol_counter_corr;
//bits and frame
unsigned short int d_frame_bit_index;
unsigned int d_GPS_frame_4bytes;