1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-26 15:03:14 +00:00

Fix GLONASS L1 nav message decoding (fixes #289)

This commit is contained in:
Carles Fernandez 2019-07-09 20:00:29 +02:00
parent 24007b59e5
commit faeb99bf6f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -100,13 +100,11 @@ glonass_l1_ca_telemetry_decoder_gs::glonass_l1_ca_telemetry_decoder_gs(
}
}
d_symbol_history.set_capacity(GLONASS_GNAV_PREAMBLE_LENGTH_SYMBOLS);
d_symbol_history.set_capacity(GLONASS_GNAV_STRING_SYMBOLS);
d_sample_counter = 0ULL;
d_stat = 0;
d_preamble_index = 0ULL;
d_flag_frame_sync = false;
d_flag_parity = false;
d_TOW_at_current_symbol = 0;
Flag_valid_word = false;
@ -289,13 +287,12 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
d_flag_preamble = false;
if (static_cast<int32_t>(d_symbol_history.size()) == d_symbols_per_preamble)
if (static_cast<int32_t>(d_symbol_history.size()) >= d_symbols_per_preamble)
{
// ******* preamble correlation ********
int i = 0;
for (const auto &iter : d_symbol_history)
for (int32_t i = 0; i < d_symbols_per_preamble; i++)
{
if (iter.Prompt_I < 0.0) // symbols clipping
if (d_symbol_history[i].Prompt_I < 0.0) // symbols clipping
{
corr_value -= d_preambles_symbols[i];
}
@ -303,7 +300,6 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu
{
corr_value += d_preambles_symbols[i];
}
i++;
}
}