diff --git a/CMakeLists.txt b/CMakeLists.txt index 12918282e..265e79ec5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ../' ") endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + cmake_minimum_required(VERSION 2.8) project(gnss-sdr CXX C) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) @@ -83,6 +84,7 @@ if(ENABLE_FPGA) endif(ENABLE_FPGA) + ############################### # GNSS-SDR version information ############################### @@ -279,32 +281,87 @@ if(UNIX) ) endif(UNIX) - - -################################################################################ -# Checkout cmake version -################################################################################ -if(CMAKE_VERSION VERSION_LESS 2.8.8) - message(STATUS "Your CMake version is too old and does not support some features required by GNSS-SDR. CMake version must be at least 2.8.8. For more information check https://github.com/joakimkarlsson/bandit/issues/40") - message(FATAL_ERROR "Fatal error: CMake >= 2.8.8 required.") -endif(CMAKE_VERSION VERSION_LESS 2.8.8) +# Determine if we are using make or ninja +if(CMAKE_MAKE_PROGRAM MATCHES "make") + set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "make") +endif(CMAKE_MAKE_PROGRAM MATCHES "make") +if(CMAKE_MAKE_PROGRAM MATCHES "ninja") + set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "ninja") +endif(CMAKE_MAKE_PROGRAM MATCHES "ninja") +if(NOT CMAKE_MAKE_PROGRAM_PRETTY_NAME) + set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "${CMAKE_MAKE_PROGRAM}") +endif(NOT CMAKE_MAKE_PROGRAM_PRETTY_NAME) ################################################################################ -# Checkout compiler version +# Minimum required versions ################################################################################ -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) - message(STATUS "Your GCC version is too old and does not support some C++11 features required by GNSS-SDR. GCC version must be at least 4.7") +set(GNSSSDR_CMAKE_MIN_VERSION "2.8.8") +set(GNSSSDR_GCC_MIN_VERSION "4.7.2") +set(GNSSSDR_CLANG_MIN_VERSION "3.4.0") +set(GNSSSDR_APPLECLANG_MIN_VERSION "500") +set(GNSSSDR_GNURADIO_MIN_VERSION "3.7.3") +set(GNSSSDR_BOOST_MIN_VERSION "1.45") +set(GNSSSDR_PYTHON_MIN_VERSION "2.7") +set(GNSSSDR_MAKO_MIN_VERSION "0.4.2") +set(GNSSSDR_ARMADILLO_MIN_VERSION "4.200.0") + + + +################################################################################ +# Check cmake version +################################################################################ +if(CMAKE_VERSION VERSION_LESS ${GNSSSDR_CMAKE_MIN_VERSION}) + message(STATUS "Your CMake version is too old and does not support some features required by GNSS-SDR. CMake version must be at least ${GNSSSDR_CMAKE_MIN_VERSION}. For more information check https://github.com/joakimkarlsson/bandit/issues/40") + message(FATAL_ERROR "Fatal error: CMake >= ${GNSSSDR_CMAKE_MIN_VERSION} required.") +endif(CMAKE_VERSION VERSION_LESS ${GNSSSDR_CMAKE_MIN_VERSION}) + + + +################################################################################ +# Check compiler version +################################################################################ +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${GNSSSDR_GCC_MIN_VERSION}) + message(STATUS "Your GCC version is too old and does not support some C++ features required by GNSS-SDR. GCC version must be at least ${GNSSSDR_GCC_MIN_VERSION}") if(${LINUX_DISTRIBUTION} MATCHES "Ubuntu") if(${LINUX_VER} MATCHES "12.04") message(STATUS "For instructions on how to upgrade GCC, check http://askubuntu.com/a/271561") endif(${LINUX_VER} MATCHES "12.04") endif(${LINUX_DISTRIBUTION} MATCHES "Ubuntu") - message(FATAL_ERROR "Fatal error: GCC >= 4.7 required.") - endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) -endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + message(FATAL_ERROR "Fatal error: GCC >= ${GNSSSDR_GCC_MIN_VERSION} required.") + endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${GNSSSDR_GCC_MIN_VERSION}) +endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + execute_process(COMMAND + ${CMAKE_CXX_COMPILER} -v + RESULT_VARIABLE _res ERROR_VARIABLE _err + ERROR_STRIP_TRAILING_WHITESPACE) + if(${_res} STREQUAL "0") + # output is in error stream + string(REGEX MATCH "^Apple.*" IS_APPLE ${_err}) + if("${IS_APPLE}" STREQUAL "") + set(MIN_VERSION ${GNSSSDR_CLANG_MIN_VERSION}) + set(APPLE_STR "") + # retrieve the compiler's version from it + string(REGEX MATCH "clang version [0-9.]+" CLANG_OTHER_VERSION ${_err}) + string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_OTHER_VERSION}) + else("${IS_APPLE}" STREQUAL "") + set(MIN_VERSION ${GNSSSDR_APPLECLANG_MIN_VERSION}) + set(APPLE_STR "Apple ") + # retrieve the compiler's version from it + string(REGEX MATCH "(clang-[0-9.]+)" CLANG_APPLE_VERSION ${_err}) + string(REGEX MATCH "[0-9.]+" CLANG_VERSION ${CLANG_APPLE_VERSION}) + endif("${IS_APPLE}" STREQUAL "") + if(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}") + message(WARNING "\nThe compiler selected to build GNSS-SDR (${APPLE_STR}Clang version ${CLANG_VERSION} : ${CMAKE_CXX_COMPILER}) is older than that officially supported (${MIN_VERSION} minimum). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.") + endif(${CLANG_VERSION} VERSION_LESS "${MIN_VERSION}") + else(${_res} STREQUAL "0") + message(WARNING "\nCannot determine the version of the compiler selected to build GNSS-SDR (${APPLE_STR}Clang : ${CMAKE_CXX_COMPILER}). This build may or not work. We highly recommend using Apple Clang version ${APPLECLANG_MIN_VERSION} or more recent, or Clang version ${CLANG_MIN_VERSION} or more recent.") + endif(${_res} STREQUAL "0") +endif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -339,6 +396,7 @@ if(OS_IS_LINUX) endif(OS_IS_LINUX) + ################################################################################ # Googletest - https://github.com/google/googletest ################################################################################ @@ -364,7 +422,7 @@ if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) else(LIBGTEST_DEV_DIR) message (STATUS " Googletest has not been found.") message (STATUS " Googletest will be downloaded and built automatically ") - message (STATUS " when doing 'make'. ") + message (STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") endif(LIBGTEST_DEV_DIR) endif(GTEST_DIR) endif(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) @@ -384,12 +442,13 @@ set(Boost_ADDITIONAL_VERSIONS "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" "1.70.0" "1.70" "1.71.0" "1.71" "1.72.0" "1.72" "1.73.0" "1.73" "1.74.0" "1.74" + "1.75.0" "1.75" "1.76.0" "1.76" "1.77.0" "1.77" "1.78.0" "1.78" "1.79.0" "1.79" ) set(Boost_USE_MULTITHREAD ON) set(Boost_USE_STATIC_LIBS OFF) find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono unit_test_framework program_options REQUIRED) if(NOT Boost_FOUND) - message(FATAL_ERROR "Fatal error: Boost (version >=1.45.0) required.") + message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") endif(NOT Boost_FOUND) @@ -400,17 +459,17 @@ endif(NOT Boost_FOUND) set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT) find_package(Gnuradio) if(PC_GNURADIO_RUNTIME_VERSION) - if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS 3.7.3) + if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) set(GNURADIO_RUNTIME_FOUND) message(STATUS "The GNU Radio version installed in your system is too old.") - endif(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS 3.7.3) + endif(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) endif(PC_GNURADIO_RUNTIME_VERSION) if(NOT GNURADIO_RUNTIME_FOUND) - message(STATUS "CMake cannot find GNU Radio >= 3.7.3") + 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.") - message(FATAL_ERROR "GNU Radio 3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "GNU Radio ${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif(OS_IS_LINUX) if(OS_IS_MACOSX) message("You can install it easily via Macports:") @@ -418,24 +477,24 @@ if(NOT GNURADIO_RUNTIME_FOUND) message("Alternatively, you can use homebrew:") message(" brew tap odrisci/gnuradio") message(" brew install gnuradio" ) - message(FATAL_ERROR "GNU Radio 3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "GNU Radio ${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif(OS_IS_MACOSX) endif(NOT GNURADIO_RUNTIME_FOUND) if(NOT GNURADIO_ANALOG_FOUND) - message(FATAL_ERROR "*** The gnuradio-analog library v3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "*** The gnuradio-analog library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif() if(NOT GNURADIO_BLOCKS_FOUND) - message(FATAL_ERROR "*** The gnuradio-blocks library v3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "*** The gnuradio-blocks library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif() if(NOT GNURADIO_FILTER_FOUND) - message(FATAL_ERROR "*** The gnuradio-filter library v3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "*** The gnuradio-filter library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif() if(NOT GNURADIO_FFT_FOUND) - message(FATAL_ERROR "*** The gnuradio-fft library v3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "*** The gnuradio-fft library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif() if(NOT GNURADIO_PMT_FOUND) - message(FATAL_ERROR "*** The gnuradio-pmt library v3.7.3 or later is required to build gnss-sdr") + message(FATAL_ERROR "*** The gnuradio-pmt library v${GNSSSDR_GNURADIO_MIN_VERSION} or later is required to build gnss-sdr") endif() @@ -466,17 +525,17 @@ endif() find_package(VolkGnssSdr) if(NOT VOLK_GNSSSDR_FOUND) - message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing 'make'") + message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'") ############################### # Find Python required modules ############################### include(SetupPython) #sets PYTHON_EXECUTABLE and PYTHON_DASH_B - GNSSSDR_PYTHON_CHECK_MODULE("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND) - GNSSSDR_PYTHON_CHECK_MODULE("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND) + GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND) + GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND) GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) if(NOT PYTHON_MIN_VER_FOUND) - message(FATAL_ERROR "Python 2.7 or greater required to build VOLK_GNSSSDR") + message(FATAL_ERROR "Python ${GNSSSDR_PYTHON_MIN_VERSION} or greater required to build VOLK_GNSSSDR") endif() # Mako @@ -509,11 +568,11 @@ if(NOT VOLK_GNSSSDR_FOUND) if(ENABLE_PACKAGING) if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) - set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=ON") + set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=ON -DCMAKE_VERBOSE_MAKEFILE=ON") endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) endif(ENABLE_PACKAGING) - set(VOLK_GNSSSDR_BUILD_COMMAND "make") + set(VOLK_GNSSSDR_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}") if(PYTHON_EXECUTABLE) set(USE_THIS_PYTHON "-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}") endif(PYTHON_EXECUTABLE) @@ -523,8 +582,6 @@ if(NOT VOLK_GNSSSDR_FOUND) endif(CMAKE_GENERATOR STREQUAL Xcode) endif(OS_IS_MACOSX) - set(CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - set(C_FLAGS "${CMAKE_C_FLAGS} -std=c11") if(CMAKE_CROSSCOMPILING) set(VOLK_GNSSSDR_COMPILER "") else(CMAKE_CROSSCOMPILING) @@ -534,8 +591,6 @@ if(NOT VOLK_GNSSSDR_FOUND) -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON -DENABLE_PROFILING=${ENABLE_PROFILING} - -DCMAKE_CXX_FLAGS=${CXX_FLAGS} - -DCMAKE_C_FLAGS=${C_FLAGS} -DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR} -DENABLE_ORC=OFF ${STRIP_VOLK_GNSSSDR_PROFILE} @@ -545,7 +600,8 @@ if(NOT VOLK_GNSSSDR_FOUND) -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake -DCROSSCOMPILE_MULTILIB=TRUE ) endif(EXISTS $ENV{OECORE_TARGET_SYSROOT}) - ExternalProject_Add(volk_gnsssdr_module + if(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add(volk_gnsssdr_module PREFIX ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build @@ -556,6 +612,21 @@ if(NOT VOLK_GNSSSDR_FOUND) BUILD_COMMAND ${VOLK_GNSSSDR_BUILD_COMMAND} volk_gnsssdr_profile INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install ) + else(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add(volk_gnsssdr_module + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build + CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} + DOWNLOAD_COMMAND "" + UPDATE_COMMAND "" + PATCH_COMMAND "" + BUILD_COMMAND ${VOLK_GNSSSDR_BUILD_COMMAND} volk_gnsssdr_profile + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}volk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX} + ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install + ) + endif(CMAKE_VERSION VERSION_LESS 3.2) find_package(ORC) if(NOT ORC_FOUND) set(ORC_LIBRARIES "") @@ -563,13 +634,20 @@ if(NOT VOLK_GNSSSDR_FOUND) endif(NOT ORC_FOUND) add_library(volk_gnsssdr UNKNOWN IMPORTED) - set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr.a) + set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}) set(VOLK_GNSSSDR_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build/include/;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include;${ORC_INCLUDE_DIRS}") set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES}) - add_custom_command(TARGET volk_gnsssdr_module POST_BUILD + if(CMAKE_VERSION VERSION_LESS 3.2) + add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile - ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + else(CMAKE_VERSION VERSION_LESS 3.2) + add_custom_command(TARGET volk_gnsssdr_module POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile + BYPRODUCTS ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + endif(CMAKE_VERSION VERSION_LESS 3.2) add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr-config-info @@ -582,13 +660,28 @@ endif(NOT VOLK_GNSSSDR_FOUND) # gflags - https://github.com/gflags/gflags ################################################################################ set(LOCAL_GFLAGS false) -set(gflags_RELEASE 2.2.0) +set(gflags_RELEASE 2.2.1) find_package(GFlags) if (NOT GFlags_FOUND) message (STATUS " gflags library has not been found.") message (STATUS " gflags will be downloaded and built automatically ") message (STATUS " when doing 'make'. ") + if(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add( + gflags-${gflags_RELEASE} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} + GIT_REPOSITORY git://github.com/gflags/gflags.git + GIT_TAG v${gflags_RELEASE} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} + CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + UPDATE_COMMAND "" + PATCH_COMMAND "" + INSTALL_COMMAND "" + ) + else(CMAKE_VERSION VERSION_LESS 3.2) ExternalProject_Add( gflags-${gflags_RELEASE} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} @@ -597,18 +690,20 @@ if (NOT GFlags_FOUND) SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - BUILD_COMMAND make + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX} UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_COMMAND "" ) + endif(CMAKE_VERSION VERSION_LESS 3.2) set(GFlags_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/include CACHE PATH "Local Gflags headers" ) add_library(gflags UNKNOWN IMPORTED) - set_property(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags.a) + set_property(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}) add_dependencies(gflags gflags-${gflags_RELEASE}) set(GFlags_LIBS gflags) file(GLOB GFlags_SHARED_LIBS "${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*") @@ -721,7 +816,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") endif(EXISTS "/usr/bin/libtoolize") endif(OS_IS_LINUX) - ExternalProject_Add( + if(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add( glog-${glog_RELEASE} DEPENDS ${TARGET_GFLAGS} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} @@ -730,11 +826,28 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix= - BUILD_COMMAND make + BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" UPDATE_COMMAND "" PATCH_COMMAND "" INSTALL_COMMAND "" - ) + ) + else(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add( + glog-${glog_RELEASE} + DEPENDS ${TARGET_GFLAGS} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + GIT_REPOSITORY https://github.com/google/glog/ + GIT_TAG v${glog_RELEASE} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix= + BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX} + UPDATE_COMMAND "" + PATCH_COMMAND "" + INSTALL_COMMAND "" + ) + endif(CMAKE_VERSION VERSION_LESS 3.2) # Set up variables set(GLOG_INCLUDE_DIRS @@ -742,7 +855,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure") ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/src ) set(GLOG_LIBRARIES - ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog.a + ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX} ) set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) else(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) @@ -882,6 +995,28 @@ if(OS_IS_LINUX) /usr/lib/gcc/sparc64-linux-gnu/6 /usr/lib/gcc/x86_64-linux-gnux32/6 /usr/lib/gcc/sh4-linux-gnu/6 + /usr/lib/gcc/x86_64-linux-gnu/7 # Debian 9 Buster + /usr/lib/gcc/alpha-linux-gnu/7 + /usr/lib/gcc/aarch64-linux-gnu/7 + /usr/lib/gcc/arm-linux-gnueabi/7 + /usr/lib/gcc/arm-linux-gnueabihf/7 + /usr/lib/gcc/hppa-linux-gnu/7 + /usr/lib/gcc/i686-gnu/7 + /usr/lib/gcc/i686-linux-gnu/7 + /usr/lib/gcc/x86_64-kfreebsd-gnu/7 + /usr/lib/gcc/i686-kfreebsd-gnu/7 + /usr/lib/gcc/m68k-linux-gnu/7 + /usr/lib/gcc/mips-linux-gnu/7 + /usr/lib/gcc/mips64el-linux-gnuabi64/7 + /usr/lib/gcc/mipsel-linux-gnu/7 + /usr/lib/gcc/powerpc-linux-gnu/7 + /usr/lib/gcc/powerpc-linux-gnuspe/7 + /usr/lib/gcc/powerpc64-linux-gnu/7 + /usr/lib/gcc/powerpc64le-linux-gnu/7 + /usr/lib/gcc/s390x-linux-gnu/7 + /usr/lib/gcc/sparc64-linux-gnu/7 + /usr/lib/gcc/x86_64-linux-gnux32/7 + /usr/lib/gcc/sh4-linux-gnu/7 ) if(NOT GFORTRAN) message(STATUS "The gfortran library has not been found.") @@ -897,14 +1032,22 @@ if(OS_IS_LINUX) endif(OS_IS_LINUX) find_package(Armadillo) +if(ARMADILLO_FOUND) + if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION}) + set(ARMADILLO_FOUND false) + set(ENABLE_OWN_ARMADILLO true) + endif(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION}) +endif(ARMADILLO_FOUND) + if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) message(STATUS " Armadillo has not been found.") message(STATUS " Armadillo will be downloaded and built automatically") - message(STATUS " when doing 'make'. ") - set(armadillo_BRANCH 7.900.x) + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") + set(armadillo_BRANCH unstable) set(armadillo_RELEASE ${armadillo_BRANCH}) - ExternalProject_Add( + if(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add( armadillo-${armadillo_RELEASE} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} GIT_REPOSITORY https://github.com/conradsnicta/armadillo-code.git @@ -912,10 +1055,25 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11 - BUILD_COMMAND make + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} UPDATE_COMMAND "" INSTALL_COMMAND "" - ) + ) + else(CMAKE_VERSION VERSION_LESS 3.2) + ExternalProject_Add( + armadillo-${armadillo_RELEASE} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} + GIT_REPOSITORY https://github.com/conradsnicta/armadillo-code.git + GIT_TAG ${armadillo_BRANCH} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} + CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11 + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX} + UPDATE_COMMAND "" + INSTALL_COMMAND "" + ) + endif(CMAKE_VERSION VERSION_LESS 3.2) # Set up variables ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir) @@ -931,7 +1089,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) if(NOT GFORTRAN) set(GFORTRAN "") endif(NOT GFORTRAN) - set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a) + set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}) set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE) set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE}) else(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) @@ -1026,7 +1184,7 @@ endif(NOT UHD_FOUND) find_package(Doxygen) if(DOXYGEN_FOUND) message(STATUS "Doxygen found.") - message(STATUS "You can build the documentation with 'make doc'." ) + message(STATUS "You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'." ) message(STATUS "When done, point your browser to ${CMAKE_BINARY_DIR}/html/index.html") set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) @@ -1049,7 +1207,7 @@ if(DOXYGEN_FOUND) COMMENT "Generating API documentation with Doxygen." VERBATIM ) if(LATEX_COMPILER) - message(STATUS "'make pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf") + message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf") add_custom_target(pdfmanual COMMAND ${CMAKE_MAKE_PROGRAM} COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf @@ -1059,7 +1217,7 @@ if(DOXYGEN_FOUND) COMMENT "Generating PDF manual with Doxygen." VERBATIM ) endif(LATEX_COMPILER) - message(STATUS "'make doc-clean' will clean the documentation.") + message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.") add_custom_target(doc-clean COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/html COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/latex @@ -1130,6 +1288,8 @@ else(ENABLE_CUDA) message(STATUS "Enable it with 'cmake -DENABLE_CUDA=ON ../' to add support for GPU-based acceleration using CUDA." ) endif(ENABLE_CUDA) + + ############################################################################### # FPGA (OPTIONAL) ############################################################################### @@ -1141,6 +1301,8 @@ else(ENABLE_FPGA) message(STATUS "Enable it with 'cmake -DENABLE_FPGA=ON ../' to add support for GPU-based acceleration using the FPGA." ) endif(ENABLE_FPGA) + + ################################################################################ # Setup of optional drivers ################################################################################ @@ -1210,7 +1372,7 @@ if(FLEXIBAND_DRIVER) endif(FLEXIBAND_DRIVER) if(ENABLE_FLEXIBAND) - message(STATUS "CTTC's Antenna Array front-end driver will be compiled." ) + message(STATUS "The Teleorbit Flexiband front-end source will be compiled." ) message(STATUS "You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ../'" ) else(ENABLE_FLEXIBAND) message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled." ) @@ -1264,17 +1426,50 @@ endif(ENABLE_GPROF) ######################################################################## # Set compiler flags ######################################################################## -# Enable C++11 support in GCC +# Enable C++14 support in GCC / Fallback to C++11 when using GCC < 6.1.1 if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) - set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11 -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11") + else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14") + endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) + +# Enable C++14 support in Clang from 3.5 / Fallback to C++11 if older version and use lib++ if working in macOS if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11 -stdlib=libc++") + if(OS_IS_LINUX) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11") + else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14") + endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0") + endif(OS_IS_LINUX) + if(OS_IS_MACOSX) + # See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences + if(CLANG_VERSION VERSION_LESS "600") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11") + else(CLANG_VERSION VERSION_LESS "600") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14") + endif(CLANG_VERSION VERSION_LESS "600") + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wno-deprecated-declarations") + endif(OS_IS_MACOSX) + if(CMAKE_BUILD_TYPE MATCHES "Release") set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wno-unused-private-field") endif(CMAKE_BUILD_TYPE MATCHES "Release") + if(OS_IS_MACOSX) + set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -stdlib=libc++") + endif(OS_IS_MACOSX) endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") +if(NOT (CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + if(NOT (CMAKE_VERSION VERSION_LESS "3.1")) + set(CMAKE_C_STANDARD 11) + set(CMAKE_CXX_STANDARD 14) + endif(NOT (CMAKE_VERSION VERSION_LESS "3.1")) +endif(NOT (CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + # Processor-architecture related flags # See http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options if (NOT ARCH_COMPILER_FLAGS) diff --git a/README.md b/README.md index 4b24a1dc9..9a14d8343 100644 --- a/README.md +++ b/README.md @@ -584,11 +584,10 @@ We use a [DBSRX2](https://www.ettus.com/product/details/DBSRX2) to do the task, 1. The default configuration file resides at [/usr/local/share/gnss-sdr/conf/default.conf](./conf/gnss-sdr.conf). 2. You need to review/modify at least the following settings: * ```SignalSource.filename=``` (absolute or relative route to your GNSS signal captured file) - * ```GNSS-SDR.internal_fs_hz=``` (captured file sampling rate in Hz) - * ```SignalSource.sampling_frequency=``` (captured file sampling rate in Hz) - * ```SignalConditioner.sample_freq_in=``` (captured file sampling rate in Hz) - * ```SignalConditioner.sample_freq_out=``` (captured file sampling rate in Hz) - * ```TelemetryDecoder.fs_in=``` (captured file sampling rate in Hz) + * ```GNSS-SDR.internal_fs_sps=``` (captured file sampling rate in samples per second) + * ```SignalSource.sampling_frequency=``` (captured file sampling rate in samples per second) + * ```SignalConditioner.sample_freq_in=``` (captured file sampling rate in samples per second) + * ```SignalConditioner.sample_freq_out=``` (captured file sampling rate in samples per second) 3. The configuration file has in-line documentation, you can try to tune the number of channels and several receiver parameters. Store your .conf file in some working directory of your choice. 4. Run the receiver invoking the configuration by ```$ gnss-sdr --config_file=/path/to/my_receiver.conf``` @@ -1138,12 +1137,10 @@ In case you are configuring a multi-system receiver, you will need to decimate t ;######### TELEMETRY DECODER GPS L1 CONFIG ############ TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder TelemetryDecoder_1C.dump=false -TelemetryDecoder_1C.decimation_factor=4; ;######### TELEMETRY DECODER GALILEO E1B CONFIG ############ TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder TelemetryDecoder_1B.dump=false -TelemetryDecoder_1B.decimation_factor=1; ~~~~~~ More documentation at the [Telemetry Decoder Blocks page](http://gnss-sdr.org/docs/sp-blocks/telemetry-decoder/). @@ -1155,25 +1152,7 @@ GNSS systems provide different kinds of observations. The most commonly used are The common interface is [ObservablesInterface](./src/core/interfaces/observables_interface.h). -Configuration example for GPS L1 C/A signals: - -~~~~~~ -;######### OBSERVABLES CONFIG ############ -Observables.implementation=GPS_L1_CA_Observables -Observables.dump=false -Observables.dump_filename=./observables.dat -~~~~~~ - -For Galileo E1B receivers: - -~~~~~~ -;######### OBSERVABLES CONFIG ############ -Observables.implementation=Galileo_E1B_Observables -Observables.dump=false -Observables.dump_filename=./observables.dat -~~~~~~ - -For hybrid GPS L1 / Galileo E1B receivers: +Configuration example: ~~~~~~ ;######### OBSERVABLES CONFIG ############ @@ -1190,57 +1169,30 @@ Although data processing for obtaining high-accuracy PVT solutions is out of the The common interface is [PvtInterface](./src/core/interfaces/pvt_interface.h). -Configuration example for GPS L1 C/A signals: +Configuration example: ~~~~~~ ;######### PVT CONFIG ############ -PVT.implementation=GPS_L1_CA_PVT -PVT.averaging_depth=10 ; Number of PVT observations in the moving average algorithm -PVT.flag_averaging=true ; Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false] -PVT.output_rate_ms=100 ; Period in [ms] between two PVT outputs -PVT.display_rate_ms=500 ; Position console print (std::out) interval [ms]. -PVT.dump=false ; Enables the PVT internal binary data file logging [true] or [false] -PVT.dump_filename=./PVT ; Log path and filename without extension of GeoJSON and KML files +PVT.implementation=RTKLIB_PVT +PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic +PVT.iono_model=Broadcast ; options: OFF, Broadcast +PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen +PVT.rinex_version=2 ; options: 2 or 3 +PVT.output_rate_ms=100 ; Period in [ms] between two PVT outputs +PVT.display_rate_ms=500 ; Position console print (std::out) interval [ms]. PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea ; NMEA log path and filename -PVT.flag_nmea_tty_port=true ; Enables the NMEA log to a serial TTY port +PVT.flag_nmea_tty_port=false ; Enables the NMEA log to a serial TTY port PVT.nmea_dump_devname=/dev/pts/4 ; serial device descriptor for NMEA logging -PVT.flag_rtcm_server=false ; Enables or disables a TCP/IP server dispatching RTCM messages -PVT.flag_rtcm_tty_port=true ; Enables the RTCM log to a serial TTY port +PVT.flag_rtcm_server=true ; Enables or disables a TCP/IP server dispatching RTCM messages +PVT.flag_rtcm_tty_port=false ; Enables the RTCM log to a serial TTY port PVT.rtcm_dump_devname=/dev/pts/1 ; serial device descriptor for RTCM logging +PVT.rtcm_tcp_port=2101 +PVT.rtcm_MT1019_rate_ms=5000 +PVT.rtcm_MT1045_rate_ms=5000 +PVT.rtcm_MT1097_rate_ms=1000 +PVT.rtcm_MT1077_rate_ms=1000 ~~~~~~ -For Galileo E1B receivers: - -~~~~~~ -;######### PVT CONFIG ############ -PVT.implementation=GALILEO_E1_PVT -PVT.averaging_depth=100 -PVT.flag_averaging=false -PVT.output_rate_ms=100; -PVT.display_rate_ms=500; -PVT.dump=false -PVT.dump_filename=./PVT -PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea ; NMEA log path and filename -PVT.flag_nmea_tty_port=true ; Enables the NMEA log to a serial TTY port -PVT.nmea_dump_devname=/dev/pts/4 ; serial device descriptor for NMEA logging -PVT.flag_rtcm_server=false ; Enables or disables a TCP/IP server dispatching RTCM messages -PVT.flag_rtcm_tty_port=true ; Enables the RTCM log to a serial TTY port -PVT.rtcm_dump_devname=/dev/pts/1 ; serial device descriptor for RTCM logging -~~~~~~ - - -For hybrid GPS L1 / Galileo E1B receivers: - -~~~~~~ -;######### PVT CONFIG ############ -PVT.implementation=Hybrid_PVT -PVT.averaging_depth=10 -PVT.flag_averaging=false -PVT.output_rate_ms=100; -PVT.display_rate_ms=500; -PVT.dump=false -PVT.dump_filename=./PVT -~~~~~~ **Notes on the output formats:** @@ -1250,9 +1202,9 @@ PVT.dump_filename=./PVT * **NMEA 0183** is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass, autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the U.S. [National Marine Electronics Association](http://www.nmea.org/). The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data are transmitted in a *sentence* from one *talker* to multiple *listeners* at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with a nearly unlimited number of listeners, and using multiplexers, multiple sensors can talk to a single computer port. At the application layer, the standard also defines the contents of each sentence (message) type, so that all listeners can parse messages accurately. Those messages can be sent through the serial port (that could be for instance a Bluetooth link) and be used/displayed by a number of software applications such as [gpsd](http://www.catb.org/gpsd/ "The UNIX GPS daemon"), [JOSM](https://josm.openstreetmap.de/ "The Java OpenStreetMap Editor"), [OpenCPN](http://opencpn.org/ocpn/ "Open Chart Plotter Navigator"), and many others (and maybe running on other devices). - * **RINEX** (Receiver Independent Exchange Format) is an interchange format for raw satellite navigation system data, covering observables and the information contained in the navigation message broadcast by GNSS satellites. This allows the user to post-process the received data to produce a more accurate result (usually with other data unknown to the original receiver, such as better models of the atmospheric conditions at time of measurement). RINEX files can be used by software packages such as [GPSTk](http://www.gpstk.org), [RTKLIB](http://www.rtklib.com/) and [gLAB](http://gage14.upc.es/gLAB/). GNSS-SDR by default generates RINEX version [3.02](https://igscb.jpl.nasa.gov/igscb/data/format/rinex302.pdf). If [2.11](https://igscb.jpl.nasa.gov/igscb/data/format/rinex211.txt) is needed, it can be requested through a commandline flag when invoking the software receiver: + * **RINEX** (Receiver Independent Exchange Format) is an interchange format for raw satellite navigation system data, covering observables and the information contained in the navigation message broadcast by GNSS satellites. This allows the user to post-process the received data to produce a more accurate result (usually with other data unknown to the original receiver, such as better models of the atmospheric conditions at time of measurement). RINEX files can be used by software packages such as [GPSTk](http://www.gpstk.org), [RTKLIB](http://www.rtklib.com/) and [gLAB](http://gage14.upc.es/gLAB/). GNSS-SDR by default generates RINEX version [3.02](https://igscb.jpl.nasa.gov/igscb/data/format/rinex302.pdf). If [2.11](https://igscb.jpl.nasa.gov/igscb/data/format/rinex211.txt) is needed, it can be requested through the `rinex_version` parameter in the configuration file: ~~~~~~ -$ gnss-sdr --RINEX_version=2 +PVT.rinex_version=2 ~~~~~~ * **RTCM SC-104** provides standards that define the data structure for differential GNSS correction information for a variety of differential correction applications. Developed by the Radio Technical Commission for Maritime Services ([RTCM](http://www.rtcm.org/overview.php#Standards "Radio Technical Commission for Maritime Services")), they have become an industry standard for communication of correction information. GNSS-SDR implements RTCM version 3.2, defined in the document *RTCM 10403.2, Differential GNSS (Global Navigation Satellite Systems) Services - Version 3* (February 1, 2013), which can be [purchased online](https://ssl29.pair.com/dmarkle/puborder.php?show=3 "RTCM Online Publication Order Form"). By default, the generated RTCM binary messages are dumped into a text file in hexadecimal format. However, GNSS-SDR is equipped with a TCP/IP server, acting as an NTRIP source that can feed an NTRIP server. NTRIP (Networked Transport of RTCM via Internet Protocol) is an open standard protocol that can be freely download from [BKG](http://igs.bkg.bund.de/root_ftp/NTRIP/documentation/NtripDocumentation.pdf "Networked Transport of RTCM via Internet Protocol (Ntrip) Version 1.0"), and it is designed for disseminating differential correction data (*e.g.* in the RTCM-104 format) or other kinds of GNSS streaming data to stationary or mobile users over the Internet. The TCP/IP server can be enabled by setting ```PVT.flag_rtcm_server=true``` in the configuration file, and will be active during the execution of the software receiver. By default, the server will operate on port 2101 (which is the recommended port for RTCM services according to the Internet Assigned Numbers Authority, [IANA](http://www.iana.org/assignments/service-names-port-numbers "Service Name and Transport Protocol Port Number Registry")), and will identify the Reference Station with ID=1234. This behaviour can be changed in the configuration file: diff --git a/conf/front-end-cal.conf b/conf/front-end-cal.conf index 6f9d898d4..af9221936 100644 --- a/conf/front-end-cal.conf +++ b/conf/front-end-cal.conf @@ -23,8 +23,8 @@ GNSS-SDR.init_altitude_m=10 ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2000000 ;######### SUPL RRLP GPS assistance configuration ##### ; Check http://www.mcc-mnc.com/ diff --git a/conf/gnss-sdr.conf b/conf/gnss-sdr.conf index f56a720a6..6ffffd631 100644 --- a/conf/gnss-sdr.conf +++ b/conf/gnss-sdr.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_FPGA.conf b/conf/gnss-sdr_GPS_L1_FPGA.conf index 7e7e49aa7..5def11d31 100644 --- a/conf/gnss-sdr_GPS_L1_FPGA.conf +++ b/conf/gnss-sdr_GPS_L1_FPGA.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf index 8f3aed872..e2c156cec 100644 --- a/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_GN3S_realtime.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2727933.33 ; 8183800/3 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2727933.33 ; 8183800/3 ;######### SIGNAL_SOURCE CONFIG ############ @@ -14,7 +14,7 @@ GNSS-SDR.internal_fs_hz=2727933.33 ; 8183800/3 ;#Notes for GN3S source: ; - The front-end sampling frequency is fixed to 8.1838 MSPS (8183800 Hz). ; - The baseband signal is shifted to an IF of 38400 Hz. It should be corrected with the signal conditioner block -GNSS-SDR.internal_fs_hz=2727933.33 ; 8183800/3 +GNSS-SDR.internal_fs_sps=2727933.33 ; 8183800/3 ;######### SIGNAL_SOURCE CONFIG ############ SignalSource.implementation=GN3S_Signal_Source diff --git a/conf/gnss-sdr_GPS_L1_SPIR.conf b/conf/gnss-sdr_GPS_L1_SPIR.conf index 5e4335b00..0799f82c5 100644 --- a/conf/gnss-sdr_GPS_L1_SPIR.conf +++ b/conf/gnss-sdr_GPS_L1_SPIR.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ @@ -226,7 +226,7 @@ Acquisition_1C.max_dwells=5 ;Acquisition3.repeat_satellite = true ;#cboc: Only for [Galileo_E1_PCPS_Ambiguous_Acquisition]. This option allows you to choose between acquiring with CBOC signal [true] or sinboc(1,1) signal [false]. -;#Use only if GNSS-SDR.internal_fs_hz is greater than or equal to 6138000 +;#Use only if GNSS-SDR.internal_fs_sps is greater than or equal to 6138000 Acquisition0.cboc=false diff --git a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf index b71126374..094d1f1d8 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf @@ -7,8 +7,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf index 22584d4e4..64db841fa 100644 --- a/conf/gnss-sdr_GPS_L1_USRP_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_USRP_realtime.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2000000 ;######### SUPL RRLP GPS assistance configuration ##### @@ -177,71 +177,19 @@ Resampler.sample_freq_out=2000000 ;######### CHANNELS GLOBAL CONFIG ############ ;#count: Number of available GPS satellite channels. -Channels_GPS.count=6 +Channels_1C.count=6 ;#count: Number of available Galileo satellite channels. -Channels_Galileo.count=0 +Channels_1B.count=0 ;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS -;#if the option is disabled by default is assigned GPS -Channel.system=GPS + ;#signal: ;# "1C" GPS L1 C/A -;# "1P" GPS L1 P -;# "1W" GPS L1 Z-tracking and similar (AS on) -;# "1Y" GPS L1 Y -;# "1M" GPS L1 M -;# "1N" GPS L1 codeless -;# "2C" GPS L2 C/A -;# "2D" GPS L2 L1(C/A)+(P2-P1) semi-codeless ;# "2S" GPS L2 L2C (M) -;# "2L" GPS L2 L2C (L) -;# "2X" GPS L2 L2C (M+L) -;# "2P" GPS L2 P -;# "2W" GPS L2 Z-tracking and similar (AS on) -;# "2Y" GPS L2 Y -;# "2M" GPS GPS L2 M -;# "2N" GPS L2 codeless -;# "5I" GPS L5 I -;# "5Q" GPS L5 Q -;# "5X" GPS L5 I+Q -;# "1C" GLONASS G1 C/A -;# "1P" GLONASS G1 P -;# "2C" GLONASS G2 C/A (Glonass M) -;# "2P" GLONASS G2 P -;# "1A" GALILEO E1 A (PRS) ;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL) -;# "1C" GALILEO E1 C (no data) -;# "1X" GALILEO E1 B+C -;# "1Z" GALILEO E1 A+B+C -;# "5I" GALILEO E5a I (F/NAV OS) -;# "5Q" GALILEO E5a Q (no data) ;# "5X" GALILEO E5a I+Q -;# "7I" GALILEO E5b I -;# "7Q" GALILEO E5b Q -;# "7X" GALILEO E5b I+Q -;# "8I" GALILEO E5 I -;# "8Q" GALILEO E5 Q -;# "8X" GALILEO E5 I+Q -;# "6A" GALILEO E6 A -;# "6B" GALILEO E6 B -;# "6C" GALILEO E6 C -;# "6X" GALILEO E6 B+C -;# "6Z" GALILEO E6 A+B+C -;# "1C" SBAS L1 C/A -;# "5I" SBAS L5 I -;# "5Q" SBAS L5 Q -;# "5X" SBAS L5 I+Q -;# "2I" COMPASS E2 I -;# "2Q" COMPASS E2 Q -;# "2X" COMPASS E2 IQ -;# "7I" COMPASS E5b I -;# "7Q" COMPASS E5b Q -;# "7X" COMPASS E5b IQ -;# "6I" COMPASS E6 I -;# "6Q" COMPASS E6 Q -;# "6X" COMPASS E6 IQ + ;#if the option is disabled by default is assigned "1C" GPS L1 C/A Channel.signal=1C @@ -250,46 +198,45 @@ Channel.signal=1C ;######### CHANNEL 0 CONFIG ############ -Channel0.system=GPS -Channel0.signal=1C +;Channel0.system=GPS +;Channel0.signal=1C ;#satellite: Satellite PRN ID for this channel. Disable this option to random search -Channel0.satellite=11 +;Channel0.satellite=11 ;######### CHANNEL 1 CONFIG ############ -Channel1.system=GPS -Channel1.signal=1C -Channel1.satellite=18 +;Channel1.system=GPS +;Channel1.signal=1C +;Channel1.satellite=18 ;######### ACQUISITION GLOBAL CONFIG ############ ;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -Acquisition_GPS.dump=false +Acquisition_1C.dump=false ;#filename: Log path and filename -Acquisition_GPS.dump_filename=./acq_dump.dat -;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. -Acquisition_GPS.item_type=gr_complex +Acquisition_1C.dump_filename=./acq_dump.dat +;#item_type: Type and resolution for each of the signal samples. +Acquisition_1C.item_type=gr_complex ;#if: Signal intermediate frequency in [Hz] -Acquisition_GPS.if=0 +Acquisition_1C.if=0 ;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_GPS.coherent_integration_time_ms=1 -;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition +Acquisition_1C.coherent_integration_time_ms=1 +Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition ;#threshold: Acquisition threshold. It will be ignored if pfa is defined. -Acquisition_GPS.threshold=0.01 +Acquisition_1C.threshold=0.01 ;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -;Acquisition_GPS.pfa=0.0001 +;Acquisition_1C.pfa=0.0001 ;#doppler_max: Maximum expected Doppler shift [Hz] -Acquisition_GPS.doppler_max=10000 +Acquisition_1C.doppler_max=10000 ;#doppler_max: Doppler step in the grid search [Hz] -Acquisition_GPS.doppler_step=500 +Acquisition_1C.doppler_step=500 ;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] (should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition]) -Acquisition_GPS.bit_transition_flag=false +Acquisition_1C.bit_transition_flag=false ;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true -Acquisition_GPS.max_dwells=1 +Acquisition_1C.max_dwells=1 ;######### ACQUISITION CHANNELS CONFIG ###### @@ -299,37 +246,37 @@ Acquisition_GPS.max_dwells=1 ;######### TRACKING GLOBAL CONFIG ############ ;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_PLL_C_Aid_Tracking] -Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking +Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking ;#item_type: Type and resolution for each of the signal samples. -Tracking_GPS.item_type=gr_complex +Tracking_1C.item_type=gr_complex ;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_GPS.if=0 +Tracking_1C.if=0 ;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_GPS.dump=false +Tracking_1C.dump=false ;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. -Tracking_GPS.dump_filename=./tracking_ch_ +Tracking_1C.dump_filename=./tracking_ch_ ;#pll_bw_hz: PLL loop filter bandwidth [Hz] -Tracking_GPS.pll_bw_hz=50.0; +Tracking_1C.pll_bw_hz=30.0; ;#dll_bw_hz: DLL loop filter bandwidth [Hz] -Tracking_GPS.dll_bw_hz=2.0; +Tracking_1C.dll_bw_hz=4.0; ;#order: PLL/DLL loop filter order [2] or [3] -Tracking_GPS.order=3; +Tracking_1C.order=3; -;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] -Tracking_GPS.early_late_space_chips=0.5; +;#early_late_space_chips: correlator early-late space [chips] +Tracking_1C.early_late_space_chips=0.5; ;######### TELEMETRY DECODER GPS CONFIG ############ ;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A -TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder -TelemetryDecoder_GPS.dump=false +TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder +TelemetryDecoder_1C.dump=false ;#decimation factor -TelemetryDecoder_GPS.decimation_factor=1; +TelemetryDecoder_1C.decimation_factor=1; ;######### OBSERVABLES CONFIG ############ ;#implementation: diff --git a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf index 2c67377bf..02fa2ff35 100644 --- a/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf +++ b/conf/gnss-sdr_GPS_L1_acq_QuickSync.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_GPS_L1_gr_complex.conf b/conf/gnss-sdr_GPS_L1_gr_complex.conf index ca5af458c..662d42b12 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2600000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2600000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf index 41e4b61bb..e7e8f4e62 100644 --- a/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf +++ b/conf/gnss-sdr_GPS_L1_gr_complex_gpu.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_GPS_L1_ishort.conf b/conf/gnss-sdr_GPS_L1_ishort.conf index b7376135f..a5cce5189 100644 --- a/conf/gnss-sdr_GPS_L1_ishort.conf +++ b/conf/gnss-sdr_GPS_L1_ishort.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2000000 ;######### CONTROL_THREAD CONFIG ############ ControlThread.wait_for_flowgraph=false diff --git a/conf/gnss-sdr_GPS_L1_nsr.conf b/conf/gnss-sdr_GPS_L1_nsr.conf index 076f46260..078f8e690 100644 --- a/conf/gnss-sdr_GPS_L1_nsr.conf +++ b/conf/gnss-sdr_GPS_L1_nsr.conf @@ -8,8 +8,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2560000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2560000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf index 809f2bcbb..f3bac7589 100644 --- a/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf +++ b/conf/gnss-sdr_GPS_L1_nsr_twobit_packed.conf @@ -8,8 +8,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2560000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2560000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf b/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf index d6222161e..2ce06d573 100644 --- a/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf +++ b/conf/gnss-sdr_GPS_L1_pulse_blanking_gr_complex.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2000000 ;######### CONTROL_THREAD CONFIG ############ ControlThread.wait_for_flowgraph=false diff --git a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf index 5b1ffe1d6..468c44de7 100644 --- a/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtl_tcp_realtime.conf @@ -6,10 +6,10 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. ;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE ; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/ -GNSS-SDR.internal_fs_hz=1200000 +GNSS-SDR.internal_fs_sps=1200000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf index f7c934703..8c5f9022a 100644 --- a/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf +++ b/conf/gnss-sdr_GPS_L1_rtlsdr_realtime.conf @@ -5,10 +5,10 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. ;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE ; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/ -GNSS-SDR.internal_fs_hz=1999898 +GNSS-SDR.internal_fs_sps=1999898 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf index b21abf2c7..a720b859b 100644 --- a/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf +++ b/conf/gnss-sdr_GPS_L1_two_bits_cpx.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=3200000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=3200000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf index e96fa0e94..5c800efad 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP1_realtime.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf index 4bebf9fcb..263f7cce2 100644 --- a/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_GPS_L2C_USRP_X300_realtime.conf @@ -7,8 +7,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SUPL RRLP GPS assistance configuration ##### ; Check http://www.mcc-mnc.com/ diff --git a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf index a305cd277..6d82ad1e9 100644 --- a/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_Galileo_E1_USRP_X300_realtime.conf @@ -7,8 +7,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf index 9be99d94d..52df58dc9 100644 --- a/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf +++ b/conf/gnss-sdr_Galileo_E1_acq_QuickSync.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_Galileo_E1_ishort.conf b/conf/gnss-sdr_Galileo_E1_ishort.conf index cada1263c..208571be0 100644 --- a/conf/gnss-sdr_Galileo_E1_ishort.conf +++ b/conf/gnss-sdr_Galileo_E1_ishort.conf @@ -5,8 +5,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SIGNAL_SOURCE CONFIG ############ @@ -193,7 +193,7 @@ Acquisition_1B.doppler_step=125 ;Acquisition_1B3.repeat_satellite = true ;#cboc: Only for [Galileo_E1_PCPS_Ambiguous_Acquisition]. This option allows you to choose between acquiring with CBOC signal [true] or sinboc(1,1) signal [false]. -;#Use only if GNSS-SDR.internal_fs_hz is greater than or equal to 6138000 +;#Use only if GNSS-SDR.internal_fs_sps is greater than or equal to 6138000 Acquisition_1B.cboc=false diff --git a/conf/gnss-sdr_Galileo_E1_nsr.conf b/conf/gnss-sdr_Galileo_E1_nsr.conf index c357bd013..4cf3f213c 100644 --- a/conf/gnss-sdr_Galileo_E1_nsr.conf +++ b/conf/gnss-sdr_Galileo_E1_nsr.conf @@ -5,11 +5,11 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -;GNSS-SDR.internal_fs_hz=6826700 -GNSS-SDR.internal_fs_hz=2560000 -;GNSS-SDR.internal_fs_hz=4096000 -;GNSS-SDR.internal_fs_hz=5120000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +;GNSS-SDR.internal_fs_sps=6826700 +GNSS-SDR.internal_fs_sps=2560000 +;GNSS-SDR.internal_fs_sps=4096000 +;GNSS-SDR.internal_fs_sps=5120000 ;######### SIGNAL_SOURCE CONFIG ############ @@ -87,7 +87,7 @@ Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition Acquisition_1B.pfa=0.0000008 Acquisition_1B.doppler_max=15000 Acquisition_1B.doppler_step=125 -Acquisition_1B.cboc=false ; This option allows you to choose between acquiring with CBOC signal [true] or sinboc(1,1) signal [false]. Use only if GNSS-SDR.internal_fs_hz is greater than or equal to 6138000 +Acquisition_1B.cboc=false ; This option allows you to choose between acquiring with CBOC signal [true] or sinboc(1,1) signal [false]. Use only if GNSS-SDR.internal_fs_sps is greater than or equal to 6138000 ;######### TRACKING GLOBAL CONFIG ############ Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking diff --git a/conf/gnss-sdr_Galileo_E5a.conf b/conf/gnss-sdr_Galileo_E5a.conf index 1528a5d2b..0845e1dff 100644 --- a/conf/gnss-sdr_Galileo_E5a.conf +++ b/conf/gnss-sdr_Galileo_E5a.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=32000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=32000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf index 6b733b4dd..8d4e1bc0b 100644 --- a/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf +++ b/conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=50000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=50000000 ;######### SUPL RRLP GPS assistance configuration ##### ; Check http://www.mcc-mnc.com/ diff --git a/conf/gnss-sdr_Hybrid_byte.conf b/conf/gnss-sdr_Hybrid_byte.conf index 047c2bc6f..44aa298f6 100644 --- a/conf/gnss-sdr_Hybrid_byte.conf +++ b/conf/gnss-sdr_Hybrid_byte.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=20000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=20000000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_Hybrid_byte_sim.conf b/conf/gnss-sdr_Hybrid_byte_sim.conf index 32bea4e58..5de0b699f 100644 --- a/conf/gnss-sdr_Hybrid_byte_sim.conf +++ b/conf/gnss-sdr_Hybrid_byte_sim.conf @@ -6,9 +6,9 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -;#GNSS-SDR.internal_fs_hz=2048000 -GNSS-SDR.internal_fs_hz=2600000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +;GNSS-SDR.internal_fs_sps=2048000 +GNSS-SDR.internal_fs_sps=2600000 ;######### SIGNAL_SOURCE CONFIG ############ diff --git a/conf/gnss-sdr_Hybrid_gr_complex.conf b/conf/gnss-sdr_Hybrid_gr_complex.conf index e444a9326..684c24af7 100644 --- a/conf/gnss-sdr_Hybrid_gr_complex.conf +++ b/conf/gnss-sdr_Hybrid_gr_complex.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4092000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4092000 ;######### SIGNAL_SOURCE CONFIG ############ ;#implementation: Use [File_Signal_Source] [Nsr_File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental) diff --git a/conf/gnss-sdr_Hybrid_ishort.conf b/conf/gnss-sdr_Hybrid_ishort.conf index b6cbe8591..8e4989aeb 100644 --- a/conf/gnss-sdr_Hybrid_ishort.conf +++ b/conf/gnss-sdr_Hybrid_ishort.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_Hybrid_nsr.conf b/conf/gnss-sdr_Hybrid_nsr.conf index 51ca610e5..a65244110 100644 --- a/conf/gnss-sdr_Hybrid_nsr.conf +++ b/conf/gnss-sdr_Hybrid_nsr.conf @@ -6,11 +6,11 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -;GNSS-SDR.internal_fs_hz=6826700 -GNSS-SDR.internal_fs_hz=2560000 -;GNSS-SDR.internal_fs_hz=4096000 -;GNSS-SDR.internal_fs_hz=5120000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +;GNSS-SDR.internal_fs_sps=6826700 +GNSS-SDR.internal_fs_sps=2560000 +;GNSS-SDR.internal_fs_sps=4096000 +;GNSS-SDR.internal_fs_sps=5120000 ;######### SIGNAL_SOURCE CONFIG ############ ;#implementation: Use [File_Signal_Source] [Nsr_File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental) diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf index 924d72f9e..7cf44f53b 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### ; Check http://www.mcc-mnc.com/ diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf index b6de1c3cd..ef35f1207 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf index 2e33999f6..859c41ba2 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf index b49d1c795..f95cdba22 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf index 8cf620713..4860367dc 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=5000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=5000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf index 2f2ba159d..37a7f89be 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Flexiband_realtime_III_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf index 436b1070f..e3c724fad 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_L2_Galileo_E1B_Flexiband_bin_file_III_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=2500000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=2500000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf index 62938acd4..541ef7b8b 100644 --- a/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf +++ b/conf/gnss-sdr_multichannel_GPS_L1_USRP_X300_realtime.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf index e278865e9..50cd9d1cb 100644 --- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=5000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=5000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf index 26128cf81..ce8f87a9f 100644 --- a/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf +++ b/conf/gnss-sdr_multichannel_GPS_L2_M_Flexiband_bin_file_III_1b_real.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=5000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=5000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf b/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf index 7a108fba6..e03a01dbe 100644 --- a/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf +++ b/conf/gnss-sdr_multichannel_all_in_one_Flexiband_bin_file_III_1b.conf @@ -6,8 +6,8 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=5000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=5000000 ;######### SUPL RRLP GPS assistance configuration ##### diff --git a/conf/gnss-sdr_multisource_Hybrid_ishort.conf b/conf/gnss-sdr_multisource_Hybrid_ishort.conf index 31f777693..71571955e 100644 --- a/conf/gnss-sdr_multisource_Hybrid_ishort.conf +++ b/conf/gnss-sdr_multisource_Hybrid_ishort.conf @@ -6,9 +6,11 @@ [GNSS-SDR] ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -GNSS-SDR.internal_fs_hz=4000000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +GNSS-SDR.internal_fs_sps=4000000 + Receiver.sources_count=2 + ;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. ; it helps to not overload the CPU, but the processing time will be longer. SignalSource.enable_throttle_control=false @@ -283,14 +285,12 @@ Resampler1.sample_freq_out=4000000 ;######### CHANNELS GLOBAL CONFIG ############ ;#count: Number of available GPS satellite channels. -Channels_GPS.count=2 +Channels_1C.count=2 ;#count: Number of available Galileo satellite channels. -Channels_Galileo.count=2 +Channels_1B.count=2 ;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver Channels.in_acquisition=1 -;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS -;#if the option is disabled by default is assigned GPS -Channel.system=GPS, Galileo + ;# CHANNEL CONNECTION Channel0.RF_channel_ID=0 @@ -305,118 +305,118 @@ Channel.signal=1B ;######### GPS ACQUISITION CONFIG ############ ;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -Acquisition_GPS.dump=false +Acquisition_1C.dump=false ;#filename: Log path and filename -Acquisition_GPS.dump_filename=./acq_dump.dat +Acquisition_1C.dump_filename=./acq_dump.dat ;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. -Acquisition_GPS.item_type=gr_complex +Acquisition_1C.item_type=gr_complex ;#if: Signal intermediate frequency in [Hz] -Acquisition_GPS.if=0 +Acquisition_1C.if=0 ;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_GPS.sampled_ms=1 +Acquisition_1C.sampled_ms=1 ;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition +Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition ;#threshold: Acquisition threshold -Acquisition_GPS.threshold=0.0075 +Acquisition_1C.threshold=0.0075 ;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -;Acquisition_GPS.pfa=0.01 +;Acquisition_1C.pfa=0.01 ;#doppler_max: Maximum expected Doppler shift [Hz] -Acquisition_GPS.doppler_max=10000 +Acquisition_1C.doppler_max=10000 ;#doppler_max: Doppler step in the grid search [Hz] -Acquisition_GPS.doppler_step=500 +Acquisition_1C.doppler_step=500 ;######### GALILEO ACQUISITION CONFIG ############ ;#dump: Enable or disable the acquisition internal data file logging [true] or [false] -Acquisition_Galileo.dump=false +Acquisition_1B.dump=false ;#filename: Log path and filename -Acquisition_Galileo.dump_filename=./acq_dump.dat +Acquisition_1B.dump_filename=./acq_dump.dat ;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version. -Acquisition_Galileo.item_type=gr_complex +Acquisition_1B.item_type=gr_complex ;#if: Signal intermediate frequency in [Hz] -Acquisition_Galileo.if=0 +Acquisition_1B.if=0 ;#sampled_ms: Signal block duration for the acquisition signal detection [ms] -Acquisition_Galileo.sampled_ms=4 +Acquisition_1B.sampled_ms=4 ;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -Acquisition_Galileo.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition +Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition ;#threshold: Acquisition threshold -;Acquisition_Galileo.threshold=0 +;Acquisition_1B.threshold=0 ;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition] -Acquisition_Galileo.pfa=0.0000008 +Acquisition_1B.pfa=0.0000008 ;#doppler_max: Maximum expected Doppler shift [Hz] -Acquisition_Galileo.doppler_max=15000 +Acquisition_1B.doppler_max=15000 ;#doppler_max: Doppler step in the grid search [Hz] -Acquisition_Galileo.doppler_step=125 +Acquisition_1B.doppler_step=125 ;######### TRACKING GPS CONFIG ############ ;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_PLL_C_Aid_Tracking] or [GPS_L1_CA_TCP_CONNECTOR_Tracking] or [Galileo_E1_DLL_PLL_VEML_Tracking] -Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking +Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking ;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version. -Tracking_GPS.item_type=gr_complex +Tracking_1C.item_type=gr_complex ;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_GPS.if=0 +Tracking_1C.if=0 ;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_GPS.dump=false +Tracking_1C.dump=false ;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. -Tracking_GPS.dump_filename=../data/epl_tracking_ch_ +Tracking_1C.dump_filename=../data/epl_tracking_ch_ ;#pll_bw_hz: PLL loop filter bandwidth [Hz] -Tracking_GPS.pll_bw_hz=45.0; +Tracking_1C.pll_bw_hz=45.0; ;#dll_bw_hz: DLL loop filter bandwidth [Hz] -Tracking_GPS.dll_bw_hz=4.0; +Tracking_1C.dll_bw_hz=4.0; ;#order: PLL/DLL loop filter order [2] or [3] -Tracking_GPS.order=3; +Tracking_1C.order=3; ;######### TRACKING GALILEO CONFIG ############ ;#implementation: Selected tracking algorithm: [Galileo_E1_DLL_PLL_VEML_Tracking] -Tracking_Galileo.implementation=Galileo_E1_DLL_PLL_VEML_Tracking +Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking ;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version. -Tracking_Galileo.item_type=gr_complex +Tracking_1B.item_type=gr_complex ;#sampling_frequency: Signal Intermediate Frequency in [Hz] -Tracking_Galileo.if=0 +Tracking_1B.if=0 ;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false] -Tracking_Galileo.dump=false +Tracking_1B.dump=false ;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number. -Tracking_Galileo.dump_filename=../data/veml_tracking_ch_ +Tracking_1B.dump_filename=../data/veml_tracking_ch_ ;#pll_bw_hz: PLL loop filter bandwidth [Hz] -Tracking_Galileo.pll_bw_hz=15.0; +Tracking_1B.pll_bw_hz=15.0; ;#dll_bw_hz: DLL loop filter bandwidth [Hz] -Tracking_Galileo.dll_bw_hz=2.0; +Tracking_1B.dll_bw_hz=2.0; ;#order: PLL/DLL loop filter order [2] or [3] -Tracking_Galileo.order=3; +Tracking_1B.order=3; ;#early_late_space_chips: correlator early-late space [chips]. Use [0.5] for GPS and [0.15] for Galileo -Tracking_Galileo.early_late_space_chips=0.15; +Tracking_1B.early_late_space_chips=0.15; ;#very_early_late_space_chips: only for [Galileo_E1_DLL_PLL_VEML_Tracking], correlator very early-late space [chips]. Use [0.6] -Tracking_Galileo.very_early_late_space_chips=0.6; +Tracking_1B.very_early_late_space_chips=0.6; ;######### TELEMETRY DECODER GPS CONFIG ############ ;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A -TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder -TelemetryDecoder_GPS.dump=false +TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder +TelemetryDecoder_1C.dump=false ;#decimation factor -TelemetryDecoder_GPS.decimation_factor=4; +TelemetryDecoder_1C.decimation_factor=4; ;######### TELEMETRY DECODER GALILEO CONFIG ############ ;#implementation: Use [Galileo_E1B_Telemetry_Decoder] for Galileo E1B -TelemetryDecoder_Galileo.implementation=Galileo_E1B_Telemetry_Decoder -TelemetryDecoder_Galileo.dump=false +TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder +TelemetryDecoder_1B.dump=false ;######### OBSERVABLES CONFIG ############ diff --git a/conf/gnss-sdr_multisource_Hybrid_nsr.conf b/conf/gnss-sdr_multisource_Hybrid_nsr.conf index f0a644f18..deee952af 100644 --- a/conf/gnss-sdr_multisource_Hybrid_nsr.conf +++ b/conf/gnss-sdr_multisource_Hybrid_nsr.conf @@ -8,11 +8,11 @@ Receiver.sources_count=2 ;######### GLOBAL OPTIONS ################## -;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz]. -;GNSS-SDR.internal_fs_hz=6826700 -GNSS-SDR.internal_fs_hz=2560000 -;GNSS-SDR.internal_fs_hz=4096000 -;GNSS-SDR.internal_fs_hz=5120000 +;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second]. +;GNSS-SDR.internal_fs_sps=6826700 +GNSS-SDR.internal_fs_sps=2560000 +;GNSS-SDR.internal_fs_sps=4096000 +;GNSS-SDR.internal_fs_sps=5120000 ;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing. ; it helps to not overload the CPU, but the processing time will be longer. diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index a051c7953..baf58e507 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -21,7 +21,7 @@ set(PVT_ADAPTER_SOURCES ) include_directories( - $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/core/system_parameters ${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/receiver diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 0de546abb..8e1e9fbe0 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -194,7 +194,8 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, int num_bands = 0; if ((gps_1C_count > 0) || (gal_1B_count > 0)) num_bands = 1; if (((gps_1C_count > 0) || (gal_1B_count > 0)) && (gps_2S_count > 0) ) num_bands = 2; - if (((gps_1C_count > 0) || (gal_1B_count > 0)) && (gps_2S_count > 0) && ((gal_E5a_count > 0) || (gal_E5a_count > 0))) num_bands = 3; + if (((gps_1C_count > 0) || (gal_1B_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0)) ) num_bands = 2; + if (((gps_1C_count > 0) || (gal_1B_count > 0)) && (gps_2S_count > 0) && ((gal_E5a_count > 0) || (gal_E5b_count > 0))) num_bands = 3; int number_of_frequencies = configuration->property(role + ".num_bands", num_bands); /* (1:L1, 2:L1+L2, 3:L1+L2+L5) */ if( (number_of_frequencies < 1) || (number_of_frequencies > 3) ) { @@ -382,7 +383,7 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, iono_model, /* ionosphere option (IONOOPT_XXX) */ trop_model, /* troposphere option (TROPOPT_XXX) */ dynamics_model, /* dynamics model (0:none, 1:velocity, 2:accel) */ - earth_tide, /* earth tide correction (0:off,1:solid,2:solid+otl+pole) */ + earth_tide, /* earth tide correction (0:off,1:solid,2:solid+otl+pole) */ number_filter_iter, /* number of filter iteration */ 0, /* code smoothing window size (0:none) */ 0, /* interpolate reference obs (for post mission) */ @@ -446,7 +447,7 @@ bool RtklibPvt::save_assistance_to_XML() ofs.close(); LOG(INFO) << "Saved GPS L1 Ephemeris map data"; } - catch (std::exception& e) + catch (const std::exception & e) { LOG(WARNING) << e.what(); return false; diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.h b/src/algorithms/PVT/adapters/rtklib_pvt.h index 33d04ecf0..f37515323 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.h +++ b/src/algorithms/PVT/adapters/rtklib_pvt.h @@ -53,44 +53,41 @@ public: virtual ~RtklibPvt(); - std::string role() + inline std::string role() override { return role_; } //! Returns "RTKLIB_Pvt" - std::string implementation() + inline std::string implementation() override { return "RTKLIB_PVT"; } - void connect(gr::top_block_sptr top_block); - void disconnect(gr::top_block_sptr top_block); - gr::basic_block_sptr get_left_block(); - gr::basic_block_sptr get_right_block(); + void connect(gr::top_block_sptr top_block) override; + void disconnect(gr::top_block_sptr top_block) override; + gr::basic_block_sptr get_left_block() override; + gr::basic_block_sptr get_right_block() override; - void reset() + inline void reset() override { return; } //! All blocks must have an item_size() function implementation. Returns sizeof(gr_complex) - size_t item_size() + inline size_t item_size() override { return sizeof(gr_complex); } private: rtklib_pvt_cc_sptr pvt_; - rtk_t rtk; - bool dump_; std::string dump_filename_; std::string role_; unsigned int in_streams_; unsigned int out_streams_; - std::string eph_xml_filename_; bool save_assistance_to_XML(); }; diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index a80c236a4..ad8c08e7c 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -21,7 +21,7 @@ set(PVT_GR_BLOCKS_SOURCES ) include_directories( - $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/core/system_parameters ${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/receiver diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index a349ef753..152fc6f1d 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -280,7 +280,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump d_dump_filename.append("_raw.dat"); dump_ls_pvt_filename.append("_ls_pvt.dat"); - d_ls_pvt = std::make_shared((int)nchannels, dump_ls_pvt_filename, d_dump, rtk); + d_ls_pvt = std::make_shared(static_cast(nchannels), dump_ls_pvt_filename, d_dump, rtk); d_ls_pvt->set_averaging_depth(1); d_rx_time = 0.0; @@ -326,8 +326,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump std::cout << "GNSS-SDR can not create message queues!" << std::endl; throw new std::exception(); } - gettimeofday(&tv, NULL); - begin = tv.tv_sec * 1000000 + tv.tv_usec; + start = std::chrono::system_clock::now(); } @@ -336,7 +335,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc() msgctl(sysv_msqid, IPC_RMID, NULL); //save GPS L2CM ephemeris to XML file - std::string file_name="eph_GPS_L2CM.xml"; + std::string file_name = "eph_GPS_L2CM.xml"; if (d_ls_pvt->gps_cnav_ephemeris_map.size() > 0) { @@ -348,7 +347,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc() ofs.close(); LOG(INFO) << "Saved GPS L2CM Ephemeris map data"; } - catch (std::exception& e) + catch (const std::exception & e) { LOG(WARNING) << e.what(); } @@ -371,7 +370,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc() ofs.close(); LOG(INFO) << "Saved GPS L1 CA Ephemeris map data"; } - catch (std::exception& e) + catch (const std::exception & e) { LOG(WARNING) << e.what(); } @@ -394,7 +393,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc() ofs.close(); LOG(INFO) << "Saved Galileo E1 Ephemeris map data"; } - catch (std::exception& e) + catch (const std::exception & e) { LOG(WARNING) << e.what(); } @@ -404,6 +403,17 @@ rtklib_pvt_cc::~rtklib_pvt_cc() LOG(WARNING) << "Failed to save Galileo E1 Ephemeris, map is empty"; } + if (d_dump_file.is_open() == true) + { + try + { + d_dump_file.close(); + } + catch(const std::exception & ex) + { + LOG(WARNING) << "Exception in destructor closing the dump file " << ex.what(); + } + } } @@ -447,16 +457,16 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite unsigned int gal_channel = 0; gnss_observables_map.clear(); - Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer + const Gnss_Synchro **in = reinterpret_cast(&input_items[0]); // Get the input buffer pointer // ############ 1. READ PSEUDORANGES #### for (unsigned int i = 0; i < d_nchannels; i++) { if (in[i][epoch].Flag_valid_pseudorange == true) { - std::map::iterator tmp_eph_iter_gps = d_ls_pvt->gps_ephemeris_map.find(in[i][epoch].PRN); - std::map::iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN); - std::map::iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN); + std::map::const_iterator tmp_eph_iter_gps = d_ls_pvt->gps_ephemeris_map.find(in[i][epoch].PRN); + std::map::const_iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN); + std::map::const_iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN); if(((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0)) || ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0)) || ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0)) @@ -559,18 +569,18 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite for (std::map::iterator it = gnss_observables_map.begin(); it != gnss_observables_map.end(); ++it) { - it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->d_rx_dt_s * GPS_C_m_s; + it->second.Pseudorange_m = it->second.Pseudorange_m - d_ls_pvt->get_time_offset_s() * GPS_C_m_s; } if(first_fix == true) { - std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; + std::cout << "First position fix at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time()) + << " UTC is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude() + << " [deg], Height= " << d_ls_pvt->get_height() << " [m]" << std::endl; ttff_msgbuf ttff; ttff.mtype = 1; - gettimeofday(&tv, NULL); - long long int end = tv.tv_sec * 1000000 + tv.tv_usec; - ttff.ttff = static_cast(end - begin) / 1000000.0; + end = std::chrono::system_clock::now(); + std::chrono::duration elapsed_seconds = end - start; + ttff.ttff = elapsed_seconds.count(); send_sys_v_ttff_msg(ttff); first_fix = false; } @@ -607,20 +617,20 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite // ####################### RINEX FILES ################# - std::map::iterator galileo_ephemeris_iter; - std::map::iterator gps_ephemeris_iter; - std::map::iterator gps_cnav_ephemeris_iter; - std::map::iterator gnss_observables_iter; + std::map::const_iterator galileo_ephemeris_iter; + std::map::const_iterator gps_ephemeris_iter; + std::map::const_iterator gps_cnav_ephemeris_iter; + std::map::const_iterator gnss_observables_iter; if (!b_rinex_header_written) // & we have utc data in nav message! { - galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin(); + galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); + gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); + gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.cbegin(); if(type_of_rx == 1) // GPS L1 C/A only { - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) + if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) { rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time); rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model); @@ -630,7 +640,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 2) // GPS L2C only { - if (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) + if (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend()) { rp->rinex_obs_header(rp->obsFile, gps_cnav_ephemeris_iter->second, d_rx_time); rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model); @@ -639,7 +649,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 4) // Galileo E1B only { - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time); rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); @@ -649,7 +659,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if(type_of_rx == 5) // Galileo E5a only { std::string signal("5X"); - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal); rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); @@ -659,7 +669,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if(type_of_rx == 6) // Galileo E5b only { std::string signal("7X"); - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal); rp->rinex_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac); @@ -668,7 +678,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 7) // GPS L1 C/A + GPS L2C { - if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end())) + if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend())) { rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time); rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model); @@ -678,7 +688,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if(type_of_rx == 9) // GPS L1 C/A + Galileo E1B { - if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) ) + if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) ) { std::string gal_signal("1B"); rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); @@ -688,7 +698,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 10) // GPS L1 C/A + Galileo E5a { - if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) ) + if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) ) { std::string gal_signal("5X"); rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); @@ -698,7 +708,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 11) // GPS L1 C/A + Galileo E5b { - if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) ) + if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) ) { std::string gal_signal("7X"); rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); @@ -708,7 +718,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 14) // Galileo E1B + Galileo E5a { - if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) ) + if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) ) { std::string gal_signal("1B 5X"); rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal); @@ -718,7 +728,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 15) // Galileo E1B + Galileo E5b { - if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) ) + if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) ) { std::string gal_signal("1B 7X"); rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal); @@ -756,9 +766,9 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map); } } - galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin(); + galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); + gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); + gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.cbegin(); // Log observables into the RINEX file if(flag_write_RINEX_obs_output) @@ -890,17 +900,17 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { if(flag_write_RTCM_1019_output == true) { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) + for(std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend(); gps_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); } } if(flag_write_RTCM_MSM_output == true) { - std::map::iterator gps_ephemeris_iter; - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); + std::map::const_iterator gps_ephemeris_iter; + gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) + if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -910,16 +920,16 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { if(flag_write_RTCM_1045_output == true) { - for(std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ ) + for(std::map::const_iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend(); gal_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second); } } if(flag_write_RTCM_MSM_output == true) { - std::map::iterator gal_ephemeris_iter; - gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + std::map::const_iterator gal_ephemeris_iter; + gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); + if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -929,18 +939,18 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { if(flag_write_RTCM_1019_output == true) { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) + for(std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend(); gps_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); } } if(flag_write_RTCM_MSM_output == true) { - std::map::iterator gps_ephemeris_iter; - gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - std::map::iterator gps_cnav_ephemeris_iter; - gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin(); - if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) ) + std::map::const_iterator gps_ephemeris_iter; + gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); + std::map::const_iterator gps_cnav_ephemeris_iter; + gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.cbegin(); + if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend()) ) { d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -967,7 +977,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite //gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.end(); //galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.end(); unsigned int i = 0; - for (gnss_observables_iter = gnss_observables_map.begin(); gnss_observables_iter != gnss_observables_map.end(); gnss_observables_iter++) + for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++) { std::string system(&gnss_observables_iter->second.System, 1); if(gps_channel == 0) @@ -976,7 +986,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { // This is a channel with valid GPS signal gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) + if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) { gps_channel = i; } @@ -987,7 +997,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if(system.compare("E") == 0) { galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { gal_channel = i; } @@ -998,14 +1008,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if(flag_write_RTCM_MSM_output == true) { - if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } } if(flag_write_RTCM_MSM_output == true) { - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) + if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -1018,14 +1028,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { if(type_of_rx == 1) // GPS L1 C/A { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) + for(std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend(); gps_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); } - std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); + std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); - if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) + if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -1034,14 +1044,14 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite if((type_of_rx == 4) || (type_of_rx == 5) || (type_of_rx == 6) || (type_of_rx == 14) || (type_of_rx == 15)) // Galileo { - for(std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ ) + for(std::map::const_iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend(); gal_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second); } - std::map::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); + std::map::const_iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin(); - if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -1049,15 +1059,15 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } if(type_of_rx == 7) // GPS L1 C/A + GPS L2C { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) + for(std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend(); gps_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); } - std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); - std::map::iterator gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin(); + std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); + std::map::const_iterator gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.cbegin(); - if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end())) + if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.cend())) { d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } @@ -1067,7 +1077,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite { if(d_rtcm_MT1019_rate_ms != 0) // allows deactivating messages by setting rate = 0 { - for(std::map::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ ) + for(std::map::const_iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.cbegin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend(); gps_ephemeris_iter++ ) { d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second); } @@ -1081,7 +1091,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } unsigned int i = 0; - for (gnss_observables_iter = gnss_observables_map.begin(); gnss_observables_iter != gnss_observables_map.end(); gnss_observables_iter++) + for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++) { std::string system(&gnss_observables_iter->second.System, 1); if(gps_channel == 0) @@ -1126,20 +1136,20 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite } // DEBUG MESSAGE: Display position in console output - if( (d_ls_pvt->b_valid_position == true) && (flag_display_pvt == true) ) + if( (d_ls_pvt->is_valid_position() == true) && (flag_display_pvt == true) ) { - std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC using " << d_ls_pvt->d_valid_observations << " observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl; + std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time()) + << " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude() + << " [deg], Height= " << d_ls_pvt->get_height() << " [m]" << std::endl; - LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC using "<< d_ls_pvt->d_valid_observations << " observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d - << " [deg], Height= " << d_ls_pvt->d_height_m << " [m]"; + LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time()) + << " UTC using "<< d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude() + << " [deg], Height= " << d_ls_pvt->get_height() << " [m]"; - /* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time) - << " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = " - << d_ls_pvt->d_VDOP <<" TDOP = " << d_ls_pvt->d_TDOP - << " GDOP = " << d_ls_pvt->d_GDOP << std::endl; */ + /* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time()) + << " UTC using "<< d_ls_pvt->get_num_valid_observations()<<" observations is HDOP = " << d_ls_pvt->get_HDOP() << " VDOP = " + << d_ls_pvt->get_VDOP() <<" TDOP = " << d_ls_pvt->get_TDOP() + << " GDOP = " << d_ls_pvt->get_GDOP() << std::endl; */ } // MULTIPLEXED FILE RECORDING - Record results to file @@ -1151,10 +1161,10 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite for (unsigned int i = 0; i < d_nchannels; i++) { tmp_double = in[i][epoch].Pseudorange_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); tmp_double = 0; - d_dump_file.write((char*)&tmp_double, sizeof(double)); - d_dump_file.write((char*)&d_rx_time, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); + d_dump_file.write(reinterpret_cast(&d_rx_time), sizeof(double)); } } catch (const std::ifstream::failure& e) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h index a23cb4b38..a188c5809 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.h @@ -31,7 +31,7 @@ #ifndef GNSS_SDR_RTKLIB_PVT_CC_H #define GNSS_SDR_RTKLIB_PVT_CC_H -#include +#include #include #include #include @@ -143,8 +143,7 @@ private: double ttff; } ttff_msgbuf; bool send_sys_v_ttff_msg(ttff_msgbuf ttff); - struct timeval tv; - long long int begin; + std::chrono::time_point start, end; public: rtklib_pvt_cc(unsigned int nchannels, diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index d223454d3..5e30040d5 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -31,7 +31,7 @@ set(PVT_LIB_SOURCES ) include_directories( - $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/core/system_parameters ${CMAKE_SOURCE_DIR}/src/core/interfaces ${CMAKE_SOURCE_DIR}/src/core/receiver diff --git a/src/algorithms/PVT/libs/geojson_printer.cc b/src/algorithms/PVT/libs/geojson_printer.cc index 997992934..b1062f65f 100644 --- a/src/algorithms/PVT/libs/geojson_printer.cc +++ b/src/algorithms/PVT/libs/geojson_printer.cc @@ -31,9 +31,9 @@ #include "geojson_printer.h" -#include #include #include +#include #include GeoJSON_Printer::GeoJSON_Printer() @@ -42,7 +42,6 @@ GeoJSON_Printer::GeoJSON_Printer() } - GeoJSON_Printer::~GeoJSON_Printer () { GeoJSON_Printer::close_file(); @@ -51,41 +50,39 @@ GeoJSON_Printer::~GeoJSON_Printer () bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name) { - time_t rawtime; - struct tm * timeinfo; - time ( &rawtime ); - timeinfo = localtime ( &rawtime ); + boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); + tm timeinfo = boost::posix_time::to_tm(pt); if (time_tag_name) { std::stringstream strm0; - const int year = timeinfo->tm_year - 100; + const int year = timeinfo.tm_year - 100; strm0 << year; - const int month = timeinfo->tm_mon + 1; + const int month = timeinfo.tm_mon + 1; if(month < 10) { strm0 << "0"; } strm0 << month; - const int day = timeinfo->tm_mday; + const int day = timeinfo.tm_mday; if(day < 10) { strm0 << "0"; } strm0 << day << "_"; - const int hour = timeinfo->tm_hour; + const int hour = timeinfo.tm_hour; if(hour < 10) { strm0 << "0"; } strm0 << hour; - const int min = timeinfo->tm_min; + const int min = timeinfo.tm_min; if(min < 10) { strm0 << "0"; } strm0 << min; - const int sec = timeinfo->tm_sec; + const int sec = timeinfo.tm_sec; if(sec < 10) { strm0 << "0"; @@ -131,7 +128,6 @@ bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name) } - bool GeoJSON_Printer::print_position(const std::shared_ptr& position, bool print_average_values) { double latitude; @@ -142,15 +138,15 @@ bool GeoJSON_Printer::print_position(const std::shared_ptr& positi if (print_average_values == false) { - latitude = position_->d_latitude_d; - longitude = position_->d_longitude_d; - height = position_->d_height_m; + latitude = position_->get_latitude(); + longitude = position_->get_longitude(); + height = position_->get_height(); } else { - latitude = position_->d_avg_latitude_d; - longitude = position_->d_avg_longitude_d; - height = position_->d_avg_height_m; + latitude = position_->get_avg_latitude(); + longitude = position_->get_avg_longitude(); + height = position_->get_avg_height(); } if (geojson_file.is_open()) @@ -174,7 +170,6 @@ bool GeoJSON_Printer::print_position(const std::shared_ptr& positi } - bool GeoJSON_Printer::close_file() { if (geojson_file.is_open()) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 20add847b..2deb7c05b 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -46,7 +46,7 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag d_flag_dump_enabled = flag_dump_to_file; d_galileo_current_time = 0; count_valid_position = 0; - d_flag_averaging = false; + this->set_averaging_flag(false); // ############# ENABLE DATA FILE LOG ################# if (d_flag_dump_enabled == true) { @@ -69,7 +69,17 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag hybrid_ls_pvt::~hybrid_ls_pvt() { - d_dump_file.close(); + if (d_dump_file.is_open() == true) + { + try + { + d_dump_file.close(); + } + catch(const std::exception & ex) + { + LOG(WARNING) << "Exception in destructor closing the dump file " << ex.what(); + } + } } @@ -94,7 +104,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou double TX_time_corrected_s = 0.0; double SV_clock_bias_s = 0.0; - d_flag_averaging = flag_averaging; + this->set_averaging_flag(flag_averaging); // ******************************************************************************** // ****** PREPARE THE LEAST SQUARES DATA (SV POSITIONS MATRIX AND OBS VECTORS) **** @@ -138,9 +148,9 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou // 4- fill the observations vector with the corrected observables obs.resize(valid_obs + 1, 1); - obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s - d_rx_dt_s * GALILEO_C_m_s; - d_visible_satellites_IDs[valid_obs] = galileo_ephemeris_iter->second.i_satellite_PRN; - d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz; + obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s - this->get_time_offset_s() * GALILEO_C_m_s; + this->set_visible_satellites_ID(valid_obs, galileo_ephemeris_iter->second.i_satellite_PRN); + this->set_visible_satellites_CN0_dB(valid_obs, gnss_observables_iter->second.CN0_dB_hz); Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST GST = galileo_ephemeris_iter->second.Galileo_System_Time(Galileo_week_number, hybrid_current_time); @@ -201,9 +211,9 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou double P1_P2=(1.0-Gamma)*(gps_ephemeris_iter->second.d_TGD* GPS_C_m_s); double Code_bias_m= P1_P2/(1.0-Gamma); obs.resize(valid_obs + 1, 1); - obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s-Code_bias_m-d_rx_dt_s * GPS_C_m_s; - d_visible_satellites_IDs[valid_obs] = gps_ephemeris_iter->second.i_satellite_PRN; - d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz; + obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s-Code_bias_m-this->get_time_offset_s() * GPS_C_m_s; + this->set_visible_satellites_ID(valid_obs, gps_ephemeris_iter->second.i_satellite_PRN); + this->set_visible_satellites_CN0_dB(valid_obs, gnss_observables_iter->second.CN0_dB_hz); // SV ECEF DEBUG OUTPUT LOG(INFO) << "(new)ECEF GPS L1 CA satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN @@ -254,8 +264,8 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou // 4- fill the observations vector with the corrected observables obs.resize(valid_obs + 1, 1); obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr*GPS_C_m_s + SV_clock_bias_s * GPS_C_m_s; - d_visible_satellites_IDs[valid_obs] = gps_cnav_ephemeris_iter->second.i_satellite_PRN; - d_visible_satellites_CN0_dB[valid_obs] = gnss_observables_iter->second.CN0_dB_hz; + this->set_visible_satellites_ID(valid_obs, gps_cnav_ephemeris_iter->second.i_satellite_PRN); + this->set_visible_satellites_CN0_dB(valid_obs, gnss_observables_iter->second.CN0_dB_hz); GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week; GPS_week=GPS_week%1024; //Necessary due to the increase of WN bits in CNAV message (10 in GPS NAV and 13 in CNAV) @@ -286,7 +296,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou // ******************************************************************************** // ****** SOLVE LEAST SQUARES****************************************************** // ******************************************************************************** - d_valid_observations = valid_obs; + this->set_num_valid_observations(valid_obs); LOG(INFO) << "HYBRID PVT: valid observations=" << valid_obs; @@ -299,23 +309,23 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou try { // check if this is the initial position computation - if (d_rx_dt_s == 0) + if (this->get_time_offset_s() == 0) { // execute Bancroft's algorithm to estimate initial receiver position and time DLOG(INFO) << " Executing Bancroft algorithm..."; rx_position_and_time = bancroftPos(satpos.t(), obs); - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s = rx_position_and_time(3) / GPS_C_m_s; // save time for the next iteration [meters]->[seconds] + this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration + this->set_time_offset_s(rx_position_and_time(3) / GPS_C_m_s); // save time for the next iteration [meters]->[seconds] } // Execute WLS using previous position as the initialization point rx_position_and_time = leastSquarePos(satpos, obs, W); - d_rx_pos = rx_position_and_time.rows(0, 2); // save ECEF position for the next iteration - d_rx_dt_s += rx_position_and_time(3) / GPS_C_m_s; // accumulate the rx time error for the next iteration [meters]->[seconds] + this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration + this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / GPS_C_m_s); // accumulate the rx time error for the next iteration [meters]->[seconds] DLOG(INFO) << "Hybrid Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time; - DLOG(INFO) << "Accumulated rx clock error=" << d_rx_dt_s << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_m_s << " [s]"; + DLOG(INFO) << "Accumulated rx clock error=" << this->get_time_offset_s() << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_m_s << " [s]"; // Compute GST and Gregorian time if( GST != 0.0) @@ -331,13 +341,13 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou boost::posix_time::time_duration t = boost::posix_time::seconds(utc); // 22 August 1999 00:00 last Galileo start GST epoch (ICD sec 5.1.2) boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t); - d_position_UTC_time = p_time; + this->set_position_UTC_time(p_time); cart2geo(static_cast(rx_position_and_time(0)), static_cast(rx_position_and_time(1)), static_cast(rx_position_and_time(2)), 4); DLOG(INFO) << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time) - << " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d - << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_s << " [s]"; + << " is Lat = " << this->get_latitude() << " [deg], Long = " << this->get_longitude() + << " [deg], Height= " << this->get_height() << " [m]" << " RX time offset= " << this->get_time_offset_s() << " [s]"; // ###### Compute DOPs ######## hybrid_ls_pvt::compute_DOP(); @@ -351,28 +361,28 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou double tmp_double; // PVT GPS time tmp_double = hybrid_current_time; - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // ECEF User Position East [m] tmp_double = rx_position_and_time(0); - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // ECEF User Position North [m] tmp_double = rx_position_and_time(1); - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // ECEF User Position Up [m] tmp_double = rx_position_and_time(2); - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // User clock offset [s] tmp_double = rx_position_and_time(3); - d_dump_file.write((char*)&tmp_double, sizeof(double)); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // GEO user position Latitude [deg] - tmp_double = d_latitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); + tmp_double = this->get_latitude(); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // GEO user position Longitude [deg] - tmp_double = d_longitude_d; - d_dump_file.write((char*)&tmp_double, sizeof(double)); + tmp_double = this->get_longitude(); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); // GEO user position Height [m] - tmp_double = d_height_m; - d_dump_file.write((char*)&tmp_double, sizeof(double)); + tmp_double = this->get_height(); + d_dump_file.write(reinterpret_cast(&tmp_double), sizeof(double)); } catch (const std::ifstream::failure& e) { @@ -381,18 +391,18 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_observables_map, dou } // MOVING AVERAGE PVT - pos_averaging(flag_averaging); + this->perform_pos_averaging(); } catch(const std::exception & e) { - d_rx_dt_s = 0; //reset rx time estimation + this->set_time_offset_s(0.0); //reset rx time estimation LOG(WARNING) << "Problem with the solver, invalid solution!" << e.what(); - b_valid_position = false; + this->set_valid_position(false); } } else { - b_valid_position = false; + this->set_valid_position(false); } - return b_valid_position; + return this->is_valid_position(); } diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.h b/src/algorithms/PVT/libs/hybrid_ls_pvt.h index e1084d6e7..1a658793b 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.h +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.h @@ -49,13 +49,17 @@ class hybrid_ls_pvt : public Ls_Pvt { private: - + int count_valid_position; + bool d_flag_dump_enabled; + std::string d_dump_filename; + std::ofstream d_dump_file; + int d_nchannels; // Number of available channels for positioning + double d_galileo_current_time; public: hybrid_ls_pvt(int nchannels,std::string dump_filename, bool flag_dump_to_file); ~hybrid_ls_pvt(); bool get_PVT(std::map gnss_observables_map, double Rx_time, bool flag_averaging); - int d_nchannels; //!< Number of available channels for positioning std::map galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris std::map gps_ephemeris_map; //!< Map storing new GPS_Ephemeris @@ -70,16 +74,6 @@ public: Gps_CNAV_Iono gps_cnav_iono; Gps_CNAV_Utc_Model gps_cnav_utc_model; - - double d_galileo_current_time; - - int count_valid_position; - - bool d_flag_dump_enabled; - bool d_flag_averaging; - - std::string d_dump_filename; - std::ofstream d_dump_file; }; #endif diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index dd457db45..1db4f6f61 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -30,51 +30,47 @@ */ #include "kml_printer.h" -#include #include +#include #include using google::LogMessage; bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) { + boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); + tm timeinfo = boost::posix_time::to_tm(pt); - time_t rawtime; - struct tm * timeinfo; - time ( &rawtime ); - timeinfo = localtime ( &rawtime ); if (time_tag_name) { - - std::stringstream strm0; - const int year = timeinfo->tm_year - 100; + const int year = timeinfo.tm_year - 100; strm0 << year; - const int month = timeinfo->tm_mon + 1; + const int month = timeinfo.tm_mon + 1; if(month < 10) { strm0 << "0"; } strm0 << month; - const int day = timeinfo->tm_mday; + const int day = timeinfo.tm_mday; if(day < 10) { strm0 << "0"; } strm0 << day << "_"; - const int hour = timeinfo->tm_hour; + const int hour = timeinfo.tm_hour; if(hour < 10) { strm0 << "0"; } strm0 << hour; - const int min = timeinfo->tm_min; + const int min = timeinfo.tm_min; if(min < 10) { strm0 << "0"; } strm0 << min; - const int sec = timeinfo->tm_sec; + const int sec = timeinfo.tm_sec; if(sec < 10) { strm0 << "0"; @@ -88,6 +84,7 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) kml_filename = filename + ".kml"; } kml_file.open(kml_filename.c_str()); + if (kml_file.is_open()) { DLOG(INFO) << "KML printer writing on " << filename.c_str(); @@ -98,7 +95,7 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) << "" << std::endl << " " << std::endl << " GNSS Track" << std::endl - << " GNSS-SDR Receiver position log file created at " << asctime (timeinfo) + << " GNSS-SDR Receiver position log file created at " << pt << " " << std::endl << "