mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14:51 +00:00
clang-tidy: apply checks
This commit is contained in:
parent
18fda22221
commit
f1871a84e2
@ -37,7 +37,7 @@
|
||||
|
||||
TEST(CodeGenerationTest, CodeGenGPSL1Test)
|
||||
{
|
||||
std::complex<float>* _dest = new std::complex<float>[1023];
|
||||
auto* _dest = new std::complex<float>[1023];
|
||||
signed int _prn = 1;
|
||||
unsigned int _chip_shift = 4;
|
||||
|
||||
@ -68,7 +68,7 @@ TEST(CodeGenerationTest, CodeGenGPSL1SampledTest)
|
||||
const signed int _codeFreqBasis = 1023000; //Hz
|
||||
const signed int _codeLength = 1023;
|
||||
int _samplesPerCode = round(_fs / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
std::complex<float>* _dest = new std::complex<float>[_samplesPerCode];
|
||||
auto* _dest = new std::complex<float>[_samplesPerCode];
|
||||
|
||||
int iterations = 1000;
|
||||
|
||||
@ -96,7 +96,7 @@ TEST(CodeGenerationTest, ComplexConjugateTest)
|
||||
const signed int _codeFreqBasis = 1023000; //Hz
|
||||
const signed int _codeLength = 1023;
|
||||
int _samplesPerCode = round(_fs / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
std::complex<float>* _dest = new std::complex<float>[_samplesPerCode];
|
||||
auto* _dest = new std::complex<float>[_samplesPerCode];
|
||||
|
||||
int iterations = 1000;
|
||||
|
||||
|
@ -41,10 +41,10 @@ TEST(ComplexCarrierTest, StandardComplexImplementation)
|
||||
{
|
||||
// Dynamic allocation creates new usable space on the program STACK
|
||||
// (an area of RAM specifically allocated to the program)
|
||||
std::complex<float>* output = new std::complex<float>[FLAGS_size_carrier_test];
|
||||
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
|
||||
const double _f = 2000.0;
|
||||
const double _fs = 2000000.0;
|
||||
const double phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
|
||||
const auto phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
|
||||
double phase = 0.0;
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
@ -84,7 +84,7 @@ TEST(ComplexCarrierTest, C11ComplexImplementation)
|
||||
std::vector<std::complex<float>> output(FLAGS_size_carrier_test);
|
||||
const double _f = 2000.0;
|
||||
const double _fs = 2000000.0;
|
||||
const double phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
|
||||
const auto phase_step = static_cast<double>((GPS_TWO_PI * _f) / _fs);
|
||||
double phase = 0.0;
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
@ -113,7 +113,7 @@ TEST(ComplexCarrierTest, C11ComplexImplementation)
|
||||
|
||||
TEST(ComplexCarrierTest, OwnComplexImplementation)
|
||||
{
|
||||
std::complex<float>* output = new std::complex<float>[FLAGS_size_carrier_test];
|
||||
auto* output = new std::complex<float>[FLAGS_size_carrier_test];
|
||||
double _f = 2000.0;
|
||||
double _fs = 2000000.0;
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
|
@ -41,8 +41,8 @@ DEFINE_int32(size_conjugate_test, 100000, "Size of the arrays used for conjugate
|
||||
|
||||
TEST(ConjugateTest, StandardCComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = new std::complex<float>[FLAGS_size_conjugate_test];
|
||||
std::complex<float>* output = new std::complex<float>[FLAGS_size_conjugate_test];
|
||||
auto* input = new std::complex<float>[FLAGS_size_conjugate_test];
|
||||
auto* output = new std::complex<float>[FLAGS_size_conjugate_test];
|
||||
std::fill_n(input, FLAGS_size_conjugate_test, std::complex<float>(0.0, 0.0));
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
@ -114,8 +114,8 @@ TEST(ConjugateTest, ArmadilloComplexImplementation)
|
||||
|
||||
TEST(ConjugateTest, VolkComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
std::complex<float>* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
auto* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
auto* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_conjugate_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
std::fill_n(input, FLAGS_size_conjugate_test, std::complex<float>(0.0, 0.0));
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
|
@ -112,7 +112,7 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
{
|
||||
boost::filesystem::path p(gnuplot_executable);
|
||||
boost::filesystem::path dir = p.parent_path();
|
||||
std::string gnuplot_path = dir.native();
|
||||
const std::string& gnuplot_path = dir.native();
|
||||
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
||||
|
||||
Gnuplot g1("linespoints");
|
||||
|
@ -46,8 +46,9 @@ TEST(FFTSpeedTest, ArmadilloVSGNURadioExecutionTime)
|
||||
unsigned int fft_sizes[19] = {16, 25, 32, 45, 64, 95, 128, 195, 256, 325, 512, 785, 1024, 1503, 2048, 3127, 4096, 6349, 8192};
|
||||
double d_execution_time;
|
||||
EXPECT_NO_THROW(
|
||||
for (int i = 0; i < 19; i++) {
|
||||
d_fft_size = fft_sizes[i];
|
||||
for (unsigned int fft_size
|
||||
: fft_sizes) {
|
||||
d_fft_size = fft_size;
|
||||
gr::fft::fft_complex* d_gr_fft;
|
||||
d_gr_fft = new gr::fft::fft_complex(d_fft_size, true);
|
||||
arma::arma_rng::set_seed_random();
|
||||
|
@ -42,8 +42,8 @@ DEFINE_int32(size_magnitude_test, 100000, "Size of the arrays used for magnitude
|
||||
|
||||
TEST(MagnitudeSquaredTest, StandardCComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = new std::complex<float>[FLAGS_size_magnitude_test];
|
||||
float* output = new float[FLAGS_size_magnitude_test];
|
||||
auto* input = new std::complex<float>[FLAGS_size_magnitude_test];
|
||||
auto* output = new float[FLAGS_size_magnitude_test];
|
||||
unsigned int number = 0;
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
start = std::chrono::system_clock::now();
|
||||
@ -114,9 +114,9 @@ TEST(MagnitudeSquaredTest, ArmadilloComplexImplementation)
|
||||
|
||||
TEST(MagnitudeSquaredTest, VolkComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
auto* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
std::fill_n(input, FLAGS_size_magnitude_test, std::complex<float>(0.0, 0.0));
|
||||
float* output = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto* output = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_magnitude_test * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
start = std::chrono::system_clock::now();
|
||||
|
||||
|
@ -43,8 +43,8 @@ DEFINE_int32(size_multiply_test, 100000, "Size of the arrays used for multiply t
|
||||
|
||||
TEST(MultiplyTest, StandardCDoubleImplementation)
|
||||
{
|
||||
double* input = new double[FLAGS_size_multiply_test];
|
||||
double* output = new double[FLAGS_size_multiply_test];
|
||||
auto* input = new double[FLAGS_size_multiply_test];
|
||||
auto* output = new double[FLAGS_size_multiply_test];
|
||||
std::fill_n(input, FLAGS_size_multiply_test, 0.0);
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
start = std::chrono::system_clock::now();
|
||||
@ -95,8 +95,8 @@ TEST(MultiplyTest, ArmadilloImplementation)
|
||||
|
||||
TEST(MultiplyTest, StandardCComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = new std::complex<float>[FLAGS_size_multiply_test];
|
||||
std::complex<float>* output = new std::complex<float>[FLAGS_size_multiply_test];
|
||||
auto* input = new std::complex<float>[FLAGS_size_multiply_test];
|
||||
auto* output = new std::complex<float>[FLAGS_size_multiply_test];
|
||||
std::fill_n(input, FLAGS_size_multiply_test, std::complex<float>(0.0, 0.0));
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
start = std::chrono::system_clock::now();
|
||||
@ -174,8 +174,8 @@ TEST(MultiplyTest, ArmadilloComplexImplementation)
|
||||
|
||||
TEST(MultiplyTest, VolkComplexImplementation)
|
||||
{
|
||||
std::complex<float>* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
std::complex<float>* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
auto* input = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
auto* output = static_cast<std::complex<float>*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(std::complex<float>), volk_gnsssdr_get_alignment()));
|
||||
std::fill_n(input, FLAGS_size_multiply_test, std::complex<float>(0.0, 0.0));
|
||||
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
@ -190,10 +190,10 @@ TEST(MultiplyTest, VolkComplexImplementation)
|
||||
<< " microseconds" << std::endl;
|
||||
ASSERT_LE(0, elapsed_seconds.count() * 1e6);
|
||||
|
||||
float* mag = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto* mag = static_cast<float*>(volk_gnsssdr_malloc(FLAGS_size_multiply_test * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
volk_32fc_magnitude_32f(mag, output, FLAGS_size_multiply_test);
|
||||
|
||||
float* result = new float(0);
|
||||
auto* result = new float(0);
|
||||
volk_32f_accumulator_s32f(result, mag, FLAGS_size_multiply_test);
|
||||
// Comparing floating-point numbers is tricky.
|
||||
// Due to round-off errors, it is very unlikely that two floating-points will match exactly.
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -84,7 +85,7 @@ void GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -104,8 +105,7 @@ GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx::GalileoE1Pcps8msAmbiguo
|
||||
}
|
||||
|
||||
GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx::~GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -124,8 +124,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -85,7 +86,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pm
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -105,8 +106,7 @@ GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::GalileoE1PcpsAmbiguousAcqu
|
||||
}
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx::~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -125,8 +125,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -93,7 +94,7 @@ void GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx::msg_handler_events(pmt::p
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -113,8 +114,7 @@ GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx::GalileoE1PcpsAmbiguousAcquisit
|
||||
}
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx::~GalileoE1PcpsAmbiguousAcquisitionGSoCTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -134,8 +134,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1PcpsAmbiguousAcquisitionGSoCTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void start_queue();
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -87,7 +88,7 @@ void GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
@ -107,8 +108,7 @@ GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx::GalileoE1PcpsAmbiguousAcquisitionT
|
||||
|
||||
|
||||
GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx::~GalileoE1PcpsAmbiguousAcquisitionTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -127,8 +127,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1PcpsAmbiguousAcquisitionTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void plot_grid();
|
||||
@ -176,9 +175,9 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid()
|
||||
{
|
||||
//load the measured values
|
||||
std::string basename = "./tmp-acq-gal1/acquisition_E_1B";
|
||||
unsigned int sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
unsigned int samples_per_code = static_cast<unsigned int>(round(4000000 / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); // !!
|
||||
acquisition_dump_reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code);
|
||||
|
||||
if (!acq_dump.read_binary_acq()) std::cout << "Error reading files" << std::endl;
|
||||
@ -201,7 +200,7 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid()
|
||||
{
|
||||
boost::filesystem::path p(gnuplot_executable);
|
||||
boost::filesystem::path dir = p.parent_path();
|
||||
std::string gnuplot_path = dir.native();
|
||||
const std::string& gnuplot_path = dir.native();
|
||||
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
||||
|
||||
Gnuplot g1("lines");
|
||||
@ -351,7 +350,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
|
||||
std::cout << "Doppler: " << gnss_synchro.Acq_doppler_hz << std::endl;
|
||||
|
||||
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
|
||||
float delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000000);
|
||||
auto delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000000);
|
||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||
|
||||
EXPECT_LE(doppler_error_hz, 166) << "Doppler error exceeds the expected value: 166 Hz = 2/(3*integration period)";
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -85,7 +86,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx::msg_handler_events(pmt:
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -105,8 +106,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx::GalileoE1PcpsCccwsrAmbiguous
|
||||
}
|
||||
|
||||
GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx::~GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -125,8 +125,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1PcpsCccwsrAmbiguousAcquisitionTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -93,7 +94,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx::msg_handler_
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -114,8 +115,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx::GalileoE1PcpsQuic
|
||||
|
||||
|
||||
GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx::~GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -133,8 +133,7 @@ protected:
|
||||
init();
|
||||
}
|
||||
~GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -87,7 +88,7 @@ void GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx::msg_handler_event
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -108,8 +109,7 @@ GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx::GalileoE1PcpsTongAmbig
|
||||
|
||||
|
||||
GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx::~GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
class GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test : public ::testing::Test
|
||||
@ -126,8 +126,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -84,7 +85,7 @@ void GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx::msg_handler_events(p
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -105,8 +106,7 @@ GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx::GalileoE5aPcpsAcquisition
|
||||
|
||||
|
||||
GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx::~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
class GalileoE5aPcpsAcquisitionGSoC2014GensourceTest : public ::testing::Test
|
||||
@ -122,8 +122,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE5aPcpsAcquisitionGSoC2014GensourceTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -89,7 +90,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx::msg_handler_events(pmt::pmt_
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -110,8 +111,7 @@ GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx::GlonassL1CaPcpsAcquisitionGSoC201
|
||||
|
||||
|
||||
GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx::~GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -125,13 +125,12 @@ protected:
|
||||
stop = false;
|
||||
message = 0;
|
||||
gnss_synchro = Gnss_Synchro();
|
||||
acquisition = 0;
|
||||
acquisition = nullptr;
|
||||
init();
|
||||
}
|
||||
|
||||
~GlonassL1CaPcpsAcquisitionGSoC2017Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
@ -370,12 +369,12 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::wait_message()
|
||||
{
|
||||
acquisition->reset();
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
gettimeofday(&tv, nullptr);
|
||||
begin = tv.tv_sec * 1e6 + tv.tv_usec;
|
||||
|
||||
channel_internal_queue.wait_and_pop(message);
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
gettimeofday(&tv, nullptr);
|
||||
end = tv.tv_sec * 1e6 + tv.tv_usec;
|
||||
|
||||
mean_acq_time_us += (end - begin);
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -89,7 +90,7 @@ void GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pmt_t ms
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -109,8 +110,7 @@ GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx::GpsL1CaPcpsAcquisitionGSoC2013Test_ms
|
||||
}
|
||||
|
||||
GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx::~GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -124,13 +124,12 @@ protected:
|
||||
stop = false;
|
||||
message = 0;
|
||||
gnss_synchro = Gnss_Synchro();
|
||||
acquisition = 0;
|
||||
acquisition = nullptr;
|
||||
init();
|
||||
}
|
||||
|
||||
~GpsL1CaPcpsAcquisitionGSoC2013Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -91,7 +92,7 @@ void GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test_msg_rx::msg_handler_events(pmt:
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -112,8 +113,7 @@ GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test_msg_rx::GpsL1CaPcpsQuickSyncAcquisit
|
||||
|
||||
|
||||
GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test_msg_rx::~GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -131,8 +131,7 @@ protected:
|
||||
}
|
||||
|
||||
~GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -87,7 +88,7 @@ void GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pmt_
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
channel_internal_queue.push(rx_message);
|
||||
}
|
||||
@ -107,8 +108,7 @@ GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx::GpsL1CaPcpsTongAcquisitionGSoC201
|
||||
}
|
||||
|
||||
GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx::~GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -125,8 +125,7 @@ protected:
|
||||
}
|
||||
|
||||
~GpsL1CaPcpsTongAcquisitionGSoC2013Test()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
void config_1();
|
||||
|
@ -43,8 +43,7 @@ protected:
|
||||
this->conf();
|
||||
}
|
||||
~NmeaPrinterTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
void conf();
|
||||
rtk_t rtk;
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void deinterleaver(int32_t rows, int32_t cols, double *in, double *out)
|
||||
void deinterleaver(int32_t rows, int32_t cols, const double *in, double *out)
|
||||
{
|
||||
for (int32_t r = 0; r < rows; r++)
|
||||
{
|
||||
@ -76,7 +76,7 @@ public:
|
||||
bool decode_INAV_word(double *page_part_symbols, int32_t frame_length)
|
||||
{
|
||||
// 1. De-interleave
|
||||
double *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
auto *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
deinterleaver(GALILEO_INAV_INTERLEAVER_ROWS, GALILEO_INAV_INTERLEAVER_COLS, page_part_symbols, page_part_symbols_deint);
|
||||
|
||||
// 2. Viterbi decoder
|
||||
@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int32_t *page_part_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto *page_part_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
|
||||
const int32_t CodeLength = 240;
|
||||
int32_t DataLength = (CodeLength / nn) - mm;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
bool decode_FNAV_word(double *page_symbols, int32_t frame_length)
|
||||
{
|
||||
// 1. De-interleave
|
||||
double *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
auto *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
deinterleaver(GALILEO_FNAV_INTERLEAVER_ROWS, GALILEO_FNAV_INTERLEAVER_COLS, page_symbols, page_symbols_deint);
|
||||
|
||||
// 2. Viterbi decoder
|
||||
@ -150,7 +150,7 @@ public:
|
||||
page_symbols_deint[i] = -page_symbols_deint[i];
|
||||
}
|
||||
}
|
||||
int32_t *page_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto *page_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
|
||||
const int32_t CodeLength = 488;
|
||||
int32_t DataLength = (CodeLength / nn) - mm;
|
||||
|
@ -66,8 +66,7 @@ protected:
|
||||
}
|
||||
|
||||
~GalileoE5aTrackingTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -80,7 +81,7 @@ void GlonassL1CaDllPllCAidTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
@ -98,8 +99,7 @@ GlonassL1CaDllPllCAidTrackingTest_msg_rx::GlonassL1CaDllPllCAidTrackingTest_msg_
|
||||
}
|
||||
|
||||
GlonassL1CaDllPllCAidTrackingTest_msg_rx::~GlonassL1CaDllPllCAidTrackingTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -117,8 +117,7 @@ protected:
|
||||
}
|
||||
|
||||
~GlonassL1CaDllPllCAidTrackingTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <chrono>
|
||||
#include <utility>
|
||||
#ifdef GR_GREATER_38
|
||||
#include <gnuradio/analog/sig_source.h>
|
||||
#else
|
||||
@ -81,7 +82,7 @@ void GlonassL1CaDllPllTrackingTest_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
int64_t message = pmt::to_long(msg);
|
||||
int64_t message = pmt::to_long(std::move(msg));
|
||||
rx_message = message;
|
||||
}
|
||||
catch (boost::bad_any_cast& e)
|
||||
@ -99,8 +100,7 @@ GlonassL1CaDllPllTrackingTest_msg_rx::GlonassL1CaDllPllTrackingTest_msg_rx() : g
|
||||
}
|
||||
|
||||
GlonassL1CaDllPllTrackingTest_msg_rx::~GlonassL1CaDllPllTrackingTest_msg_rx()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
// ###########################################################
|
||||
@ -118,8 +118,7 @@ protected:
|
||||
}
|
||||
|
||||
~GlonassL1CaDllPllTrackingTest()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user