diff --git a/src/algorithms/PVT/libs/signal_enabled_flags.h b/src/algorithms/PVT/libs/signal_enabled_flags.h index 5092eb620..43e1c6d01 100644 --- a/src/algorithms/PVT/libs/signal_enabled_flags.h +++ b/src/algorithms/PVT/libs/signal_enabled_flags.h @@ -17,27 +17,11 @@ #ifndef GNSS_SDR_SIGNAL_ENABLED_FLAGS_H #define GNSS_SDR_SIGNAL_ENABLED_FLAGS_H +#include "signal_flag.h" #include class ConfigurationInterface; -enum signal_flag : uint32_t -{ - GPS_1C = 0x1 << 0, - GPS_2S = 0x1 << 1, - GPS_L5 = 0x1 << 2, - GAL_1B = 0x1 << 3, - GAL_E5a = 0x1 << 4, - GAL_E5b = 0x1 << 5, - GAL_E6 = 0x1 << 6, - GLO_1G = 0x1 << 7, - GLO_2G = 0x1 << 8, - BDS_B1 = 0x1 << 9, - BDS_B3 = 0x1 << 10, - QZS_J1 = 0x1 << 11, - QZS_J5 = 0x1 << 12 -}; - class Signal_Enabled_Flags { public: diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt index 4806fdbd1..5a4f493d2 100644 --- a/src/algorithms/tracking/adapters/CMakeLists.txt +++ b/src/algorithms/tracking/adapters/CMakeLists.txt @@ -37,46 +37,20 @@ if(ENABLE_FPGA) endif() set(TRACKING_ADAPTER_SOURCES - base_dll_pll_tracking.cc - beidou_b1i_dll_pll_tracking.cc - beidou_b3i_dll_pll_tracking.cc - galileo_e1_dll_pll_veml_tracking.cc - galileo_e5a_dll_pll_tracking.cc - galileo_e5b_dll_pll_tracking.cc - galileo_e6_dll_pll_tracking.cc - glonass_l1_ca_dll_pll_tracking.cc - glonass_l2_ca_dll_pll_tracking.cc - gps_l1_ca_dll_pll_tracking.cc - gps_l2_m_dll_pll_tracking.cc - gps_l5_dll_pll_tracking.cc + dll_pll_tracking_adapter.cc galileo_e1_tcp_connector_tracking.cc gps_l1_ca_tcp_connector_tracking.cc gps_l1_ca_gaussian_tracking.cc gps_l1_ca_kf_tracking.cc - qzss_l1_dll_pll_tracking.cc - qzss_l5_dll_pll_tracking.cc ${OPT_TRACKING_ADAPTERS_SOURCES} ) set(TRACKING_ADAPTER_HEADERS - base_dll_pll_tracking.h - beidou_b1i_dll_pll_tracking.h - beidou_b3i_dll_pll_tracking.h - galileo_e1_dll_pll_veml_tracking.h - galileo_e5a_dll_pll_tracking.h - galileo_e5b_dll_pll_tracking.h - galileo_e6_dll_pll_tracking.h - glonass_l1_ca_dll_pll_tracking.h - glonass_l2_ca_dll_pll_tracking.h - gps_l1_ca_dll_pll_tracking.h - gps_l2_m_dll_pll_tracking.h - gps_l5_dll_pll_tracking.h + dll_pll_tracking_adapter.h galileo_e1_tcp_connector_tracking.h gps_l1_ca_tcp_connector_tracking.h gps_l1_ca_gaussian_tracking.h gps_l1_ca_kf_tracking.h - qzss_l1_dll_pll_tracking.h - qzss_l5_dll_pll_tracking.h ${OPT_TRACKING_ADAPTERS_HEADERS} ) diff --git a/src/algorithms/tracking/adapters/base_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/base_dll_pll_tracking.cc deleted file mode 100644 index 957d3b968..000000000 --- a/src/algorithms/tracking/adapters/base_dll_pll_tracking.cc +++ /dev/null @@ -1,98 +0,0 @@ -/*! - * \file base_dll_pll_tracking.cc - * \brief Base class providing shared logic for DLL+PLL VEML tracking adapters. - * \authors Carles Fernandez, 2025. carles.fernandez(at)cttc.cat - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "base_dll_pll_tracking.h" -#include "configuration_interface.h" - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -BaseDllPllTracking::BaseDllPllTracking( - const ConfigurationInterface* configuration, - std::string role, - unsigned int in_streams, - unsigned int out_streams) - : role_(std::move(role)), - item_size_(sizeof(gr_complex)) -{ - trk_params_.SetFromConfiguration(configuration, role_); - - if (in_streams > 1) - { - LOG(ERROR) << "Only one input stream is supported."; - } - if (out_streams > 1) - { - LOG(ERROR) << "Only one output stream is supported."; - } - - DLOG(INFO) << "role " << role_; -} - - -void BaseDllPllTracking::connect(gr::top_block_sptr top_block) -{ - if (top_block) - { /* no connection needed */ - } -} - - -void BaseDllPllTracking::disconnect(gr::top_block_sptr top_block) -{ - if (top_block) - { /* no disconnection needed */ - } -} - - -gr::basic_block_sptr BaseDllPllTracking::get_left_block() -{ - return tracking_sptr_; -} - - -gr::basic_block_sptr BaseDllPllTracking::get_right_block() -{ - return tracking_sptr_; -} - - -void BaseDllPllTracking::set_channel(unsigned int channel) -{ - tracking_sptr_->set_channel(channel); -} - - -void BaseDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) -{ - tracking_sptr_->set_gnss_synchro(p_gnss_synchro); -} - - -void BaseDllPllTracking::start_tracking() -{ - tracking_sptr_->start_tracking(); -} - - -void BaseDllPllTracking::stop_tracking() -{ - tracking_sptr_->stop_tracking(); -} diff --git a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc deleted file mode 100644 index 5516f6228..000000000 --- a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.cc +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * \file beidou_b1i_dll_pll_tracking.cc - * \brief Implementation of an adapter of a DLL+PLL tracking loop block - * for Beidou B1I to a TrackingInterface - * \author Sergi Segura, 2018. sergi.segura.munoz@gmail.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "beidou_b1i_dll_pll_tracking.h" -#include "Beidou_B1I.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -BeidouB1iDllPllTracking::BeidouB1iDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void BeidouB1iDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration) -{ - const auto vector_length = static_cast(std::round(config_params().fs_in / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - config_params().system = 'C'; - const std::array sig{'B', '1', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (config_params().extend_correlation_symbols > 20) - { - config_params().extend_correlation_symbols = 20; - std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n'; - } - config_params().track_pilot = configuration->property(role() + ".track_pilot", false); - if (config_params().track_pilot) - { - std::cout << TEXT_RED << "WARNING: BEIDOU B1I does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n'; - config_params().track_pilot = false; - } - if ((config_params().extend_correlation_symbols > 1) && (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: BEIDOU B1I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } -} - - -void BeidouB1iDllPllTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.h b/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.h deleted file mode 100644 index fb94898a6..000000000 --- a/src/algorithms/tracking/adapters/beidou_b1i_dll_pll_tracking.h +++ /dev/null @@ -1,64 +0,0 @@ -/*! - * \file beidou_b1i_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Beidou B1I to a TrackingInterface - * \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H -#define GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for BeiDou B1I signals - */ -class BeidouB1iDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - BeidouB1iDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "BEIDOU_B1I_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "BEIDOU_B1I_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc deleted file mode 100644 index 4d75667d4..000000000 --- a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.cc +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * \file beidou_b3i_dll_pll_tracking.cc - * \brief Implementation of an adapter of a DLL+PLL tracking loop block - * for Beidou B3I to a TrackingInterface - * \author Damian Miralles, 2019. dmiralles2009(at)gmail.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "beidou_b3i_dll_pll_tracking.h" -#include "Beidou_B3I.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -BeidouB3iDllPllTracking::BeidouB3iDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void BeidouB3iDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration) -{ - const auto vector_length = static_cast(std::round(static_cast(config_params().fs_in) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - config_params().system = 'C'; - const std::array sig{'B', '3', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - config_params().track_pilot = configuration->property(role() + ".track_pilot", false); - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (config_params().extend_correlation_symbols > 20) - { - config_params().extend_correlation_symbols = 20; - std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n'; - } -} - - -void BeidouB3iDllPllTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.h b/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.h deleted file mode 100644 index 0e087e2f5..000000000 --- a/src/algorithms/tracking/adapters/beidou_b3i_dll_pll_tracking.h +++ /dev/null @@ -1,64 +0,0 @@ -/*! - * \file beidou_b3i_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Beidou B3I to a TrackingInterface - * \author Damian Miralles, 2019. dmiralles2009(at)gmail.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H -#define GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for BeiDou B3I signals - */ -class BeidouB3iDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - BeidouB3iDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "BEIDOU_B3I_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "BEIDOU_B3I_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_BEIDOU_B3I_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/dll_pll_tracking_adapter.cc b/src/algorithms/tracking/adapters/dll_pll_tracking_adapter.cc new file mode 100644 index 000000000..1f897ce4c --- /dev/null +++ b/src/algorithms/tracking/adapters/dll_pll_tracking_adapter.cc @@ -0,0 +1,247 @@ +/*! + * \file dll_pll_tracking_adapter.cc + * \brief Base class providing shared logic for DLL+PLL VEML tracking adapters. + * \authors Carles Fernandez, 2025. carles.fernandez(at)cttc.cat + * Mathieu Favreau, 2026. favreau.mathieu(at)hotmail.com + * ----------------------------------------------------------------------------- + * + * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. + * This file is part of GNSS-SDR. + * + * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) + * SPDX-License-Identifier: GPL-3.0-or-later + * + * ----------------------------------------------------------------------------- + */ + +#include "dll_pll_tracking_adapter.h" +#include "Beidou_B1I.h" +#include "Beidou_B3I.h" +#include "GLONASS_L1_L2_CA.h" +#include "GPS_L1_CA.h" +#include "GPS_L2C.h" +#include "GPS_L5.h" +#include "Galileo_E1.h" +#include "Galileo_E5a.h" +#include "Galileo_E5b.h" +#include "Galileo_E6.h" +#include "configuration_interface.h" +#include "display.h" +#include "qzss.h" + +#if USE_GLOG_AND_GFLAGS +#include +#else +#include +#endif + +namespace +{ + +struct signal_info +{ + char system; + std::array sig; + std::string sig_name; + double code_chip_rate; + double code_length_chips; + int32_t max_extend_correlation_symbols; + bool has_pilot; + bool disable_track_pilot; +}; + +signal_info get_signal_info(signal_flag sig_flag) +{ + switch (sig_flag) + { + case GPS_1C: + return {'G', {'1', 'C', '\0'}, "GPS L1 C/A", GPS_L1_CA_CODE_RATE_CPS, GPS_L1_CA_CODE_LENGTH_CHIPS, 20, false, true}; + case GPS_2S: + return {'G', {'2', 'S', '\0'}, "GPS L2", GPS_L2_M_CODE_RATE_CPS, GPS_L2_M_CODE_LENGTH_CHIPS, 1, false, true}; + case GPS_L5: + return {'G', {'L', '5', '\0'}, "GPS L5", GPS_L5I_CODE_RATE_CPS, GPS_L5I_CODE_LENGTH_CHIPS, GPS_L5I_NH_CODE_LENGTH, true, false}; + case GAL_1B: + return {'E', {'1', 'B', '\0'}, "Galileo E1", GALILEO_E1_CODE_CHIP_RATE_CPS, GALILEO_E1_B_CODE_LENGTH_CHIPS, 1, true, false}; + case GAL_E5a: + return {'E', {'5', 'X', '\0'}, "Galileo E5a", GALILEO_E5A_CODE_CHIP_RATE_CPS, GALILEO_E5A_CODE_LENGTH_CHIPS, GALILEO_E5A_I_SECONDARY_CODE_LENGTH, true, false}; + case GAL_E5b: + return {'E', {'7', 'X', '\0'}, "Galileo E5b", GALILEO_E5B_CODE_CHIP_RATE_CPS, GALILEO_E5B_CODE_LENGTH_CHIPS, GALILEO_E5B_I_SECONDARY_CODE_LENGTH, true, false}; + case GAL_E6: + return {'E', {'E', '6', '\0'}, "Galileo E6", GALILEO_E6_B_CODE_CHIP_RATE_CPS, GALILEO_E6_B_CODE_LENGTH_CHIPS, 1, true, false}; + case GLO_1G: + return {'R', {'1', 'G', '\0'}, "Glonass L1", GLONASS_L1_CA_CODE_RATE_CPS, GLONASS_L1_CA_CODE_LENGTH_CHIPS, 10, false, true}; + case GLO_2G: + return {'R', {'2', 'G', '\0'}, "Glonass L2", GLONASS_L2_CA_CODE_RATE_CPS, GLONASS_L2_CA_CODE_LENGTH_CHIPS, 10, false, true}; + case BDS_B1: + return {'C', {'B', '1', '\0'}, "BEIDOU B1I", BEIDOU_B1I_CODE_RATE_CPS, BEIDOU_B1I_CODE_LENGTH_CHIPS, 20, false, true}; + case BDS_B3: + return {'C', {'B', '3', '\0'}, "BEIDOU B3I", BEIDOU_B3I_CODE_RATE_CPS, BEIDOU_B3I_CODE_LENGTH_CHIPS, 20, false, false}; // Does false, false make sense? + case QZS_J1: + return {'J', {'J', '1', '\0'}, "QZSS L1 C/A", QZSS_L1_CHIP_RATE, QZSS_L1_CODE_LENGTH, 20, false, true}; + case QZS_J5: + return {'J', {'J', '5', '\0'}, "QZSS L5", QZSS_L5_CHIP_RATE, QZSS_L5_CODE_LENGTH, QZSS_L5I_NH_CODE_LENGTH, true, false}; + default: + LOG(ERROR) << "Invalid signal in DLL PLL Tracking Adapter."; + } + + return {}; +} + +void check_and_configure_trk_params(const ConfigurationInterface* configuration, const std::string& role, const signal_info& sig_info, Dll_Pll_Conf& trk_params) +{ + trk_params.SetFromConfiguration(configuration, role); + trk_params.vector_length = static_cast(std::round(trk_params.fs_in / (sig_info.code_chip_rate / sig_info.code_length_chips))); + trk_params.system = sig_info.system; + std::copy_n(sig_info.sig.data(), 3, trk_params.signal); + trk_params.track_pilot = configuration->property(role + ".track_pilot", sig_info.has_pilot); + + const bool track_data = !sig_info.has_pilot || !trk_params.track_pilot; + + if (trk_params.extend_correlation_symbols < 1) + { + trk_params.extend_correlation_symbols = 1; + std::cout << TEXT_RED << "WARNING: " << sig_info.sig_name << ": extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol"; + } + else if (track_data && trk_params.extend_correlation_symbols > sig_info.max_extend_correlation_symbols) + { + trk_params.extend_correlation_symbols = sig_info.max_extend_correlation_symbols; + std::cout << TEXT_RED << "WARNING: " << sig_info.sig_name; + + if (sig_info.max_extend_correlation_symbols == 1) + { + if (sig_info.has_pilot) + { + std::cout << ": extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 1 symbol"; + } + else + { + std::cout << ": extended coherent integration is not allowed. Coherent integration has been set to 1 symbol"; + } + } + else + { + if (sig_info.has_pilot) + { + std::cout << ": extend_correlation_symbols limited to " << sig_info.max_extend_correlation_symbols + << " symbols when tracking the data component. Coherent integration has been set to " << sig_info.max_extend_correlation_symbols << " symbols"; + } + else + { + std::cout << ": extend_correlation_symbols limited to " << sig_info.max_extend_correlation_symbols + << " symbols. Coherent integration has been set to " << sig_info.max_extend_correlation_symbols << " symbols"; + } + } + + std::cout << TEXT_RESET << '\n'; + } + + if (sig_info.disable_track_pilot && trk_params.track_pilot) + { + std::cout << TEXT_RED << "WARNING: " << sig_info.sig_name << " does not have pilot signal. Data tracking has been enabled instead" << TEXT_RESET << '\n'; + trk_params.track_pilot = false; + } + + if ((trk_params.extend_correlation_symbols > 1) && (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz || trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz)) + { + std::cout << TEXT_RED << "WARNING: " << sig_info.sig_name << ". PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; + } +} + +} // namespace + +DllPllTrackingAdapter::DllPllTrackingAdapter( + const ConfigurationInterface* configuration, + std::string role, + std::string implementation, + unsigned int in_streams, + unsigned int out_streams, + signal_flag sig_flag) + : role_(std::move(role)), + implementation_(std::move(implementation)), + item_size_(sizeof(gr_complex)) +{ + DLOG(INFO) << "role " << role_; + + const auto sig_info = get_signal_info(sig_flag); + + if (!sig_info.sig_name.empty()) + { + check_and_configure_trk_params(configuration, role_, sig_info, trk_params_); + } + else + { + item_size_ = 0; + } + + if (trk_params_.item_type == "gr_complex") + { + tracking_sptr_ = dll_pll_veml_make_tracking(trk_params_); + DLOG(INFO) << "Tracking block (" << tracking_sptr_->unique_id() << ")"; + } + else + { + item_size_ = 0; + LOG(WARNING) << trk_params_.item_type << " unknown tracking item type."; + } + + if (in_streams > 1) + { + LOG(ERROR) << "Only one input stream is supported."; + } + if (out_streams > 1) + { + LOG(ERROR) << "Only one output stream is supported."; + } +} + + +void DllPllTrackingAdapter::connect(gr::top_block_sptr top_block) +{ + if (top_block) + { /* no connection needed */ + } +} + + +void DllPllTrackingAdapter::disconnect(gr::top_block_sptr top_block) +{ + if (top_block) + { /* no disconnection needed */ + } +} + + +gr::basic_block_sptr DllPllTrackingAdapter::get_left_block() +{ + return tracking_sptr_; +} + + +gr::basic_block_sptr DllPllTrackingAdapter::get_right_block() +{ + return tracking_sptr_; +} + + +void DllPllTrackingAdapter::set_channel(unsigned int channel) +{ + tracking_sptr_->set_channel(channel); +} + + +void DllPllTrackingAdapter::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) +{ + tracking_sptr_->set_gnss_synchro(p_gnss_synchro); +} + + +void DllPllTrackingAdapter::start_tracking() +{ + tracking_sptr_->start_tracking(); +} + + +void DllPllTrackingAdapter::stop_tracking() +{ + tracking_sptr_->stop_tracking(); +} diff --git a/src/algorithms/tracking/adapters/base_dll_pll_tracking.h b/src/algorithms/tracking/adapters/dll_pll_tracking_adapter.h similarity index 61% rename from src/algorithms/tracking/adapters/base_dll_pll_tracking.h rename to src/algorithms/tracking/adapters/dll_pll_tracking_adapter.h index a3c277a18..0a3018fd4 100644 --- a/src/algorithms/tracking/adapters/base_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/dll_pll_tracking_adapter.h @@ -1,5 +1,5 @@ /*! - * \file base_dll_pll_tracking.h + * \file dll_pll_tracking_adapter.h * \brief Base class providing shared logic for DLL+PLL VEML tracking adapters. * \authors Carles Fernandez, 2025. carles.fernandez(at)cttc.cat * @@ -14,11 +14,12 @@ * ----------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_BASE_DLL_PLL_TRACKING_H -#define GNSS_SDR_BASE_DLL_PLL_TRACKING_H +#ifndef GNSS_SDR_DLL_PLL_TRACKING_ADAPTER_H +#define GNSS_SDR_DLL_PLL_TRACKING_ADAPTER_H #include "dll_pll_conf.h" #include "dll_pll_veml_tracking.h" +#include "signal_flag.h" #include "tracking_interface.h" #include #include @@ -36,91 +37,91 @@ class ConfigurationInterface; * \brief Base class providing shared logic for DLL+PLL tracking loop adapters * for GNSS signals. */ -class BaseDllPllTracking : public TrackingInterface +class DllPllTrackingAdapter : public TrackingInterface { public: /*! * \brief Base constructor of a Tracking block adapter */ - explicit BaseDllPllTracking(const ConfigurationInterface* configuration, + explicit DllPllTrackingAdapter(const ConfigurationInterface* configuration, std::string role, + std::string implementation, unsigned int in_streams, - unsigned int out_streams); + unsigned int out_streams, + signal_flag sig_flag); /*! * \brief Default destructor of the Tracking block adapter */ - ~BaseDllPllTracking() override = default; + ~DllPllTrackingAdapter() override = default; /*! * \brief Get role from the Tracking block adapter */ - inline std::string role() override final { return role_; } + inline std::string role() override { return role_; } + + /*! + * \brief Get implementation from the Tracking block adapter + */ + inline std::string implementation() override { return implementation_; } /*! * \brief Get item_size from the Tracking block adapter */ - inline size_t item_size() override final { return item_size_; } + inline size_t item_size() override + { + return item_size_; + } /*! * \brief Connect the Tracking block adapter */ - void connect(gr::top_block_sptr top_block) override final; + void connect(gr::top_block_sptr top_block) override; /*! * \brief Disconnect the sTracking block adapter */ - void disconnect(gr::top_block_sptr top_block) override final; + void disconnect(gr::top_block_sptr top_block) override; /*! * \brief Get left block from the Tracking block adapter */ - gr::basic_block_sptr get_left_block() override final; + gr::basic_block_sptr get_left_block() override; /*! * \brief Get right block from the Tracking block adapter */ - gr::basic_block_sptr get_right_block() override final; + gr::basic_block_sptr get_right_block() override; /*! * \brief Set tracking channel unique ID */ - void set_channel(unsigned int channel) override final; + void set_channel(unsigned int channel) override; /*! * \brief Set acquisition Gnss_Synchro object pointer * to exchange synchronization data between acquisition and tracking blocks */ - void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override final; + void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; /*! * \brief Start the Tracking block */ - void start_tracking() override final; + void start_tracking() override; /*! * \brief Stop the Tracking block */ - void stop_tracking() override final; - -protected: - // Can be used by each derived class - inline Dll_Pll_Conf& config_params() { return trk_params_; } - inline const Dll_Pll_Conf& config_params() const { return trk_params_; } - inline void set_item_size(size_t item_size) { item_size_ = item_size; } - - // Must be implemented / filled by each derived class - virtual void configure_tracking_parameters(const ConfigurationInterface* configuration) = 0; - virtual void create_tracking_block() = 0; - dll_pll_veml_tracking_sptr tracking_sptr_; + void stop_tracking() override; private: - // Managed by the base class + dll_pll_veml_tracking_sptr tracking_sptr_; Dll_Pll_Conf trk_params_; const std::string role_; + const std::string implementation_; size_t item_size_; }; /** \} */ /** \} */ -#endif // GNSS_SDR_BASE_DLL_PLL_TRACKING_H +#endif // GNSS_SDR_DLL_PLL_TRACKING_ADAPTER_H diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc deleted file mode 100644 index 6c417b4bb..000000000 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file galileo_e1_dll_pll_veml_tracking.cc - * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block - * to a TrackingInterface for Galileo E1 signals - * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "galileo_e1_dll_pll_veml_tracking.h" -#include "Galileo_E1.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GalileoE1DllPllVemlTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration [[maybe_unused]]) -{ - const auto vector_length = static_cast(std::round(config_params().fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - config_params().system = 'E'; - const std::array sig{'1', 'B', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E1. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (4 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot && config_params().extend_correlation_symbols > 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } -} - - -void GalileoE1DllPllVemlTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h deleted file mode 100644 index 54cea7742..000000000 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h +++ /dev/null @@ -1,64 +0,0 @@ -/*! - * \file galileo_e1_dll_pll_veml_tracking.h - * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block - * to a TrackingInterface for Galileo E1 signals - * \author Luis Esteve, 2012. luis(at)epsilon-formacion.com - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H -#define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for Galileo E1 signals - */ -class GalileoE1DllPllVemlTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GalileoE1DllPllVemlTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "Galileo_E1_DLL_PLL_VEML_Tracking" - inline std::string implementation() override - { - return "Galileo_E1_DLL_PLL_VEML_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc deleted file mode 100644 index 8dd56cafb..000000000 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file galileo_e5a_dll_pll_tracking.cc - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E5a signals - * \author Marc Sales, 2014. marcsales92(at)gmail.com - * \based on work from: - *
    - *
  • Javier Arribas, 2011. jarribas(at)cttc.es - *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com - *
- * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "galileo_e5a_dll_pll_tracking.h" -#include "Galileo_E5a.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - - -GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GalileoE5aDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration [[maybe_unused]]) -{ - const auto vector_length = static_cast(std::round(config_params().fs_in / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - config_params().system = 'E'; - const std::array sig{'5', 'X', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot and config_params().extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH) - { - config_params().extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH; - std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } -} - - -void GalileoE5aDllPllTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h deleted file mode 100644 index 6443a72e1..000000000 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h +++ /dev/null @@ -1,64 +0,0 @@ -/*! - * \file galileo_e5a_dll_pll_tracking.h - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E5a signals - * \author Marc Sales, 2014. marcsales92(at)gmail.com - * \based on work from: - *
    - *
  • Javier Arribas, 2011. jarribas(at)cttc.es - *
  • Luis Esteve, 2012. luis(at)epsilon-formacion.com - *
- * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H -#define GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for Galileo E5a signals - */ -class GalileoE5aDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GalileoE5aDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "Galileo_E5a_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "Galileo_E5a_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.cc deleted file mode 100644 index 015064e4e..000000000 --- a/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file galileo_e5b_dll_pll_tracking.cc - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E5b signals - * \author Piyush Gupta, 2020. piyush04111999@gmail.com - * \based on work from: - *
    - *
  • Javier Arribas, 2011. jarribas@cttc.es - *
  • Luis Esteve, 2012. luis@epsilon-formacion.com - *
  • Marc Sales, 2014. marcsales92@gmail.com - *
- * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "galileo_e5b_dll_pll_tracking.h" -#include "Galileo_E5b.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GalileoE5bDllPllTracking::GalileoE5bDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GalileoE5bDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration [[maybe_unused]]) -{ - const auto vector_length = static_cast(std::round(config_params().fs_in / (GALILEO_E5B_CODE_CHIP_RATE_CPS / GALILEO_E5B_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E5b. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot and config_params().extend_correlation_symbols > GALILEO_E5B_I_SECONDARY_CODE_LENGTH) - { - config_params().extend_correlation_symbols = GALILEO_E5B_I_SECONDARY_CODE_LENGTH; - std::cout << TEXT_RED << "WARNING: Galileo E5b. extend_correlation_symbols must be lower than 5 when tracking the data component. Coherent integration has been set to 4 symbols (4 ms)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: Galileo E5b. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } - config_params().system = 'E'; - const std::array sig{'7', 'X', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); -} - - -void GalileoE5bDllPllTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.h b/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.h deleted file mode 100644 index 2433e2294..000000000 --- a/src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.h +++ /dev/null @@ -1,65 +0,0 @@ -/*! - * \file galileo_e5b_dll_pll_tracking.h - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E5b signals - * \author Piyush Gupta, 2020. piyush04111999@gmail.com - * \based on work from: - *
    - *
  • Javier Arribas, 2011. jarribas@cttc.es - *
  • Luis Esteve, 2012. luis@epsilon-formacion.com - *
  • Marc Sales, 2014. marcsales92@gmail.com - *
- * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GALILEO_E5B_DLL_PLL_TRACKING_H -#define GNSS_SDR_GALILEO_E5B_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for Galileo E5b signals - */ -class GalileoE5bDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GalileoE5bDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "Galileo_E5b_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "Galileo_E5b_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GALILEO_E5B_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.cc deleted file mode 100644 index 6324e36b9..000000000 --- a/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.cc +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * \file galileo_e6_dll_pll_tracking.cc - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E6 signals - * \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es - * - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "galileo_e6_dll_pll_tracking.h" -#include "Galileo_E6.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - - -GalileoE6DllPllTracking::GalileoE6DllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GalileoE6DllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration [[maybe_unused]]) -{ - const auto vector_length = static_cast(std::round(config_params().fs_in / (GALILEO_E6_B_CODE_CHIP_RATE_CPS / GALILEO_E6_B_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - config_params().system = 'E'; - const std::array sig{'5', 'X', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E6. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot and config_params().extend_correlation_symbols > 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Galileo E6. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 1 ms (1 symbol)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: Galileo E5b. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } -} - - -void GalileoE6DllPllTracking::create_tracking_block() -{ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.h b/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.h deleted file mode 100644 index ed51a2cd6..000000000 --- a/src/algorithms/tracking/adapters/galileo_e6_dll_pll_tracking.h +++ /dev/null @@ -1,158 +0,0 @@ -/*! - * \file galileo_e6_dll_pll_tracking.h - * \brief Adapts a code DLL + carrier PLL - * tracking block to a TrackingInterface for Galileo E6 signals - * \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es - * - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H -#define GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -class ConfigurationInterface; - -/*! - * \brief This class Adapts a DLL+PLL VEML (Very Early Minus Late) tracking - * loop block to a TrackingInterface for Galileo E5a signals - */ -class GalileoE6DllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GalileoE6DllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "Galileo_E6_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "Galileo_E6_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H - -// // -// src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h - -// src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h -// #include "dll_pll_veml_tracking.h" -// #include "tracking_interface.h" -// #include - -// /** \addtogroup Tracking -// * \{ */ -// /** \addtogroup Tracking_adapters -// * \{ */ - - -// class ConfigurationInterface; - -// /*! -// * \brief This class implements a code DLL + carrier PLL tracking loop -// */ -// class GalileoE6DllPllTracking : public TrackingInterface -// { -// public: -// GalileoE6DllPllTracking( -// const ConfigurationInterface* configuration, -// const std::string& role, -// unsigned int in_streams, -// unsigned int out_streams); - -// ~GalileoE6DllPllTracking() = default; - -// inline std::string role() override -// { -// return role_; -// } - -// //! Returns "Galileo_E6_DLL_PLL_Tracking" -// inline std::string implementation() override -// { -// return "Galileo_E6_DLL_PLL_Tracking"; -// } - -// inline size_t item_size() override -// { -// return item_size_; -// } - -// /*! -// * \brief Connect -// */ -// void connect(gr::top_block_sptr top_block) override; - -// /*! -// * \brief Disconnect -// */ -// void disconnect(gr::top_block_sptr top_block) override; - -// /*! -// * \brief Get left block -// */ -// gr::basic_block_sptr get_left_block() override; - -// /*! -// * \brief Get right block -// */ -// gr::basic_block_sptr get_right_block() override; - -// /*! -// * \brief Set tracking channel unique ID -// */ -// void set_channel(unsigned int channel) override; - -// /*! -// * \brief Set acquisition/tracking common Gnss_Synchro object pointer -// * to efficiently exchange synchronization data between acquisition and tracking blocks -// */ -// void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; - -// void start_tracking() override; - -// /*! -// * \brief Stop running tracking -// */ -// void stop_tracking() override; - -// private: -// dll_pll_veml_tracking_sptr tracking_sptr_; -// std::string role_; -// size_t item_size_; -// unsigned int channel_; -// unsigned int in_streams_; -// unsigned int out_streams_; -// }; - - -// /** \} */ -// /** \} */ -// #endif // GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc deleted file mode 100644 index 0e7e634c0..000000000 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc +++ /dev/null @@ -1,120 +0,0 @@ -/*! - * \file glonass_l1_ca_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Glonass L1 C/A to a TrackingInterface - * \author Gabriel Araujo, 2017. gabriel.araujo.5000(at)gmail.com - * \author Luis Esteve, 2017. luis(at)epsilon-formacion.com - * \author Javier Arribas, 2025 javier.arribas(at)cttc.es - * \author Carles Fernandez-Prades, 2025 carles.fernandez(at)cttc.es - * - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - - -#include "glonass_l1_ca_dll_pll_tracking.h" -#include "GLONASS_L1_L2_CA.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GlonassL1CaDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - // Set basic signal identifiers - config_params().system = 'R'; - const std::array sig{'1', 'G', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - - const auto vector_length = static_cast(std::round(config_params().fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - - // Sanity checks and warnings - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED - << "WARNING: Glonass L1: extend_correlation_symbols must be > 0. " - << "Coherent integration set to 1 ms." - << TEXT_RESET << std::endl; - } - else if (config_params().extend_correlation_symbols > 10) - { - config_params().extend_correlation_symbols = 10; - std::cout << TEXT_RED - << "WARNING: Glonass L1: extend_correlation_symbols limited to 10 (10 ms)." - << TEXT_RESET << std::endl; - } - - // GPS L1 C/A does not have a pilot component - config_params().track_pilot = configuration->property(this->role() + ".track_pilot", false); - if (config_params().track_pilot) - { - config_params().track_pilot = false; - std::cout << TEXT_RED - << "WARNING: Glonass L1 does not have pilot signal. " - << "Data tracking enabled instead." - << TEXT_RESET << std::endl; - } - - // Ensure bandwidth sanity when narrow-band is enabled - if ((config_params().extend_correlation_symbols > 1) && - (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz || - config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED - << "WARNING: Glonass L1: Narrow tracking bandwidth is higher than wide bandwidth." - << TEXT_RESET << std::endl; - } -} - - -void GlonassL1CaDllPllTracking::create_tracking_block() -{ - // Create GNU Radio block - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "Tracking block (" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h deleted file mode 100644 index 8241de478..000000000 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * \file glonass_l1_ca_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Glonass L1 C/A to a TrackingInterface - * \author Gabriel Araujo, 2017. gabriel.araujo.5000(at)gmail.com - * \author Luis Esteve, 2017. luis(at)epsilon-formacion.com - * \author Javier Arribas, 2025 javier.arribas(at)cttc.es - * \author Carles Fernandez-Prades, 2025 carles.fernandez(at)cttc.es - * - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H -#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for GLONASS L1 signals - */ -class GlonassL1CaDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GlonassL1CaDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "GLONASS_L1_CA_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "GLONASS_L1_CA_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GLONASS_L1_DLL_PLL_TRACKING_H \ No newline at end of file diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc deleted file mode 100644 index 17ba9df6d..000000000 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc +++ /dev/null @@ -1,120 +0,0 @@ -/*! - * \file glonass_l2_ca_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Glonass L2 C/A to a TrackingInterface - * \author Gabriel Araujo, 2017. gabriel.araujo.5000(at)gmail.com - * \author Luis Esteve, 2017. luis(at)epsilon-formacion.com - * \author Javier Arribas, 2025 javier.arribas(at)cttc.es - * \author Carles Fernandez-Prades, 2025 carles.fernandez(at)cttc.es - * - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - - -#include "glonass_l2_ca_dll_pll_tracking.h" -#include "GLONASS_L1_L2_CA.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GlonassL2CaDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - // Set basic signal identifiers - config_params().system = 'R'; - const std::array sig{'2', 'G', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - - const auto vector_length = static_cast(std::round(config_params().fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - - // Sanity checks and warnings - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED - << "WARNING: Glonass L2: extend_correlation_symbols must be > 0. " - << "Coherent integration set to 1 ms." - << TEXT_RESET << std::endl; - } - else if (config_params().extend_correlation_symbols > 10) - { - config_params().extend_correlation_symbols = 10; - std::cout << TEXT_RED - << "WARNING: Glonass L2: extend_correlation_symbols limited to 10 (10 ms)." - << TEXT_RESET << std::endl; - } - - // Glonass L2 C/A does not have a pilot component - config_params().track_pilot = configuration->property(this->role() + ".track_pilot", false); - if (config_params().track_pilot) - { - config_params().track_pilot = false; - std::cout << TEXT_RED - << "WARNING: Glonass L2 does not have pilot signal. " - << "Data tracking enabled instead." - << TEXT_RESET << std::endl; - } - - // Ensure bandwidth sanity when narrow-band is enabled - if ((config_params().extend_correlation_symbols > 1) && - (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz || - config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED - << "WARNING: Glonass L2: Narrow tracking bandwidth is higher than wide bandwidth." - << TEXT_RESET << std::endl; - } -} - - -void GlonassL2CaDllPllTracking::create_tracking_block() -{ - // Create GNU Radio block - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "Tracking block (" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} \ No newline at end of file diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h deleted file mode 100644 index 9087a6e29..000000000 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h +++ /dev/null @@ -1,65 +0,0 @@ -/*! - * \file glonass_l2_ca_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for Glonass L2 C/A to a TrackingInterface - * \author Damian Miralles, 2018, dmiralles2009(at)gmail.com - * \author Javier Arribas, 2025 javier.arribas(at)cttc.es - * \author Carles Fernandez-Prades, 2025 carles.fernandez(at)cttc.es - * - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_H -#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for GLONASS L2 signals - */ -class GlonassL2CaDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GlonassL2CaDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "GLONASS_L2_CA_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "GLONASS_L2_CA_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc deleted file mode 100644 index 578d9dc3f..000000000 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * \file gps_l1_ca_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L1 C/A to a TrackingInterface - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com - * Javier Arribas, 2011. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "gps_l1_ca_dll_pll_tracking.h" -#include "GPS_L1_CA.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GpsL1CaDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - // Set basic signal identifiers - config_params().system = 'G'; - const std::array sig{'1', 'C', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - - const auto vector_length = static_cast(std::round(config_params().fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS))); - config_params().vector_length = vector_length; - - // Sanity checks and warnings - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED - << "WARNING: GPS L1 C/A: extend_correlation_symbols must be > 0. " - << "Coherent integration set to 1 ms." - << TEXT_RESET << std::endl; - } - else if (config_params().extend_correlation_symbols > 20) - { - config_params().extend_correlation_symbols = 20; - std::cout << TEXT_RED - << "WARNING: GPS L1 C/A: extend_correlation_symbols limited to 20 (20 ms)." - << TEXT_RESET << std::endl; - } - - // GPS L1 C/A does not have a pilot component - config_params().track_pilot = configuration->property(this->role() + ".track_pilot", false); - if (config_params().track_pilot) - { - config_params().track_pilot = false; - std::cout << TEXT_RED - << "WARNING: GPS L1 C/A does not have pilot signal. " - << "Data tracking enabled instead." - << TEXT_RESET << std::endl; - } - - // Ensure bandwidth sanity when narrow-band is enabled - if ((config_params().extend_correlation_symbols > 1) && - (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz || - config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED - << "WARNING: GPS L1 C/A: Narrow tracking bandwidth is higher than wide bandwidth." - << TEXT_RESET << std::endl; - } -} - - -void GpsL1CaDllPllTracking::create_tracking_block() -{ - // Create GNU Radio block - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "Tracking block (" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h deleted file mode 100644 index 482f697e0..000000000 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * \file gps_l1_ca_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L1 C/A to a TrackingInterface - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com - * Javier Arribas, 2011. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H -#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for GPS L1 C/A signals - */ -class GpsL1CaDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GpsL1CaDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "GPS_L1_CA_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "GPS_L1_CA_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc deleted file mode 100644 index 38e706427..000000000 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc +++ /dev/null @@ -1,84 +0,0 @@ -/*! - * \file gps_l2_m_dll_pll_tracking.cc - * \brief Implementation of an adapter of a DLL+PLL tracking loop block - * for GPS L2C(M) to a TrackingInterface - * \author Javier Arribas, 2015. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "gps_l2_m_dll_pll_tracking.h" -#include "GPS_L2C.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GpsL2MDllPllTracking::GpsL2MDllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GpsL2MDllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration) -{ - const auto vector_length = static_cast(std::round(static_cast(config_params().fs_in) / (static_cast(GPS_L2_M_CODE_RATE_CPS) / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS)))); - config_params().vector_length = vector_length; - if (config_params().extend_correlation_symbols != 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: Extended coherent integration is not allowed in GPS L2. Coherent integration has been set to 20 ms (1 symbol)" << TEXT_RESET << '\n'; - } - config_params().track_pilot = configuration->property(role() + ".track_pilot", false); - if (config_params().track_pilot) - { - config_params().track_pilot = false; - std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n'; - } - config_params().system = 'G'; - const std::array sig{'2', 'S', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); -} - - -void GpsL2MDllPllTracking::create_tracking_block() -{ - // ################# Make a GNU Radio Tracking block object ################ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h deleted file mode 100644 index 0b2eda166..000000000 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * \file gps_l2_m_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L2C(M) to a TrackingInterface - * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com - * Javier Arribas, 2011. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H -#define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for GPS L2C(M) signals - */ -class GpsL2MDllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GpsL2MDllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "GPS_L2_M_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "GPS_L2_M_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc deleted file mode 100644 index e9e98783c..000000000 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file gps_l5_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L5 to a TrackingInterface - * \author Javier Arribas, 2017. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "gps_l5_dll_pll_tracking.h" -#include "GPS_L5.h" -#include "configuration_interface.h" -#include "display.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -GpsL5DllPllTracking::GpsL5DllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void GpsL5DllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - const auto vector_length = static_cast(std::round(static_cast(config_params().fs_in) / (static_cast(GPS_L5I_CODE_RATE_CPS) / static_cast(GPS_L5I_CODE_LENGTH_CHIPS)))); - config_params().vector_length = vector_length; - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot and config_params().extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH) - { - config_params().extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH; - std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } - config_params().system = 'G'; - const std::array sig{'L', '5', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); -} - - -void GpsL5DllPllTracking::create_tracking_block() -{ - // ################# Make a GNU Radio Tracking block object ################ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h deleted file mode 100644 index 110fe4c1f..000000000 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * \file gps_l5_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L5 to a TrackingInterface - * \author Javier Arribas, 2017. jarribas(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_H -#define GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for GPS L5 signals - */ -class GpsL5DllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - GpsL5DllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "GPS_L5_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "GPS_L5_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.cc deleted file mode 100644 index a27fe9d4b..000000000 --- a/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.cc +++ /dev/null @@ -1,115 +0,0 @@ -/*! - * \file qzss_l1_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for QZSS L1 signals to a TrackingInterface - * \author Carles Fernandez, 2026. cfernandez(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "qzss_l1_dll_pll_tracking.h" -#include "configuration_interface.h" -#include "display.h" -#include "qzss.h" -#include -#include -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -QzssL1DllPllTracking::QzssL1DllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void QzssL1DllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - // Set basic signal identifiers - config_params().system = 'J'; - const std::array sig{'J', '1', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); - - const auto vector_length = static_cast(std::round(config_params().fs_in / (QZSS_L1_CHIP_RATE / QZSS_L1_CODE_LENGTH))); - config_params().vector_length = vector_length; - - // Sanity checks and warnings - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED - << "WARNING: QZSS L1 C/A: extend_correlation_symbols must be > 0. " - << "Coherent integration set to 1 ms." - << TEXT_RESET << std::endl; - } - else if (config_params().extend_correlation_symbols > 20) - { - config_params().extend_correlation_symbols = 20; - std::cout << TEXT_RED - << "WARNING: QZSS L1 C/A: extend_correlation_symbols limited to 20 (20 ms)." - << TEXT_RESET << std::endl; - } - - // QZSS L1 C/A does not have a pilot component - config_params().track_pilot = configuration->property(this->role() + ".track_pilot", false); - if (config_params().track_pilot) - { - config_params().track_pilot = false; - std::cout << TEXT_RED - << "WARNING: QZSS L1 C/A does not have pilot signal. " - << "Data tracking enabled instead." - << TEXT_RESET << std::endl; - } - - // Ensure bandwidth sanity when narrow-band is enabled - if ((config_params().extend_correlation_symbols > 1) && - (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz || - config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED - << "WARNING: QZSS L1 C/A: Narrow tracking bandwidth is higher than wide bandwidth." - << TEXT_RESET << std::endl; - } -} - - -void QzssL1DllPllTracking::create_tracking_block() -{ - // Create GNU Radio block - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "Tracking block (" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.h b/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.h deleted file mode 100644 index 6f3106f43..000000000 --- a/src/algorithms/tracking/adapters/qzss_l1_dll_pll_tracking.h +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * \file qzss_l1_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for QZSS L1 signals to a TrackingInterface - * \author Carles Fernandez, 2026. cfernandez(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_QZSS_L1_DLL_PLL_TRACKING_H -#define GNSS_SDR_QZSS_L1_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for QZSS L1 signals - */ -class QzssL1DllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - QzssL1DllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "QZSS_L1_CA_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "QZSS_L1_CA_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_QZSS_L1_CA_DLL_PLL_TRACKING_H diff --git a/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.cc deleted file mode 100644 index 868268b61..000000000 --- a/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * \file qzss_l5_dll_pll_tracking.cc - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for QZSS L5 signals to a TrackingInterface - * \author Carles Fernandez, 2026. cfernandez(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#include "qzss_l5_dll_pll_tracking.h" -#include "configuration_interface.h" -#include "display.h" -#include "qzss.h" -#include -#include - -#if USE_GLOG_AND_GFLAGS -#include -#else -#include -#endif - -QzssL5DllPllTracking::QzssL5DllPllTracking( - const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams) - : BaseDllPllTracking(configuration, role, in_streams, out_streams) -{ - configure_tracking_parameters(configuration); - create_tracking_block(); -} - - -void QzssL5DllPllTracking::configure_tracking_parameters( - const ConfigurationInterface* configuration __attribute__((unused))) -{ - const auto vector_length = static_cast(std::round(static_cast(config_params().fs_in) / (static_cast(QZSS_L5_CHIP_RATE) / static_cast(QZSS_L5_CODE_LENGTH)))); - config_params().vector_length = vector_length; - if (config_params().extend_correlation_symbols < 1) - { - config_params().extend_correlation_symbols = 1; - std::cout << TEXT_RED << "WARNING: QZSS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n'; - } - else if (!config_params().track_pilot and config_params().extend_correlation_symbols > QZSS_L5I_NH_CODE_LENGTH) - { - config_params().extend_correlation_symbols = QZSS_L5I_NH_CODE_LENGTH; - std::cout << TEXT_RED << "WARNING: QZSS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << '\n'; - } - if ((config_params().extend_correlation_symbols > 1) and (config_params().pll_bw_narrow_hz > config_params().pll_bw_hz or config_params().dll_bw_narrow_hz > config_params().dll_bw_hz)) - { - std::cout << TEXT_RED << "WARNING: QZSS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n'; - } - config_params().system = 'J'; - const std::array sig{'J', '5', '\0'}; - std::copy_n(sig.data(), 3, config_params().signal); -} - - -void QzssL5DllPllTracking::create_tracking_block() -{ - // ################# Make a GNU Radio Tracking block object ################ - if (config_params().item_type == "gr_complex") - { - tracking_sptr_ = dll_pll_veml_make_tracking(config_params()); - DLOG(INFO) << "tracking(" << tracking_sptr_->unique_id() << ")"; - } - else - { - set_item_size(0); - tracking_sptr_ = nullptr; - LOG(WARNING) << config_params().item_type << " unknown tracking item type."; - } -} diff --git a/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.h b/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.h deleted file mode 100644 index 4e56791e4..000000000 --- a/src/algorithms/tracking/adapters/qzss_l5_dll_pll_tracking.h +++ /dev/null @@ -1,62 +0,0 @@ -/*! - * \file qzss_l5_dll_pll_tracking.h - * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for QZSS L5 signals to a TrackingInterface - * \author Carles Fernandez, 2026. cfernandez(at)cttc.es - * - * Code DLL + carrier PLL according to the algorithms described in: - * K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, - * A Software-Defined GPS and Galileo Receiver. A Single-Frequency - * Approach, Birkhauser, 2007 - * - * ----------------------------------------------------------------------------- - * - * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. - * This file is part of GNSS-SDR. - * - * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) - * SPDX-License-Identifier: GPL-3.0-or-later - * - * ----------------------------------------------------------------------------- - */ - -#ifndef GNSS_SDR_QZSS_L5_DLL_PLL_TRACKING_H -#define GNSS_SDR_QZSS_L5_DLL_PLL_TRACKING_H - -#include "base_dll_pll_tracking.h" - -/** \addtogroup Tracking - * Classes for GNSS signal tracking. - * \{ */ -/** \addtogroup Tracking_adapters tracking_adapters - * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface - * \{ */ - - -/*! - * \brief This class implements a code DLL + carrier PLL tracking loop - * block adapter for QZSS L5 signals - */ -class QzssL5DllPllTracking : public BaseDllPllTracking -{ -public: - //! Constructor - QzssL5DllPllTracking(const ConfigurationInterface* configuration, - const std::string& role, - unsigned int in_streams, - unsigned int out_streams); - - //! Returns "QZSS_L5_DLL_PLL_Tracking" - inline std::string implementation() override - { - return "QZSS_L5_DLL_PLL_Tracking"; - } - -private: - void configure_tracking_parameters(const ConfigurationInterface* configuration) override; - void create_tracking_block() override; -}; - -/** \} */ -/** \} */ -#endif // GNSS_SDR_QZSS_L5_DLL_PLL_TRACKING_H diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 666c1953b..0b88166a5 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -6,6 +6,7 @@ * Javier Arribas, 2011. jarribas(at)cttc.es * Marc Majoral, 2018. mmajoral(at)cttc.es * Carles Fernandez-Prades, 2014-2020. cfernandez(at)cttc.es + * Mathieu Favreau, 2025-2026. favreau.mathieu(at)hotmail.com * * This class encapsulates the complexity behind the instantiation * of GNSS blocks. @@ -16,7 +17,7 @@ * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. * This file is part of GNSS-SDR. * - * Copyright (C) 2010-2022 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) * SPDX-License-Identifier: GPL-3.0-or-later * * ----------------------------------------------------------------------------- @@ -27,10 +28,8 @@ #include "acquisition_interface.h" #include "array_signal_conditioner.h" #include "beamformer_filter.h" -#include "beidou_b1i_dll_pll_tracking.h" #include "beidou_b1i_pcps_acquisition.h" #include "beidou_b1i_telemetry_decoder.h" -#include "beidou_b3i_dll_pll_tracking.h" #include "beidou_b3i_pcps_acquisition.h" #include "beidou_b3i_telemetry_decoder.h" #include "byte_to_short.h" @@ -38,13 +37,13 @@ #include "configuration_interface.h" #include "cshort_to_grcomplex.h" #include "direct_resampler_conditioner.h" +#include "dll_pll_tracking_adapter.h" #include "fifo_signal_source.h" #include "file_signal_source.h" #include "file_timestamp_signal_source.h" #include "fir_filter.h" #include "four_bit_cpx_file_signal_source.h" #include "freq_xlating_fir_filter.h" -#include "galileo_e1_dll_pll_veml_tracking.h" #include "galileo_e1_pcps_8ms_ambiguous_acquisition.h" #include "galileo_e1_pcps_ambiguous_acquisition.h" #include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h" @@ -52,26 +51,20 @@ #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" #include "galileo_e1_tcp_connector_tracking.h" #include "galileo_e1b_telemetry_decoder.h" -#include "galileo_e5a_dll_pll_tracking.h" #include "galileo_e5a_noncoherent_iq_acquisition_caf.h" #include "galileo_e5a_pcps_acquisition.h" #include "galileo_e5a_telemetry_decoder.h" -#include "galileo_e5b_dll_pll_tracking.h" #include "galileo_e5b_pcps_acquisition.h" #include "galileo_e5b_telemetry_decoder.h" -#include "galileo_e6_dll_pll_tracking.h" #include "galileo_e6_pcps_acquisition.h" #include "galileo_e6_telemetry_decoder.h" -#include "glonass_l1_ca_dll_pll_tracking.h" #include "glonass_l1_ca_pcps_acquisition.h" #include "glonass_l1_ca_telemetry_decoder.h" -#include "glonass_l2_ca_dll_pll_tracking.h" #include "glonass_l2_ca_pcps_acquisition.h" #include "glonass_l2_ca_telemetry_decoder.h" #include "gnss_block_interface.h" #include "gnss_sdr_make_unique.h" #include "gnss_sdr_string_literals.h" -#include "gps_l1_ca_dll_pll_tracking.h" #include "gps_l1_ca_gaussian_tracking.h" #include "gps_l1_ca_kf_tracking.h" #include "gps_l1_ca_pcps_acquisition.h" @@ -81,10 +74,8 @@ #include "gps_l1_ca_pcps_tong_acquisition.h" #include "gps_l1_ca_tcp_connector_tracking.h" #include "gps_l1_ca_telemetry_decoder.h" -#include "gps_l2_m_dll_pll_tracking.h" #include "gps_l2_m_pcps_acquisition.h" #include "gps_l2c_telemetry_decoder.h" -#include "gps_l5_dll_pll_tracking.h" #include "gps_l5_telemetry_decoder.h" #include "gps_l5i_pcps_acquisition.h" #include "hybrid_observables.h" @@ -103,16 +94,15 @@ #include "ntlab_file_signal_source.h" #include "pass_through.h" #include "pulse_blanking_filter.h" -#include "qzss_l1_dll_pll_tracking.h" #include "qzss_l1_pcps_acquisition.h" #include "qzss_l1_telemetry_decoder.h" -#include "qzss_l5_dll_pll_tracking.h" #include "qzss_l5_telemetry_decoder.h" #include "qzss_l5i_pcps_acquisition.h" #include "rtklib_pvt.h" #include "rtl_tcp_signal_source.h" #include "sbas_l1_telemetry_decoder.h" #include "signal_conditioner.h" +#include "signal_flag.h" #include "spir_file_signal_source.h" #include "spir_gss6450_file_signal_source.h" #include "telemetry_decoder_interface.h" @@ -588,7 +578,7 @@ std::unique_ptr get_trk_block( { if (implementation == "GPS_L1_CA_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GPS_1C); } else if (implementation == "GPS_L1_CA_Gaussian_Tracking") { @@ -604,7 +594,7 @@ std::unique_ptr get_trk_block( } else if (implementation == "Galileo_E1_DLL_PLL_VEML_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GAL_1B); } else if (implementation == "Galileo_E1_TCP_CONNECTOR_Tracking") { @@ -612,47 +602,47 @@ std::unique_ptr get_trk_block( } else if (implementation == "Galileo_E5a_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GAL_E5a); } else if (implementation == "Galileo_E5b_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GAL_E5b); } else if (implementation == "Galileo_E6_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GAL_E6); } else if (implementation == "GPS_L2_M_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GPS_2S); } else if ((implementation == "GPS_L5i_DLL_PLL_Tracking") or (implementation == "GPS_L5_DLL_PLL_Tracking")) { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GPS_L5); } else if (implementation == "GLONASS_L1_CA_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GLO_1G); } else if (implementation == "GLONASS_L2_CA_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, GLO_2G); } else if (implementation == "BEIDOU_B1I_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, BDS_B1); } else if (implementation == "BEIDOU_B3I_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, BDS_B3); } else if (implementation == "QZSS_L1_CA_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, QZS_J1); } else if (implementation == "QZSS_L5_DLL_PLL_Tracking") { - return std::make_unique(configuration, role, in_streams, out_streams); + return std::make_unique(configuration, role, implementation, in_streams, out_streams, QZS_J5); } #if CUDA_GPU_ACCEL else if (implementation == "GPS_L1_CA_DLL_PLL_Tracking_GPU") diff --git a/src/core/system_parameters/CMakeLists.txt b/src/core/system_parameters/CMakeLists.txt index cc757901b..a8e038353 100644 --- a/src/core/system_parameters/CMakeLists.txt +++ b/src/core/system_parameters/CMakeLists.txt @@ -98,6 +98,7 @@ set(SYSTEM_PARAMETERS_HEADERS osnma_dsm_reader.h tow_to_trk.h qzss.h + signal_flag.h ) list(SORT SYSTEM_PARAMETERS_HEADERS) diff --git a/src/core/system_parameters/signal_flag.h b/src/core/system_parameters/signal_flag.h new file mode 100644 index 000000000..6f6e8fba5 --- /dev/null +++ b/src/core/system_parameters/signal_flag.h @@ -0,0 +1,41 @@ +/*! + * \file signal_flag.h + * \brief Enum for signals + * \author Mathieu Favreau, 2026. favreau.mathieu(at)hotmail.com + * + * ----------------------------------------------------------------------------- + * + * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. + * This file is part of GNSS-SDR. + * + * Copyright (C) 2010-2026 (see AUTHORS file for a list of contributors) + * SPDX-License-Identifier: GPL-3.0-or-later + * + * ----------------------------------------------------------------------------- + */ + +#ifndef GNSS_SDR_SIGNAL_FLAG_H +#define GNSS_SDR_SIGNAL_FLAG_H + +#include + +class ConfigurationInterface; + +enum signal_flag : uint32_t +{ + GPS_1C = 0x1 << 0, + GPS_2S = 0x1 << 1, + GPS_L5 = 0x1 << 2, + GAL_1B = 0x1 << 3, + GAL_E5a = 0x1 << 4, + GAL_E5b = 0x1 << 5, + GAL_E6 = 0x1 << 6, + GLO_1G = 0x1 << 7, + GLO_2G = 0x1 << 8, + BDS_B1 = 0x1 << 9, + BDS_B3 = 0x1 << 10, + QZS_J1 = 0x1 << 11, + QZS_J5 = 0x1 << 12 +}; + +#endif // GNSS_SDR_SIGNAL_FLAG_H diff --git a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc index bd4e74d7e..d963f929f 100644 --- a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc +++ b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc @@ -18,12 +18,12 @@ #include "concurrent_queue.h" -#include "galileo_e1_dll_pll_veml_tracking.h" #include "gnss_block_factory.h" #include "gnss_block_interface.h" #include "gnss_sdr_valve.h" #include "gnss_synchro.h" #include "in_memory_configuration.h" +#include "tracking_interface.h" #include #include #include @@ -101,7 +101,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun) // Example using smart pointers and the block factory std::shared_ptr trk_ = factory->GetBlock(config.get(), "Tracking_1B", 1, 1); - std::shared_ptr tracking = std::dynamic_pointer_cast(trk_); + std::shared_ptr tracking = std::dynamic_pointer_cast(trk_); ASSERT_NO_THROW({ tracking->set_channel(gnss_synchro.Channel_ID); diff --git a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc index f13a498bd..dd947f509 100644 --- a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc +++ b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc @@ -18,12 +18,12 @@ #include "concurrent_queue.h" -#include "galileo_e5a_dll_pll_tracking.h" #include "gnss_block_factory.h" #include "gnss_block_interface.h" #include "gnss_sdr_valve.h" #include "gnss_synchro.h" #include "in_memory_configuration.h" +#include "tracking_interface.h" #include #include #include diff --git a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc index 8536ece4f..7dc3a0b75 100644 --- a/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc +++ b/tests/unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc @@ -19,12 +19,12 @@ #include "concurrent_queue.h" -#include "galileo_e5b_dll_pll_tracking.h" #include "gnss_block_factory.h" #include "gnss_block_interface.h" #include "gnss_sdr_valve.h" #include "gnss_synchro.h" #include "in_memory_configuration.h" +#include "tracking_interface.h" #include #include #include diff --git a/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc b/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc index c442d6f02..336d25a57 100644 --- a/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc +++ b/tests/unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc @@ -18,7 +18,7 @@ #include "concurrent_queue.h" -#include "glonass_l1_ca_dll_pll_tracking.h" +#include "gnss_block_factory.h" #include "gnss_block_interface.h" #include "gnss_sdr_valve.h" #include "gnss_synchro.h" @@ -157,9 +157,12 @@ TEST_F(GlonassL1CaDllPllTrackingTest, ValidationOfResults) int nsamples = fs_in * 4e-3 * 2; init(); + + GNSSBlockFactory factory; queue = std::make_shared>(); top_block = gr::make_top_block("Tracking test"); - std::shared_ptr tracking = std::make_shared(config.get(), "Tracking_1G", 1, 1); + std::shared_ptr trk = factory.GetBlock(config.get(), "Tracking_1G", 1, 1); + std::shared_ptr tracking = std::dynamic_pointer_cast(trk); auto msg_rx = GlonassL1CaDllPllTrackingTest_msg_rx_make(); gnss_synchro.Acq_delay_samples = 1343;