1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-06 05:43:47 +00:00

Merge branch 'small-fixes' into next

This commit is contained in:
Carles Fernandez 2023-04-04 09:11:47 +02:00
commit 3f9a5cdb1b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
12 changed files with 102 additions and 97 deletions

View File

@ -1,7 +1,7 @@
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver. # GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
# This file is part of GNSS-SDR. # This file is part of GNSS-SDR.
# #
# SPDX-FileCopyrightText: 2010-2022 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-FileCopyrightText: 2010-2023 C. Fernandez-Prades cfernandez(at)cttc.es
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
################################################################################ ################################################################################
@ -315,55 +315,43 @@ endif()
################################################################################ ################################################################################
# Minimum required versions # Minimum required versions
################################################################################ ################################################################################
set(GNSSSDR_GCC_MIN_VERSION "4.7.2")
set(GNSSSDR_CLANG_MIN_VERSION "3.4.0")
set(GNSSSDR_APPLECLANG_MIN_VERSION "500") set(GNSSSDR_APPLECLANG_MIN_VERSION "500")
set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3")
set(GNSSSDR_BOOST_MIN_VERSION "1.53")
set(GNSSSDR_PYTHON_MIN_VERSION "2.7")
set(GNSSSDR_PYTHON3_MIN_VERSION "3.4")
set(GNSSSDR_MAKO_MIN_VERSION "0.4.2")
set(GNSSSDR_ARMADILLO_MIN_VERSION "5.300.0") set(GNSSSDR_ARMADILLO_MIN_VERSION "5.300.0")
set(GNSSSDR_BOOST_MIN_VERSION "1.53")
set(GNSSSDR_CLANG_MIN_VERSION "3.4.0")
set(GNSSSDR_GCC_MIN_VERSION "4.7.2")
set(GNSSSDR_GFLAGS_MIN_VERSION "2.1.2") set(GNSSSDR_GFLAGS_MIN_VERSION "2.1.2")
set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3")
set(GNSSSDR_MAKO_MIN_VERSION "0.4.2")
set(GNSSSDR_MATIO_MIN_VERSION "1.5.3") set(GNSSSDR_MATIO_MIN_VERSION "1.5.3")
set(GNSSSDR_PROTOBUF_MIN_VERSION "3.0.0") set(GNSSSDR_PROTOBUF_MIN_VERSION "3.0.0")
set(GNSSSDR_PYTHON_MIN_VERSION "2.7")
set(GNSSSDR_PYTHON3_MIN_VERSION "3.4")
################################################################################ ################################################################################
# Versions to download and build (but not installed) if not found # Versions to download and build (but not to install system-wide) if not found
################################################################################ ################################################################################
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "12.2.x")
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2") set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.6.0") set(GNSSSDR_GLOG_LOCAL_VERSION "0.6.0")
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "11.2.x")
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR
CMAKE_VERSION VERSION_LESS 3.5)
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.x")
else()
set(GNSSSDR_GTEST_LOCAL_VERSION "1.13.0")
endif()
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
if(CMAKE_VERSION VERSION_GREATER 3.17.0)
set(GNSSSDR_GNSSTK_LOCAL_VERSION "14.0.0")
else()
set(GNSSSDR_GNSSTK_LOCAL_VERSION "13.7.0")
endif()
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.23") set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.23")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.13")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "22.2") set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "22.2")
if(CMAKE_CROSSCOMPILING OR CMAKE_VERSION VERSION_LESS "3.13") set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.13")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.12") set(GNSSSDR_GTEST_LOCAL_VERSION "1.13.0")
endif() set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GNSSTK_LOCAL_VERSION "14.0.0")
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.7.1") set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.7.1")
set(GNSSSDR_MATHJAX_EXTERNAL_VERSION "2.7.7") set(GNSSSDR_MATHJAX_EXTERNAL_VERSION "2.7.7")
# Downgrade versions if requirements are not met
if(CMAKE_VERSION VERSION_LESS "3.16") if(CMAKE_VERSION VERSION_LESS "3.16")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.5.0") set(GNSSSDR_GLOG_LOCAL_VERSION "0.5.0")
endif() endif()
if(CMAKE_VERSION VERSION_LESS "3.3") if(CMAKE_VERSION VERSION_LESS "3.3")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0") # Fix for Debian 8 set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
endif() endif()
if(CMAKE_VERSION VERSION_LESS "3.0.2") if(CMAKE_VERSION VERSION_LESS "3.0.2")
@ -371,6 +359,20 @@ if(CMAKE_VERSION VERSION_LESS "3.0.2")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.4") # Fix for Ubuntu 14.04 set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.4") # Fix for Ubuntu 14.04
endif() endif()
if(CMAKE_CROSSCOMPILING OR CMAKE_VERSION VERSION_LESS "3.13")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.12")
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) OR
CMAKE_VERSION VERSION_LESS 3.5)
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.x")
endif()
if(CMAKE_VERSION VERSION_LESS "3.17")
set(GNSSSDR_GNSSTK_LOCAL_VERSION "13.7.0")
endif()
################################################################################ ################################################################################
@ -1960,17 +1962,13 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
set(ARMADILLO_BUILD_COMMAND ${CMAKE_COMMAND} set(ARMADILLO_BUILD_COMMAND ${CMAKE_COMMAND}
"--build" "${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}" "--build" "${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}"
"--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug> "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
"--target" install
) )
if(CMAKE_TOOLCHAIN_FILE) if(CMAKE_TOOLCHAIN_FILE)
set(ARMADILLO_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}) set(ARMADILLO_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
else() else()
set(ARMADILLO_TOOLCHAIN_FILE "") set(ARMADILLO_TOOLCHAIN_FILE "")
endif() endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ENABLE_OWN_ARMADILLO)
set(DARWIN_DISABLE_HDF5 -DDETECT_HDF5=false)
else()
set(DARWIN_DISABLE_HDF5 "")
endif()
set(ARMADILLO_CXX_VERSION "") set(ARMADILLO_CXX_VERSION "")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.3) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.8.3)
set(ARMADILLO_CXX_VERSION -DCMAKE_CXX_FLAGS=-std=c++11) set(ARMADILLO_CXX_VERSION -DCMAKE_CXX_FLAGS=-std=c++11)
@ -1980,41 +1978,38 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
PREFIX ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE} PREFIX ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git
GIT_TAG ${armadillo_BRANCH} GIT_TAG ${armadillo_BRANCH}
UPDATE_COMMAND ""
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE} SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE} BINARY_DIR ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DBUILD_SMOKE_TEST=OFF -DBUILD_SMOKE_TEST=OFF
-DALLOW_BLAS_LAPACK_MACOS=ON -DALLOW_BLAS_LAPACK_MACOS=ON
${ARMADILLO_CXX_VERSION} ${ARMADILLO_CXX_VERSION}
${DARWIN_DISABLE_HDF5}
${ARMADILLO_TOOLCHAIN_FILE} ${ARMADILLO_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
BUILD_COMMAND ${ARMADILLO_BUILD_COMMAND} BUILD_COMMAND ${ARMADILLO_BUILD_COMMAND}
UPDATE_COMMAND ""
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )
else() else()
if(CMAKE_VERSION VERSION_GREATER 3.12.0)
set(PARALLEL_BUILD "--parallel 2")
endif()
ExternalProject_Add(armadillo-${armadillo_RELEASE} ExternalProject_Add(armadillo-${armadillo_RELEASE}
PREFIX ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE} PREFIX ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git
GIT_TAG ${armadillo_BRANCH} GIT_TAG ${armadillo_BRANCH}
UPDATE_COMMAND ""
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE} SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE} BINARY_DIR ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug>
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DBUILD_SMOKE_TEST=OFF -DBUILD_SMOKE_TEST=OFF
-DALLOW_BLAS_LAPACK_MACOS=ON -DALLOW_BLAS_LAPACK_MACOS=ON
${ARMADILLO_CXX_VERSION} ${ARMADILLO_CXX_VERSION}
${DARWIN_DISABLE_HDF5}
${ARMADILLO_TOOLCHAIN_FILE} ${ARMADILLO_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:NoOptWithASM>:Debug>$<$<CONFIG:Coverage>:Debug>$<$<CONFIG:O2WithASM>:RelWithDebInfo>$<$<CONFIG:O3WithASM>:RelWithDebInfo>$<$<CONFIG:ASAN>:Debug> BUILD_COMMAND ${ARMADILLO_BUILD_COMMAND}
BUILD_COMMAND "${ARMADILLO_BUILD_COMMAND} ${PARALLEL_BUILD}"
BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX} BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/armadillo-${armadillo_RELEASE}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
UPDATE_COMMAND ""
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )
endif() endif()
@ -2067,6 +2062,20 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
if(ARPACK_LIBRARY) if(ARPACK_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${ARPACK_LIBRARY}) target_link_libraries(Armadillo::armadillo INTERFACE ${ARPACK_LIBRARY})
endif() endif()
find_library(FLEXIBLAS_LIBRARY
NAMES flexiblas
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64
)
if(FLEXIBLAS_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${FLEXIBLAS_LIBRARY})
endif()
find_library(SUPERLU_LIBRARY
NAMES superlu
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64
)
if(SUPERLU_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ${SUPERLU_LIBRARY})
endif()
endif() endif()

