mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Merge branch 'next' of github.com:gnss-sdr/gnss-sdr into pps_lime
This commit is contained in:
commit
e2755dbb84
@ -27,6 +27,7 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
@ -160,7 +161,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
|
||||
{
|
||||
// DATA SIGNAL
|
||||
// Three replicas of data primary code. CODE A: (1,1,1)
|
||||
memcpy(d_fft_if->get_inbuf(), codeI, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(codeI, codeI + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
@ -171,7 +172,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
|
||||
if (d_both_signal_components == true)
|
||||
{
|
||||
// Three replicas of pilot primary code. CODE A: (1,1,1)
|
||||
memcpy(d_fft_if->get_inbuf(), codeQ, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(codeQ, codeQ + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
@ -336,7 +337,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
buff_increment = d_fft_size - d_buffer_count;
|
||||
}
|
||||
memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex) * buff_increment);
|
||||
std::copy(in, in + buff_increment, d_inbuffer.begin() + d_buffer_count);
|
||||
// If buffer will be full in next iteration
|
||||
if (d_buffer_count >= static_cast<int>(d_fft_size - d_gr_stream_buffer))
|
||||
{
|
||||
@ -353,7 +354,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
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));
|
||||
std::copy(in, in + (d_fft_size - d_buffer_count), d_inbuffer.begin() + d_buffer_count);
|
||||
}
|
||||
d_sample_counter += static_cast<uint64_t>(d_fft_size - d_buffer_count); // sample counter
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
@ -115,7 +116,7 @@ galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
// code A: two replicas of a primary code
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code, code + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
|
@ -33,10 +33,9 @@
|
||||
#include <pmt/pmt_sugar.h> // for mp
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm> // for fill_n, min
|
||||
#include <algorithm> // for std::fill_n, std::min, std::copy
|
||||
#include <array>
|
||||
#include <cmath> // for floor, fmod, rint, ceil
|
||||
#include <cstring> // for memcpy
|
||||
#include <cmath> // for floor, fmod, rint, ceil
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
@ -189,18 +188,18 @@ void pcps_acquisition::set_local_code(std::complex<float>* code)
|
||||
{
|
||||
const int32_t offset = d_fft_size / 2;
|
||||
std::fill_n(d_fft_if->get_inbuf(), offset, gr_complex(0.0, 0.0));
|
||||
memcpy(d_fft_if->get_inbuf() + offset, code, sizeof(gr_complex) * offset);
|
||||
std::copy(code, code + offset, d_fft_if->get_inbuf() + offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d_acq_parameters.sampled_ms == d_acq_parameters.ms_per_code)
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_consumed_samples);
|
||||
std::copy(code, code + d_consumed_samples, d_fft_if->get_inbuf());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::fill_n(d_fft_if->get_inbuf(), d_fft_size - d_consumed_samples, gr_complex(0.0, 0.0));
|
||||
memcpy(d_fft_if->get_inbuf() + d_consumed_samples, code, sizeof(gr_complex) * d_consumed_samples);
|
||||
std::copy(code, code + d_consumed_samples, d_fft_if->get_inbuf() + d_consumed_samples);
|
||||
}
|
||||
}
|
||||
|
||||
@ -577,7 +576,7 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int32_t
|
||||
}
|
||||
|
||||
int32_t idx = excludeRangeIndex1;
|
||||
memcpy(d_tmp_buffer.data(), d_magnitude_grid[index_doppler].data(), d_fft_size * sizeof(float));
|
||||
std::copy(d_magnitude_grid[index_doppler].data(), d_magnitude_grid[index_doppler].data() + d_fft_size, d_tmp_buffer.data());
|
||||
do
|
||||
{
|
||||
d_tmp_buffer[idx] = 0.0;
|
||||
@ -610,7 +609,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
{
|
||||
volk_gnsssdr_16ic_convert_32fc(d_data_buffer.data(), d_data_buffer_sc.data(), d_consumed_samples);
|
||||
}
|
||||
memcpy(d_input_signal.data(), d_data_buffer.data(), d_consumed_samples * sizeof(gr_complex));
|
||||
std::copy(d_data_buffer.data(), d_data_buffer.data() + d_consumed_samples, d_input_signal.data());
|
||||
if (d_fft_size > d_consumed_samples)
|
||||
{
|
||||
for (uint32_t i = d_consumed_samples; i < d_fft_size; i++)
|
||||
@ -667,7 +666,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
// Record results to file if required
|
||||
if (d_dump and d_channel == d_dump_channel)
|
||||
{
|
||||
memcpy(d_grid.colptr(doppler_index), d_magnitude_grid[doppler_index].data(), sizeof(float) * effective_fft_size);
|
||||
std::copy(d_magnitude_grid[doppler_index].data(), d_magnitude_grid[doppler_index].data() + effective_fft_size, d_grid.colptr(doppler_index));
|
||||
}
|
||||
}
|
||||
|
||||
@ -725,7 +724,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
// Record results to file if required
|
||||
if (d_dump and d_channel == d_dump_channel)
|
||||
{
|
||||
memcpy(d_narrow_grid.colptr(doppler_index), d_magnitude_grid[doppler_index].data(), sizeof(float) * effective_fft_size);
|
||||
std::copy(d_magnitude_grid[doppler_index].data(), d_magnitude_grid[doppler_index].data() + effective_fft_size, d_narrow_grid.colptr(doppler_index));
|
||||
}
|
||||
}
|
||||
// Compute the test statistic
|
||||
@ -958,7 +957,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
{
|
||||
buff_increment = d_consumed_samples - d_buffer_count;
|
||||
}
|
||||
memcpy(&d_data_buffer_sc[d_buffer_count], in, sizeof(lv_16sc_t) * buff_increment);
|
||||
std::copy(in, in + buff_increment, d_data_buffer_sc.begin() + d_buffer_count);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -971,7 +970,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
{
|
||||
buff_increment = d_consumed_samples - d_buffer_count;
|
||||
}
|
||||
memcpy(&d_data_buffer[d_buffer_count], in, sizeof(gr_complex) * buff_increment);
|
||||
std::copy(in, in + buff_increment, d_data_buffer.begin() + d_buffer_count);
|
||||
}
|
||||
|
||||
// If buffer will be full in next iteration
|
||||
|
@ -146,7 +146,7 @@ void pcps_acquisition_fine_doppler_cc::set_doppler_step(unsigned int doppler_ste
|
||||
|
||||
void pcps_acquisition_fine_doppler_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code, code + d_fft_size, d_fft_if->get_inbuf());
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
// Conjugate the local code
|
||||
volk_32fc_conjugate_32fc(d_fft_codes.data(), d_fft_if->get_outbuf(), d_fft_size);
|
||||
@ -234,7 +234,7 @@ float pcps_acquisition_fine_doppler_cc::compute_CAF()
|
||||
// Record results to file if required
|
||||
if (d_dump and d_channel == d_dump_channel)
|
||||
{
|
||||
memcpy(grid_.colptr(i), d_grid_data[i].data(), sizeof(float) * d_fft_size);
|
||||
std::copy(d_grid_data[i].data(), d_grid_data[i].data() + d_fft_size, grid_.colptr(i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
|
||||
for (int n = 0; n < prn_replicas - 1; n++)
|
||||
{
|
||||
memcpy(&code_replica[(n + 1) * d_fft_size], code_replica.data(), d_fft_size * sizeof(gr_complex));
|
||||
std::copy_n(code_replica.data(), d_fft_size, &code_replica[(n + 1) * d_fft_size]);
|
||||
}
|
||||
// 2. Perform code wipe-off
|
||||
volk_32fc_x2_multiply_32fc(fft_operator->get_inbuf(), d_10_ms_buffer.data(), code_replica.data(), signal_samples);
|
||||
@ -473,6 +473,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
|
||||
int return_value = 0; // Number of Gnss_Syncro objects produced
|
||||
int samples_remaining;
|
||||
const auto *in_aux = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
switch (d_state)
|
||||
{
|
||||
case 0: // S0. StandBy
|
||||
@ -490,7 +491,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
break;
|
||||
case 1: // S1. ComputeGrid
|
||||
compute_and_accumulate_grid(input_items);
|
||||
memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast<const gr_complex *>(input_items[0]), d_fft_size * sizeof(gr_complex));
|
||||
std::copy(in_aux, in_aux + d_fft_size, &d_10_ms_buffer[d_n_samples_in_buffer]);
|
||||
d_n_samples_in_buffer += d_fft_size;
|
||||
d_well_count++;
|
||||
if (d_well_count >= d_max_dwells)
|
||||
@ -518,7 +519,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
|
||||
if (samples_remaining > noutput_items)
|
||||
{
|
||||
memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast<const gr_complex *>(input_items[0]), noutput_items * sizeof(gr_complex));
|
||||
std::copy(in_aux, in_aux + noutput_items, &d_10_ms_buffer[d_n_samples_in_buffer]);
|
||||
d_n_samples_in_buffer += noutput_items;
|
||||
d_sample_counter += static_cast<uint64_t>(noutput_items); // sample counter
|
||||
consume_each(noutput_items);
|
||||
@ -527,7 +528,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
{
|
||||
if (samples_remaining > 0)
|
||||
{
|
||||
memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast<const gr_complex *>(input_items[0]), samples_remaining * sizeof(gr_complex));
|
||||
std::copy(in_aux, in_aux + samples_remaining, &d_10_ms_buffer[d_n_samples_in_buffer]);
|
||||
d_sample_counter += static_cast<uint64_t>(samples_remaining); // sample counter
|
||||
consume_each(samples_remaining);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
@ -117,7 +118,7 @@ pcps_assisted_acquisition_cc::~pcps_assisted_acquisition_cc()
|
||||
|
||||
void pcps_assisted_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code, code + d_fft_size, d_fft_if->get_inbuf());
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
@ -126,7 +127,7 @@ void pcps_cccwsr_acquisition_cc::set_local_code(std::complex<float> *code_data,
|
||||
std::complex<float> *code_pilot)
|
||||
{
|
||||
// Data code (E1B)
|
||||
memcpy(d_fft_if->get_inbuf(), code_data, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code_data, code_data + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
@ -134,7 +135,7 @@ void pcps_cccwsr_acquisition_cc::set_local_code(std::complex<float> *code_data,
|
||||
volk_32fc_conjugate_32fc(d_fft_code_data.data(), d_fft_if->get_outbuf(), d_fft_size);
|
||||
|
||||
// Pilot code (E1C)
|
||||
memcpy(d_fft_if->get_inbuf(), code_pilot, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code_pilot, code_pilot + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
@ -284,7 +285,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
// Copy the result of the correlation between wiped--off signal and data code in
|
||||
// d_data_correlation.
|
||||
memcpy(d_data_correlation.data(), d_ifft->get_outbuf(), sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(d_ifft->get_outbuf(), d_ifft->get_outbuf() + d_fft_size, d_data_correlation.data());
|
||||
|
||||
// Multiply carrier wiped--off, Fourier transformed incoming signal
|
||||
// with the local FFT'd pilot code reference (E1C) using SIMD operations
|
||||
@ -297,7 +298,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
// Copy the result of the correlation between wiped--off signal and pilot code in
|
||||
// d_data_correlation.
|
||||
memcpy(d_pilot_correlation.data(), d_ifft->get_outbuf(), sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(d_ifft->get_outbuf(), d_ifft->get_outbuf() + d_fft_size, d_pilot_correlation.data());
|
||||
|
||||
for (uint32_t i = 0; i < d_fft_size; i++)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ void pcps_opencl_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code, code + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
@ -695,8 +695,8 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
uint32_t num_dwells = std::min(static_cast<int>(d_max_dwells - d_in_dwell_count), ninput_items[0]);
|
||||
for (uint32_t i = 0; i < num_dwells; i++)
|
||||
{
|
||||
memcpy(d_in_buffer[d_in_dwell_count++].data(), static_cast<const gr_complex *>(input_items[i]),
|
||||
sizeof(gr_complex) * d_fft_size);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[i]);
|
||||
std::copy(in, in + d_fft_size, d_in_buffer[d_in_dwell_count++].data());
|
||||
d_sample_counter += static_cast<uint64_t>(d_fft_size);
|
||||
d_sample_counter_buffer.push_back(d_sample_counter);
|
||||
}
|
||||
|
@ -136,9 +136,9 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
|
||||
{
|
||||
/* save a local copy of the code without the folding process to perform corre-
|
||||
lation in time in the final steps of the acquisition stage */
|
||||
memcpy(d_code.data(), code, sizeof(gr_complex) * d_samples_per_code);
|
||||
std::copy(code, code + d_samples_per_code, d_code.data());
|
||||
|
||||
memcpy(d_fft_if->get_inbuf(), d_code_folded.data(), sizeof(gr_complex) * (d_fft_size));
|
||||
std::copy(d_code_folded.data(), d_code_folded.data() + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
/* perform folding of the code by the factorial factor parameter. Notice that
|
||||
folding of the code in the time stage would result in a downsampled spectrum
|
||||
@ -317,7 +317,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
// at zero. This is done to avoid over acumulation when performing
|
||||
// the folding process to be stored in d_fft_if->get_inbuf()
|
||||
d_signal_folded = std::vector<gr_complex>(d_fft_size, lv_cmake(0.0F, 0.0F));
|
||||
memcpy(d_fft_if->get_inbuf(), d_signal_folded.data(), sizeof(gr_complex) * (d_fft_size));
|
||||
std::copy(d_signal_folded.data(), d_signal_folded.data() + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
// Doppler search steps and then multiplication of the incoming
|
||||
// signal with the doppler wipeoffs to eliminate frequency offset
|
||||
@ -392,9 +392,8 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
// Copy a signal of 1 code length into suggested buffer.
|
||||
// The copied signal must have doppler effect corrected*/
|
||||
memcpy(in_1code.data(), &in_temp[d_possible_delay[i]],
|
||||
sizeof(gr_complex) * (d_samples_per_code));
|
||||
// The copied signal must have doppler effect corrected
|
||||
std::copy_n(&in_temp[d_possible_delay[i]], d_samples_per_code, in_1code.data());
|
||||
|
||||
// Perform multiplication of the unmodified local
|
||||
// generated code with the incoming signal with doppler
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
@ -140,7 +141,7 @@ pcps_tong_acquisition_cc::~pcps_tong_acquisition_cc()
|
||||
|
||||
void pcps_tong_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
std::copy(code, code + d_fft_size, d_fft_if->get_inbuf());
|
||||
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <volk/volk.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
notch_sptr make_notch_filter(float pfa, float p_c_factor,
|
||||
@ -75,13 +74,13 @@ int Notch::general_work(int noutput_items, gr_vector_int &ninput_items __attribu
|
||||
{
|
||||
if ((n_segments_ < n_segments_est_) && (filter_state_ == false))
|
||||
{
|
||||
memcpy(d_fft_->get_inbuf(), in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, d_fft_->get_inbuf());
|
||||
d_fft_->execute();
|
||||
volk_32fc_s32f_power_spectrum_32f(power_spect_.data(), d_fft_->get_outbuf(), 1.0, length_);
|
||||
volk_32f_s32f_calc_spectral_noise_floor_32f(&sig2dB, power_spect_.data(), 15.0, length_);
|
||||
sig2lin = std::pow(10.0F, (sig2dB / 10.0F)) / (static_cast<float>(n_deg_fred_));
|
||||
noise_pow_est_ = (static_cast<float>(n_segments_) * noise_pow_est_ + sig2lin) / (static_cast<float>(n_segments_ + 1));
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -109,7 +108,7 @@ int Notch::general_work(int noutput_items, gr_vector_int &ninput_items __attribu
|
||||
n_segments_ = 0;
|
||||
}
|
||||
filter_state_ = false;
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
}
|
||||
}
|
||||
index_out += length_;
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <volk/volk.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int32_t length, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff)
|
||||
@ -83,13 +82,13 @@ int NotchLite::general_work(int noutput_items, gr_vector_int &ninput_items __att
|
||||
{
|
||||
if ((n_segments_ < n_segments_est_) && (filter_state_ == false))
|
||||
{
|
||||
memcpy(d_fft_->get_inbuf(), in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, d_fft_->get_inbuf());
|
||||
d_fft_->execute();
|
||||
volk_32fc_s32f_power_spectrum_32f(power_spect_.data(), d_fft_->get_outbuf(), 1.0, length_);
|
||||
volk_32f_s32f_calc_spectral_noise_floor_32f(&sig2dB, power_spect_.data(), 15.0, length_);
|
||||
sig2lin = std::pow(10.0F, (sig2dB / 10.0F)) / static_cast<float>(n_deg_fred_);
|
||||
noise_pow_est_ = (static_cast<float>(n_segments_) * noise_pow_est_ + sig2lin) / static_cast<float>(n_segments_ + 1);
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -126,7 +125,7 @@ int NotchLite::general_work(int noutput_items, gr_vector_int &ninput_items __att
|
||||
n_segments_ = 0;
|
||||
}
|
||||
filter_state_ = false;
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
}
|
||||
}
|
||||
index_out += length_;
|
||||
|
@ -69,18 +69,18 @@ int pulse_blanking_cc::general_work(int noutput_items, gr_vector_int &ninput_ite
|
||||
if ((n_segments_ < n_segments_est_) && (last_filtered_ == false))
|
||||
{
|
||||
noise_power_estimation_ = (static_cast<float>(n_segments_) * noise_power_estimation_ + segment_energy / static_cast<float>(n_deg_fred_)) / static_cast<float>(n_segments_ + 1);
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((segment_energy / noise_power_estimation_) > thres_)
|
||||
{
|
||||
memcpy(out, zeros_.data(), sizeof(gr_complex) * length_);
|
||||
std::copy_n(zeros_.data(), length_, out);
|
||||
last_filtered_ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(out, in, sizeof(gr_complex) * length_);
|
||||
std::copy(in, in + length_, out);
|
||||
last_filtered_ = false;
|
||||
if (n_segments_ > n_segments_reset_)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
|
||||
@ -62,7 +63,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
}
|
||||
trk_params.system = 'C';
|
||||
const std::array<char, 3> sig_{'B', '1', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
||||
@ -52,7 +53,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
||||
}
|
||||
trk_params.system = 'C';
|
||||
const std::array<char, 3> sig_{'B', '3', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
@ -55,7 +56,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
trk_params.vector_length = vector_length;
|
||||
trk_params.system = 'E';
|
||||
const std::array<char, 3> sig_{'1', 'B', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "uio_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
@ -59,7 +60,7 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
trk_params_fpga.vector_length = vector_length;
|
||||
trk_params_fpga.system = 'E';
|
||||
const std::array<char, 3> sig_{'1', 'B', '\0'};
|
||||
std::memcpy(trk_params_fpga.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params_fpga.signal);
|
||||
|
||||
// UIO device file
|
||||
device_name = configuration->property(role + ".devicename", default_device_name_Galileo_E1);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
@ -55,7 +56,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
||||
}
|
||||
trk_params.system = 'E';
|
||||
const std::array<char, 3> sig_{'5', 'X', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "uio_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
@ -54,7 +55,7 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
}
|
||||
trk_params_fpga.system = 'E';
|
||||
const std::array<char, 3> sig_{'5', 'X', '\0'};
|
||||
std::memcpy(trk_params_fpga.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params_fpga.signal);
|
||||
|
||||
d_data_codes = nullptr;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE5bDllPllTracking::GalileoE5bDllPllTracking(
|
||||
@ -56,7 +57,7 @@ GalileoE5bDllPllTracking::GalileoE5bDllPllTracking(
|
||||
}
|
||||
trk_params.system = 'E';
|
||||
const std::array<char, 3> sig_{'7', 'X', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GalileoE6DllPllTracking::GalileoE6DllPllTracking(
|
||||
@ -51,7 +52,7 @@ GalileoE6DllPllTracking::GalileoE6DllPllTracking(
|
||||
}
|
||||
trk_params.system = 'E';
|
||||
const std::array<char, 3> sig_{'E', '6', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
@ -63,7 +64,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
|
||||
trk_params.system = 'G';
|
||||
const std::array<char, 3> sig_{'1', 'C', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "uio_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
@ -64,7 +65,7 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
}
|
||||
trk_params_fpga.system = 'G';
|
||||
const std::array<char, 3> sig_{'1', 'C', '\0'};
|
||||
std::memcpy(trk_params_fpga.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params_fpga.signal);
|
||||
|
||||
// UIO device file
|
||||
device_name = configuration->property(role + ".devicename", default_device_name_GPS_L1);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "kf_conf.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL1CaKfVtlTracking::GpsL1CaKfVtlTracking(
|
||||
@ -58,7 +59,7 @@ GpsL1CaKfVtlTracking::GpsL1CaKfVtlTracking(
|
||||
|
||||
trk_params.system = 'G';
|
||||
const std::array<char, 3> sig_{'1', 'C', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
@ -52,7 +53,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
||||
}
|
||||
trk_params.system = 'G';
|
||||
const std::array<char, 3> sig_{'2', 'S', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -32,9 +32,9 @@
|
||||
#include "uio_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath> // for round
|
||||
#include <cstring> // for memcpy
|
||||
#include <cmath> // for round
|
||||
#include <iostream>
|
||||
|
||||
GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
@ -62,7 +62,7 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
}
|
||||
trk_params_fpga.system = 'G';
|
||||
const std::array<char, 3> sig_{'2', 'S', '\0'};
|
||||
std::memcpy(trk_params_fpga.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params_fpga.signal);
|
||||
|
||||
// UIO device file
|
||||
device_name = configuration->property(role + ".devicename", default_device_name_GPS_L2);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
@ -55,7 +56,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
||||
}
|
||||
trk_params.system = 'G';
|
||||
const std::array<char, 3> sig_{'L', '5', '\0'};
|
||||
std::memcpy(trk_params.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params.signal);
|
||||
|
||||
// ################# Make a GNU Radio Tracking block object ################
|
||||
if (trk_params.item_type == "gr_complex")
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "uio_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
@ -61,7 +62,7 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
d_track_pilot = trk_params_fpga.track_pilot;
|
||||
trk_params_fpga.system = 'G';
|
||||
const std::array<char, 3> sig_{'L', '5', '\0'};
|
||||
std::memcpy(trk_params_fpga.signal, sig_.data(), 3);
|
||||
std::copy_n(sig_.data(), 3, trk_params_fpga.signal);
|
||||
|
||||
// UIO device file
|
||||
device_name = configuration->property(role + ".devicename", default_device_name_GPS_L5);
|
||||
|
@ -156,7 +156,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
d_acq_carrier_doppler_hz = static_cast<float>(d_acquisition_gnss_synchro->Acq_doppler_hz);
|
||||
d_acq_sample_stamp = d_acquisition_gnss_synchro->Acq_samplestamp_samples;
|
||||
std::array<char, 3> Signal_{};
|
||||
std::memcpy(Signal_.data(), d_acquisition_gnss_synchro->Signal, 3);
|
||||
std::copy_n(d_acquisition_gnss_synchro->Signal, 3, Signal_.data());
|
||||
|
||||
// generate local reference ALWAYS starting at chip 1 (2 samples per chip)
|
||||
galileo_e1_code_gen_complex_sampled(d_ca_code,
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cuda_profiler_api.h>
|
||||
#include <iostream>
|
||||
@ -349,7 +350,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
|
||||
// ################# CARRIER WIPEOFF AND CORRELATORS ##############################
|
||||
// perform carrier wipe-off and compute Early, Prompt and Late correlation
|
||||
|
||||
memcpy(in_gpu, in, sizeof(gr_complex) * d_correlation_length_samples);
|
||||
std::copy(in, in + d_correlation_length_samples, in_gpu);
|
||||
cudaProfilerStart();
|
||||
multicorrelator_gpu->Carrier_wipeoff_multicorrelator_resampler_cuda(static_cast<float>(d_rem_carrier_phase_rad),
|
||||
static_cast<float>(d_carrier_phase_step_rad),
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "gnss_sdr_fft.h"
|
||||
#include <armadillo>
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
@ -39,7 +40,7 @@ TEST(FFTSpeedTest, ArmadilloVSGNURadioExecutionTime)
|
||||
arma::arma_rng::set_seed_random();
|
||||
arma::cx_fvec d_arma_fft = arma::cx_fvec(d_fft_size).randn() + gr_complex(0.0, 1.0) * arma::cx_fvec(d_fft_size).randn();
|
||||
arma::cx_fvec d_arma_fft_result(d_fft_size);
|
||||
memcpy(d_gr_fft->get_inbuf(), d_arma_fft.memptr(), sizeof(gr_complex) * d_fft_size);
|
||||
std::copy_n(d_arma_fft.memptr(), d_fft_size, d_gr_fft->get_inbuf());
|
||||
|
||||
start = std::chrono::system_clock::now();
|
||||
for (int k = 0; k < FLAGS_fft_speed_iterations_test; k++)
|
||||
|
Loading…
Reference in New Issue
Block a user