1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-18 21:23:02 +00:00

Fix bug in Galileo E5b generation (out of bounds read)

This commit is contained in:
Carles Fernandez 2020-07-20 10:03:53 +02:00
parent 8a06981c16
commit 3e6931200e
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -429,7 +429,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
// New random data bit
current_data_bit_int_[sat] = (uniform_dist(e1) % 2) == 0 ? 1 : -1;
}
data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5B_I_SECONDARY_CODE[((ms_counter_[sat] + delay_sec_[sat]) % 20)] == '0' ? 1 : -1);
data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5B_I_SECONDARY_CODE[((ms_counter_[sat] + delay_sec_[sat]) % 4)] == '0' ? 1 : -1);
pilot_modulation_[sat] = (GALILEO_E5B_Q_SECONDARY_CODE[PRN_[sat] - 1][((ms_counter_[sat] + delay_sec_[sat]) % 100)] == '0' ? 1 : -1);
ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5B_CODE_PERIOD_S));