View File

@ -403,9 +403,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL $ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE $ sudo zypper install lapack-devel blas-devel # For OpenSUSE
$ sudo pacman -S blas lapack # For Arch Linux $ sudo pacman -S blas lapack # For Arch Linux
$ wget https://sourceforge.net/projects/arma/files/armadillo-11.2.1.tar.xz $ wget https://sourceforge.net/projects/arma/files/armadillo-12.0.1.tar.xz
$ tar xvfz armadillo-11.2.1.tar.xz $ tar xvfz armadillo-12.0.1.tar.xz
$ cd armadillo-11.2.1 $ cd armadillo-12.0.1
$ cmake . $ cmake .
$ make $ make
$ sudo make install $ sudo make install

View File

@ -30,10 +30,10 @@ Gnss_Satellite::Gnss_Satellite(const std::string& system_, uint32_t PRN_)
void Gnss_Satellite::reset() void Gnss_Satellite::reset()
{ {
system = std::string(""); this->system.clear();
block = std::string(""); this->block.clear();
PRN = 0; this->PRN = 0;
rf_link = 0; this->rf_link = 0;
} }
@ -103,7 +103,10 @@ Gnss_Satellite::Gnss_Satellite(Gnss_Satellite&& other) noexcept
PRN(other.PRN), PRN(other.PRN),
rf_link(other.rf_link) rf_link(other.rf_link)
{ {
other.reset(); other.system.clear();
other.block.clear();
other.PRN = 0;
other.rf_link = 0;
} }
@ -116,7 +119,10 @@ Gnss_Satellite& Gnss_Satellite::operator=(Gnss_Satellite&& other) noexcept
block = std::move(other.block); block = std::move(other.block);
PRN = other.PRN; PRN = other.PRN;
rf_link = other.rf_link; rf_link = other.rf_link;
other.reset(); other.system.clear();
other.block.clear();
other.PRN = 0;
other.rf_link = 0;
} }
return *this; return *this;
} }
@ -621,7 +627,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
block_ = std::string("FOC-FM19"); // Galileo Full Operational Capability (FOC) satellite FM19 / GSAT0219, launched on Jul. 25, 2018. UNDER COMMISSIONING. block_ = std::string("FOC-FM19"); // Galileo Full Operational Capability (FOC) satellite FM19 / GSAT0219, launched on Jul. 25, 2018. UNDER COMMISSIONING.
break; break;
default: default:
block_ = std::string("Unknown(Simulated)"); block_ = std::string("Unknown");
} }
} }
if (system_ == "Beidou") if (system_ == "Beidou")
@ -768,7 +774,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
block_ = std::string("BeiDou-3 GEOG3"); // launched 2020/06/2023 block_ = std::string("BeiDou-3 GEOG3"); // launched 2020/06/2023
break; break;
default: default:
block_ = std::string("Unknown(Simulated)"); block_ = std::string("Unknown");
} }
} }
return block_; return block_;

