1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-27 22:58:24 +00:00

Improving GPS L1 CA telemetry decoder reliability

This commit is contained in:
Javier Arribas 2018-07-26 19:56:10 +02:00
parent 83413f2eaf
commit 81fc5adcd7

View File

@ -259,6 +259,8 @@ bool gps_l1_ca_telemetry_decoder_cc::decode_subframe()
if (CRC_ok) if (CRC_ok)
{ {
int subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe int subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe
if (subframe_ID > 0 and subframe_ID < 6)
{
std::cout << "New GPS NAV message received in channel " << this->d_channel << ": " std::cout << "New GPS NAV message received in channel " << this->d_channel << ": "
<< "subframe " << "subframe "
<< subframe_ID << " from satellite " << subframe_ID << " from satellite "
@ -295,6 +297,11 @@ bool gps_l1_ca_telemetry_decoder_cc::decode_subframe()
} }
d_flag_new_tow_available = true; d_flag_new_tow_available = true;
} }
else
{
return false;
}
}
return subframe_synchro_confirmation; return subframe_synchro_confirmation;
} }
@ -419,7 +426,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
//2. Add the telemetry decoder information //2. Add the telemetry decoder information
if (this->d_flag_preamble == true and d_flag_new_tow_available == true) if (this->d_flag_preamble == true and d_flag_new_tow_available == true)
{ {
d_TOW_at_current_symbol_ms = static_cast<unsigned int>(d_nav.d_TOW) * 1000 + GPS_L1_CA_CODE_PERIOD_MS + GPS_CA_PREAMBLE_DURATION_MS; d_TOW_at_current_symbol_ms = static_cast<unsigned int>(d_nav.d_TOW) * 1000 + GPS_CA_PREAMBLE_DURATION_MS;
d_TOW_at_Preamble_ms = d_TOW_at_current_symbol_ms; d_TOW_at_Preamble_ms = d_TOW_at_current_symbol_ms;
flag_TOW_set = true; flag_TOW_set = true;
d_flag_new_tow_available = false; d_flag_new_tow_available = false;