From 1d80f1ba9beed559372947acef4c596433dbb3b1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 14 Jun 2019 18:22:07 +0200 Subject: [PATCH 01/20] Fix building if Armadillo < 9.400 --- src/algorithms/tracking/libs/CMakeLists.txt | 9 +++++++-- src/tests/CMakeLists.txt | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index 80948c7e3..f8fb19479 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -33,7 +33,6 @@ set(TRACKING_LIB_SOURCES cpu_multicorrelator.cc cpu_multicorrelator_real_codes.cc cpu_multicorrelator_16sc.cc - nonlinear_tracking.cc lock_detectors.cc tcp_communication.cc tcp_packet_data.cc @@ -51,7 +50,6 @@ set(TRACKING_LIB_HEADERS cpu_multicorrelator.h cpu_multicorrelator_real_codes.h cpu_multicorrelator_16sc.h - nonlinear_tracking.h lock_detectors.h tcp_communication.h tcp_packet_data.h @@ -65,6 +63,12 @@ set(TRACKING_LIB_HEADERS exponential_smoother.h ) +if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) + # sqrtmat_sympd() requires 9.400 + set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} nonlinear_tracking.cc) + set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} nonlinear_tracking.h) +endif() + if(ENABLE_FPGA) set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} fpga_multicorrelator.cc dll_pll_conf_fpga.cc) set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} fpga_multicorrelator.h dll_pll_conf_fpga.h) @@ -84,6 +88,7 @@ target_link_libraries(tracking_libs Gnuradio::runtime Volkgnsssdr::volkgnsssdr core_system_parameters + algorithms_libs ${OPT_TRACKING_LIBRARIES} PRIVATE Gflags::gflags diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 8bbddef13..219676d34 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -161,6 +161,11 @@ if(ENABLE_FPGA) add_definitions(-DFPGA_BLOCKS_TEST=1) endif() +if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) + # sqrtmat_sympd() in nonlinear_tracking.cc requires 9.400 + add_definitions(-DARMADILLO_HAVE_MVNRND=1) +endif() + find_package(Gnuplot) if(GNUPLOT_FOUND) add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}") From a22f79891b8db1fdb49e0c8f20465941bccf266d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 14 Jun 2019 19:16:37 +0200 Subject: [PATCH 02/20] Fix building if Armadillo < 8.400 --- src/tests/test_main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc index f171f199a..e20338cfa 100644 --- a/src/tests/test_main.cc +++ b/src/tests/test_main.cc @@ -99,8 +99,10 @@ DECLARE_string(log_dir); #endif #include "unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc" +#if ARMADILLO_HAVE_MVNRND #include "unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc" #include "unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc" +#endif #include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc" #include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc" #include "unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc" From 61f7ea2922a21b09913162dbdb82087cf29fa5d4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 14 Jun 2019 21:16:40 +0200 Subject: [PATCH 03/20] Fix for Armadillo < 8.400 --- src/tests/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 219676d34..04faa41a7 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -798,14 +798,20 @@ endif() ######################################################### if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) + set(NONLINEAR_SOURCES "") + if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) + set(NONLINEAR_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc + ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc + ) + endif() add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/bayesian_estimation_test.cc - ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc - ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc + ${NONLINEAR_SOURCES} ) if(${FILESYSTEM_FOUND}) target_compile_definitions(trk_test PRIVATE -DHAS_STD_FILESYSTEM=1) From 7467f94164b96b2821ca5b3eea10c2fbac79c808 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 10:11:11 +0200 Subject: [PATCH 04/20] Relax Armadillo version for nonlinear filters --- src/algorithms/tracking/libs/CMakeLists.txt | 4 ++-- src/tests/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index f8fb19479..e8bfb8d26 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -63,8 +63,8 @@ set(TRACKING_LIB_HEADERS exponential_smoother.h ) -if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) - # sqrtmat_sympd() requires 9.400 +if(ARMADILLO_VERSION_STRING VERSION_GREATER 7.400) + # sqrtmat_sympd() requires 7.400 set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} nonlinear_tracking.cc) set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} nonlinear_tracking.h) endif() diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 04faa41a7..12f65f0fd 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -161,8 +161,8 @@ if(ENABLE_FPGA) add_definitions(-DFPGA_BLOCKS_TEST=1) endif() -if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) - # sqrtmat_sympd() in nonlinear_tracking.cc requires 9.400 +if(ARMADILLO_VERSION_STRING VERSION_GREATER 8.400) + # mvnrnd() requires 8.400 add_definitions(-DARMADILLO_HAVE_MVNRND=1) endif() @@ -799,7 +799,7 @@ endif() ######################################################### if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) set(NONLINEAR_SOURCES "") - if(ARMADILLO_VERSION_STRING VERSION_GREATER 9.400) + if(ARMADILLO_VERSION_STRING VERSION_GREATER 8.400) set(NONLINEAR_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc From ec8f398e59031e7cee58211c5d2def01665bfee7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 14 Jun 2019 14:10:30 +0200 Subject: [PATCH 05/20] Set CMAKE_CXX_STANDARD to 20 when available --- CMakeLists.txt | 6 +++++- .../libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66ae4894a..601688fa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -787,7 +787,11 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17) TYPE OPTIONAL ) if(${FILESYSTEM_FOUND}) - set(CMAKE_CXX_STANDARD 17) + if(CMAKE_VERSION VERSION_LESS 3.12) + set(CMAKE_CXX_STANDARD 17) + else() + set(CMAKE_CXX_STANDARD 20) + endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() endif() diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index 8d515f584..86b4eab9d 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -95,7 +95,11 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) set(CMAKE_CXX_STANDARD 14) else() if(${FILESYSTEM_FOUND}) - set(CMAKE_CXX_STANDARD 17) + if(CMAKE_VERSION VERSION_LESS 3.12) + set(CMAKE_CXX_STANDARD 17) + else() + set(CMAKE_CXX_STANDARD 20) + endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) else() set(CMAKE_CXX_STANDARD 14) From aae32a103360b5004900f4e705cca83a4e6d3d2c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 11:02:06 +0200 Subject: [PATCH 06/20] Udpate changelog --- docs/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog b/docs/changelog index 5cfa4faee..b816abbc7 100644 --- a/docs/changelog +++ b/docs/changelog @@ -50,7 +50,8 @@ - Added interfaces for FPGA off-loading. - CMake scripts now follow a modern approach (targets and properties) but still work with 2.8.12. - Improvements for macOS users using Homebrew. -- The volk_gnsssdr library can now be built without requiring Boost if the compiler supports C++17. +- The volk_gnsssdr library can now be built without requiring Boost if the compiler supports C++17 or higher. +- CMake scripts automatically select among C++11, C++14, C++17 or C++20 standards, the most recent as possible, depending on compiler and dependencies versions. ### Improvements in Reliability From 6911ad8fce8553c81762d3ada63ee706df43b9ff Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 13:07:09 +0200 Subject: [PATCH 07/20] Remove performance-unnecessary-copy-initialization clang-tidy check Applying its fixes breaks building when using clnag 8.0 :-( --- .clang-tidy | 1 - docs/changelog | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index bfb1b252c..3515d6a2a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -32,7 +32,6 @@ Checks: '-*, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, - performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-container-size-empty, readability-identifier-naming, diff --git a/docs/changelog b/docs/changelog index b816abbc7..25156e270 100644 --- a/docs/changelog +++ b/docs/changelog @@ -16,7 +16,7 @@ - Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average per channel). - Shortened Acquisition to Tracking transition time. -- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-string-compare. +- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-value-param, readability-string-compare. ### Improvements in Flexibility: From b11e85aa61ba3af241c5d3333b4b4b57ef3af106 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 19:33:00 +0200 Subject: [PATCH 08/20] Find libgfortran in more environments (including gcc 9.0) --- cmake/Modules/FindGFORTRAN.cmake | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/cmake/Modules/FindGFORTRAN.cmake b/cmake/Modules/FindGFORTRAN.cmake index f19ccd77a..395639c9a 100644 --- a/cmake/Modules/FindGFORTRAN.cmake +++ b/cmake/Modules/FindGFORTRAN.cmake @@ -45,12 +45,37 @@ find_library(GFORTRAN NAMES gfortran /usr/lib/gcc/i686-redhat-linux/4.8.2 /usr/lib/gcc/x86_64-redhat-linux/7 /usr/lib/gcc/i686-redhat-linux/7 + /usr/lib/gcc/x86_64-redhat-linux/8 + /usr/lib/gcc/i686-redhat-linux/8 + /usr/lib/gcc/x86_64-redhat-linux/9 + /usr/lib/gcc/i686-redhat-linux/9 + /usr/lib64/gcc/x86_64-redhat-linux/7 + /usr/lib64/gcc/x86_64-redhat-linux/8 + /usr/lib64/gcc/x86_64-redhat-linux/9 /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/7 /usr/lib/gcc/aarch64-redhat-linux/7 /usr/lib/gcc/i586-suse-linux/4.8 # OpenSUSE 13.1 /usr/lib/gcc/i586-suse-linux/4.9 + /usr/lib/gcc/i586-suse-linux/7 + /usr/lib/gcc/i586-suse-linux/8 + /usr/lib/gcc/i586-suse-linux/9 /usr/lib/gcc/x86_64-suse-linux/4.8 /usr/lib/gcc/x86_64-suse-linux/4.9 + /usr/lib64/gcc/x86_64-suse-linux/7 + /usr/lib64/gcc/x86_64-suse-linux/8 + /usr/lib64/gcc/x86_64-suse-linux/9 + /usr/lib/gcc/armv7hl-suse-linux-gnueabi/7 + /usr/lib/gcc/armv7hl-suse-linux-gnueabi/8 + /usr/lib/gcc/armv7hl-suse-linux-gnueabi/9 + /usr/lib64/gcc/aarch64-suse-linux/7 + /usr/lib64/gcc/aarch64-suse-linux/8 + /usr/lib64/gcc/aarch64-suse-linux/9 + /usr/lib64/gcc/powerpc64-suse-linux/7 + /usr/lib64/gcc/powerpc64-suse-linux/8 + /usr/lib64/gcc/powerpc64-suse-linux/9 + /usr/lib64/gcc/powerpc64le-suse-linux/7 + /usr/lib64/gcc/powerpc64le-suse-linux/8 + /usr/lib64/gcc/powerpc64le-suse-linux/9 /usr/lib/gcc/i486-linux-gnu # Debian 7 /usr/lib/gcc/i486-linux-gnu/4.4 /usr/lib/gcc/i486-linux-gnu/4.6 @@ -142,6 +167,24 @@ find_library(GFORTRAN NAMES gfortran /usr/lib/gcc/powerpc64le-linux-gnu/8 /usr/lib/gcc/s390x-linux-gnu/8 /usr/lib/gcc/alpha-linux-gnu/8 + /usr/lib/gcc/x86_64-linux-gnu/9 + /usr/lib/gcc/aarch64-linux-gnu/9 + /usr/lib/gcc/arm-linux-gnueabi/9 + /usr/lib/gcc/arm-linux-gnueabihf/9 + /usr/lib/gcc/i686-linux-gnu/9 + /usr/lib/gcc/powerpc64le-linux-gnu/9 + /usr/lib/gcc/powerpc64-linux-gnu/9/ + /usr/lib/gcc/s390x-linux-gnu/9 + /usr/lib/gcc/alpha-linux-gnu/9 + /usr/lib/gcc/hppa-linux-gnu/9 + /usr/lib/gcc/m68k-linux-gnu/9 + /usr/lib/gcc/mips-linux-gnu/9 + /usr/lib/gcc/mips64el-linux-gnuabi64/9 + /usr/lib/gcc/mipsel-linux-gnu/9 + /usr/lib/gcc/riscv64-linux-gnu/9 + /usr/lib/gcc/sh4-linux-gnu/9 + /usr/lib/gcc/sparc64-linux-gnu/9 + /usr/lib/gcc/x86_64-linux-gnux32/9 ${GFORTRAN_ROOT}/lib $ENV{GFORTRAN_ROOT}/lib ) From 6df59ab6b771ba8b3667df38836cee00cce801eb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 20:39:06 +0200 Subject: [PATCH 09/20] Allow building glog with clang and stdc++ --- CMakeLists.txt | 55 +++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 601688fa2..beac67588 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1235,37 +1235,32 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS}) set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS}) endif() - - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags -"#!/bin/sh -export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} -export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK} -export LIBS=\"${GFLAGS_LIBRARIES_TO_LINK} -lc++\" -export CXXFLAGS=\"-stdlib=libc++\" -export CC=clang -export CXX=clang++ -cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/ -aclocal -automake --add-missing -autoreconf -vfi -cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION} -${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure" - ) - else() - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags -"#!/bin/sh -export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} -export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK} -export LIBS=${GFLAGS_LIBRARIES_TO_LINK} -cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/ -aclocal -automake --add-missing -autoreconf -vfi -cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION} -${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure" - ) + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag(-stdlib=libc++ HAVE_FLAG_CXX) + if(${HAVE_FLAG_CXX}) + set(GFLAGS_LIBRARIES_TO_LINK "${GFLAGS_LIBRARIES_TO_LINK} -lc++") + set(GLOG_EXPORT_CXX_LIBRARIES "export CXXFLAGS=\"-stdlib=libc++\"") endif() + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(GLOG_EXPORT_C_COMPILER "export CC=clang") + set(GLOG_EXPORT_CXX_COMPILER "export CXX=clang++") + endif() + + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags +"#!/bin/sh +export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} +export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK} +export LIBS=\"${GFLAGS_LIBRARIES_TO_LINK}\" +${GLOG_EXPORT_CXX_LIBRARIES} +${GLOG_EXPORT_C_COMPILER} +${GLOG_EXPORT_CXX_COMPILER} +cd ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/ +aclocal +automake --add-missing +autoreconf -vfi +cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION} +${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure" + ) file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION} From 62280567a63c0eeec0517712c3876a12fd101f34 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 22:01:05 +0200 Subject: [PATCH 10/20] Allow building glog with clang --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index beac67588..b13dd1407 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1235,9 +1235,7 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS}) set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS}) endif() - include(CheckCXXCompilerFlag) - check_cxx_compiler_flag(-stdlib=libc++ HAVE_FLAG_CXX) - if(${HAVE_FLAG_CXX}) + if(OS_IS_MACOSX) set(GFLAGS_LIBRARIES_TO_LINK "${GFLAGS_LIBRARIES_TO_LINK} -lc++") set(GLOG_EXPORT_CXX_LIBRARIES "export CXXFLAGS=\"-stdlib=libc++\"") endif() From 597806ed179e5bcc21c0b49c4efd52dcace0584b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 22:14:38 +0200 Subject: [PATCH 11/20] Add Catalina to the list of macOS versions --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b13dd1407..8193d44b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,6 +295,12 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(OS_IS_MACOSX TRUE) execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION) string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) + if(${DARWIN_VERSION} MATCHES "19") + set(MACOS_CATALINA TRUE) + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on macOS Catalina 10.15") + endif() if(${DARWIN_VERSION} MATCHES "18") set(MACOS_MOJAVE TRUE) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") From c31236096d3b02bb0bba0d219546c626ae1d42a1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 22:25:22 +0200 Subject: [PATCH 12/20] Build volk_gnsssdr with C++20 with clang++ if available --- .../libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index 86b4eab9d..4dc040d43 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -138,7 +138,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_STANDARD 14) else() if(${FILESYSTEM_FOUND}) - set(CMAKE_CXX_STANDARD 17) + if(CMAKE_VERSION VERSION_LESS 3.12) + set(CMAKE_CXX_STANDARD 17) + else() + set(CMAKE_CXX_STANDARD 20) + endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) else() set(CMAKE_CXX_STANDARD 14) From e2d583a44205aa6d49289f32cfa0423f7dd4b1d8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 15 Jun 2019 23:49:24 +0200 Subject: [PATCH 13/20] Move definition og GNU Radio imported targets to the custom CMake module --- CMakeLists.txt | 126 ------------------------------- cmake/Modules/FindGNURADIO.cmake | 37 +++++++++ 2 files changed, 37 insertions(+), 126 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8193d44b3..f2f4b7f8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -629,132 +629,6 @@ set_package_properties(GNURADIO PROPERTIES PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." TYPE REQUIRED ) -if(GNURADIO_VERSION) - if(GNURADIO_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) - unset(GNURADIO_RUNTIME_FOUND) - message(STATUS "The GNU Radio version installed in your system (v${GNURADIO_VERSION}) is too old.") - endif() -endif() -if(NOT GNURADIO_RUNTIME_FOUND) - message(STATUS "CMake cannot find GNU Radio >= ${GNSSSDR_GNURADIO_MIN_VERSION}") - if(OS_IS_LINUX) - message("Go to https://github.com/gnuradio/pybombs") - message("and follow the instructions to install GNU Radio in your system.") - endif() - if(OS_IS_MACOSX) - message("You can install it easily via Macports:") - message(" sudo port install gnuradio ") - message("Alternatively, you can use homebrew:") - message(" brew install gnuradio") - endif() - message(FATAL_ERROR "GNU Radio v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr.") -else() - if(NOT TARGET Gnuradio::runtime) - add_library(Gnuradio::runtime SHARED IMPORTED) - list(GET GNURADIO_RUNTIME_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_RUNTIME_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::runtime PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_RUNTIME_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_RUNTIME_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_RUNTIME_LIBRARIES}" - ) - endif() -endif() - -if(NOT GNURADIO_ANALOG_FOUND) - message(FATAL_ERROR "*** The gnuradio-analog library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") -else() - if(NOT TARGET Gnuradio::analog) - add_library(Gnuradio::analog SHARED IMPORTED) - list(GET GNURADIO_ANALOG_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_ANALOG_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::analog PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_ANALOG_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_ANALOG_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_ANALOG_LIBRARIES}" - ) - endif() -endif() - -if(NOT GNURADIO_BLOCKS_FOUND) - message(FATAL_ERROR "*** The gnuradio-blocks library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") -else() - if(NOT TARGET Gnuradio::blocks) - add_library(Gnuradio::blocks SHARED IMPORTED) - list(GET GNURADIO_BLOCKS_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_BLOCKS_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::blocks PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_BLOCKS_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_BLOCKS_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_BLOCKS_LIBRARIES}" - ) - endif() -endif() - -if(NOT GNURADIO_FILTER_FOUND) - message(FATAL_ERROR "*** The gnuradio-filter library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") -else() - if(NOT TARGET Gnuradio::filter) - add_library(Gnuradio::filter SHARED IMPORTED) - list(GET GNURADIO_FILTER_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_FILTER_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::filter PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_FILTER_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FILTER_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_FILTER_LIBRARIES}" - ) - endif() -endif() - -if(NOT GNURADIO_FFT_FOUND) - message(FATAL_ERROR "*** The gnuradio-fft library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") -else() - if(NOT TARGET Gnuradio::fft) - add_library(Gnuradio::fft SHARED IMPORTED) - list(GET GNURADIO_FFT_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_FFT_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::fft PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_FFT_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FFT_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_FFT_LIBRARIES}" - ) - endif() -endif() - -if(NOT GNURADIO_PMT_FOUND) - message(FATAL_ERROR "*** The gnuradio-pmt library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") -else() - if(NOT TARGET Gnuradio::pmt) - add_library(Gnuradio::pmt SHARED IMPORTED) - list(GET GNURADIO_PMT_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_PMT_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::pmt PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_PMT_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_PMT_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_PMT_LIBRARIES}" - ) - endif() -endif() - -if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND) - if(NOT TARGET Gnuradio::uhd) - add_library(Gnuradio::uhd SHARED IMPORTED) - list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::uhd PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_UHD_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}" - ) - endif() -endif() diff --git a/cmake/Modules/FindGNURADIO.cmake b/cmake/Modules/FindGNURADIO.cmake index 37b106833..27777983c 100644 --- a/cmake/Modules/FindGNURADIO.cmake +++ b/cmake/Modules/FindGNURADIO.cmake @@ -143,6 +143,21 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) set(GNURADIO_FOUND FALSE) # Trick for feature_summary endif() + # Create imported target + string(TOLOWER ${EXTVAR} gnuradio_component) + if(NOT TARGET Gnuradio::${gnuradio_component}) + add_library(Gnuradio::${gnuradio_component} SHARED IMPORTED) + set(GNURADIO_LIBRARY ${GNURADIO_${EXTVAR}_LIBRARIES}) + list(GET GNURADIO_LIBRARY 0 FIRST_DIR) + get_filename_component(GNURADIO_DIR ${FIRST_DIR} ABSOLUTE) + set_target_properties(Gnuradio::${gnuradio_component} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${GNURADIO_DIR}" + INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_${EXTVAR}_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${GNURADIO_LIBRARY}" + ) + endif() + mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS) endfunction() @@ -218,3 +233,25 @@ if(NOT DEFINED GNURADIO_FOUND) set(GNURADIO_FOUND TRUE) endif() set(GNURADIO_VERSION ${PC_GNURADIO_RUNTIME_VERSION}) + +if(NOT GNSSSDR_GNURADIO_MIN_VERSION) + set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3") +endif() + +if(GNURADIO_VERSION) + if(GNURADIO_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) + unset(GNURADIO_RUNTIME_FOUND) + message(STATUS "The GNU Radio version installed in your system (v${GNURADIO_VERSION}) is too old.") + if(OS_IS_LINUX) + message("Go to https://github.com/gnuradio/pybombs") + message("and follow the instructions to install GNU Radio in your system.") + endif() + if(OS_IS_MACOSX) + message("You can install it easily via Macports:") + message(" sudo port install gnuradio ") + message("Alternatively, you can use homebrew:") + message(" brew install gnuradio") + endif() + message(FATAL_ERROR "GNU Radio v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr.") + endif() +endif() From e574ecdccf914ca06eb5cfd6885c1cba0497d3a7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 00:16:52 +0200 Subject: [PATCH 14/20] Print Armadillo version if found in the summary report --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f4b7f8e..bfee10eb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1337,6 +1337,9 @@ set_package_properties(Armadillo PROPERTIES TYPE REQUIRED ) if(ARMADILLO_FOUND) + set_package_properties(Armadillo PROPERTIES + DESCRIPTION "C++ library for linear algebra and scientific computing (found: v${ARMADILLO_VERSION_STRING})" + ) if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION}) set(ARMADILLO_FOUND false) set(ENABLE_OWN_ARMADILLO true) From 75d51ab837d29222d4579bef58f1aee2d984bc0d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 09:37:04 +0200 Subject: [PATCH 15/20] Fix typos, improve comments --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfee10eb9..e3a44189f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,7 +474,7 @@ endif() ################################################################################ -# Set C and C++ standard +# Set minimal C and C++ standards ################################################################################ if(NOT (CMAKE_VERSION VERSION_LESS "3.1")) set(CMAKE_C_STANDARD 11) @@ -490,7 +490,7 @@ else() endif() endif() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - if(OS_IS_MACOSX) + if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") if(CLANG_VERSION VERSION_LESS "600") add_compile_options("$<$,CXX>:-std=c++11>") else() @@ -649,7 +649,7 @@ endif() ################################################################################ -# Dectect availability of std::filesystem +# Detect availability of std::filesystem and set C++ standard accordingly ################################################################################ set(FILESYSTEM_FOUND FALSE) if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17) From d6887488f3f6399f161d6f876cb8c6f17866d8ba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 11:40:58 +0200 Subject: [PATCH 16/20] Avoid usage of std::rand() --- .../tracking/cubature_filter_test.cc | 5 +++-- .../tracking/unscented_filter_test.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc index ec61ea47d..827c706ea 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc @@ -97,14 +97,15 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest) std::default_random_engine e1(r()); std::normal_distribution normal_dist(0, 5); std::uniform_real_distribution uniform_dist(0.1, 5.0); + std::uniform_int_distribution<> uniform_dist_int(1, 5); uint8_t nx = 0; uint8_t ny = 0; for (uint16_t k = 0; k < CUBATURE_TEST_N_TRIALS; k++) { - nx = std::rand() % 5 + 1; - ny = std::rand() % 5 + 1; + nx = static_cast(uniform_dist_int(e1)); + ny = static_cast(uniform_dist_int(e1)); kf_x = arma::randn(nx, 1); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc index d68a76ea6..510ac90b5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc @@ -97,14 +97,15 @@ TEST(UnscentedFilterComputationTest, UnscentedFilterTest) std::default_random_engine e1(r()); std::normal_distribution normal_dist(0, 5); std::uniform_real_distribution uniform_dist(0.1, 5.0); + std::uniform_int_distribution<> uniform_dist_int(1, 5); uint8_t nx = 0; uint8_t ny = 0; for (uint16_t k = 0; k < UNSCENTED_TEST_N_TRIALS; k++) { - nx = std::rand() % 5 + 1; - ny = std::rand() % 5 + 1; + nx = static_cast(uniform_dist_int(e1)); + ny = static_cast(uniform_dist_int(e1)); kf_x = arma::randn(nx, 1); From 16f7c4b889f78f8fb89af994e548896b607ec412 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 14:54:41 +0200 Subject: [PATCH 17/20] Pass vectors and matrices by reference, rename classes to CamelCase style --- .../tracking/libs/nonlinear_tracking.cc | 46 +++++++++---------- .../tracking/libs/nonlinear_tracking.h | 40 ++++++++-------- .../tracking/cubature_filter_test.cc | 22 ++++----- .../tracking/unscented_filter_test.cc | 22 ++++----- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/algorithms/tracking/libs/nonlinear_tracking.cc b/src/algorithms/tracking/libs/nonlinear_tracking.cc index 99d637f06..645185730 100644 --- a/src/algorithms/tracking/libs/nonlinear_tracking.cc +++ b/src/algorithms/tracking/libs/nonlinear_tracking.cc @@ -4,7 +4,7 @@ * * Cubature_Filter implements the functionality of the Cubature Kalman * Filter, which uses multidimensional cubature rules to estimate the - * time evolution of a nonlinear system. Unscented_filter implements + * time evolution of a nonlinear system. UnscentedFilter implements * an Unscented Kalman Filter which uses Unscented Transform rules to * perform a similar estimation. * @@ -44,7 +44,7 @@ /***************** CUBATURE KALMAN FILTER *****************/ -Cubature_filter::Cubature_filter() +CubatureFilter::CubatureFilter() { int nx = 1; x_pred_out = arma::zeros(nx, 1); @@ -55,7 +55,7 @@ Cubature_filter::Cubature_filter() } -Cubature_filter::Cubature_filter(int nx) +CubatureFilter::CubatureFilter(int nx) { x_pred_out = arma::zeros(nx, 1); P_x_pred_out = arma::eye(nx, nx) * (nx + 1); @@ -65,7 +65,7 @@ Cubature_filter::Cubature_filter(int nx) } -Cubature_filter::Cubature_filter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0) +CubatureFilter::CubatureFilter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0) { x_pred_out = x_pred_0; P_x_pred_out = P_x_pred_0; @@ -75,10 +75,10 @@ Cubature_filter::Cubature_filter(const arma::vec& x_pred_0, const arma::mat& P_x } -Cubature_filter::~Cubature_filter() = default; +CubatureFilter::~CubatureFilter() = default; -void Cubature_filter::initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0) +void CubatureFilter::initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0) { x_pred_out = x_pred_0; P_x_pred_out = P_x_pred_0; @@ -91,7 +91,7 @@ void Cubature_filter::initialize(const arma::mat& x_pred_0, const arma::mat& P_x /* * Perform the prediction step of the cubature Kalman filter */ -void Cubature_filter::predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, Model_Function* transition_fcn, const arma::mat& noise_covariance) +void CubatureFilter::predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, ModelFunction* transition_fcn, const arma::mat& noise_covariance) { // Compute number of cubature points int nx = x_post.n_elem; @@ -133,7 +133,7 @@ void Cubature_filter::predict_sequential(const arma::vec& x_post, const arma::ma /* * Perform the update step of the cubature Kalman filter */ -void Cubature_filter::update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, Model_Function* measurement_fcn, const arma::mat& noise_covariance) +void CubatureFilter::update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, ModelFunction* measurement_fcn, const arma::mat& noise_covariance) { // Compute number of cubature points int nx = x_pred.n_elem; @@ -178,25 +178,25 @@ void Cubature_filter::update_sequential(const arma::vec& z_upd, const arma::vec& } -arma::mat Cubature_filter::get_x_pred() const +arma::mat CubatureFilter::get_x_pred() const { return x_pred_out; } -arma::mat Cubature_filter::get_P_x_pred() const +arma::mat CubatureFilter::get_P_x_pred() const { return P_x_pred_out; } -arma::mat Cubature_filter::get_x_est() const +arma::mat CubatureFilter::get_x_est() const { return x_est; } -arma::mat Cubature_filter::get_P_x_est() const +arma::mat CubatureFilter::get_P_x_est() const { return P_x_est; } @@ -205,7 +205,7 @@ arma::mat Cubature_filter::get_P_x_est() const /***************** UNSCENTED KALMAN FILTER *****************/ -Unscented_filter::Unscented_filter() +UnscentedFilter::UnscentedFilter() { int nx = 1; x_pred_out = arma::zeros(nx, 1); @@ -216,7 +216,7 @@ Unscented_filter::Unscented_filter() } -Unscented_filter::Unscented_filter(int nx) +UnscentedFilter::UnscentedFilter(int nx) { x_pred_out = arma::zeros(nx, 1); P_x_pred_out = arma::eye(nx, nx) * (nx + 1); @@ -226,7 +226,7 @@ Unscented_filter::Unscented_filter(int nx) } -Unscented_filter::Unscented_filter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0) +UnscentedFilter::UnscentedFilter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0) { x_pred_out = x_pred_0; P_x_pred_out = P_x_pred_0; @@ -236,10 +236,10 @@ Unscented_filter::Unscented_filter(const arma::vec& x_pred_0, const arma::mat& P } -Unscented_filter::~Unscented_filter() = default; +UnscentedFilter::~UnscentedFilter() = default; -void Unscented_filter::initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0) +void UnscentedFilter::initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0) { x_pred_out = x_pred_0; P_x_pred_out = P_x_pred_0; @@ -252,7 +252,7 @@ void Unscented_filter::initialize(const arma::mat& x_pred_0, const arma::mat& P_ /* * Perform the prediction step of the Unscented Kalman filter */ -void Unscented_filter::predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, Model_Function* transition_fcn, const arma::mat& noise_covariance) +void UnscentedFilter::predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, ModelFunction* transition_fcn, const arma::mat& noise_covariance) { // Compute number of sigma points int nx = x_post.n_elem; @@ -307,7 +307,7 @@ void Unscented_filter::predict_sequential(const arma::vec& x_post, const arma::m /* * Perform the update step of the Unscented Kalman filter */ -void Unscented_filter::update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, Model_Function* measurement_fcn, const arma::mat& noise_covariance) +void UnscentedFilter::update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, ModelFunction* measurement_fcn, const arma::mat& noise_covariance) { // Compute number of sigma points int nx = x_pred.n_elem; @@ -364,25 +364,25 @@ void Unscented_filter::update_sequential(const arma::vec& z_upd, const arma::vec } -arma::mat Unscented_filter::get_x_pred() const +arma::mat UnscentedFilter::get_x_pred() const { return x_pred_out; } -arma::mat Unscented_filter::get_P_x_pred() const +arma::mat UnscentedFilter::get_P_x_pred() const { return P_x_pred_out; } -arma::mat Unscented_filter::get_x_est() const +arma::mat UnscentedFilter::get_x_est() const { return x_est; } -arma::mat Unscented_filter::get_P_x_est() const +arma::mat UnscentedFilter::get_P_x_est() const { return P_x_est; } diff --git a/src/algorithms/tracking/libs/nonlinear_tracking.h b/src/algorithms/tracking/libs/nonlinear_tracking.h index fdba4fec3..642645ea1 100644 --- a/src/algorithms/tracking/libs/nonlinear_tracking.h +++ b/src/algorithms/tracking/libs/nonlinear_tracking.h @@ -2,9 +2,9 @@ * \file nonlinear_tracking.h * \brief Interface of a library for nonlinear tracking algorithms * - * Cubature_Filter implements the functionality of the Cubature Kalman + * CubatureFilter implements the functionality of the Cubature Kalman * Filter, which uses multidimensional cubature rules to estimate the - * time evolution of a nonlinear system. Unscented_filter implements + * time evolution of a nonlinear system. UnscentedFilter implements * an Unscented Kalman Filter which uses Unscented Transform rules to * perform a similar estimation. * @@ -47,29 +47,29 @@ #include // Abstract model function -class Model_Function +class ModelFunction { public: - Model_Function(){}; - virtual arma::vec operator()(arma::vec input) = 0; - virtual ~Model_Function() = default; + ModelFunction(){}; + virtual arma::vec operator()(const arma::vec& input) = 0; + virtual ~ModelFunction() = default; }; -class Cubature_filter +class CubatureFilter { public: // Constructors and destructors - Cubature_filter(); - Cubature_filter(int nx); - Cubature_filter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0); - ~Cubature_filter(); + CubatureFilter(); + CubatureFilter(int nx); + CubatureFilter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0); + ~CubatureFilter(); // Reinitialization function void initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0); // Prediction and estimation - void predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, Model_Function* transition_fcn, const arma::mat& noise_covariance); - void update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, Model_Function* measurement_fcn, const arma::mat& noise_covariance); + void predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, ModelFunction* transition_fcn, const arma::mat& noise_covariance); + void update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, ModelFunction* measurement_fcn, const arma::mat& noise_covariance); // Getters arma::mat get_x_pred() const; @@ -84,21 +84,21 @@ private: arma::mat P_x_est; }; -class Unscented_filter +class UnscentedFilter { public: // Constructors and destructors - Unscented_filter(); - Unscented_filter(int nx); - Unscented_filter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0); - ~Unscented_filter(); + UnscentedFilter(); + UnscentedFilter(int nx); + UnscentedFilter(const arma::vec& x_pred_0, const arma::mat& P_x_pred_0); + ~UnscentedFilter(); // Reinitialization function void initialize(const arma::mat& x_pred_0, const arma::mat& P_x_pred_0); // Prediction and estimation - void predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, Model_Function* transition_fcn, const arma::mat& noise_covariance); - void update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, Model_Function* measurement_fcn, const arma::mat& noise_covariance); + void predict_sequential(const arma::vec& x_post, const arma::mat& P_x_post, ModelFunction* transition_fcn, const arma::mat& noise_covariance); + void update_sequential(const arma::vec& z_upd, const arma::vec& x_pred, const arma::mat& P_x_pred, ModelFunction* measurement_fcn, const arma::mat& noise_covariance); // Getters arma::mat get_x_pred() const; diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc index 827c706ea..56e18df38 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc @@ -36,21 +36,21 @@ #define CUBATURE_TEST_N_TRIALS 1000 #define CUBATURE_TEST_TOLERANCE 0.01 -class Transition_Model : public Model_Function +class TransitionModel : public ModelFunction { public: - Transition_Model(arma::mat kf_F) { coeff_mat = kf_F; }; - virtual arma::vec operator()(arma::vec input) { return coeff_mat * input; }; + TransitionModel(const arma::mat& kf_F) { coeff_mat = kf_F; }; + virtual arma::vec operator()(const arma::vec& input) { return coeff_mat * input; }; private: arma::mat coeff_mat; }; -class Measurement_Model : public Model_Function +class MeasurementModel : public ModelFunction { public: - Measurement_Model(arma::mat kf_H) { coeff_mat = kf_H; }; - virtual arma::vec operator()(arma::vec input) { return coeff_mat * input; }; + MeasurementModel(const arma::mat& kf_H) { coeff_mat = kf_H; }; + virtual arma::vec operator()(const arma::vec& input) { return coeff_mat * input; }; private: arma::mat coeff_mat; @@ -58,7 +58,7 @@ private: TEST(CubatureFilterComputationTest, CubatureFilterTest) { - Cubature_filter kf_cubature; + CubatureFilter kf_cubature; arma::vec kf_x; arma::mat kf_P_x; @@ -88,8 +88,8 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest) arma::mat kf_P_y; arma::mat kf_K; - Model_Function* transition_function; - Model_Function* measurement_function; + ModelFunction* transition_function; + ModelFunction* measurement_function; //--- Perform initializations ------------------------------ @@ -118,7 +118,7 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest) kf_F = arma::randu(nx, nx); kf_Q = arma::diagmat(arma::randu(nx, 1)); - transition_function = new Transition_Model(kf_F); + transition_function = new TransitionModel(kf_F); arma::mat ttx = (*transition_function)(kf_x_post); kf_cubature.predict_sequential(kf_x_post, kf_P_x_post, transition_function, kf_Q); @@ -141,7 +141,7 @@ TEST(CubatureFilterComputationTest, CubatureFilterTest) kf_y = kf_H * (kf_F * kf_x + eta) + nu; - measurement_function = new Measurement_Model(kf_H); + measurement_function = new MeasurementModel(kf_H); kf_cubature.update_sequential(kf_y, kf_x_pre, kf_P_x_pre, measurement_function, kf_R); ckf_x_post = kf_cubature.get_x_est(); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc index 510ac90b5..eaef07845 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc @@ -36,21 +36,21 @@ #define UNSCENTED_TEST_N_TRIALS 10 #define UNSCENTED_TEST_TOLERANCE 10 -class Transition_Model_UKF : public Model_Function +class TransitionModelUKF : public ModelFunction { public: - Transition_Model_UKF(arma::mat kf_F) { coeff_mat = kf_F; }; - virtual arma::vec operator()(arma::vec input) { return coeff_mat * input; }; + TransitionModelUKF(const arma::mat& kf_F) { coeff_mat = kf_F; }; + virtual arma::vec operator()(const arma::vec& input) { return coeff_mat * input; }; private: arma::mat coeff_mat; }; -class Measurement_Model_UKF : public Model_Function +class MeasurementModelUKF : public ModelFunction { public: - Measurement_Model_UKF(arma::mat kf_H) { coeff_mat = kf_H; }; - virtual arma::vec operator()(arma::vec input) { return coeff_mat * input; }; + MeasurementModelUKF(const arma::mat& kf_H) { coeff_mat = kf_H; }; + virtual arma::vec operator()(const arma::vec& input) { return coeff_mat * input; }; private: arma::mat coeff_mat; @@ -58,7 +58,7 @@ private: TEST(UnscentedFilterComputationTest, UnscentedFilterTest) { - Unscented_filter kf_unscented; + UnscentedFilter kf_unscented; arma::vec kf_x; arma::mat kf_P_x; @@ -88,8 +88,8 @@ TEST(UnscentedFilterComputationTest, UnscentedFilterTest) arma::mat kf_P_y; arma::mat kf_K; - Model_Function* transition_function; - Model_Function* measurement_function; + ModelFunction* transition_function; + ModelFunction* measurement_function; //--- Perform initializations ------------------------------ @@ -118,7 +118,7 @@ TEST(UnscentedFilterComputationTest, UnscentedFilterTest) kf_F = arma::randu(nx, nx); kf_Q = arma::diagmat(arma::randu(nx, 1)); - transition_function = new Transition_Model_UKF(kf_F); + transition_function = new TransitionModelUKF(kf_F); arma::mat ttx = (*transition_function)(kf_x_post); kf_unscented.predict_sequential(kf_x_post, kf_P_x_post, transition_function, kf_Q); @@ -141,7 +141,7 @@ TEST(UnscentedFilterComputationTest, UnscentedFilterTest) kf_y = kf_H * (kf_F * kf_x + eta) + nu; - measurement_function = new Measurement_Model_UKF(kf_H); + measurement_function = new MeasurementModelUKF(kf_H); kf_unscented.update_sequential(kf_y, kf_x_pre, kf_P_x_pre, measurement_function, kf_R); ukf_x_post = kf_unscented.get_x_est(); From ee9e7493aea5b5783f4956bc248195b5cd29c9e9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 20:27:00 +0200 Subject: [PATCH 18/20] Add annotation rate parameter for KML, GPX, GeoJSON and NMEA outputs (default: 1s) --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 5 +++ .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 41 +++++++++++++++++-- .../PVT/gnuradio_blocks/rtklib_pvt_gs.h | 5 +++ src/algorithms/PVT/libs/pvt_conf.cc | 4 ++ src/algorithms/PVT/libs/pvt_conf.h | 4 ++ 5 files changed, 55 insertions(+), 4 deletions(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index cae7fc052..51579ad06 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -138,6 +138,11 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, pvt_output_parameters.rtcm_msg_rate_ms[k] = rtcm_MT1097_rate_ms; } + pvt_output_parameters.kml_rate_ms = bc::lcm(configuration->property(role + ".kml_rate_ms", pvt_output_parameters.kml_rate_ms), pvt_output_parameters.output_rate_ms); + pvt_output_parameters.gpx_rate_ms = bc::lcm(configuration->property(role + ".gpx_rate_ms", pvt_output_parameters.gpx_rate_ms), pvt_output_parameters.output_rate_ms); + pvt_output_parameters.geojson_rate_ms = bc::lcm(configuration->property(role + ".geojson_rate_ms", pvt_output_parameters.geojson_rate_ms), pvt_output_parameters.output_rate_ms); + pvt_output_parameters.nmea_rate_ms = bc::lcm(configuration->property(role + ".nmea_rate_ms", pvt_output_parameters.nmea_rate_ms), pvt_output_parameters.output_rate_ms); + // Infer the type of receiver /* * TYPE | RECEIVER diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 2af4082b6..199ce7d04 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -178,6 +178,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, std::string kml_dump_filename; kml_dump_filename = d_dump_filename; d_kml_output_enabled = conf_.kml_output_enabled; + d_kml_rate_ms = conf_.kml_rate_ms; + if (d_kml_rate_ms == 0) + { + d_kml_output_enabled = false; + } if (d_kml_output_enabled) { d_kml_dump = std::make_shared(conf_.kml_output_path); @@ -192,6 +197,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, std::string gpx_dump_filename; gpx_dump_filename = d_dump_filename; d_gpx_output_enabled = conf_.gpx_output_enabled; + d_gpx_rate_ms = conf_.gpx_rate_ms; + if (d_gpx_rate_ms == 0) + { + d_gpx_output_enabled = false; + } if (d_gpx_output_enabled) { d_gpx_dump = std::make_shared(conf_.gpx_output_path); @@ -206,6 +216,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, std::string geojson_dump_filename; geojson_dump_filename = d_dump_filename; d_geojson_output_enabled = conf_.geojson_output_enabled; + d_geojson_rate_ms = conf_.geojson_rate_ms; + if (d_geojson_rate_ms == 0) + { + d_geojson_output_enabled = false; + } if (d_geojson_output_enabled) { d_geojson_printer = std::make_shared(conf_.geojson_output_path); @@ -218,6 +233,12 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels, // initialize nmea_printer d_nmea_output_file_enabled = (conf_.nmea_output_file_enabled or conf_.flag_nmea_tty_port); + d_nmea_rate_ms = conf_.nmea_rate_ms; + if (d_nmea_rate_ms == 0) + { + d_nmea_output_file_enabled = false; + } + if (d_nmea_output_file_enabled) { d_nmea_printer = std::make_shared(conf_.nmea_dump_filename, conf_.nmea_output_file_enabled, conf_.flag_nmea_tty_port, conf_.nmea_dump_devname, conf_.nmea_output_file_path); @@ -1799,19 +1820,31 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item } if (d_kml_output_enabled) { - d_kml_dump->print_position(d_pvt_solver, false); + if (current_RX_time_ms % d_kml_rate_ms == 0) + { + d_kml_dump->print_position(d_pvt_solver, false); + } } if (d_gpx_output_enabled) { - d_gpx_dump->print_position(d_pvt_solver, false); + if (current_RX_time_ms % d_gpx_rate_ms == 0) + { + d_gpx_dump->print_position(d_pvt_solver, false); + } } if (d_geojson_output_enabled) { - d_geojson_printer->print_position(d_pvt_solver, false); + if (current_RX_time_ms % d_geojson_rate_ms == 0) + { + d_geojson_printer->print_position(d_pvt_solver, false); + } } if (d_nmea_output_file_enabled) { - d_nmea_printer->Print_Nmea_Line(d_pvt_solver, false); + if (current_RX_time_ms % d_nmea_rate_ms == 0) + { + d_nmea_printer->Print_Nmea_Line(d_pvt_solver, false); + } } /* diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h index a97874da8..ade48e8b7 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.h @@ -106,6 +106,11 @@ private: int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system int32_t d_rtcm_MSM_rate_ms; + int32_t d_kml_rate_ms; + int32_t d_gpx_rate_ms; + int32_t d_geojson_rate_ms; + int32_t d_nmea_rate_ms; + int32_t d_last_status_print_seg; // for status printer uint32_t d_nchannels; diff --git a/src/algorithms/PVT/libs/pvt_conf.cc b/src/algorithms/PVT/libs/pvt_conf.cc index 990745632..d16db0526 100644 --- a/src/algorithms/PVT/libs/pvt_conf.cc +++ b/src/algorithms/PVT/libs/pvt_conf.cc @@ -35,6 +35,10 @@ Pvt_Conf::Pvt_Conf() type_of_receiver = 0U; output_rate_ms = 0; display_rate_ms = 0; + kml_rate_ms = 1000; + gpx_rate_ms = 1000; + geojson_rate_ms = 1000; + nmea_rate_ms = 1000; rinex_version = 0; rinexobs_rate_ms = 0; diff --git a/src/algorithms/PVT/libs/pvt_conf.h b/src/algorithms/PVT/libs/pvt_conf.h index 7d6b02f89..1b6897e7e 100644 --- a/src/algorithms/PVT/libs/pvt_conf.h +++ b/src/algorithms/PVT/libs/pvt_conf.h @@ -41,6 +41,10 @@ public: uint32_t type_of_receiver; int32_t output_rate_ms; int32_t display_rate_ms; + int32_t kml_rate_ms; + int32_t gpx_rate_ms; + int32_t geojson_rate_ms; + int32_t nmea_rate_ms; int32_t rinex_version; int32_t rinexobs_rate_ms; From bb03f804784277c25e6cfa619b91340b0b140ae5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 23:28:24 +0200 Subject: [PATCH 19/20] Print Boost, Matio and Protocol Buffers found versions in summary report --- CMakeLists.txt | 29 ++++++++++++++++++++++++--- cmake/Modules/FindLOG4CPP.cmake | 1 - src/utils/rinex2assist/CMakeLists.txt | 2 ++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3a44189f..dec1a3edb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,14 +702,25 @@ if(NOT ${FILESYSTEM_FOUND}) set(BOOST_COMPONENTS ${BOOST_COMPONENTS} filesystem) endif() find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS ${BOOST_COMPONENTS} REQUIRED) + +if(NOT Boost_FOUND) + message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") +endif() + set_package_properties(Boost PROPERTIES URL "https://www.boost.org" - DESCRIPTION "Portable C++ source libraries" PURPOSE "Used widely across the source code." TYPE REQUIRED ) -if(NOT Boost_FOUND) - message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") + +if(CMAKE_VERSION VERSION_GREATER 3.14) + set_package_properties(Boost PROPERTIES + DESCRIPTION "Portable C++ source libraries (found: ${Boost_VERSION_STRING})" + ) +else() + set_package_properties(Boost PROPERTIES + DESCRIPTION "Portable C++ source libraries (found: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION})" + ) endif() if(CMAKE_VERSION VERSION_LESS 3.5) @@ -1669,6 +1680,10 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS set_package_properties(MATIO PROPERTIES PURPOSE "Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) +else() + set_package_properties(MATIO PROPERTIES + DESCRIPTION "MATLAB MAT File I/O Library (found: v.${MATIO_VERSION_STRING})" + ) endif() @@ -1796,6 +1811,13 @@ if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9) set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}") endif() endif() + +if(Protobuf_FOUND) + set_package_properties(Protobuf PROPERTIES + DESCRIPTION "Structured data serialization mechanism (found: v${Protobuf_VERSION})" + ) +endif() + if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING) find_program(PROTOC_EXECUTABLE protoc) if(NOT PROTOC_EXECUTABLE) @@ -1815,6 +1837,7 @@ if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING) message(FATAL_ERROR "Please install the Protocol Buffers compiler v${Protobuf_VERSION} in the host machine") endif() endif() + if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSION} VERSION_LESS ${GNSSSDR_PROTOBUF_MIN_VERSION})) unset(Protobuf_PROTOC_EXECUTABLE) if(CMAKE_CROSSCOMPILING) diff --git a/cmake/Modules/FindLOG4CPP.cmake b/cmake/Modules/FindLOG4CPP.cmake index 784d1f2d0..83d6532ac 100644 --- a/cmake/Modules/FindLOG4CPP.cmake +++ b/cmake/Modules/FindLOG4CPP.cmake @@ -85,7 +85,6 @@ find_library(LOG4CPP_LIBRARY /usr/lib/alpha-linux-gnu /usr/lib64 /usr/lib - /usr/local/lib /opt/local/lib ${LOG4CPP_ROOT}/lib $ENV{LOG4CPP_ROOT}/lib diff --git a/src/utils/rinex2assist/CMakeLists.txt b/src/utils/rinex2assist/CMakeLists.txt index 312462ea1..78c07c428 100644 --- a/src/utils/rinex2assist/CMakeLists.txt +++ b/src/utils/rinex2assist/CMakeLists.txt @@ -99,3 +99,5 @@ else() message(STATUS "Boost Iostreams library not found.") message(STATUS " rinex2assist will not be built.") endif() + +set(Boost_FOUND TRUE) # trick for summary report From d49959d264f43fc95645a47d4013620da70f438b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 16 Jun 2019 23:32:11 +0200 Subject: [PATCH 20/20] Update changelog --- docs/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog b/docs/changelog index 25156e270..3b8c0438e 100644 --- a/docs/changelog +++ b/docs/changelog @@ -64,8 +64,9 @@ - The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels. - Fixed program termination (avoiding hangs and segfaults in some platforms/configurations). - The Labsat_Signal_Source now terminates the receiver's execution when the end of file(s) is reached. It now accepts LabSat 2 filenames and series of LabSat 3 files. -- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory. +- Added configuration parameters to set the annotation rate in KML, GPX, GeoJSON and NMEA outputs, set by default to 1 s. - New parameter PVT.show_local_time_zone displays time in the local time zone. Subject to the proper system configuration of the machine running the software receiver. +- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory. - Improved information provided to the user in case of failure.