View File

@ -72,7 +72,6 @@ private:
public: public:
int rx_message{0}; int rx_message{0};
~GpsL1CaPcpsAcquisitionTest_msg_rx() override; //!< Default destructor
}; };
@ -115,9 +114,6 @@ GpsL1CaPcpsAcquisitionTest_msg_rx::GpsL1CaPcpsAcquisitionTest_msg_rx()
} }
GpsL1CaPcpsAcquisitionTest_msg_rx::~GpsL1CaPcpsAcquisitionTest_msg_rx() = default;
// ########################################################### // ###########################################################
class GpsL1CaPcpsAcquisitionTest : public ::testing::Test class GpsL1CaPcpsAcquisitionTest : public ::testing::Test
@ -131,8 +127,6 @@ protected:
gnss_synchro = Gnss_Synchro(); gnss_synchro = Gnss_Synchro();
} }
~GpsL1CaPcpsAcquisitionTest() override = default;
void init(); void init();
void plot_grid() const; void plot_grid() const;

View File

@ -38,7 +38,6 @@ class DataTypeAdapter : public ::testing::Test
{ {
public: public:
DataTypeAdapter(); DataTypeAdapter();
~DataTypeAdapter() override;
int run_byte_to_short_block() const; int run_byte_to_short_block() const;
int run_ibyte_to_cbyte_block() const; int run_ibyte_to_cbyte_block() const;
int run_ibyte_to_complex_block() const; int run_ibyte_to_complex_block() const;
@ -67,9 +66,6 @@ DataTypeAdapter::DataTypeAdapter()
} }
DataTypeAdapter::~DataTypeAdapter() = default;
int DataTypeAdapter::run_ishort_to_cshort_block() const int DataTypeAdapter::run_ishort_to_cshort_block() const
{ {
std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>(); std::shared_ptr<ConfigurationInterface> config = std::make_shared<InMemoryConfiguration>();

View File

@ -44,23 +44,24 @@ DEFINE_int32(filter_test_nsamples, 1000000, "Number of samples to filter in the
class FirFilterTest : public ::testing::Test class FirFilterTest : public ::testing::Test
{ {
protected: protected:
FirFilterTest() : item_size(sizeof(gr_complex)) FirFilterTest() : item_size(sizeof(gr_complex)),
nsamples(FLAGS_filter_test_nsamples)
{ {
queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
} }
~FirFilterTest() override = default;
void init(); void init();
void configure_cbyte_cbyte(); void configure_cbyte_cbyte();
void configure_cbyte_gr_complex(); void configure_cbyte_gr_complex();
void configure_gr_complex_gr_complex(); void configure_gr_complex_gr_complex();
void configure_cshort_cshort(); void configure_cshort_cshort();
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
gr::top_block_sptr top_block; gr::top_block_sptr top_block;
std::shared_ptr<InMemoryConfiguration> config; std::shared_ptr<InMemoryConfiguration> config;
size_t item_size; size_t item_size;
int nsamples = FLAGS_filter_test_nsamples; int nsamples;
}; };

View File

@ -43,28 +43,28 @@ DEFINE_int32(notch_filter_lite_test_nsamples, 1000000, "Number of samples to fil
class NotchFilterLiteTest : public ::testing::Test class NotchFilterLiteTest : public ::testing::Test
{ {
protected: protected:
NotchFilterLiteTest() : item_size(sizeof(gr_complex)), nsamples(FLAGS_notch_filter_lite_test_nsamples) NotchFilterLiteTest() : item_size(sizeof(gr_complex)),
nsamples(FLAGS_notch_filter_lite_test_nsamples)
{ {
queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
} }
~NotchFilterLiteTest() override = default;
bool stop = false;
std::thread ch_thread;
void start_queue(); void start_queue();
void wait_message(); void wait_message();
void process_message(); void process_message();
void stop_queue(); void stop_queue();
pmt::pmt_t message;
void init(); void init();
void configure_gr_complex_gr_complex(); void configure_gr_complex_gr_complex();
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
gr::top_block_sptr top_block; gr::top_block_sptr top_block;
std::shared_ptr<InMemoryConfiguration> config; std::shared_ptr<InMemoryConfiguration> config;
pmt::pmt_t message;
std::thread ch_thread;
size_t item_size; size_t item_size;
int nsamples; int nsamples;
bool stop{false};
}; };

View File

@ -43,28 +43,28 @@ DEFINE_int32(notch_filter_test_nsamples, 1000000, "Number of samples to filter i
class NotchFilterTest : public ::testing::Test class NotchFilterTest : public ::testing::Test
{ {
protected: protected:
NotchFilterTest() : item_size(sizeof(gr_complex)), nsamples(FLAGS_notch_filter_test_nsamples) NotchFilterTest() : item_size(sizeof(gr_complex)),
nsamples(FLAGS_notch_filter_test_nsamples)
{ {
queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
} }
~NotchFilterTest() override = default;
bool stop = false;
std::thread ch_thread;
void start_queue(); void start_queue();
void wait_message(); void wait_message();
void process_message(); void process_message();
void stop_queue(); void stop_queue();
pmt::pmt_t message;
void init(); void init();
void configure_gr_complex_gr_complex(); void configure_gr_complex_gr_complex();
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
gr::top_block_sptr top_block; gr::top_block_sptr top_block;
std::shared_ptr<InMemoryConfiguration> config; std::shared_ptr<InMemoryConfiguration> config;
std::thread ch_thread;
pmt::pmt_t message;
size_t item_size; size_t item_size;
int nsamples; int nsamples;
bool stop{false};
}; };

View File

@ -43,26 +43,28 @@ DEFINE_int32(pb_filter_test_nsamples, 1000000, "Number of samples to filter in t
class PulseBlankingFilterTest : public ::testing::Test class PulseBlankingFilterTest : public ::testing::Test
{ {
protected: protected:
PulseBlankingFilterTest() : item_size(sizeof(gr_complex)), nsamples(FLAGS_pb_filter_test_nsamples) PulseBlankingFilterTest() : item_size(sizeof(gr_complex)),
nsamples(FLAGS_pb_filter_test_nsamples)
{ {
queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
} }
~PulseBlankingFilterTest() override = default;
bool stop = false;
std::thread ch_thread;
void start_queue(); void start_queue();
void wait_message(); void wait_message();
void process_message(); void process_message();
void stop_queue(); void stop_queue();
void init(); void init();
void configure_gr_complex_gr_complex(); void configure_gr_complex_gr_complex();
std::thread ch_thread;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
gr::top_block_sptr top_block;
std::shared_ptr<InMemoryConfiguration> config; std::shared_ptr<InMemoryConfiguration> config;
gr::top_block_sptr top_block;
pmt::pmt_t message;
size_t item_size; size_t item_size;
int nsamples; int nsamples;
pmt::pmt_t message; bool stop{false};
}; };

View File

@ -126,14 +126,14 @@ TEST(CpuMulticorrelatorRealCodesTest, MeasureExecutionTime)
// create the concurrent correlator threads // create the concurrent correlator threads
for (int current_thread = 0; current_thread < current_max_threads; current_thread++) for (int current_thread = 0; current_thread < current_max_threads; current_thread++)
{ {
thread_pool.emplace_back(std::thread(run_correlator_cpu_real_codes, thread_pool.emplace_back(run_correlator_cpu_real_codes,
correlator_pool[current_thread], correlator_pool[current_thread],
d_rem_carrier_phase_rad, d_rem_carrier_phase_rad,
d_carrier_phase_step_rad, d_carrier_phase_step_rad,
d_code_phase_step_chips, d_code_phase_step_chips,
d_code_phase_rate_step_chips, d_code_phase_rate_step_chips,
d_rem_code_phase_chips, d_rem_code_phase_chips,
correlation_sizes[correlation_sizes_idx])); correlation_sizes[correlation_sizes_idx]);
} }
// wait the threads to finish they work and destroy the thread objects // wait the threads to finish they work and destroy the thread objects
for (auto& t : thread_pool) for (auto& t : thread_pool)
@ -224,14 +224,14 @@ TEST(CpuMulticorrelatorRealCodesTest, MeasureExecutionTimeAlloc)
// create the concurrent correlator threads // create the concurrent correlator threads
for (int current_thread = 0; current_thread < current_max_threads; current_thread++) for (int current_thread = 0; current_thread < current_max_threads; current_thread++)
{ {
thread_pool.emplace_back(std::thread(run_correlator_cpu_real_codes, thread_pool.emplace_back(run_correlator_cpu_real_codes,
correlator_pool[current_thread], correlator_pool[current_thread],
d_rem_carrier_phase_rad, d_rem_carrier_phase_rad,
d_carrier_phase_step_rad, d_carrier_phase_step_rad,
d_code_phase_step_chips, d_code_phase_step_chips,
d_code_phase_rate_step_chips, d_code_phase_rate_step_chips,
d_rem_code_phase_chips, d_rem_code_phase_chips,
correlation_sizes[correlation_sizes_idx])); correlation_sizes[correlation_sizes_idx]);
} }
// wait the threads to finish they work and destroy the thread objects // wait the threads to finish they work and destroy the thread objects
for (auto& t : thread_pool) for (auto& t : thread_pool)

View File

@ -122,13 +122,13 @@ TEST(CpuMulticorrelatorTest, MeasureExecutionTime)
// create the concurrent correlator threads // create the concurrent correlator threads
for (int current_thread = 0; current_thread < current_max_threads; current_thread++) for (int current_thread = 0; current_thread < current_max_threads; current_thread++)
{ {
thread_pool.push_back(std::thread(run_correlator_cpu, thread_pool.emplace_back(run_correlator_cpu,
correlator_pool[current_thread], correlator_pool[current_thread],
d_rem_carrier_phase_rad, d_rem_carrier_phase_rad,
d_carrier_phase_step_rad, d_carrier_phase_step_rad,
d_code_phase_step_chips, d_code_phase_step_chips,
d_rem_code_phase_chips, d_rem_code_phase_chips,
correlation_sizes[correlation_sizes_idx])); correlation_sizes[correlation_sizes_idx]);
} }
// wait the threads to finish they work and destroy the thread objects // wait the threads to finish they work and destroy the thread objects
for (auto& t : thread_pool) for (auto& t : thread_pool)
@ -220,13 +220,13 @@ TEST(CpuMulticorrelatorTest, MeasureExecutionTimeAlloc)
// create the concurrent correlator threads // create the concurrent correlator threads
for (int current_thread = 0; current_thread < current_max_threads; current_thread++) for (int current_thread = 0; current_thread < current_max_threads; current_thread++)
{ {
thread_pool.push_back(std::thread(run_correlator_cpu, thread_pool.emplace_back(run_correlator_cpu,
correlator_pool[current_thread], correlator_pool[current_thread],
d_rem_carrier_phase_rad, d_rem_carrier_phase_rad,
d_carrier_phase_step_rad, d_carrier_phase_step_rad,
d_code_phase_step_chips, d_code_phase_step_chips,
d_rem_code_phase_chips, d_rem_code_phase_chips,
correlation_sizes[correlation_sizes_idx])); correlation_sizes[correlation_sizes_idx]);
} }
// wait the threads to finish they work and destroy the thread objects // wait the threads to finish they work and destroy the thread objects
for (auto& t : thread_pool) for (auto& t : thread_pool)

View File

@ -45,11 +45,8 @@ protected:
{ {
factory = std::make_shared<GNSSBlockFactory>(); factory = std::make_shared<GNSSBlockFactory>();
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
gnss_synchro = Gnss_Synchro();
} }
~GalileoE1DllPllVemlTrackingInternalTest() override = default;
void init(); void init();
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue;
@ -58,8 +55,8 @@ protected:
std::shared_ptr<InMemoryConfiguration> config; std::shared_ptr<InMemoryConfiguration> config;
Gnss_Synchro gnss_synchro{}; Gnss_Synchro gnss_synchro{};
size_t item_size; size_t item_size;
bool stop{false};
int message{0}; int message{0};
bool stop{false};
}; };