1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-18 16:15:21 +00:00

bds b1i: Merging latest changes from upstream/next

This commit is contained in:
Damian Miralles
2018-12-18 15:55:36 -06:00
633 changed files with 8609 additions and 7671 deletions

View 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;
}

View 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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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();
}
}

View File

@@ -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;

View File

@@ -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();
}
}

View File

@@ -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>

View File

@@ -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;

View File

@@ -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>

View File

@@ -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();
}
}

View File

@@ -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;

View File

@@ -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();
}
}

View File

@@ -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>

View File

@@ -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;

View File

@@ -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>

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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();

View File

@@ -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>

View File

@@ -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;
}

View File

@@ -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);