mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-27 13:37:38 +00:00
bds b1i: Merging latest changes from upstream/next
This commit is contained in:
@@ -34,23 +34,20 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dll_pll_conf.h"
|
||||
#include "galileo_e1_dll_pll_veml_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GalileoE1DllPllVemlTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_param = Dll_Pll_Conf();
|
||||
@@ -133,7 +130,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@@ -157,7 +154,10 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
}
|
||||
|
||||
|
||||
GalileoE1DllPllVemlTracking::~GalileoE1DllPllVemlTracking()
|
||||
GalileoE1DllPllVemlTracking::~GalileoE1DllPllVemlTracking() = default;
|
||||
|
||||
|
||||
void GalileoE1DllPllVemlTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_
|
||||
#define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class GalileoE1DllPllVemlTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE1DllPllVemlTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_dll_pll_veml_tracking_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "display.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
//#define NUM_PRNs_GALILEO_E1 50
|
||||
@@ -51,7 +51,7 @@ void GalileoE1DllPllVemlTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//dllpllconf_t trk_param;
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_FPGA_H_
|
||||
#define GNSS_SDR_GALILEO_E1_DLL_PLL_VEML_TRACKING_FPGA_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking_fpga.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class GalileoE1DllPllVemlTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE1DllPllVemlTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,21 +36,19 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_tcp_connector_tracking.h"
|
||||
#include <glog/logging.h>
|
||||
#include "Galileo_E1.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GalileoE1TcpConnectorTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
//################# CONFIGURATION PARAMETERS ########################
|
||||
@@ -81,7 +79,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = galileo_e1_tcp_connector_make_tracking_cc(
|
||||
@@ -113,7 +111,10 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
}
|
||||
|
||||
|
||||
GalileoE1TcpConnectorTracking::~GalileoE1TcpConnectorTracking()
|
||||
GalileoE1TcpConnectorTracking::~GalileoE1TcpConnectorTracking() = default;
|
||||
|
||||
|
||||
void GalileoE1TcpConnectorTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_H_
|
||||
#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_H_
|
||||
|
||||
#include <string>
|
||||
#include "tracking_interface.h"
|
||||
#include "galileo_e1_tcp_connector_tracking_cc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -53,7 +53,7 @@ class GalileoE1TcpConnectorTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE1TcpConnectorTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -35,22 +35,19 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
#include "dll_pll_conf.h"
|
||||
#include "galileo_e5a_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GalileoE5aDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_param = Dll_Pll_Conf();
|
||||
@@ -131,7 +128,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@@ -154,7 +151,10 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GalileoE5aDllPllTracking::~GalileoE5aDllPllTracking()
|
||||
GalileoE5aDllPllTracking::~GalileoE5aDllPllTracking() = default;
|
||||
|
||||
|
||||
void GalileoE5aDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -52,7 +52,7 @@ class GalileoE5aDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE5aDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_dll_pll_tracking_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "display.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -51,7 +51,7 @@ void GalileoE5aDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
ConfigurationInterface *configuration, std::string role,
|
||||
ConfigurationInterface *configuration, const std::string &role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//printf("creating the E5A tracking");
|
||||
@@ -136,9 +136,9 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
unsigned int code_samples_per_chip = 1;
|
||||
unsigned int code_length_chips = static_cast<unsigned int>(Galileo_E5a_CODE_LENGTH_CHIPS);
|
||||
auto code_length_chips = static_cast<unsigned int>(Galileo_E5a_CODE_LENGTH_CHIPS);
|
||||
|
||||
gr_complex *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * code_length_chips * code_samples_per_chip, volk_gnsssdr_get_alignment()));
|
||||
auto *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * code_length_chips * code_samples_per_chip, volk_gnsssdr_get_alignment()));
|
||||
|
||||
float *tracking_code;
|
||||
float *data_code;
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_FPGA_H_
|
||||
#define GNSS_SDR_GALILEO_E5A_DLL_PLL_TRACKING_FPGA_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking_fpga.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -52,7 +52,7 @@ class GalileoE5aDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE5aDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -38,20 +38,17 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GlonassL1CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -86,7 +83,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_cc = glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -102,7 +99,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
tracking_sc = glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -135,18 +132,21 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
|
||||
}
|
||||
|
||||
|
||||
GlonassL1CaDllPllCAidTracking::~GlonassL1CaDllPllCAidTracking()
|
||||
GlonassL1CaDllPllCAidTracking::~GlonassL1CaDllPllCAidTracking() = default;
|
||||
|
||||
|
||||
void GlonassL1CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GlonassL1CaDllPllCAidTracking::start_tracking()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->start_tracking();
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->start_tracking();
|
||||
}
|
||||
@@ -164,11 +164,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_channel(channel);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_channel(channel);
|
||||
}
|
||||
@@ -181,11 +181,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
|
||||
void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
@@ -216,35 +216,31 @@ void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -54,7 +54,7 @@ class GlonassL1CaDllPllCAidTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GlonassL1CaDllPllCAidTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -37,20 +37,17 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_tracking.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GlonassL1CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -78,7 +75,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
|
||||
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
@@ -108,7 +105,10 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GlonassL1CaDllPllTracking::~GlonassL1CaDllPllTracking()
|
||||
GlonassL1CaDllPllTracking::~GlonassL1CaDllPllTracking() = default;
|
||||
|
||||
|
||||
void GlonassL1CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "glonass_l1_ca_dll_pll_tracking_cc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -52,7 +52,7 @@ class GlonassL1CaDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GlonassL1CaDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,20 +36,17 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GlonassL2CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -84,7 +81,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_cc = glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -100,7 +97,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
tracking_sc = glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -133,18 +130,21 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
|
||||
}
|
||||
|
||||
|
||||
GlonassL2CaDllPllCAidTracking::~GlonassL2CaDllPllCAidTracking()
|
||||
GlonassL2CaDllPllCAidTracking::~GlonassL2CaDllPllCAidTracking() = default;
|
||||
|
||||
|
||||
void GlonassL2CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GlonassL2CaDllPllCAidTracking::start_tracking()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->start_tracking();
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->start_tracking();
|
||||
}
|
||||
@@ -162,11 +162,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_channel(channel);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_channel(channel);
|
||||
}
|
||||
@@ -179,11 +179,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
|
||||
void GlonassL2CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
@@ -214,35 +214,29 @@ void GlonassL2CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_right_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -52,7 +52,7 @@ class GlonassL2CaDllPllCAidTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GlonassL2CaDllPllCAidTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -35,20 +35,17 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GlonassL2CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -76,7 +73,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
|
||||
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
@@ -106,7 +103,10 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GlonassL2CaDllPllTracking::~GlonassL2CaDllPllTracking()
|
||||
GlonassL2CaDllPllTracking::~GlonassL2CaDllPllTracking() = default;
|
||||
|
||||
|
||||
void GlonassL2CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "glonass_l2_ca_dll_pll_tracking_cc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -51,7 +51,7 @@ class GlonassL2CaDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GlonassL2CaDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -45,12 +45,9 @@
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -85,7 +82,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_cc = gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
@@ -101,7 +98,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
early_late_space_chips);
|
||||
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
tracking_sc = gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
@@ -134,18 +131,21 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaDllPllCAidTracking::~GpsL1CaDllPllCAidTracking()
|
||||
GpsL1CaDllPllCAidTracking::~GpsL1CaDllPllCAidTracking() = default;
|
||||
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::start_tracking()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->start_tracking();
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->start_tracking();
|
||||
}
|
||||
@@ -162,11 +162,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_channel(channel);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_channel(channel);
|
||||
}
|
||||
@@ -178,11 +178,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel)
|
||||
|
||||
void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
tracking_cc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
else if (item_type_ == "cshort")
|
||||
{
|
||||
tracking_sc->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
@@ -210,34 +210,28 @@ void GpsL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_right_block()
|
||||
{
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return tracking_cc;
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return tracking_sc;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
LOG(WARNING) << item_type_ << " unknown tracking item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class GpsL1CaDllPllCAidTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaDllPllCAidTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -35,23 +35,19 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL1CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
tracking_->stop_tracking();
|
||||
}
|
||||
|
||||
GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_param = Dll_Pll_Conf();
|
||||
@@ -136,7 +132,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@@ -159,8 +155,12 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaDllPllTracking::~GpsL1CaDllPllTracking()
|
||||
GpsL1CaDllPllTracking::~GpsL1CaDllPllTracking() = default;
|
||||
|
||||
|
||||
void GpsL1CaDllPllTracking::stop_tracking()
|
||||
{
|
||||
tracking_->stop_tracking();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -51,7 +51,7 @@ class GpsL1CaDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <glog/logging.h>
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "gps_l1_ca_dll_pll_tracking_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#define NUM_PRNs 32
|
||||
|
||||
@@ -53,7 +53,7 @@ void GpsL1CaDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga();
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_FPGA_H_
|
||||
|
||||
#include <string>
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking_fpga.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -53,7 +53,7 @@ class GpsL1CaDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
|
||||
#include "gps_l1_ca_dll_pll_tracking_gpu.h"
|
||||
#include <glog/logging.h>
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_GPU_H_
|
||||
|
||||
#include <string>
|
||||
#include "tracking_interface.h"
|
||||
#include "gps_l1_ca_dll_pll_tracking_gpu_cc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
@@ -39,20 +39,17 @@
|
||||
|
||||
|
||||
#include "gps_l1_ca_kf_tracking.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL1CaKfTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -93,7 +90,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
bce_kappa = configuration->property(role + ".bce_kappa", 0);
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = gps_l1_ca_kf_make_tracking_cc(
|
||||
@@ -121,7 +118,10 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaKfTracking::~GpsL1CaKfTracking()
|
||||
GpsL1CaKfTracking::~GpsL1CaKfTracking() = default;
|
||||
|
||||
|
||||
void GpsL1CaKfTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class GpsL1CaKfTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaKfTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,20 +36,18 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_tcp_connector_tracking.h"
|
||||
#include <glog/logging.h>
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL1CaTcpConnectorTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
DLOG(INFO) << "role " << role;
|
||||
//################# CONFIGURATION PARAMETERS ########################
|
||||
@@ -73,7 +71,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
|
||||
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
@@ -103,7 +101,10 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaTcpConnectorTracking::~GpsL1CaTcpConnectorTracking()
|
||||
GpsL1CaTcpConnectorTracking::~GpsL1CaTcpConnectorTracking() = default;
|
||||
|
||||
|
||||
void GpsL1CaTcpConnectorTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_TCP_CONNECTOR_TRACKING_H_
|
||||
|
||||
#include <string>
|
||||
#include "tracking_interface.h"
|
||||
#include "gps_l1_ca_tcp_connector_tracking_cc.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -52,7 +52,7 @@ class GpsL1CaTcpConnectorTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaTcpConnectorTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -34,23 +34,20 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gps_l2_m_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL2MDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_param = Dll_Pll_Conf();
|
||||
@@ -112,7 +109,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@@ -135,11 +132,13 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL2MDllPllTracking::~GpsL2MDllPllTracking()
|
||||
GpsL2MDllPllTracking::~GpsL2MDllPllTracking() = default;
|
||||
|
||||
|
||||
void GpsL2MDllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL2MDllPllTracking::start_tracking()
|
||||
{
|
||||
tracking_->start_tracking();
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#ifndef GNSS_SDR_gps_l2_m_dll_pll_tracking_H_
|
||||
#define GNSS_SDR_gps_l2_m_dll_pll_tracking_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -51,7 +51,7 @@ class GpsL2MDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL2MDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
|
||||
|
||||
#include "gps_l2_m_dll_pll_tracking_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#define NUM_PRNs 32
|
||||
@@ -52,7 +52,7 @@ void GpsL2MDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//dllpllconf_t trk_param;
|
||||
@@ -125,7 +125,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
|
||||
//d_tracking_code = static_cast<float *>(volk_gnsssdr_malloc(2 * static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * NUM_PRNs * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
float* ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto* ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
d_ca_codes = static_cast<int*>(volk_gnsssdr_malloc(static_cast<int>(GPS_L2_M_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int), volk_gnsssdr_get_alignment()));
|
||||
@@ -167,9 +167,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
}
|
||||
|
||||
|
||||
GpsL2MDllPllTrackingFpga::~GpsL2MDllPllTrackingFpga()
|
||||
{
|
||||
}
|
||||
GpsL2MDllPllTrackingFpga::~GpsL2MDllPllTrackingFpga() = default;
|
||||
|
||||
|
||||
void GpsL2MDllPllTrackingFpga::start_tracking()
|
||||
|
||||
@@ -52,7 +52,7 @@ class GpsL2MDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL2MDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -34,23 +34,20 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gps_l5_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
void GpsL5DllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
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_param = Dll_Pll_Conf();
|
||||
@@ -131,7 +128,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@@ -154,7 +151,10 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL5DllPllTracking::~GpsL5DllPllTracking()
|
||||
GpsL5DllPllTracking::~GpsL5DllPllTracking() = default;
|
||||
|
||||
|
||||
void GpsL5DllPllTracking::stop_tracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -50,7 +50,7 @@ class GpsL5DllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL5DllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
|
||||
|
||||
#include "gps_l5_dll_pll_tracking_fpga.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
#define NUM_PRNs 32
|
||||
@@ -52,7 +52,7 @@ void GpsL5DllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
ConfigurationInterface *configuration, std::string role,
|
||||
ConfigurationInterface *configuration, const std::string &role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//printf("L5 TRK CLASS CREATED\n");
|
||||
@@ -136,7 +136,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
|
||||
//################# PRE-COMPUTE ALL THE CODES #################
|
||||
unsigned int code_samples_per_chip = 1;
|
||||
unsigned int code_length_chips = static_cast<unsigned int>(GPS_L5i_CODE_LENGTH_CHIPS);
|
||||
auto code_length_chips = static_cast<unsigned int>(GPS_L5i_CODE_LENGTH_CHIPS);
|
||||
//printf("TRK code_length_chips = %d\n", code_length_chips);
|
||||
|
||||
float *tracking_code;
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#ifndef GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_FPGA_H_
|
||||
#define GNSS_SDR_GPS_L5_DLL_PLL_TRACKING_FPGA_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking_fpga.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -50,7 +50,7 @@ class GpsL5DllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL5DllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
208
src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc
Executable file → Normal file
208
src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc
Executable file → Normal file
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* \file dll_pll_veml_tracking.cc
|
||||
* \brief Implementation of a code DLL + carrier PLL tracking block.
|
||||
* \author Javier Arribas, 2018. jarribas(at)cttc.es
|
||||
* \author Antonio Ramos, 2018 antonio.ramosdet(at)gmail.com
|
||||
* Javier Arribas, 2018. jarribas(at)cttc.es
|
||||
*
|
||||
* Code DLL + carrier PLL according to the algorithms described in:
|
||||
* [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
|
||||
@@ -35,23 +35,23 @@
|
||||
*/
|
||||
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "beidou_b1i_signal_processing.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@@ -60,9 +60,8 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <numeric>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -117,7 +116,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
if (trk_parameters.system == 'G')
|
||||
{
|
||||
systemName = "GPS";
|
||||
if (signal_type.compare("1C") == 0)
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L1_FREQ_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD;
|
||||
@@ -137,11 +136,11 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
// preamble bits to sampled symbols
|
||||
d_gps_l1ca_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
for (int32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++)
|
||||
for (uint16_t preambles_bit : preambles_bits)
|
||||
{
|
||||
for (uint32_t j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++)
|
||||
{
|
||||
if (preambles_bits[i] == 1)
|
||||
if (preambles_bit == 1)
|
||||
{
|
||||
d_gps_l1ca_preambles_symbols[n] = 1;
|
||||
}
|
||||
@@ -155,7 +154,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); // Change fixed buffer size
|
||||
d_symbol_history.clear(); // Clear all the elements in the buffer
|
||||
}
|
||||
else if (signal_type.compare("2S") == 0)
|
||||
else if (signal_type == "2S")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L2_FREQ_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD;
|
||||
@@ -169,7 +168,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
}
|
||||
else if (signal_type.compare("L5") == 0)
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5i_PERIOD;
|
||||
@@ -211,7 +210,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (trk_parameters.system == 'E')
|
||||
{
|
||||
systemName = "Galileo";
|
||||
if (signal_type.compare("1B") == 0)
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E1_FREQ_HZ;
|
||||
d_code_period = Galileo_E1_CODE_PERIOD;
|
||||
@@ -235,7 +234,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
}
|
||||
interchange_iq = false; // Note that E1-B and E1-C are in anti-phase, NOT IN QUADRATURE. See Galileo ICD.
|
||||
}
|
||||
else if (signal_type.compare("5X") == 0)
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5a_CODE_PERIOD;
|
||||
@@ -277,7 +276,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
else if (trk_parameters.system == 'C')
|
||||
{
|
||||
systemName = "Beidou";
|
||||
if (signal_type.compare("B1") == 0)
|
||||
if (signal_type == "B1")
|
||||
{
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
@@ -327,10 +326,10 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
K_blk_samples = 0.0;
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz);
|
||||
d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz);
|
||||
d_code_loop_filter = Tracking_2nd_DLL_filter(static_cast<float>(d_code_period));
|
||||
d_carrier_loop_filter = Tracking_2nd_PLL_filter(static_cast<float>(d_code_period));
|
||||
d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz);
|
||||
d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz);
|
||||
|
||||
// Initialization of local code replica
|
||||
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
|
||||
@@ -440,7 +439,6 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_carrier_phase_step_rad = 0.0;
|
||||
d_carrier_phase_rate_step_rad = 0.0;
|
||||
d_rem_code_phase_chips = 0.0;
|
||||
d_code_phase_samples = 0.0;
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
d_state = 0; // initial state: standby
|
||||
clear_tracking_vars();
|
||||
@@ -462,10 +460,10 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_dump_filename = trk_parameters.dump_filename;
|
||||
std::string dump_path;
|
||||
// Get path
|
||||
if (d_dump_filename.find_last_of("/") != std::string::npos)
|
||||
if (d_dump_filename.find_last_of('/') != std::string::npos)
|
||||
{
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/"));
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
||||
d_dump_filename = dump_filename_;
|
||||
}
|
||||
else
|
||||
@@ -477,9 +475,9 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
|
||||
d_dump_filename = "trk_channel_";
|
||||
}
|
||||
// remove extension if any
|
||||
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos)
|
||||
if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
|
||||
{
|
||||
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of("."));
|
||||
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
|
||||
}
|
||||
|
||||
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;
|
||||
@@ -502,36 +500,6 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_acq_carrier_doppler_hz = d_acquisition_gnss_synchro->Acq_doppler_hz;
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
|
||||
int64_t acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
|
||||
double acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples;
|
||||
DLOG(INFO) << "Number of seconds between Acquisition and Tracking = " << acq_trk_diff_seconds;
|
||||
// Doppler effect Fd = (C / (C + Vr)) * F
|
||||
double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq;
|
||||
// new chip and PRN sequence periods based on acq Doppler
|
||||
d_code_freq_chips = radial_velocity * d_code_chip_rate;
|
||||
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
|
||||
d_code_phase_rate_step_chips = 0.0;
|
||||
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
double T_prn_mod_seconds = T_chip_mod_seconds * static_cast<double>(d_code_length_chips);
|
||||
double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in;
|
||||
|
||||
//d_current_prn_length_samples = std::round(T_prn_mod_samples);
|
||||
d_current_prn_length_samples = std::floor(T_prn_mod_samples);
|
||||
|
||||
double T_prn_true_seconds = static_cast<double>(d_code_length_chips) / d_code_chip_rate;
|
||||
double T_prn_true_samples = T_prn_true_seconds * trk_parameters.fs_in;
|
||||
double T_prn_diff_seconds = T_prn_true_seconds - T_prn_mod_seconds;
|
||||
double N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
double corrected_acq_phase_samples = std::fmod(d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * trk_parameters.fs_in, T_prn_true_samples);
|
||||
if (corrected_acq_phase_samples < 0.0)
|
||||
{
|
||||
corrected_acq_phase_samples += T_prn_mod_samples;
|
||||
}
|
||||
double delay_correction_samples = d_acq_code_phase_samples - corrected_acq_phase_samples;
|
||||
|
||||
d_acq_code_phase_samples = corrected_acq_phase_samples;
|
||||
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
||||
d_carrier_phase_step_rad = PI_2 * d_carrier_doppler_hz / trk_parameters.fs_in;
|
||||
d_carrier_phase_rate_step_rad = 0.0;
|
||||
@@ -541,15 +509,15 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_carrier_loop_filter.initialize(); // initialize the carrier filter
|
||||
d_code_loop_filter.initialize(); // initialize the code filter
|
||||
|
||||
if (systemName.compare("GPS") == 0 and signal_type.compare("1C") == 0)
|
||||
if (systemName == "GPS" and signal_type == "1C")
|
||||
{
|
||||
gps_l1_ca_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
|
||||
}
|
||||
else if (systemName.compare("GPS") == 0 and signal_type.compare("2S") == 0)
|
||||
else if (systemName == "GPS" and signal_type == "2S")
|
||||
{
|
||||
gps_l2c_m_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN);
|
||||
}
|
||||
else if (systemName.compare("GPS") == 0 and signal_type.compare("L5") == 0)
|
||||
else if (systemName == "GPS" and signal_type == "L5")
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -563,7 +531,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
gps_l5i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN);
|
||||
}
|
||||
}
|
||||
else if (systemName.compare("Galileo") == 0 and signal_type.compare("1B") == 0)
|
||||
else if (systemName == "Galileo" and signal_type == "1B")
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -578,9 +546,9 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
galileo_e1_code_gen_sinboc11_float(d_tracking_code, d_acquisition_gnss_synchro->Signal, d_acquisition_gnss_synchro->PRN);
|
||||
}
|
||||
}
|
||||
else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0)
|
||||
else if (systemName == "Galileo" and signal_type == "5X")
|
||||
{
|
||||
gr_complex *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * d_code_length_chips, volk_gnsssdr_get_alignment()));
|
||||
auto *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * d_code_length_chips, volk_gnsssdr_get_alignment()));
|
||||
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -602,7 +570,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
}
|
||||
volk_gnsssdr_free(aux_code);
|
||||
}
|
||||
else if (systemName.compare("Beidou") == 0 and signal_type.compare("B1") == 0)
|
||||
else if (systemName == "Beidou" and signal_type == "B1")
|
||||
{
|
||||
beidou_b1i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
|
||||
}
|
||||
@@ -632,7 +600,6 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_local_code_shift_chips[2] = trk_parameters.early_late_space_chips * static_cast<float>(d_code_samples_per_chip);
|
||||
}
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
d_code_loop_filter.set_DLL_BW(trk_parameters.dll_bw_hz);
|
||||
d_carrier_loop_filter.set_PLL_BW(trk_parameters.pll_bw_hz);
|
||||
d_carrier_loop_filter.set_pdi(static_cast<float>(d_code_period));
|
||||
@@ -640,22 +607,19 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of " << systemName << " " << signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
|
||||
LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
|
||||
DLOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
|
||||
|
||||
// enable tracking pull-in
|
||||
d_state = 1;
|
||||
d_cloop = true;
|
||||
d_Prompt_buffer_deque.clear();
|
||||
d_last_prompt = gr_complex(0.0, 0.0);
|
||||
LOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
|
||||
<< ". Code Phase correction [samples] = " << delay_correction_samples
|
||||
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
|
||||
}
|
||||
|
||||
|
||||
dll_pll_veml_tracking::~dll_pll_veml_tracking()
|
||||
{
|
||||
if (signal_type.compare("1C") == 0)
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
volk_gnsssdr_free(d_gps_l1ca_preambles_symbols);
|
||||
}
|
||||
@@ -730,17 +694,14 @@ bool dll_pll_veml_tracking::acquire_secondary()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_time_s)
|
||||
{
|
||||
// ####### CN0 ESTIMATION AND LOCK DETECTORS ######
|
||||
|
||||
if (d_cn0_estimation_counter < trk_parameters.cn0_samples)
|
||||
{
|
||||
// fill buffer with prompt correlator output values
|
||||
@@ -748,8 +709,6 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
|
||||
d_cn0_estimation_counter++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_cn0_estimation_counter = 0;
|
||||
// Code lock indicator
|
||||
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, trk_parameters.cn0_samples, coh_integration_time_s);
|
||||
@@ -772,11 +731,7 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
|
||||
d_carrier_lock_fail_counter = 0;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1159,28 +1114,28 @@ int32_t dll_pll_veml_tracking::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_VE = new float[num_epoch];
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *carrier_doppler_rate_hz = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
float *code_freq_rate_chips = new float[num_epoch];
|
||||
float *carr_error_hz = new float[num_epoch];
|
||||
float *carr_error_filt_hz = new float[num_epoch];
|
||||
float *code_error_chips = new float[num_epoch];
|
||||
float *code_error_filt_chips = new float[num_epoch];
|
||||
float *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
float *carrier_lock_test = new float[num_epoch];
|
||||
float *aux1 = new float[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_VE = new float[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *abs_VL = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new float[num_epoch];
|
||||
auto *carrier_doppler_hz = new float[num_epoch];
|
||||
auto *carrier_doppler_rate_hz = new float[num_epoch];
|
||||
auto *code_freq_chips = new float[num_epoch];
|
||||
auto *code_freq_rate_chips = new float[num_epoch];
|
||||
auto *carr_error_hz = new float[num_epoch];
|
||||
auto *carr_error_filt_hz = new float[num_epoch];
|
||||
auto *code_error_chips = new float[num_epoch];
|
||||
auto *code_error_filt_chips = new float[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
auto *carrier_lock_test = new float[num_epoch];
|
||||
auto *aux1 = new float[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1248,8 +1203,8 @@ int32_t dll_pll_veml_tracking::save_matfile()
|
||||
std::string filename = dump_filename_;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0);
|
||||
@@ -1417,8 +1372,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
gr::thread::scoped_lock l(d_setlock);
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
||||
switch (d_state)
|
||||
@@ -1433,16 +1388,33 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
case 1: // Pull-in
|
||||
{
|
||||
// Signal alignment (skip samples until the incoming signal is aligned with local replica)
|
||||
uint64_t acq_to_trk_delay_samples = static_cast<uint64_t>(d_sample_counter - d_acq_sample_stamp);
|
||||
double acq_trk_shif_correction_samples = static_cast<double>(d_current_prn_length_samples) - std::fmod(static_cast<double>(acq_to_trk_delay_samples), static_cast<double>(d_current_prn_length_samples));
|
||||
int32_t samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
if (samples_offset < 0)
|
||||
{
|
||||
samples_offset = 0;
|
||||
}
|
||||
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * d_acq_code_phase_samples;
|
||||
int64_t acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
|
||||
double acq_trk_diff_seconds = static_cast<double>(acq_trk_diff_samples) / trk_parameters.fs_in;
|
||||
double delta_trk_to_acq_prn_start_samples = static_cast<double>(acq_trk_diff_samples) - d_acq_code_phase_samples;
|
||||
|
||||
// Doppler effect Fd = (C / (C + Vr)) * F
|
||||
double radial_velocity = (d_signal_carrier_freq + d_acq_carrier_doppler_hz) / d_signal_carrier_freq;
|
||||
// new chip and PRN sequence periods based on acq Doppler
|
||||
d_code_freq_chips = radial_velocity * d_code_chip_rate;
|
||||
d_code_freq_chips = d_code_chip_rate;
|
||||
d_code_phase_step_chips = d_code_freq_chips / trk_parameters.fs_in;
|
||||
d_code_phase_rate_step_chips = 0.0;
|
||||
double T_chip_mod_seconds = 1.0 / d_code_freq_chips;
|
||||
double T_prn_mod_seconds = T_chip_mod_seconds * static_cast<double>(d_code_length_chips);
|
||||
double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in;
|
||||
|
||||
d_acq_code_phase_samples = T_prn_mod_samples - std::fmod(delta_trk_to_acq_prn_start_samples, T_prn_mod_samples);
|
||||
d_current_prn_length_samples = round(T_prn_mod_samples);
|
||||
|
||||
int32_t samples_offset = round(d_acq_code_phase_samples);
|
||||
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * static_cast<double>(samples_offset);
|
||||
d_state = 2;
|
||||
d_sample_counter += static_cast<uint64_t>(samples_offset); // count for the processed samples
|
||||
d_sample_counter += samples_offset; // count for the processed samples
|
||||
|
||||
DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)";
|
||||
DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
|
||||
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
|
||||
|
||||
consume_each(samples_offset); // shift input to perform alignment with local replica
|
||||
return 0;
|
||||
}
|
||||
|
||||
8
src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h
Executable file → Normal file
8
src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h
Executable file → Normal file
@@ -1,6 +1,7 @@
|
||||
/*!
|
||||
* \file dll_pll_veml_tracking.h
|
||||
* \brief Implementation of a code DLL + carrier PLL tracking block.
|
||||
* \author Javier Arribas, 2018. jarribas(at)cttc.es
|
||||
* \author Antonio Ramos, 2018 antonio.ramosdet(at)gmail.com
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
@@ -31,18 +32,18 @@
|
||||
#ifndef GNSS_SDR_DLL_PLL_VEML_TRACKING_H
|
||||
#define GNSS_SDR_DLL_PLL_VEML_TRACKING_H
|
||||
|
||||
#include "cpu_multicorrelator_real_codes.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "cpu_multicorrelator_real_codes.h"
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
|
||||
class dll_pll_veml_tracking;
|
||||
|
||||
@@ -173,7 +174,6 @@ private:
|
||||
double d_carrier_doppler_hz;
|
||||
double d_acc_carrier_phase_rad;
|
||||
double d_rem_code_phase_chips;
|
||||
double d_code_phase_samples;
|
||||
double T_chip_seconds;
|
||||
double T_prn_seconds;
|
||||
double T_prn_samples;
|
||||
|
||||
@@ -36,18 +36,18 @@
|
||||
*/
|
||||
|
||||
#include "dll_pll_veml_tracking_fpga.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@@ -103,7 +103,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
if (trk_parameters.system == 'G')
|
||||
{
|
||||
systemName = "GPS";
|
||||
if (signal_type.compare("1C") == 0)
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L1_FREQ_HZ;
|
||||
d_code_period = GPS_L1_CA_CODE_PERIOD;
|
||||
@@ -124,11 +124,11 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
// preamble bits to sampled symbols
|
||||
d_gps_l1ca_preambles_symbols = static_cast<int32_t *>(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
int32_t n = 0;
|
||||
for (int32_t i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++)
|
||||
for (unsigned short preambles_bit : preambles_bits)
|
||||
{
|
||||
for (uint32_t j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++)
|
||||
{
|
||||
if (preambles_bits[i] == 1)
|
||||
if (preambles_bit == 1)
|
||||
{
|
||||
d_gps_l1ca_preambles_symbols[n] = 1;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); // Change fixed buffer size
|
||||
d_symbol_history.clear(); // Clear all the elements in the buffer
|
||||
}
|
||||
else if (signal_type.compare("2S") == 0)
|
||||
else if (signal_type == "2S")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L2_FREQ_HZ;
|
||||
d_code_period = GPS_L2_M_PERIOD;
|
||||
@@ -156,7 +156,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
}
|
||||
else if (signal_type.compare("L5") == 0)
|
||||
else if (signal_type == "L5")
|
||||
{
|
||||
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
|
||||
d_code_period = GPS_L5i_PERIOD;
|
||||
@@ -199,7 +199,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
else if (trk_parameters.system == 'E')
|
||||
{
|
||||
systemName = "Galileo";
|
||||
if (signal_type.compare("1B") == 0)
|
||||
if (signal_type == "1B")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E1_FREQ_HZ;
|
||||
d_code_period = Galileo_E1_CODE_PERIOD;
|
||||
@@ -223,7 +223,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
}
|
||||
interchange_iq = false; // Note that E1-B and E1-C are in anti-phase, NOT IN QUADRATURE. See Galileo ICD.
|
||||
}
|
||||
else if (signal_type.compare("5X") == 0)
|
||||
else if (signal_type == "5X")
|
||||
{
|
||||
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ;
|
||||
d_code_period = GALILEO_E5a_CODE_PERIOD;
|
||||
@@ -428,10 +428,10 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
{
|
||||
d_dump_filename = trk_parameters.dump_filename;
|
||||
std::string dump_path;
|
||||
if (d_dump_filename.find_last_of("/") != std::string::npos)
|
||||
if (d_dump_filename.find_last_of('/') != std::string::npos)
|
||||
{
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/"));
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
||||
d_dump_filename = dump_filename_;
|
||||
}
|
||||
else
|
||||
@@ -443,9 +443,9 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
|
||||
d_dump_filename = "trk_channel_";
|
||||
}
|
||||
// remove extension if any
|
||||
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos)
|
||||
if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
|
||||
{
|
||||
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of("."));
|
||||
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
|
||||
}
|
||||
|
||||
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;
|
||||
@@ -501,15 +501,15 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
d_carrier_loop_filter.initialize(); // initialize the carrier filter
|
||||
d_code_loop_filter.initialize(); // initialize the code filter
|
||||
|
||||
if (systemName.compare("GPS") == 0 and signal_type.compare("1C") == 0)
|
||||
if (systemName == "GPS" and signal_type == "1C")
|
||||
{
|
||||
// nothing to compute : the local codes are pre-computed in the adapter class
|
||||
}
|
||||
else if (systemName.compare("GPS") == 0 and signal_type.compare("2S") == 0)
|
||||
else if (systemName == "GPS" and signal_type == "2S")
|
||||
{
|
||||
// nothing to compute : the local codes are pre-computed in the adapter class
|
||||
}
|
||||
else if (systemName.compare("GPS") == 0 and signal_type.compare("L5") == 0)
|
||||
else if (systemName == "GPS" and signal_type == "L5")
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -520,7 +520,7 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
// nothing to compute : the local codes are pre-computed in the adapter class
|
||||
}
|
||||
}
|
||||
else if (systemName.compare("Galileo") == 0 and signal_type.compare("1B") == 0)
|
||||
else if (systemName == "Galileo" and signal_type == "1B")
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -533,7 +533,7 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
// nothing to compute : the local codes are pre-computed in the adapter class
|
||||
}
|
||||
}
|
||||
else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0)
|
||||
else if (systemName == "Galileo" and signal_type == "5X")
|
||||
{
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@@ -604,7 +604,7 @@ void dll_pll_veml_tracking_fpga::start_tracking()
|
||||
|
||||
dll_pll_veml_tracking_fpga::~dll_pll_veml_tracking_fpga()
|
||||
{
|
||||
if (signal_type.compare("1C") == 0)
|
||||
if (signal_type == "1C")
|
||||
{
|
||||
volk_gnsssdr_free(d_gps_l1ca_preambles_symbols);
|
||||
}
|
||||
@@ -1025,26 +1025,26 @@ int32_t dll_pll_veml_tracking_fpga::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_VE = new float[num_epoch];
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
float *carr_error_hz = new float[num_epoch];
|
||||
float *carr_error_filt_hz = new float[num_epoch];
|
||||
float *code_error_chips = new float[num_epoch];
|
||||
float *code_error_filt_chips = new float[num_epoch];
|
||||
float *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
float *carrier_lock_test = new float[num_epoch];
|
||||
float *aux1 = new float[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_VE = new float[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *abs_VL = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new float[num_epoch];
|
||||
auto *carrier_doppler_hz = new float[num_epoch];
|
||||
auto *code_freq_chips = new float[num_epoch];
|
||||
auto *carr_error_hz = new float[num_epoch];
|
||||
auto *carr_error_filt_hz = new float[num_epoch];
|
||||
auto *code_error_chips = new float[num_epoch];
|
||||
auto *code_error_filt_chips = new float[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
auto *carrier_lock_test = new float[num_epoch];
|
||||
auto *aux1 = new float[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1108,8 +1108,8 @@ int32_t dll_pll_veml_tracking_fpga::save_matfile()
|
||||
std::string filename = dump_filename_;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0);
|
||||
@@ -1264,7 +1264,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
{
|
||||
gr::thread::scoped_lock l(d_setlock);
|
||||
// Block input data and block output stream pointers
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -1297,7 +1297,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
|
||||
//printf("333333 d_correlation_length_samples = %d\n", d_correlation_length_samples);
|
||||
uint32_t num_frames = ceil((counter_value - current_synchro_data.Acq_samplestamp_samples - current_synchro_data.Acq_delay_samples) / d_correlation_length_samples);
|
||||
//printf("333333 num_frames = %d\n", num_frames);
|
||||
uint64_t absolute_samples_offset = static_cast<uint64_t>(current_synchro_data.Acq_delay_samples + current_synchro_data.Acq_samplestamp_samples + num_frames * d_correlation_length_samples);
|
||||
auto absolute_samples_offset = static_cast<uint64_t>(current_synchro_data.Acq_delay_samples + current_synchro_data.Acq_samplestamp_samples + num_frames * d_correlation_length_samples);
|
||||
//printf("333333 absolute_samples_offset = %llu\n", absolute_samples_offset);
|
||||
multicorrelator_fpga->set_initial_sample(absolute_samples_offset);
|
||||
d_absolute_samples_offset = absolute_samples_offset;
|
||||
|
||||
@@ -40,17 +40,16 @@
|
||||
#define GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H
|
||||
|
||||
#include "dll_pll_conf_fpga.h"
|
||||
#include "fpga_multicorrelator.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "fpga_multicorrelator.h"
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include "fpga_multicorrelator.h"
|
||||
#include <string>
|
||||
|
||||
class dll_pll_veml_tracking_fpga;
|
||||
|
||||
|
||||
@@ -37,24 +37,25 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e1_tcp_connector_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -63,7 +64,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking
|
||||
int64_t fs_in,
|
||||
uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float pll_bw_hz,
|
||||
float dll_bw_hz,
|
||||
float early_late_space_chips,
|
||||
@@ -89,7 +90,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
int64_t fs_in,
|
||||
uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float pll_bw_hz __attribute__((unused)),
|
||||
float dll_bw_hz __attribute__((unused)),
|
||||
float early_late_space_chips,
|
||||
@@ -103,7 +104,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
//--- DLL variables --------------------------------------------------------
|
||||
@@ -172,7 +173,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
d_carrier_lock_threshold = FLAGS_carrier_lock_th;
|
||||
systemName["E"] = std::string("Galileo");
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_next_rem_code_phase_samples = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
@@ -525,7 +526,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = 0.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
@@ -543,8 +544,6 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
#ifndef GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
|
||||
#define GNSS_SDR_GALILEO_E1_TCP_CONNECTOR_TRACKING_CC_H
|
||||
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tcp_communication.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <volk/volk.h>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <gnuradio/block.h>
|
||||
#include <volk/volk.h>
|
||||
#include "gnss_synchro.h"
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include "tcp_communication.h"
|
||||
|
||||
|
||||
class Galileo_E1_Tcp_Connector_Tracking_cc;
|
||||
@@ -57,7 +57,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr
|
||||
galileo_e1_tcp_connector_make_tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float pll_bw_hz,
|
||||
float dll_bw_hz,
|
||||
float early_late_space_chips,
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
galileo_e1_tcp_connector_make_tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float pll_bw_hz,
|
||||
float dll_bw_hz,
|
||||
float early_late_space_chips,
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
Galileo_E1_Tcp_Connector_Tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float pll_bw_hz,
|
||||
float dll_bw_hz,
|
||||
float early_late_space_chips,
|
||||
|
||||
@@ -37,23 +37,23 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
@@ -74,7 +74,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -125,7 +125,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -185,7 +185,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -379,24 +379,24 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -456,8 +456,8 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -566,15 +566,15 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what() << std::endl;
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -591,8 +591,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -907,15 +907,15 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
class glonass_l1_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
@@ -37,22 +37,22 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
@@ -72,7 +72,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -183,7 +183,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -333,24 +333,24 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -410,8 +410,8 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -557,15 +557,15 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what() << std::endl;
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -582,8 +582,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -896,15 +896,15 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_FLL_PLL_filter.h"
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
@@ -37,21 +37,21 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l1_ca_dll_pll_tracking_cc.h"
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "glonass_l1_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
@@ -68,7 +68,7 @@ glonass_l1_ca_dll_pll_make_tracking_cc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l1_ca_dll_pll_tracking_cc_sptr(new Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_current_prn_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
@@ -154,7 +154,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
|
||||
systemName["R"] = std::string("Glonass");
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -331,24 +331,24 @@ int32_t Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -408,8 +408,8 @@ int32_t Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -518,7 +518,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
@@ -549,8 +549,8 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -749,7 +749,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_rem_code_phase_samples;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GLONASS_L1_CA_DLL_PLL_TRACKING_CC_H
|
||||
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -35,23 +35,23 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
|
||||
@@ -71,7 +71,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_cc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -182,7 +182,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -376,24 +376,24 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -453,8 +453,8 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -563,15 +563,15 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what() << std::endl;
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -588,8 +588,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -904,15 +904,15 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
class glonass_l2_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
@@ -35,22 +35,22 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
|
||||
@@ -70,7 +70,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_sc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -182,7 +182,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -332,24 +332,24 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -409,8 +409,8 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -556,15 +556,15 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what() << std::endl;
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -581,8 +581,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -895,15 +895,15 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_FLL_PLL_filter.h"
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
@@ -37,21 +37,21 @@
|
||||
*/
|
||||
|
||||
#include "glonass_l2_ca_dll_pll_tracking_cc.h"
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "glonass_l2_signal_processing.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
|
||||
@@ -68,7 +68,7 @@ glonass_l2_ca_dll_pll_make_tracking_cc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return glonass_l2_ca_dll_pll_tracking_cc_sptr(new Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_current_prn_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
@@ -154,7 +154,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc(
|
||||
|
||||
systemName["R"] = std::string("Glonass");
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -331,24 +331,24 @@ int32_t Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -408,8 +408,8 @@ int32_t Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -518,7 +518,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
@@ -549,8 +549,8 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -749,7 +749,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_rem_code_phase_samples;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
#ifndef GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H
|
||||
#define GNSS_SDR_GLONASS_L2_CA_DLL_PLL_TRACKING_CC_H
|
||||
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
@@ -29,22 +29,22 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_cc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -63,7 +63,7 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -175,7 +175,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc(
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -358,24 +358,24 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -435,8 +435,8 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -545,15 +545,15 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what() << std::endl;
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -570,8 +570,8 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -885,15 +885,15 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -904,8 +904,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#include "cpu_multicorrelator.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
class gps_l1_ca_dll_pll_c_aid_tracking_cc;
|
||||
|
||||
@@ -29,22 +29,22 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking_sc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -63,7 +63,7 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
|
||||
float early_late_space_chips)
|
||||
{
|
||||
return gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr(new gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips));
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pmt_t
|
||||
DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN);
|
||||
if (d_enable_extended_integration == false) //avoid re-setting preamble indicator
|
||||
{
|
||||
d_preamble_timestamp_s = pmt::to_double(msg);
|
||||
d_preamble_timestamp_s = pmt::to_double(std::move(msg));
|
||||
d_enable_extended_integration = true;
|
||||
d_preamble_synchronized = false;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
d_correlation_length_samples = static_cast<int32_t>(d_vector_length);
|
||||
|
||||
// Initialize tracking ==========================================
|
||||
@@ -175,7 +175,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc(
|
||||
|
||||
set_relative_rate(1.0 / static_cast<double>(d_vector_length));
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -360,24 +360,24 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -437,8 +437,8 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_E", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_E, 0);
|
||||
@@ -547,15 +547,15 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str();
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e->what();
|
||||
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -572,8 +572,8 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); //PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); //PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@@ -886,15 +886,15 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
|
||||
}
|
||||
catch (const std::ifstream::failure *e)
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e->what();
|
||||
LOG(WARNING) << "Exception writing trk dump file " << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -905,8 +905,6 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_C_AID_TRACKING_SC_H
|
||||
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_FLL_PLL_filter.h"
|
||||
#include "cpu_multicorrelator_16sc.h"
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <gnuradio/block.h>
|
||||
|
||||
@@ -29,17 +29,17 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_dll_pll_tracking_gpu_cc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <cuda_profiler_api.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <cmath>
|
||||
#include <cuda_profiler_api.h>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
@@ -38,21 +38,21 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_kf_tracking_cc.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <matio.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -74,7 +74,7 @@ gps_l1_ca_kf_make_tracking_cc(
|
||||
int32_t bce_kappa)
|
||||
{
|
||||
return gps_l1_ca_kf_tracking_cc_sptr(new Gps_L1_Ca_Kf_Tracking_cc(order, if_freq,
|
||||
fs_in, vector_length, dump, dump_filename, dll_bw_hz, early_late_space_chips,
|
||||
fs_in, vector_length, dump, std::move(dump_filename), dll_bw_hz, early_late_space_chips,
|
||||
bce_run, bce_ptrans, bce_strans, bce_nu, bce_kappa));
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
d_if_freq = if_freq;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_current_prn_length_samples = static_cast<int>(d_vector_length);
|
||||
|
||||
@@ -172,7 +172,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc(
|
||||
systemName["G"] = std::string("GPS");
|
||||
systemName["S"] = std::string("SBAS");
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
@@ -427,28 +427,28 @@ int32_t Gps_L1_Ca_Kf_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_VE = new float[num_epoch];
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *carrier_dopplerrate_hz2 = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
float *carr_error_hz = new float[num_epoch];
|
||||
float *carr_noise_sigma2 = new float[num_epoch];
|
||||
float *carr_error_filt_hz = new float[num_epoch];
|
||||
float *code_error_chips = new float[num_epoch];
|
||||
float *code_error_filt_chips = new float[num_epoch];
|
||||
float *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
float *carrier_lock_test = new float[num_epoch];
|
||||
float *aux1 = new float[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_VE = new float[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *abs_VL = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new float[num_epoch];
|
||||
auto *carrier_doppler_hz = new float[num_epoch];
|
||||
auto *carrier_dopplerrate_hz2 = new float[num_epoch];
|
||||
auto *code_freq_chips = new float[num_epoch];
|
||||
auto *carr_error_hz = new float[num_epoch];
|
||||
auto *carr_noise_sigma2 = new float[num_epoch];
|
||||
auto *carr_error_filt_hz = new float[num_epoch];
|
||||
auto *code_error_chips = new float[num_epoch];
|
||||
auto *code_error_filt_chips = new float[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
auto *carrier_lock_test = new float[num_epoch];
|
||||
auto *aux1 = new float[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -516,8 +516,8 @@ int32_t Gps_L1_Ca_Kf_Tracking_cc::save_matfile()
|
||||
std::string filename = d_dump_filename;
|
||||
filename.erase(filename.length() - 4, 4);
|
||||
filename.append(".mat");
|
||||
matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<long *>(matfp) != NULL)
|
||||
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
|
||||
if (reinterpret_cast<int64_t *>(matfp) != nullptr)
|
||||
{
|
||||
size_t dims[2] = {1, static_cast<size_t>(num_epoch)};
|
||||
matvar = Mat_VarCreate("abs_VE", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, abs_VE, 0);
|
||||
@@ -647,7 +647,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::set_channel(uint32_t channel)
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
@@ -677,8 +677,8 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H
|
||||
#define GNSS_SDR_GPS_L1_CA_KF_TRACKING_CC_H
|
||||
|
||||
#include "bayesian_estimation.h"
|
||||
#include "cpu_multicorrelator_real_codes.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "tracking_2nd_DLL_filter.h"
|
||||
#include "tracking_2nd_PLL_filter.h"
|
||||
#include "cpu_multicorrelator_real_codes.h"
|
||||
#include "bayesian_estimation.h"
|
||||
#include <armadillo>
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
|
||||
@@ -36,22 +36,23 @@
|
||||
*/
|
||||
|
||||
#include "gps_l1_ca_tcp_connector_tracking_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "lock_detectors.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include "tracking_discriminators.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -61,7 +62,7 @@ gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
int64_t fs_in,
|
||||
uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0)
|
||||
{
|
||||
@@ -84,7 +85,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
int64_t fs_in,
|
||||
uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0) : gr::block("Gps_L1_Ca_Tcp_Connector_Tracking_cc", gr::io_signature::make(1, 1, sizeof(gr_complex)),
|
||||
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
|
||||
@@ -94,7 +95,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
d_dump = dump;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
//--- DLL variables --------------------------------------------------------
|
||||
d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips)
|
||||
@@ -163,7 +164,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
systemName["E"] = std::string("Galileo");
|
||||
systemName["C"] = std::string("Compass");
|
||||
|
||||
d_acquisition_gnss_synchro = 0;
|
||||
d_acquisition_gnss_synchro = nullptr;
|
||||
d_channel = 0;
|
||||
d_next_rem_code_phase_samples = 0;
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
@@ -562,7 +563,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = 0.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
@@ -582,8 +583,6 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ gps_l1_ca_tcp_connector_tracking_cc_sptr
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0);
|
||||
|
||||
@@ -86,14 +86,14 @@ private:
|
||||
gps_l1_ca_tcp_connector_make_tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0);
|
||||
|
||||
Gps_L1_Ca_Tcp_Connector_Tracking_cc(
|
||||
int64_t fs_in, uint32_t vector_length,
|
||||
bool dump,
|
||||
std::string dump_filename,
|
||||
const std::string &dump_filename,
|
||||
float early_late_space_chips,
|
||||
size_t port_ch0);
|
||||
|
||||
|
||||
@@ -74,9 +74,7 @@ Bayesian_estimator::Bayesian_estimator(const arma::vec& mu_prior_0, int kappa_pr
|
||||
Psi_est = Psi_prior;
|
||||
}
|
||||
|
||||
Bayesian_estimator::~Bayesian_estimator()
|
||||
{
|
||||
}
|
||||
Bayesian_estimator::~Bayesian_estimator() = default;
|
||||
|
||||
void Bayesian_estimator::init(const arma::mat& mu_prior_0, int kappa_prior_0, int nu_prior_0, const arma::mat& Psi_prior_0)
|
||||
{
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
#ifndef GNSS_SDR_BAYESIAN_ESTIMATION_H_
|
||||
#define GNSS_SDR_BAYESIAN_ESTIMATION_H_
|
||||
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <armadillo>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
|
||||
/*! \brief Bayesian_estimator is an estimator of noise characteristics (i.e. mean, covariance)
|
||||
*
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
double carrier_lock_th;
|
||||
bool track_pilot;
|
||||
char system;
|
||||
char signal[3];
|
||||
char signal[3]{};
|
||||
|
||||
Dll_Pll_Conf();
|
||||
};
|
||||
|
||||
@@ -35,27 +35,26 @@
|
||||
*/
|
||||
|
||||
#include "fpga_multicorrelator.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// FPGA stuff
|
||||
#include <new>
|
||||
|
||||
// libraries used by DMA test code and GIPO test code
|
||||
#include <stdio.h>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
// libraries used by DMA test code
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
// libraries used by GPIO test code
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
#include <sys/mman.h>
|
||||
|
||||
// logging
|
||||
@@ -63,6 +62,7 @@
|
||||
|
||||
// string manipulation
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
// constants
|
||||
#include "GPS_L1_CA.h"
|
||||
@@ -161,7 +161,7 @@ fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int32_t n_correlators,
|
||||
{
|
||||
//printf("tracking fpga class created\n");
|
||||
d_n_correlators = n_correlators;
|
||||
d_device_name = device_name;
|
||||
d_device_name = std::move(device_name);
|
||||
d_device_base = device_base;
|
||||
d_track_pilot = track_pilot;
|
||||
d_device_descriptor = 0;
|
||||
@@ -346,7 +346,7 @@ void fpga_multicorrelator_8sc::set_channel(uint32_t channel)
|
||||
// std::cout << "deviceio" << device_io_name << " opened successfully" << std::endl;
|
||||
//
|
||||
// }
|
||||
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(NULL, PAGE_SIZE,
|
||||
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0));
|
||||
|
||||
if (d_map_base == reinterpret_cast<void *>(-1))
|
||||
@@ -710,7 +710,7 @@ void fpga_multicorrelator_8sc::unlock_channel(void)
|
||||
|
||||
void fpga_multicorrelator_8sc::close_device()
|
||||
{
|
||||
uint32_t *aux = const_cast<uint32_t *>(d_map_base);
|
||||
auto *aux = const_cast<uint32_t *>(d_map_base);
|
||||
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
|
||||
{
|
||||
printf("Failed to unmap memory uio\n");
|
||||
|
||||
@@ -29,20 +29,16 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "tcp_packet_data.h"
|
||||
#include "tcp_communication.h"
|
||||
#include "tcp_packet_data.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
tcp_communication::tcp_communication() : tcp_socket_(io_service_)
|
||||
{
|
||||
}
|
||||
tcp_communication::tcp_communication() : tcp_socket_(io_service_) {} // NOLINT
|
||||
|
||||
|
||||
tcp_communication::~tcp_communication()
|
||||
{
|
||||
}
|
||||
tcp_communication::~tcp_communication() = default;
|
||||
|
||||
|
||||
int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#ifndef GNSS_SDR_TCP_COMMUNICATION_H_
|
||||
#define GNSS_SDR_TCP_COMMUNICATION_H_
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include "tcp_packet_data.h"
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
#define NUM_TX_VARIABLES_GALILEO_E1 13
|
||||
#define NUM_TX_VARIABLES_GPS_L1_CA 9
|
||||
|
||||
@@ -37,4 +37,4 @@ tcp_packet_data::tcp_packet_data()
|
||||
proc_pack_carrier_doppler_hz = 0;
|
||||
}
|
||||
|
||||
tcp_packet_data::~tcp_packet_data() {}
|
||||
tcp_packet_data::~tcp_packet_data() = default;
|
||||
|
||||
@@ -72,21 +72,23 @@ float Tracking_2nd_DLL_filter::get_code_nco(float DLL_discriminator)
|
||||
return code_nco;
|
||||
}
|
||||
|
||||
|
||||
Tracking_2nd_DLL_filter::Tracking_2nd_DLL_filter(float pdi_code)
|
||||
{
|
||||
d_pdi_code = pdi_code; // Summation interval for code
|
||||
d_dlldampingratio = 0.7;
|
||||
}
|
||||
|
||||
|
||||
Tracking_2nd_DLL_filter::Tracking_2nd_DLL_filter()
|
||||
{
|
||||
d_pdi_code = 0.001; // Summation interval for code
|
||||
d_dlldampingratio = 0.7;
|
||||
}
|
||||
|
||||
Tracking_2nd_DLL_filter::~Tracking_2nd_DLL_filter()
|
||||
{
|
||||
}
|
||||
|
||||
Tracking_2nd_DLL_filter::~Tracking_2nd_DLL_filter() = default;
|
||||
|
||||
|
||||
void Tracking_2nd_DLL_filter::set_pdi(float pdi_code)
|
||||
{
|
||||
|
||||
@@ -77,6 +77,7 @@ float Tracking_2nd_PLL_filter::get_carrier_nco(float PLL_discriminator)
|
||||
return carr_nco;
|
||||
}
|
||||
|
||||
|
||||
Tracking_2nd_PLL_filter::Tracking_2nd_PLL_filter(float pdi_carr)
|
||||
{
|
||||
//--- PLL variables --------------------------------------------------------
|
||||
@@ -94,9 +95,8 @@ Tracking_2nd_PLL_filter::Tracking_2nd_PLL_filter()
|
||||
}
|
||||
|
||||
|
||||
Tracking_2nd_PLL_filter::~Tracking_2nd_PLL_filter()
|
||||
{
|
||||
}
|
||||
Tracking_2nd_PLL_filter::~Tracking_2nd_PLL_filter() = default;
|
||||
|
||||
|
||||
void Tracking_2nd_PLL_filter::set_pdi(float pdi_carr)
|
||||
{
|
||||
|
||||
@@ -131,6 +131,4 @@ Tracking_FLL_PLL_filter::Tracking_FLL_PLL_filter()
|
||||
}
|
||||
|
||||
|
||||
Tracking_FLL_PLL_filter::~Tracking_FLL_PLL_filter()
|
||||
{
|
||||
}
|
||||
Tracking_FLL_PLL_filter::~Tracking_FLL_PLL_filter() = default;
|
||||
|
||||
@@ -81,10 +81,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
{
|
||||
return atan(prompt_s1.imag() / prompt_s1.real());
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,10 +102,7 @@ double dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.5 * (P_early - P_late) / (P_early + P_late);
|
||||
}
|
||||
return 0.5 * (P_early - P_late) / (P_early + P_late);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -129,8 +123,5 @@ double dll_nc_vemlp_normalized(gr_complex very_early_s1, gr_complex early_s1, gr
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (P_early - P_late) / (P_early + P_late);
|
||||
}
|
||||
return (P_early - P_late) / (P_early + P_late);
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
|
||||
#include "tracking_loop_filter.h"
|
||||
#include <cmath>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
Tracking_loop_filter::Tracking_loop_filter(float update_interval,
|
||||
@@ -52,6 +52,7 @@ Tracking_loop_filter::Tracking_loop_filter(float update_interval,
|
||||
update_coefficients();
|
||||
}
|
||||
|
||||
|
||||
Tracking_loop_filter::Tracking_loop_filter()
|
||||
: d_loop_order(2),
|
||||
d_current_index(0),
|
||||
@@ -64,10 +65,9 @@ Tracking_loop_filter::Tracking_loop_filter()
|
||||
update_coefficients();
|
||||
}
|
||||
|
||||
Tracking_loop_filter::~Tracking_loop_filter()
|
||||
{
|
||||
// Don't need to do anything here
|
||||
}
|
||||
|
||||
Tracking_loop_filter::~Tracking_loop_filter() = default;
|
||||
|
||||
|
||||
float Tracking_loop_filter::apply(float current_input)
|
||||
{
|
||||
@@ -108,6 +108,7 @@ float Tracking_loop_filter::apply(float current_input)
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::update_coefficients(void)
|
||||
{
|
||||
// Analog gains:
|
||||
@@ -216,17 +217,20 @@ void Tracking_loop_filter::update_coefficients(void)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::set_noise_bandwidth(float noise_bandwidth)
|
||||
{
|
||||
d_noise_bandwidth = noise_bandwidth;
|
||||
update_coefficients();
|
||||
}
|
||||
|
||||
|
||||
float Tracking_loop_filter::get_noise_bandwidth(void) const
|
||||
{
|
||||
return d_noise_bandwidth;
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::set_update_interval(float update_interval)
|
||||
{
|
||||
d_update_interval = update_interval;
|
||||
@@ -238,17 +242,20 @@ float Tracking_loop_filter::get_update_interval(void) const
|
||||
return d_update_interval;
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::set_include_last_integrator(bool include_last_integrator)
|
||||
{
|
||||
d_include_last_integrator = include_last_integrator;
|
||||
update_coefficients();
|
||||
}
|
||||
|
||||
|
||||
bool Tracking_loop_filter::get_include_last_integrator(void) const
|
||||
{
|
||||
return d_include_last_integrator;
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::set_order(int loop_order)
|
||||
{
|
||||
if (loop_order < 1 or loop_order > MAX_LOOP_ORDER)
|
||||
@@ -264,11 +271,13 @@ void Tracking_loop_filter::set_order(int loop_order)
|
||||
update_coefficients();
|
||||
}
|
||||
|
||||
|
||||
int Tracking_loop_filter::get_order(void) const
|
||||
{
|
||||
return d_loop_order;
|
||||
}
|
||||
|
||||
|
||||
void Tracking_loop_filter::initialize(float initial_output)
|
||||
{
|
||||
d_inputs.assign(MAX_LOOP_HISTORY_LENGTH, 0.0);
|
||||
|
||||
Reference in New Issue
Block a user