mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-21 17:44:52 +00:00
Merge branch 'next' into smart_acq_resampler
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -59,7 +60,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
|
||||
{
|
||||
return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr(
|
||||
new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_));
|
||||
samples_per_code, bit_transition_flag, dump, std::move(dump_filename), both_signal_components_, CAF_window_hz_, Zero_padding_));
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +153,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -393,7 +394,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
unsigned int buff_increment;
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_fft_size)
|
||||
{
|
||||
@@ -417,7 +418,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
case 2:
|
||||
{
|
||||
// Fill last part of the buffer and reset counter
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
if (d_buffer_count < d_fft_size)
|
||||
{
|
||||
memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex) * (d_fft_size - d_buffer_count));
|
||||
@@ -674,7 +675,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
if (d_CAF_window_hz > 0)
|
||||
{
|
||||
int CAF_bins_half;
|
||||
float *accum = static_cast<float *>(volk_gnsssdr_malloc(sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *accum = static_cast<float *>(volk_gnsssdr_malloc(sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
CAF_bins_half = d_CAF_window_hz / (2 * d_doppler_step);
|
||||
float weighting_factor;
|
||||
weighting_factor = 0.5 / static_cast<float>(CAF_bins_half);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "galileo_pcps_8ms_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@@ -47,7 +48,7 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
{
|
||||
return galileo_pcps_8ms_acquisition_cc_sptr(
|
||||
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms,
|
||||
samples_per_code, dump, dump_filename));
|
||||
samples_per_code, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
@@ -87,7 +88,7 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -246,7 +247,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
float magt = 0.0;
|
||||
float magt_A = 0.0;
|
||||
float magt_B = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
||||
@@ -158,10 +158,10 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
||||
{
|
||||
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
|
||||
@@ -173,9 +173,9 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
||||
d_dump_filename = "acquisition";
|
||||
}
|
||||
// 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;
|
||||
// create directory
|
||||
@@ -268,7 +268,7 @@ bool pcps_acquisition::is_fdma()
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(d_gnss_synchro->Signal, "2G") == 0)
|
||||
if (strcmp(d_gnss_synchro->Signal, "2G") == 0)
|
||||
{
|
||||
d_old_freq += DFRQ2_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN);
|
||||
LOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_old_freq << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
|
||||
@@ -480,7 +480,7 @@ void pcps_acquisition::dump_results(int32_t effective_fft_size)
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
float aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
auto aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
@@ -963,7 +963,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
uint32_t buff_increment;
|
||||
if (d_cshort)
|
||||
{
|
||||
const lv_16sc_t* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||
{
|
||||
buff_increment = ninput_items[0];
|
||||
@@ -976,7 +976,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
}
|
||||
else
|
||||
{
|
||||
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); // Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); // Get the input samples pointer
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||
{
|
||||
buff_increment = ninput_items[0];
|
||||
|
||||
@@ -91,10 +91,10 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
||||
{
|
||||
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
|
||||
@@ -106,9 +106,9 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
||||
d_dump_filename = "acquisition";
|
||||
}
|
||||
// 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;
|
||||
// create directory
|
||||
@@ -337,7 +337,7 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF()
|
||||
|
||||
float pcps_acquisition_fine_doppler_cc::estimate_input_power(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
// Compute the input signal power estimation
|
||||
float power = 0;
|
||||
volk_32fc_magnitude_squared_32f(d_magnitude, in, d_fft_size);
|
||||
@@ -350,7 +350,7 @@ float pcps_acquisition_fine_doppler_cc::estimate_input_power(gr_vector_const_voi
|
||||
int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
@@ -359,7 +359,7 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons
|
||||
<< ", doppler_step: " << d_doppler_step;
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
@@ -405,12 +405,12 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
int signal_samples = prn_replicas * d_fft_size;
|
||||
//int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor);
|
||||
int fft_size_extended = signal_samples * zero_padding_factor;
|
||||
gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
auto *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
//zero padding the entire vector
|
||||
std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0));
|
||||
|
||||
//1. generate local code aligned with the acquisition code phase estimation
|
||||
gr_complex *code_replica = static_cast<gr_complex *>(volk_gnsssdr_malloc(signal_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto *code_replica = static_cast<gr_complex *>(volk_gnsssdr_malloc(signal_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code_replica, d_gnss_synchro->PRN, d_fs_in, 0);
|
||||
|
||||
@@ -433,7 +433,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
fft_operator->execute();
|
||||
|
||||
// 4. Compute the magnitude and find the maximum
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(fft_size_extended * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(fft_size_extended * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
volk_32fc_magnitude_squared_32f(p_tmp_vector, fft_operator->get_outbuf(), fft_size_extended);
|
||||
|
||||
@@ -442,7 +442,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
|
||||
//case even
|
||||
int counter = 0;
|
||||
float *fftFreqBins = new float[fft_size_extended];
|
||||
auto *fftFreqBins = new float[fft_size_extended];
|
||||
|
||||
std::fill_n(fftFreqBins, fft_size_extended, 0.0);
|
||||
|
||||
@@ -699,7 +699,7 @@ void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size)
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
float aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
auto aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@@ -52,7 +53,7 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
{
|
||||
return pcps_assisted_acquisition_cc_sptr(
|
||||
new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min,
|
||||
fs_in, samples_per_ms, dump, dump_filename));
|
||||
fs_in, samples_per_ms, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +90,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -301,9 +302,9 @@ double pcps_assisted_acquisition_cc::search_maximum()
|
||||
|
||||
float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
// 1- Compute the input signal power estimation
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
volk_32fc_magnitude_squared_32f(p_tmp_vector, in, d_fft_size);
|
||||
|
||||
@@ -318,7 +319,7 @@ float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_st
|
||||
int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " "
|
||||
@@ -328,7 +329,7 @@ int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_vo
|
||||
<< ", doppler_step: " << d_doppler_step;
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
@@ -54,7 +55,7 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
{
|
||||
return pcps_cccwsr_acquisition_cc_sptr(
|
||||
new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in,
|
||||
samples_per_ms, samples_per_code, dump, dump_filename));
|
||||
samples_per_ms, samples_per_code, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
@@ -98,7 +99,7 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -261,7 +262,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
float magt = 0.0;
|
||||
float magt_plus = 0.0;
|
||||
float magt_minus = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
d_sample_counter += static_cast<uint64_t>(d_fft_size); // sample counter
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -57,7 +58,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
fs_in, samples_per_ms,
|
||||
samples_per_code,
|
||||
bit_transition_flag,
|
||||
dump, dump_filename));
|
||||
dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +111,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_corr_acumulator = nullptr;
|
||||
d_signal_folded = nullptr;
|
||||
@@ -304,18 +305,18 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
int doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
gr_complex* in_temp = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
gr_complex* in_temp_folded = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_temp = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_temp_folded = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Create a signal to store a signal of size 1ms, to perform correlation
|
||||
in time. No folding on this data is required*/
|
||||
gr_complex* in_1code = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_1code = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Stores the values of the correlation output between the local code
|
||||
and the signal with doppler shift corrected */
|
||||
gr_complex* corr_output = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* corr_output = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Stores a copy of the folded version of the signal.This is used for
|
||||
the FFT operations in future steps of execution*/
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@@ -68,7 +69,7 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
{
|
||||
return pcps_tong_acquisition_cc_sptr(
|
||||
new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code,
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename));
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
@@ -111,7 +112,7 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
|
||||
// For dumping samples into a file
|
||||
d_dump = dump;
|
||||
d_dump_filename = dump_filename;
|
||||
d_dump_filename = std::move(dump_filename);
|
||||
|
||||
d_doppler_resolution = 0;
|
||||
d_threshold = 0;
|
||||
@@ -282,7 +283,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
int doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user