From 5f2f752421347faab262180299f2def59482bfd1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 29 Nov 2021 17:01:58 +0100 Subject: [PATCH] Fix a bug that prevented from obtaining PVT fixes with Galileo E1 signals if frame 0 was the first to be decoded --- docs/CHANGELOG.md | 2 ++ .../galileo_telemetry_decoder_gs.cc | 16 +++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 588edd754..9f748194c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -19,6 +19,8 @@ All notable changes to GNSS-SDR will be documented in this file. - Improved Time-To-First-Fix when using GPS L1 C/A signals, fixing a bug that was making the receiver to drop the satellite if the PLL got locked at 180 degrees, and making some optimizations on bit transition detection. +- Fixed a bug that prevented from obtaining PVT fixes with Galileo E1 OS signals + if the I/NAV subframe type 0 was the first decoded subframe. ### Improvements in Interoperability: diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc index 1656c04a1..81e4cd6bc 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc @@ -882,15 +882,13 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * d_PRN_code_period_ms); d_inav_nav.set_TOW6_flag(false); } - // warning: type 0 frame does not contain a valid TOW in some simulated signals, thus it is not safe to activate the following code: - // else if (d_inav_nav.is_TOW0_set() == true) // page 0 arrived and decoded - // { - // // TOW_0 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay - // d_TOW_at_Preamble_ms = static_cast(d_inav_nav.get_TOW0() * 1000.0); - // d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * d_PRN_code_period_ms); - // d_inav_nav.set_TOW0_flag(false); - // // std::cout << "FRAME 0 current tow: " << tmp_d_TOW_at_current_symbol_ms << " vs. " << d_TOW_at_current_symbol_ms + d_PRN_code_period_ms << "\n"; - // } + else if (d_inav_nav.is_TOW0_set() == true) // page 0 arrived and decoded + { + // TOW_0 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay + d_TOW_at_Preamble_ms = static_cast(d_inav_nav.get_TOW0() * 1000.0); + d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * d_PRN_code_period_ms); + d_inav_nav.set_TOW0_flag(false); + } else { // this page has no timing information