GNSS-SDR  0.0.21
An Open Source GNSS Software Defined Receiver
base_dll_pll_tracking.h
Go to the documentation of this file.
1 /*!
2  * \file base_dll_pll_tracking.h
3  * \brief Base class providing shared logic for DLL+PLL VEML tracking adapters.
4  * \authors Carles Fernandez, 2025. carles.fernandez(at)cttc.cat
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2025 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 #ifndef GNSS_SDR_BASE_DLL_PLL_TRACKING_H
18 #define GNSS_SDR_BASE_DLL_PLL_TRACKING_H
19 
20 #include "dll_pll_conf.h"
21 #include "dll_pll_veml_tracking.h"
22 #include "tracking_interface.h"
23 #include <cstddef>
24 #include <string>
25 
26 /** \addtogroup Tracking
27  * Classes for GNSS signal tracking.
28  * \{ */
29 /** \addtogroup Tracking_adapters tracking_adapters
30  * Wrap GNU Radio blocks for GNSS signal tracking with a TrackingInterface
31  * \{ */
32 
34 
35 /*!
36  * \brief Base class providing shared logic for DLL+PLL tracking loop adapters
37  * for GNSS signals.
38  */
40 {
41 public:
42  /*!
43  * \brief Base constructor of a Tracking block adapter
44  */
45  explicit BaseDllPllTracking(const ConfigurationInterface* configuration,
46  std::string role,
47  unsigned int in_streams,
48  unsigned int out_streams);
49 
50  /*!
51  * \brief Default destructor of the Tracking block adapter
52  */
53  ~BaseDllPllTracking() override = default;
54 
55  /*!
56  * \brief Get role from the Tracking block adapter
57  */
58  inline std::string role() override final { return role_; }
59 
60  /*!
61  * \brief Get item_size from the Tracking block adapter
62  */
63  inline size_t item_size() override final { return item_size_; }
64 
65  /*!
66  * \brief Connect the Tracking block adapter
67  */
68  void connect(gr::top_block_sptr top_block) override final;
69 
70  /*!
71  * \brief Disconnect the sTracking block adapter
72  */
73  void disconnect(gr::top_block_sptr top_block) override final;
74 
75  /*!
76  * \brief Get left block from the Tracking block adapter
77  */
78  gr::basic_block_sptr get_left_block() override final;
79 
80  /*!
81  * \brief Get right block from the Tracking block adapter
82  */
83  gr::basic_block_sptr get_right_block() override final;
84 
85  /*!
86  * \brief Set tracking channel unique ID
87  */
88  void set_channel(unsigned int channel) override final;
89 
90  /*!
91  * \brief Set acquisition Gnss_Synchro object pointer
92  * to exchange synchronization data between acquisition and tracking blocks
93  */
94  void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override final;
95 
96  /*!
97  * \brief Start the Tracking block
98  */
99  void start_tracking() override final;
100 
101  /*!
102  * \brief Stop the Tracking block
103  */
104  void stop_tracking() override final;
105 
106 protected:
107  // Can be used by each derived class
108  inline Dll_Pll_Conf& config_params() { return trk_params_; }
109  inline const Dll_Pll_Conf& config_params() const { return trk_params_; }
110  inline void set_item_size(size_t item_size) { item_size_ = item_size; }
111 
112  // Must be implemented / filled by each derived class
113  virtual void configure_tracking_parameters(const ConfigurationInterface* configuration) = 0;
114  virtual void create_tracking_block() = 0;
115  dll_pll_veml_tracking_sptr tracking_sptr_;
116 
117 private:
118  // Managed by the base class
119  Dll_Pll_Conf trk_params_;
120  const std::string role_;
121  size_t item_size_;
122 };
123 
124 /** \} */
125 /** \} */
126 #endif // GNSS_SDR_BASE_DLL_PLL_TRACKING_H
Base class providing shared logic for DLL+PLL tracking loop adapters for GNSS signals.
size_t item_size() override final
Get item_size from the Tracking block adapter.
void set_gnss_synchro(Gnss_Synchro *p_gnss_synchro) override final
Set acquisition Gnss_Synchro object pointer to exchange synchronization data between acquisition and ...
void set_channel(unsigned int channel) override final
Set tracking channel unique ID.
void stop_tracking() override final
Stop the Tracking block.
BaseDllPllTracking(const ConfigurationInterface *configuration, std::string role, unsigned int in_streams, unsigned int out_streams)
Base constructor of a Tracking block adapter.
This is the class that contains the information that is shared by the processing blocks.
Definition: gnss_synchro.h:38
std::string role() override final
Get role from the Tracking block adapter.
This abstract class represents an interface to configuration parameters.
Implementation of a code DLL + carrier PLL tracking block.
void connect(gr::top_block_sptr top_block) override final
Connect the Tracking block adapter.
~BaseDllPllTracking() override=default
Default destructor of the Tracking block adapter.
gr::basic_block_sptr get_left_block() override final
Get left block from the Tracking block adapter.
void disconnect(gr::top_block_sptr top_block) override final
Disconnect the sTracking block adapter.
Class that contains all the configuration parameters for generic tracking block based on a DLL and a ...
void start_tracking() override final
Start the Tracking block.
This abstract class represents an interface to a tracking block.
gr::basic_block_sptr get_right_block() override final
Get right block from the Tracking block adapter.
This class represents an interface to a tracking block.