1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-16 04:05:46 +00:00

Fix bug in Galileo E1/E5 telemetry decoder

This commit is contained in:
Javier Arribas 2019-06-06 18:16:27 +02:00
parent edbe7b4840
commit 54487295a7

View File

@ -97,7 +97,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
d_frame_length_symbols = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS; d_frame_length_symbols = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS;
CodeLength = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS; CodeLength = GALILEO_INAV_PAGE_PART_SYMBOLS - GALILEO_INAV_PREAMBLE_LENGTH_BITS;
DataLength = (CodeLength / nn) - mm; DataLength = (CodeLength / nn) - mm;
d_max_symbols_without_valid_frame = GALILEO_INAV_PAGE_PART_SYMBOLS * 10; //rise alarm 10 seconds without valid tlm d_max_symbols_without_valid_frame = GALILEO_INAV_PAGE_PART_SYMBOLS * 30; //rise alarm 30 seconds without valid tlm
break; break;
} }
@ -127,7 +127,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
d_secondary_code_samples[i] = -1; d_secondary_code_samples[i] = -1;
} }
} }
d_max_symbols_without_valid_frame = GALILEO_FNAV_CODES_PER_SYMBOL * GALILEO_FNAV_SYMBOLS_PER_PAGE * 10; //rise alarm 10 seconds without valid tlm d_max_symbols_without_valid_frame = GALILEO_FNAV_CODES_PER_SYMBOL * GALILEO_FNAV_SYMBOLS_PER_PAGE * 30; //rise alarm 30 seconds without valid tlm
break; break;
} }
default: default:
@ -532,13 +532,14 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
corr_value += d_preamble_samples[i]; corr_value += d_preamble_samples[i];
} }
} }
}
if (abs(corr_value) >= d_samples_per_preamble) if (abs(corr_value) >= d_samples_per_preamble)
{ {
d_preamble_index = d_sample_counter; // record the preamble sample stamp d_preamble_index = d_sample_counter; // record the preamble sample stamp
DLOG(INFO) << "Preamble detection for Galileo satellite " << this->d_satellite; DLOG(INFO) << "Preamble detection for Galileo satellite " << this->d_satellite;
d_stat = 1; // enter into frame pre-detection status d_stat = 1; // enter into frame pre-detection status
} }
}
break; break;
} }
case 1: // possible preamble lock case 1: // possible preamble lock
@ -560,7 +561,6 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
corr_value += d_preamble_samples[i]; corr_value += d_preamble_samples[i];
} }
} }
}
if (abs(corr_value) >= d_samples_per_preamble) if (abs(corr_value) >= d_samples_per_preamble)
{ {
// check preamble separation // check preamble separation
@ -571,7 +571,14 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
DLOG(INFO) << "Starting page decoder for Galileo satellite " << this->d_satellite; DLOG(INFO) << "Starting page decoder for Galileo satellite " << this->d_satellite;
d_preamble_index = d_sample_counter; // record the preamble sample stamp d_preamble_index = d_sample_counter; // record the preamble sample stamp
d_CRC_error_counter = 0; d_CRC_error_counter = 0;
if (corr_value < 0) flag_PLL_180_deg_phase_locked = true; if (corr_value < 0)
{
flag_PLL_180_deg_phase_locked = true;
}
else
{
flag_PLL_180_deg_phase_locked = false;
}
d_stat = 2; d_stat = 2;
} }
else else
@ -582,6 +589,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
} }
} }
} }
}
break; break;
} }
case 2: // preamble acquired case 2: // preamble acquired