From cdf7fcfa99f31a0991eed0856a29c46ba1e1a3e4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 21 Dec 2016 18:52:45 +0100 Subject: [PATCH] Add GPSTk as an optional analysis tool --- src/tests/CMakeLists.txt | 30 ++++++++++++++++++++--- src/tests/system-tests/trk_system_test.cc | 3 +++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index d46113690..9c086a6c2 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -152,7 +152,29 @@ if(ENABLE_SW_GENERATOR) add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}") add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n") add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv") - + set(gpstk_RELEASE "2.5") + set(gpstk_md5 "9d79f6838d274f5edfd46c780a6b1b72") + ExternalProject_Add( + gpstk-${gpstk_RELEASE} + URL https://sourceforge.net/projects/gpstk/files/gpstk/${gpstk_RELEASE}/gpstk-${gpstk_RELEASE}.src.tar.gz + URL_MD5 ${gpstk_md5} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk + BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk + CONFIGURE_COMMAND "" + BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk/script_gpstk.sh -c + UPDATE_COMMAND "" + PATCH_COMMAND "" + INSTALL_COMMAND "" + ) + set(GPSTK_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk/dev/install/include CACHE PATH "Local GPSTK headers" + ) + add_library(gpstk UNKNOWN IMPORTED) + set_property(TARGET gpstk PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk/dev/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}) + add_dependencies(gpstk gpstk-${gpstk_RELEASE}) + set(GPSTK_BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk/dev/install/bin/ ) + add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}") + set(gpstk_libs gpstk) endif(ENABLE_SW_GENERATOR) add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/src/tests/") @@ -458,15 +480,17 @@ if(ENABLE_SYSTEM_TESTING) add_executable(trk_system_test ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/trk_system_test.cc ) if(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(trk_system_test gtest-${gtest_RELEASE}) + add_dependencies(trk_system_test gtest-${gtest_RELEASE} ) else(NOT ${GTEST_DIR_LOCAL}) add_dependencies(trk_system_test gtest) endif(NOT ${GTEST_DIR_LOCAL}) + include_directories(${GPSTK_INCLUDE_DIRS}) target_link_libraries(trk_system_test ${GFlags_LIBS} ${GLOG_LIBRARIES} ${GTEST_LIBRARIES} gnss_sp_libs - gnss_rx) + gnss_rx + ${gpstk_libs}) add_custom_command(TARGET trk_system_test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/install/$ diff --git a/src/tests/system-tests/trk_system_test.cc b/src/tests/system-tests/trk_system_test.cc index 51e5c017b..26d5d2400 100644 --- a/src/tests/system-tests/trk_system_test.cc +++ b/src/tests/system-tests/trk_system_test.cc @@ -6,6 +6,7 @@ #include #include #include +#include "RinexUtilities.hpp" #include "control_thread.h" #include "concurrent_map.h" #include "concurrent_queue.h" @@ -257,6 +258,8 @@ int Trk_System_Test::check_results() // Open generated RINEX observables file + // Time alignment! + // Read reference pseudoranges from a given satellite // Read obtained pseudoranges from a given satellite