From d6ed2698e66dd054354f58df18c1ec79010c8e26 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Mon, 27 Sep 2021 16:11:17 +0200 Subject: [PATCH] Optimizing GPS L1 CA bit transitiion detection by using a bit transition slope pattern --- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.cc | 6 +++--- src/core/system_parameters/GPS_L1_CA.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index 05ba8b38f..e8e77e912 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -141,9 +141,9 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl d_trk_parameters.spc = d_trk_parameters.early_late_space_chips; d_trk_parameters.y_intercept = 1.0; // symbol integration: 20 trk symbols (20 ms) = 1 tlm bit - // set the preamble in the secondary code acquisition to obtain tlm symbol synchronization - d_secondary_code_length = static_cast(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); - d_secondary_code_string = GPS_CA_PREAMBLE_SYMBOLS_STR; + // set the bit transition pattern in secondary code to obtain bit synchronization + d_secondary_code_length = static_cast(GPS_CA_BIT_TRANSITION_SYMBOLS_LENGTH_SYMBOLS); + d_secondary_code_string = GPS_CA_BIT_TRANSITION_SYMBOLS_STR; d_symbols_per_bit = GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; } else if (d_signal_type == "2S") diff --git a/src/core/system_parameters/GPS_L1_CA.h b/src/core/system_parameters/GPS_L1_CA.h index 842dbbf3b..aea63c496 100644 --- a/src/core/system_parameters/GPS_L1_CA.h +++ b/src/core/system_parameters/GPS_L1_CA.h @@ -71,6 +71,8 @@ constexpr int32_t GPS_SUBFRAME_MS = 6000; constexpr int32_t GPS_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits] constexpr char GPS_CA_PREAMBLE[9] = "10001011"; constexpr char GPS_CA_PREAMBLE_SYMBOLS_STR[161] = "1111111111111111111100000000000000000000000000000000000000000000000000000000000011111111111111111111000000000000000000001111111111111111111111111111111111111111"; +constexpr int32_t GPS_CA_BIT_TRANSITION_SYMBOLS_LENGTH_SYMBOLS = 40; +constexpr char GPS_CA_BIT_TRANSITION_SYMBOLS_STR[41] = "1111111111111111111100000000000000000000"; // GPS NAVIGATION MESSAGE STRUCTURE // NAVIGATION MESSAGE FIELDS POSITIONS (from IS-GPS-200M Appendix II)