mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-05 10:17:03 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga
This commit is contained in:
commit
6979e561b8
208
CMakeLists.txt
208
CMakeLists.txt
@ -20,7 +20,7 @@
|
||||
# Project setup
|
||||
################################################################################
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ..'")
|
||||
message(FATAL_ERROR "Prevented in-tree build, it is bad practice.\nTry 'cd build && cmake ..' instead.")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
@ -28,6 +28,7 @@ project(gnss-sdr CXX C)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Determine optional blocks/libraries to be built (default: not built)
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..'
|
||||
@ -436,7 +437,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
execute_process(COMMAND
|
||||
${CMAKE_CXX_COMPILER} -v
|
||||
RESULT_VARIABLE _res ERROR_VARIABLE _err
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(${_res} STREQUAL "0")
|
||||
# output is in error stream
|
||||
string(REGEX MATCH "^Apple.*" IS_APPLE ${_err})
|
||||
@ -569,9 +571,11 @@ set_package_properties(Threads PROPERTIES
|
||||
################################################################################
|
||||
enable_testing()
|
||||
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
|
||||
if(EXISTS $ENV{GTEST_DIR})
|
||||
set(GTEST_DIR $ENV{GTEST_DIR})
|
||||
message(STATUS "Googletest root folder set at ${GTEST_DIR}")
|
||||
if(NOT GTEST_DIR)
|
||||
if(DEFINED ENV{GTEST_DIR})
|
||||
set(GTEST_DIR $ENV{GTEST_DIR})
|
||||
message(STATUS "Googletest root folder set at ${GTEST_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -586,9 +590,6 @@ if(NOT GOOGLETEST_FOUND)
|
||||
set_package_properties(GOOGLETEST PROPERTIES
|
||||
PURPOSE "Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
)
|
||||
if(GTEST_DIR)
|
||||
message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@ -624,73 +625,66 @@ endif()
|
||||
if(CMAKE_VERSION VERSION_LESS 3.5)
|
||||
if(NOT TARGET Boost::boost)
|
||||
add_library(Boost::boost SHARED IMPORTED) # Trick for CMake 2.8.12
|
||||
set_property(TARGET Boost::boost PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::boost PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES})
|
||||
set_target_properties(Boost::boost PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::date_time)
|
||||
add_library(Boost::date_time SHARED IMPORTED)
|
||||
set_property(TARGET Boost::date_time PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::date_time PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_DATE_TIME_LIBRARIES})
|
||||
set_property(TARGET Boost::date_time PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES})
|
||||
set_target_properties(Boost::date_time PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_DATE_TIME_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_DATE_TIME_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::system)
|
||||
add_library(Boost::system SHARED IMPORTED)
|
||||
set_property(TARGET Boost::system PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::system PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_SYSTEM_LIBRARIES})
|
||||
set_property(TARGET Boost::system PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_SYSTEM_LIBRARIES})
|
||||
set_target_properties(Boost::system PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_SYSTEM_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_SYSTEM_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::filesystem)
|
||||
add_library(Boost::filesystem SHARED IMPORTED)
|
||||
set_property(TARGET Boost::filesystem PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::filesystem PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_FILESYSTEM_LIBRARIES})
|
||||
set_property(TARGET Boost::filesystem PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_FILESYSTEM_LIBRARIES})
|
||||
set_target_properties(Boost::filesystem PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_FILESYSTEM_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_FILESYSTEM_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::thread)
|
||||
add_library(Boost::thread SHARED IMPORTED)
|
||||
set_property(TARGET Boost::thread PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::thread PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_THREAD_LIBRARIES})
|
||||
set_property(TARGET Boost::thread PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_THREAD_LIBRARIES})
|
||||
set_target_properties(Boost::thread PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_THREAD_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_THREAD_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::serialization)
|
||||
add_library(Boost::serialization SHARED IMPORTED)
|
||||
set_property(TARGET Boost::serialization PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::serialization PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_SERIALIZATION_LIBRARIES})
|
||||
set_property(TARGET Boost::serialization PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_SERIALIZATION_LIBRARIES})
|
||||
set_target_properties(Boost::serialization PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_SERIALIZATION_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_SERIALIZATION_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::chrono)
|
||||
add_library(Boost::chrono SHARED IMPORTED)
|
||||
set_property(TARGET Boost::chrono PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::chrono PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_CHRONO_LIBRARIES})
|
||||
set_property(TARGET Boost::chrono PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES})
|
||||
set_target_properties(Boost::chrono PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_CHRONO_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if(NOT TARGET Boost::atomic)
|
||||
add_library(Boost::atomic SHARED IMPORTED)
|
||||
set_property(TARGET Boost::atomic PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||
set_property(TARGET Boost::atomic PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES})
|
||||
set_property(TARGET Boost::atomic PROPERTY
|
||||
IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES})
|
||||
set_target_properties(Boost::atomic PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES}
|
||||
IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -749,10 +743,10 @@ else()
|
||||
list(GET GNURADIO_RUNTIME_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_RUNTIME_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::runtime PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_RUNTIME_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_RUNTIME_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_RUNTIME_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_RUNTIME_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_RUNTIME_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_RUNTIME_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -765,10 +759,10 @@ else()
|
||||
list(GET GNURADIO_ANALOG_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_ANALOG_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::analog PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_ANALOG_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_ANALOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_ANALOG_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_ANALOG_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_ANALOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_ANALOG_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -781,10 +775,10 @@ else()
|
||||
list(GET GNURADIO_BLOCKS_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_BLOCKS_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::blocks PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_BLOCKS_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_BLOCKS_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_BLOCKS_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_BLOCKS_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_BLOCKS_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_BLOCKS_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -797,10 +791,10 @@ else()
|
||||
list(GET GNURADIO_FILTER_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_FILTER_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::filter PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_FILTER_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FILTER_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_FILTER_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_FILTER_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FILTER_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_FILTER_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -813,10 +807,10 @@ else()
|
||||
list(GET GNURADIO_FFT_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_FFT_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::fft PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_FFT_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FFT_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_FFT_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_FFT_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_FFT_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_FFT_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -829,10 +823,10 @@ else()
|
||||
list(GET GNURADIO_PMT_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_PMT_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::pmt PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_PMT_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_PMT_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_PMT_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_PMT_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_PMT_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_PMT_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -843,10 +837,10 @@ if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND)
|
||||
list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR)
|
||||
get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE)
|
||||
set_target_properties(Gnuradio::uhd PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_UHD_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GNURADIO_UHD_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -994,7 +988,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
${STRIP_VOLK_GNSSSDR_PROFILE}
|
||||
${USE_THIS_PYTHON}
|
||||
)
|
||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake
|
||||
-DCROSSCOMPILE_MULTILIB=TRUE
|
||||
@ -1023,7 +1017,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
PATCH_COMMAND ""
|
||||
BUILD_COMMAND ${READ_ENVIRO} ${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
|
||||
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile
|
||||
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
||||
)
|
||||
endif()
|
||||
@ -1205,8 +1199,8 @@ aclocal
|
||||
automake --add-missing
|
||||
autoreconf -vfi
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure")
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure"
|
||||
)
|
||||
else()
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
"#!/bin/sh
|
||||
@ -1218,13 +1212,15 @@ aclocal
|
||||
automake --add-missing
|
||||
autoreconf -vfi
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure")
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
|
||||
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure_with_gflags)
|
||||
|
||||
@ -1410,10 +1406,10 @@ if(ARMADILLO_FOUND)
|
||||
else()
|
||||
add_library(Armadillo::armadillo SHARED IMPORTED)
|
||||
set_target_properties(Armadillo::armadillo PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -1492,10 +1488,10 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
add_library(Armadillo::armadillo STATIC IMPORTED)
|
||||
add_dependencies(Armadillo::armadillo armadillo-${armadillo_RELEASE})
|
||||
set_target_properties(Armadillo::armadillo PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
set_package_properties(Armadillo PROPERTIES
|
||||
PURPOSE "Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
@ -1738,7 +1734,7 @@ if(NOT PUGIXML_FOUND)
|
||||
message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.")
|
||||
set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
||||
set(TOOLCHAIN_ARG "")
|
||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||
set(PUGIXML_COMPILER "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake")
|
||||
endif()
|
||||
@ -1876,7 +1872,7 @@ set_package_properties(OPENCL PROPERTIES
|
||||
)
|
||||
if(ENABLE_OPENCL)
|
||||
find_package(OPENCL)
|
||||
if($ENV{DISABLE_OPENCL})
|
||||
if(DEFINED ENV{DISABLE_OPENCL})
|
||||
set(DISABLE_OPENCL TRUE)
|
||||
endif()
|
||||
if(DISABLE_OPENCL)
|
||||
@ -1903,7 +1899,7 @@ endif()
|
||||
################################################################################
|
||||
# CUDA (OPTIONAL)
|
||||
################################################################################
|
||||
if($ENV{CUDA_GPU_ACCEL})
|
||||
if(DEFINED ENV{CUDA_GPU_ACCEL})
|
||||
message(STATUS "CUDA_GPU_ACCEL environment variable found.")
|
||||
set(ENABLE_CUDA ON)
|
||||
endif()
|
||||
@ -1966,7 +1962,7 @@ endif()
|
||||
# gr-osmosdr - OPTIONAL
|
||||
# https://github.com/osmocom/gr-osmosdr
|
||||
##########################################
|
||||
if($ENV{RTLSDR_DRIVER})
|
||||
if(DEFINED ENV{RTLSDR_DRIVER})
|
||||
message(STATUS "RTLSDR_DRIVER environment variable found.")
|
||||
set(ENABLE_OSMOSDR ON)
|
||||
endif()
|
||||
@ -2026,7 +2022,7 @@ set_package_properties(LIBIIO PROPERTIES
|
||||
##############################################
|
||||
# TELEORBIT FLEXIBAND FRONTEND - OPTIONAL
|
||||
##############################################
|
||||
if($ENV{FLEXIBAND_DRIVER})
|
||||
if(DEFINED ENV{FLEXIBAND_DRIVER})
|
||||
message(STATUS "FLEXIBAND_DRIVER environment variable found.")
|
||||
set(ENABLE_FLEXIBAND ON)
|
||||
endif()
|
||||
@ -2058,7 +2054,7 @@ endif()
|
||||
######################
|
||||
# GN3S - OPTIONAL
|
||||
######################
|
||||
if($ENV{GN3S_DRIVER})
|
||||
if(DEFINED ENV{GN3S_DRIVER})
|
||||
message(STATUS "GN3S_DRIVER environment variable found.")
|
||||
set(ENABLE_GN3S ON)
|
||||
endif()
|
||||
@ -2084,7 +2080,7 @@ endif()
|
||||
#######################################################
|
||||
# CTTC's digital array beamformer prototype - OPTIONAL
|
||||
#######################################################
|
||||
if($ENV{RAW_ARRAY_DRIVER})
|
||||
if(DEFINED ENV{RAW_ARRAY_DRIVER})
|
||||
message(STATUS "RAW_ARRAY_DRIVER environment variable found.")
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif()
|
||||
@ -2267,14 +2263,16 @@ else()
|
||||
REQUIRED_PACKAGES_NOT_FOUND
|
||||
OPTIONAL_PACKAGES_FOUND
|
||||
OPTIONAL_PACKAGES_NOT_FOUND
|
||||
ENABLED_FEATURES DISABLED_FEATURES
|
||||
ENABLED_FEATURES
|
||||
DISABLED_FEATURES
|
||||
)
|
||||
feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT
|
||||
REQUIRED_PACKAGES_FOUND
|
||||
REQUIRED_PACKAGES_NOT_FOUND
|
||||
OPTIONAL_PACKAGES_FOUND
|
||||
OPTIONAL_PACKAGES_NOT_FOUND
|
||||
ENABLED_FEATURES DISABLED_FEATURES
|
||||
ENABLED_FEATURES
|
||||
DISABLED_FEATURES
|
||||
)
|
||||
endif()
|
||||
message(STATUS "GNSS-SDR v${VERSION} is ready to be built.")
|
||||
|
@ -65,22 +65,31 @@ FlexibandSignalSource::FlexibandSignalSource(ConfigurationInterface* configurati
|
||||
|
||||
usb_packet_buffer_size_ = configuration->property(role + ".usb_packet_buffer", 128);
|
||||
|
||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||
|
||||
n_channels_ = configuration->property(role + ".total_channels", 0);
|
||||
if (n_channels_ == 0)
|
||||
{
|
||||
n_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||
}
|
||||
sel_ch_ = configuration->property(role + ".sel_ch", 1);
|
||||
if (sel_ch_ > n_channels_)
|
||||
{
|
||||
LOG(WARNING) << "Invalid RF channel selection";
|
||||
}
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
flexiband_source_ = gr::teleorbit::frontend::make(firmware_filename_.c_str(), gain1_, gain2_, gain3_, AGC_, usb_packet_buffer_size_, signal_file.c_str(), flag_read_file);
|
||||
|
||||
//create I, Q -> gr_complex type conversion blocks
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
for (int n = 0; n < (n_channels_ * 2); n++)
|
||||
{
|
||||
char_to_float.push_back(gr::blocks::char_to_float::make());
|
||||
}
|
||||
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
for (int n = 0; n < n_channels_; n++)
|
||||
{
|
||||
float_to_complex_.push_back(gr::blocks::float_to_complex::make());
|
||||
null_sinks_.push_back(gr::blocks::null_sink::make(sizeof(gr_complex)));
|
||||
}
|
||||
|
||||
DLOG(INFO) << "Item size " << item_size_;
|
||||
@ -108,15 +117,16 @@ FlexibandSignalSource::~FlexibandSignalSource() = default;
|
||||
|
||||
void FlexibandSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
for (int n = 0; n < (n_channels_ * 2); n++)
|
||||
{
|
||||
top_block->connect(flexiband_source_, n, char_to_float.at(n), 0);
|
||||
DLOG(INFO) << "connected flexiband_source_ to char_to_float CH" << n;
|
||||
}
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
for (int n = 0; n < n_channels_; n++)
|
||||
{
|
||||
top_block->connect(char_to_float.at(n * 2), 0, float_to_complex_.at(n), 0);
|
||||
top_block->connect(char_to_float.at(n * 2 + 1), 0, float_to_complex_.at(n), 1);
|
||||
top_block->connect(float_to_complex_.at(n), 0, null_sinks_.at(n), 0);
|
||||
DLOG(INFO) << "connected char_to_float to float_to_complex_ CH" << n;
|
||||
}
|
||||
}
|
||||
@ -124,15 +134,16 @@ void FlexibandSignalSource::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void FlexibandSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
for (int n = 0; n < (n_channels_ * 2); n++)
|
||||
{
|
||||
top_block->disconnect(flexiband_source_, n, char_to_float.at(n), 0);
|
||||
DLOG(INFO) << "disconnect flexiband_source_ to char_to_float CH" << n;
|
||||
}
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
for (int n = 0; n < n_channels_; n++)
|
||||
{
|
||||
top_block->disconnect(char_to_float.at(n * 2), 0, float_to_complex_.at(n), 0);
|
||||
top_block->disconnect(char_to_float.at(n * 2 + 1), 0, float_to_complex_.at(n), 1);
|
||||
top_block->disconnect(float_to_complex_.at(n), 0, null_sinks_.at(n), 0);
|
||||
DLOG(INFO) << "disconnect char_to_float to float_to_complex_ CH" << n;
|
||||
}
|
||||
}
|
||||
@ -152,5 +163,14 @@ gr::basic_block_sptr FlexibandSignalSource::get_right_block()
|
||||
|
||||
gr::basic_block_sptr FlexibandSignalSource::get_right_block(int RF_channel)
|
||||
{
|
||||
return float_to_complex_.at(RF_channel);
|
||||
if (RF_channel == 0)
|
||||
{
|
||||
//in the first RF channel, return the signalsource selected channel.
|
||||
//this trick enables the use of the second or the third frequency of a FlexiBand signal without a dual frequency configuration
|
||||
return float_to_complex_.at(sel_ch_ - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return float_to_complex_.at(RF_channel);
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <gnuradio/blocks/char_to_float.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <string>
|
||||
@ -99,12 +100,14 @@ private:
|
||||
std::string signal_file;
|
||||
bool flag_read_file;
|
||||
|
||||
int RF_channels_;
|
||||
int n_channels_;
|
||||
int sel_ch_;
|
||||
|
||||
gr::block_sptr flexiband_source_;
|
||||
|
||||
std::vector<boost::shared_ptr<gr::block>> char_to_float;
|
||||
std::vector<boost::shared_ptr<gr::block>> float_to_complex_;
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
};
|
||||
|
@ -134,11 +134,11 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
|
||||
trk_param.early_late_space_chips = early_late_space_chips;
|
||||
float very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6);
|
||||
float very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.5);
|
||||
trk_param.very_early_late_space_chips = very_early_late_space_chips;
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
trk_param.early_late_space_narrow_chips = early_late_space_narrow_chips;
|
||||
float very_early_late_space_narrow_chips = configuration->property(role + ".very_early_late_space_narrow_chips", 0.6);
|
||||
float very_early_late_space_narrow_chips = configuration->property(role + ".very_early_late_space_narrow_chips", 0.5);
|
||||
trk_param.very_early_late_space_narrow_chips = very_early_late_space_narrow_chips;
|
||||
bool track_pilot = configuration->property(role + ".track_pilot", false);
|
||||
if (extend_correlation_symbols < 1)
|
||||
|
@ -144,11 +144,11 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
int32_t extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
|
||||
trk_param_fpga.early_late_space_chips = early_late_space_chips;
|
||||
float very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6);
|
||||
float very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.5);
|
||||
trk_param_fpga.very_early_late_space_chips = very_early_late_space_chips;
|
||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
|
||||
trk_param_fpga.early_late_space_narrow_chips = early_late_space_narrow_chips;
|
||||
float very_early_late_space_narrow_chips = configuration->property(role + ".very_early_late_space_narrow_chips", 0.6);
|
||||
float very_early_late_space_narrow_chips = configuration->property(role + ".very_early_late_space_narrow_chips", 0.5);
|
||||
trk_param_fpga.very_early_late_space_narrow_chips = very_early_late_space_narrow_chips;
|
||||
bool track_pilot = configuration->property(role + ".track_pilot", false);
|
||||
if (extend_correlation_symbols < 1)
|
||||
|
@ -75,7 +75,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
|
||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||
}
|
||||
early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
|
||||
very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.6);
|
||||
very_early_late_space_chips = configuration->property(role + ".very_early_late_space_chips", 0.5);
|
||||
port_ch0 = configuration->property(role + ".port_ch0", 2060);
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
@ -95,14 +95,14 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
*/
|
||||
double dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1)
|
||||
{
|
||||
double P_early, P_late;
|
||||
P_early = std::abs(early_s1);
|
||||
P_late = std::abs(late_s1);
|
||||
if (P_early + P_late == 0.0)
|
||||
double P_early = std::abs(early_s1);
|
||||
double P_late = std::abs(late_s1);
|
||||
double E_plus_L = P_early + P_late;
|
||||
if (E_plus_L == 0.0)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
return 0.5 * (P_early - P_late) / (P_early + P_late);
|
||||
return 0.5 * (P_early - P_late) / E_plus_L;
|
||||
}
|
||||
|
||||
|
||||
@ -117,12 +117,13 @@ double dll_nc_e_minus_l_normalized(gr_complex early_s1, gr_complex late_s1)
|
||||
*/
|
||||
double dll_nc_vemlp_normalized(gr_complex very_early_s1, gr_complex early_s1, gr_complex late_s1, gr_complex very_late_s1)
|
||||
{
|
||||
double P_early, P_late;
|
||||
P_early = std::sqrt(std::norm(very_early_s1) + std::norm(early_s1));
|
||||
P_late = std::sqrt(std::norm(very_late_s1) + std::norm(late_s1));
|
||||
if (P_early + P_late == 0.0)
|
||||
double Early = std::sqrt(very_early_s1.real() * very_early_s1.real() + very_early_s1.imag() * very_early_s1.imag() + early_s1.real() * early_s1.real() + early_s1.imag() * early_s1.imag());
|
||||
double Late = std::sqrt(late_s1.real() * late_s1.real() + late_s1.imag() * late_s1.imag() + very_late_s1.real() * very_late_s1.real() + very_late_s1.imag() * very_late_s1.imag());
|
||||
|
||||
double E_plus_L = Early + Late;
|
||||
if (E_plus_L == 0.0)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
return (P_early - P_late) / (P_early + P_late);
|
||||
return (Early - Late) / E_plus_L;
|
||||
}
|
||||
|
@ -363,6 +363,11 @@ void GNSSFlowgraph::connect()
|
||||
#endif
|
||||
|
||||
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
||||
std::vector<bool> signal_conditioner_connected;
|
||||
for (size_t n = 0; n < sig_conditioner_.size(); n++)
|
||||
{
|
||||
signal_conditioner_connected.push_back(false);
|
||||
}
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
#ifndef ENABLE_FPGA
|
||||
@ -500,10 +505,12 @@ void GNSSFlowgraph::connect()
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
|
||||
signal_conditioner_connected.at(selected_signal_conditioner_ID) = true; //notify that this signal conditioner is connected
|
||||
DLOG(INFO) << "signal conditioner " << selected_signal_conditioner_ID << " connected to channel " << i;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Signal Source > Signal conditioner >> Channels >> Observables
|
||||
try
|
||||
{
|
||||
@ -519,6 +526,20 @@ void GNSSFlowgraph::connect()
|
||||
}
|
||||
}
|
||||
|
||||
//check for unconnected signal conditioners and connect null_sinks in order to provide configuration flexibility to multiband files or signal sources
|
||||
if (configuration_->property(sig_source_.at(0)->role() + ".enable_FPGA", false) == false)
|
||||
{
|
||||
for (size_t n = 0; n < sig_conditioner_.size(); n++)
|
||||
{
|
||||
if (signal_conditioner_connected.at(n) == false)
|
||||
{
|
||||
null_sinks_.push_back(gr::blocks::null_sink::make(sizeof(gr_complex)));
|
||||
top_block_->connect(sig_conditioner_.at(n)->get_right_block(), 0,
|
||||
null_sinks_.back(), 0);
|
||||
LOG(INFO) << "Null sink connected to signal conditioner " << n << " due to lack of connection to any channel" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Put channels fixed to a given satellite at the beginning of the vector, then the rest
|
||||
std::vector<unsigned int> vector_of_channels;
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
|
@ -40,16 +40,17 @@
|
||||
#include "gnss_sdr_sample_counter.h"
|
||||
#include "gnss_signal.h"
|
||||
#include "pvt_interface.h"
|
||||
#include <gnuradio/msg_queue.h> // for msg_queue, msg_queue::sptr
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <pmt/pmt.h> // for pmt_t
|
||||
#include <list> // for list
|
||||
#include <map> // for map
|
||||
#include <memory> // for for shared_ptr, dynamic_pointer_cast
|
||||
#include <mutex> // for mutex
|
||||
#include <string> // for string
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector
|
||||
#include <gnuradio/blocks/null_sink.h> //for null_sink
|
||||
#include <gnuradio/msg_queue.h> // for msg_queue, msg_queue::sptr
|
||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||
#include <pmt/pmt.h> // for pmt_t
|
||||
#include <list> // for list
|
||||
#include <map> // for map
|
||||
#include <memory> // for for shared_ptr, dynamic_pointer_cast
|
||||
#include <mutex> // for mutex
|
||||
#include <string> // for string
|
||||
#include <utility> // for pair
|
||||
#include <vector> // for vector
|
||||
#if ENABLE_FPGA
|
||||
#include "gnss_sdr_fpga_sample_counter.h"
|
||||
#endif
|
||||
@ -162,6 +163,7 @@ private:
|
||||
|
||||
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_source_;
|
||||
std::vector<std::shared_ptr<GNSSBlockInterface>> sig_conditioner_;
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
|
||||
|
||||
std::shared_ptr<GNSSBlockInterface> observables_;
|
||||
std::shared_ptr<GNSSBlockInterface> pvt_;
|
||||
|
@ -58,7 +58,7 @@ const uint32_t GPS_L1_CA_CODE_PERIOD_MS = 1U; //!< GPS L1 C/A code period
|
||||
const double GPS_L1_CA_CHIP_PERIOD = 9.7752e-07; //!< GPS L1 C/A chip period [seconds]
|
||||
|
||||
//optimum parameters
|
||||
const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 1000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
/*!
|
||||
* \brief Maximum Time-Of-Arrival (TOA) difference between satellites for a receiver operated on Earth surface is 20 ms
|
||||
|
@ -64,7 +64,7 @@ const double GPS_L2_L_PERIOD = 1.5; //!< GPS L2 L code period [s
|
||||
const int32_t GPS_L2C_HISTORY_DEEP = 5;
|
||||
|
||||
//optimum parameters
|
||||
const uint32_t GPS_L2C_OPT_ACQ_FS_HZ = 1000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
const uint32_t GPS_L2C_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequncy that maximizes the acquisition SNR while using a non-multiple of chip rate
|
||||
|
||||
|
||||
const int32_t GPS_L2C_M_INIT_REG[115] =
|
||||
|
@ -23,25 +23,9 @@ add_subdirectory(system-tests/libs)
|
||||
################################################################################
|
||||
# Google Test - https://github.com/google/googletest
|
||||
################################################################################
|
||||
if(EXISTS $ENV{GTEST_DIR})
|
||||
set(GTEST_DIR_LOCAL $ENV{GTEST_DIR})
|
||||
endif()
|
||||
if(GTEST_DIR)
|
||||
set(GTEST_DIR_LOCAL ${GTEST_DIR})
|
||||
endif()
|
||||
if(NOT GTEST_DIR_LOCAL)
|
||||
set(GTEST_DIR_LOCAL false)
|
||||
else()
|
||||
set(GTEST_DIR_LOCAL true)
|
||||
endif()
|
||||
|
||||
if(GTEST_INCLUDE_DIRS)
|
||||
set(GTEST_DIR_LOCAL true)
|
||||
endif()
|
||||
|
||||
set(GTEST_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
||||
set(TOOLCHAIN_ARG "")
|
||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||
set(GTEST_COMPILER "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Toolchains/oe-sdk_cross.cmake")
|
||||
else()
|
||||
@ -50,8 +34,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
# if GTEST_DIR is not defined, we download and build it
|
||||
if(NOT GOOGLETEST_FOUND)
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
@ -63,31 +46,29 @@ if(NOT ${GTEST_DIR_LOCAL})
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(
|
||||
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/googletest
|
||||
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/googletest
|
||||
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(
|
||||
gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/googletest
|
||||
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/googletest
|
||||
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Get_Property(gtest-${GNSSSDR_GTEST_LOCAL_VERSION} binary_dir)
|
||||
|
||||
@ -149,7 +130,7 @@ else()
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -211,21 +192,20 @@ set_package_properties(GPSTK PROPERTIES
|
||||
)
|
||||
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
if(ENABLE_FPGA)
|
||||
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
if(EXISTS $ENV{OECORE_TARGET_SYSROOT})
|
||||
set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr")
|
||||
endif()
|
||||
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||
set(CROSS_INSTALL_DIR "${CROSS_INSTALL_DIR} -DBOOST_ROOT=$ENV{OECORE_TARGET_SYSROOT}/usr")
|
||||
endif()
|
||||
else()
|
||||
set(CROSS_INSTALL_DIR "")
|
||||
set(CROSS_INSTALL_DIR "")
|
||||
endif()
|
||||
find_package(GNSSSIMULATOR QUIET)
|
||||
if(GNSSSIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||
else()
|
||||
ExternalProject_Add(
|
||||
gnss-sim
|
||||
ExternalProject_Add(gnss-sim
|
||||
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
||||
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gnss-sim
|
||||
@ -255,54 +235,52 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
# Local installation of GPSTk http://www.gpstk.org/
|
||||
################################################################################
|
||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||
message(STATUS " GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
||||
if("${TOOLCHAIN_ARG}" STREQUAL "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=\"-Wno-deprecated\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||
endif()
|
||||
include(GNUInstallDirs)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(
|
||||
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(
|
||||
gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
|
||||
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/)
|
||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||
set(OWN_GPSTK True)
|
||||
add_library(Gpstk::gpstk SHARED IMPORTED)
|
||||
add_dependencies(Gpstk::gpstk gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
||||
file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIRS})
|
||||
file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIRS}/gpstk)
|
||||
set_target_properties(Gpstk::gpstk PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GPSTK_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIRS};${GPSTK_INCLUDE_DIRS}/gpstk"
|
||||
INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}"
|
||||
)
|
||||
message(STATUS " GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
||||
if("${TOOLCHAIN_ARG}" STREQUAL "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=\"-Wno-deprecated\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||
endif()
|
||||
include(GNUInstallDirs)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/SGL-UT/GPSTk
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
set(GPSTK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GPSTK headers")
|
||||
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/bin/)
|
||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||
set(OWN_GPSTK True)
|
||||
add_library(Gpstk::gpstk SHARED IMPORTED)
|
||||
add_dependencies(Gpstk::gpstk gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
||||
file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIRS})
|
||||
file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIRS}/gpstk)
|
||||
set_target_properties(Gpstk::gpstk PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GPSTK_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIRS};${GPSTK_INCLUDE_DIRS}/gpstk"
|
||||
INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}"
|
||||
)
|
||||
else()
|
||||
set(GPSTK_BINDIR ${GPSTK_INCLUDE_DIR}/../bin/)
|
||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||
set(GPSTK_BINDIR ${GPSTK_INCLUDE_DIR}/../bin/)
|
||||
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -311,39 +289,39 @@ if(ENABLE_UNIT_TESTING_EXTRA)
|
||||
add_definitions(-DEXTRA_TESTS)
|
||||
message(STATUS "Downloading some data files for testing...")
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
||||
message(STATUS "Downloading file: gps_l2c_m_prn7_5msps.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9
|
||||
)
|
||||
message(STATUS "Downloading file: gps_l2c_m_prn7_5msps.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9
|
||||
)
|
||||
endif()
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
||||
message(STATUS "Downloading file: Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a
|
||||
)
|
||||
message(STATUS "Downloading file: Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a
|
||||
)
|
||||
endif()
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat)
|
||||
message(STATUS "Downloading file: BdsB1IStr01_fs25e6_if0_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB1IStr01_fs25e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=5a4336dad9d80f3313a16dec4fff9233
|
||||
)
|
||||
message(STATUS "Downloading file: BdsB1IStr01_fs25e6_if0_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB1IStr01_fs25e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=5a4336dad9d80f3313a16dec4fff9233
|
||||
)
|
||||
endif()
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat)
|
||||
message(STATUS "Downloading file: BdsB3IStr01_fs50e6_if0_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB3IStr01_fs50e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=066d0d8434a8bc81e161778b7c34cc07
|
||||
)
|
||||
message(STATUS "Downloading file: BdsB3IStr01_fs50e6_if0_4ms.dat")
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB3IStr01_fs50e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=066d0d8434a8bc81e161778b7c34cc07
|
||||
)
|
||||
endif()
|
||||
message(STATUS "Done.")
|
||||
if(ENABLE_INSTALL_TESTS)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -427,7 +405,8 @@ if(ENABLE_UNIT_TESTING)
|
||||
else()
|
||||
add_custom_command(TARGET run_tests POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:run_tests>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:run_tests>)
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:run_tests>
|
||||
)
|
||||
endif()
|
||||
if(ENABLE_GPERFTOOLS)
|
||||
if(GPERFTOOLS_FOUND)
|
||||
@ -515,7 +494,8 @@ function(add_system_test executable)
|
||||
else()
|
||||
add_custom_command(TARGET ${executable} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>)
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>
|
||||
)
|
||||
endif()
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
@ -844,7 +824,14 @@ else()
|
||||
if(ENABLE_FPGA)
|
||||
add_dependencies(check matio_test)
|
||||
else()
|
||||
add_dependencies(check control_thread_test flowgraph_test gnss_block_test
|
||||
gnuradio_block_test acq_test trk_test matio_test)
|
||||
add_dependencies(check
|
||||
control_thread_test
|
||||
flowgraph_test
|
||||
gnss_block_test
|
||||
gnuradio_block_test
|
||||
acq_test
|
||||
trk_test
|
||||
matio_test
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -63,7 +63,13 @@ for channelNr = channelList
|
||||
|
||||
%% Plot all figures =======================================================
|
||||
|
||||
timeAxisInSeconds = (1:4:settings.msToProcess)/1000;
|
||||
if isfield(trackResults(channelNr), 'prn_start_time_s')
|
||||
timeAxis=trackResults(channelNr).prn_start_time_s;
|
||||
time_label='RX Time (s)';
|
||||
else
|
||||
timeAxis = (1:length(trackResults(channelNr).PRN));
|
||||
time_label='Epoch';
|
||||
end
|
||||
|
||||
%----- Discrete-Time Scatter Plot ---------------------------------
|
||||
plot(handles(1, 1), trackResults(channelNr).data_I,...
|
||||
@ -77,29 +83,26 @@ for channelNr = channelList
|
||||
ylabel(handles(1, 1), 'Q prompt');
|
||||
|
||||
%----- Nav bits ---------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).data_I));
|
||||
plot (handles(1, 2), t, ...
|
||||
plot (handles(1, 2), timeAxis, ...
|
||||
trackResults(channelNr).data_I);
|
||||
|
||||
grid (handles(1, 2));
|
||||
title (handles(1, 2), 'Bits of the navigation message');
|
||||
xlabel(handles(1, 2), 'Time (s)');
|
||||
xlabel(handles(1, 2), time_label);
|
||||
axis (handles(1, 2), 'tight');
|
||||
|
||||
%----- PLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscr));
|
||||
plot (handles(2, 1), t, ...
|
||||
plot (handles(2, 1), timeAxis, ...
|
||||
trackResults(channelNr).pllDiscr, 'r');
|
||||
|
||||
grid (handles(2, 1));
|
||||
axis (handles(2, 1), 'tight');
|
||||
xlabel(handles(2, 1), 'Time (s)');
|
||||
xlabel(handles(2, 1), time_label);
|
||||
ylabel(handles(2, 1), 'Amplitude');
|
||||
title (handles(2, 1), 'Raw PLL discriminator');
|
||||
|
||||
%----- Correlation ------------------------------------------------
|
||||
t = (1:length(trackResults(channelNr).I_VE));
|
||||
plot(handles(2, 2), t, ...
|
||||
plot(handles(2, 2), timeAxis, ...
|
||||
[sqrt(trackResults(channelNr).I_VE.^2 + ...
|
||||
trackResults(channelNr).Q_VE.^2)', ...
|
||||
sqrt(trackResults(channelNr).I_E.^2 + ...
|
||||
@ -114,7 +117,7 @@ for channelNr = channelList
|
||||
|
||||
grid (handles(2, 2));
|
||||
title (handles(2, 2), 'Correlation results');
|
||||
xlabel(handles(2, 2), 'Time (s)');
|
||||
xlabel(handles(2, 2), time_label);
|
||||
axis (handles(2, 2), 'tight');
|
||||
|
||||
hLegend = legend(handles(2, 2), '$\sqrt{I_{VE}^2 + Q_{VE}^2}$', ...
|
||||
@ -127,35 +130,32 @@ for channelNr = channelList
|
||||
set(hLegend, 'Interpreter', 'Latex');
|
||||
|
||||
%----- PLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).pllDiscrFilt));
|
||||
plot (handles(3, 1), t, ...
|
||||
plot (handles(3, 1), timeAxis, ...
|
||||
trackResults(channelNr).pllDiscrFilt, 'b');
|
||||
|
||||
grid (handles(3, 1));
|
||||
axis (handles(3, 1), 'tight');
|
||||
xlabel(handles(3, 1), 'Time (s)');
|
||||
xlabel(handles(3, 1), time_label);
|
||||
ylabel(handles(3, 1), 'Amplitude');
|
||||
title (handles(3, 1), 'Filtered PLL discriminator');
|
||||
|
||||
%----- DLL discriminator unfiltered--------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscr));
|
||||
plot (handles(3, 2), t, ...
|
||||
plot (handles(3, 2), timeAxis, ...
|
||||
trackResults(channelNr).dllDiscr, 'r');
|
||||
|
||||
grid (handles(3, 2));
|
||||
axis (handles(3, 2), 'tight');
|
||||
xlabel(handles(3, 2), 'Time (s)');
|
||||
xlabel(handles(3, 2), time_label);
|
||||
ylabel(handles(3, 2), 'Amplitude');
|
||||
title (handles(3, 2), 'Raw DLL discriminator');
|
||||
|
||||
%----- DLL discriminator filtered----------------------------------
|
||||
t = (1:length(trackResults(channelNr).dllDiscrFilt));
|
||||
plot (handles(3, 3), t, ...
|
||||
plot (handles(3, 3), timeAxis, ...
|
||||
trackResults(channelNr).dllDiscrFilt, 'b');
|
||||
|
||||
grid (handles(3, 3));
|
||||
axis (handles(3, 3), 'tight');
|
||||
xlabel(handles(3, 3), 'Time (s)');
|
||||
xlabel(handles(3, 3), time_label);
|
||||
ylabel(handles(3, 3), 'Amplitude');
|
||||
title (handles(3, 3), 'Filtered DLL discriminator');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user