mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-04 17:16:26 +00:00
Added Tracking Files
This commit is contained in:
parent
b32a2e271e
commit
7d1ec9b0e9
@ -43,6 +43,7 @@ set(TRACKING_ADAPTER_SOURCES
|
|||||||
gps_l1_ca_dll_pll_tracking.cc
|
gps_l1_ca_dll_pll_tracking.cc
|
||||||
gps_l1_ca_tcp_connector_tracking.cc
|
gps_l1_ca_tcp_connector_tracking.cc
|
||||||
galileo_e5a_dll_pll_tracking.cc
|
galileo_e5a_dll_pll_tracking.cc
|
||||||
|
galileo_e5b_dll_pll_tracking.cc
|
||||||
gps_l2_m_dll_pll_tracking.cc
|
gps_l2_m_dll_pll_tracking.cc
|
||||||
glonass_l1_ca_dll_pll_tracking.cc
|
glonass_l1_ca_dll_pll_tracking.cc
|
||||||
glonass_l1_ca_dll_pll_c_aid_tracking.cc
|
glonass_l1_ca_dll_pll_c_aid_tracking.cc
|
||||||
@ -61,6 +62,7 @@ set(TRACKING_ADAPTER_HEADERS
|
|||||||
gps_l1_ca_dll_pll_tracking.h
|
gps_l1_ca_dll_pll_tracking.h
|
||||||
gps_l1_ca_tcp_connector_tracking.h
|
gps_l1_ca_tcp_connector_tracking.h
|
||||||
galileo_e5a_dll_pll_tracking.h
|
galileo_e5a_dll_pll_tracking.h
|
||||||
|
galileo_e5b_dll_pll_tracking.h
|
||||||
gps_l2_m_dll_pll_tracking.h
|
gps_l2_m_dll_pll_tracking.h
|
||||||
glonass_l1_ca_dll_pll_tracking.h
|
glonass_l1_ca_dll_pll_tracking.h
|
||||||
glonass_l1_ca_dll_pll_c_aid_tracking.h
|
glonass_l1_ca_dll_pll_c_aid_tracking.h
|
||||||
|
145
src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.cc
Normal file
145
src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.cc
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/*!
|
||||||
|
* \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:
|
||||||
|
* <ul>
|
||||||
|
* <li> Javier Arribas, 2011. jarribas@cttc.es
|
||||||
|
* <li> Luis Esteve, 2012. luis@epsilon-formacion.com
|
||||||
|
* <li> Marc Sales, 2014. marcsales92@gmail.com
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||||
|
*
|
||||||
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
|
* Satellite Systems receiver
|
||||||
|
*
|
||||||
|
* This file is part of GNSS-SDR.
|
||||||
|
*
|
||||||
|
* 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 "dll_pll_conf.h"
|
||||||
|
#include "gnss_sdr_flags.h"
|
||||||
|
#include <glog/logging.h>
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
GalileoE5bDllPllTracking::GalileoE5bDllPllTracking(
|
||||||
|
const ConfigurationInterface* configuration, const std::string& role,
|
||||||
|
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||||
|
{
|
||||||
|
Dll_Pll_Conf trk_params = Dll_Pll_Conf();
|
||||||
|
DLOG(INFO) << "role " << role;
|
||||||
|
trk_params.SetFromConfiguration(configuration, role);
|
||||||
|
|
||||||
|
auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E5B_CODE_CHIP_RATE_CPS / GALILEO_E5B_CODE_LENGTH_CHIPS)));
|
||||||
|
trk_params.vector_length = vector_length;
|
||||||
|
if (trk_params.extend_correlation_symbols < 1)
|
||||||
|
{
|
||||||
|
trk_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 (!trk_params.track_pilot and trk_params.extend_correlation_symbols > GALILEO_E5B_I_SECONDARY_CODE_LENGTH)
|
||||||
|
{
|
||||||
|
trk_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 ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_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';
|
||||||
|
}
|
||||||
|
trk_params.system = 'E';
|
||||||
|
std::array<char, 3> sig_{'7', 'X', '\0'};
|
||||||
|
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||||
|
|
||||||
|
// ################# Make a GNU Radio Tracking block object ################
|
||||||
|
if (trk_params.item_type == "gr_complex")
|
||||||
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
|
tracking_ = dll_pll_veml_make_tracking(trk_params);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item_size_ = sizeof(gr_complex);
|
||||||
|
LOG(WARNING) << trk_params.item_type << " unknown tracking item type.";
|
||||||
|
}
|
||||||
|
channel_ = 0;
|
||||||
|
DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")";
|
||||||
|
if (in_streams_ > 1)
|
||||||
|
{
|
||||||
|
LOG(ERROR) << "This implementation only supports one input stream";
|
||||||
|
}
|
||||||
|
if (out_streams_ > 1)
|
||||||
|
{
|
||||||
|
LOG(ERROR) << "This implementation only supports one output stream";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE5bDllPllTracking::stop_tracking()
|
||||||
|
{
|
||||||
|
tracking_->stop_tracking();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE5bDllPllTracking::start_tracking()
|
||||||
|
{
|
||||||
|
tracking_->start_tracking();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set tracking channel unique ID
|
||||||
|
*/
|
||||||
|
void GalileoE5bDllPllTracking::set_channel(unsigned int channel)
|
||||||
|
{
|
||||||
|
channel_ = channel;
|
||||||
|
tracking_->set_channel(channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE5bDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||||
|
{
|
||||||
|
tracking_->set_gnss_synchro(p_gnss_synchro);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE5bDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||||
|
{
|
||||||
|
if (top_block)
|
||||||
|
{
|
||||||
|
/* top_block is not null */
|
||||||
|
};
|
||||||
|
// nothing to connect, now the tracking uses gr_sync_decimator
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GalileoE5bDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||||
|
{
|
||||||
|
if (top_block)
|
||||||
|
{
|
||||||
|
/* top_block is not null */
|
||||||
|
};
|
||||||
|
// nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gr::basic_block_sptr GalileoE5bDllPllTracking::get_left_block()
|
||||||
|
{
|
||||||
|
return tracking_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gr::basic_block_sptr GalileoE5bDllPllTracking::get_right_block()
|
||||||
|
{
|
||||||
|
return tracking_;
|
||||||
|
}
|
113
src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.h
Normal file
113
src/algorithms/tracking/adapters/galileo_e5b_dll_pll_tracking.h
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
/*!
|
||||||
|
* \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:
|
||||||
|
* <ul>
|
||||||
|
* <li> Javier Arribas, 2011. jarribas@cttc.es
|
||||||
|
* <li> Luis Esteve, 2012. luis@epsilon-formacion.com
|
||||||
|
* <li> Marc Sales, 2014. marcsales92@gmail.com
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
||||||
|
*
|
||||||
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
|
* Satellite Systems receiver
|
||||||
|
*
|
||||||
|
* This file is part of GNSS-SDR.
|
||||||
|
*
|
||||||
|
* 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 "dll_pll_veml_tracking.h"
|
||||||
|
#include "tracking_interface.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class ConfigurationInterface;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief This class implements a code DLL + carrier PLL tracking loop
|
||||||
|
*/
|
||||||
|
class GalileoE5bDllPllTracking : public TrackingInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GalileoE5bDllPllTracking(
|
||||||
|
const ConfigurationInterface* configuration,
|
||||||
|
const std::string& role,
|
||||||
|
unsigned int in_streams,
|
||||||
|
unsigned int out_streams);
|
||||||
|
|
||||||
|
~GalileoE5bDllPllTracking() = default;
|
||||||
|
|
||||||
|
inline std::string role() override
|
||||||
|
{
|
||||||
|
return role_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Returns "Galileo_E5b_DLL_PLL_Tracking"
|
||||||
|
inline std::string implementation() override
|
||||||
|
{
|
||||||
|
return "Galileo_E5b_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_;
|
||||||
|
size_t item_size_;
|
||||||
|
unsigned int channel_;
|
||||||
|
std::string role_;
|
||||||
|
unsigned int in_streams_;
|
||||||
|
unsigned int out_streams_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GNSS_SDR_GALILEO_E5B_DLL_PLL_TRACKING_H
|
Loading…
Reference in New Issue
Block a user