mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Update local GPSTk version to v8.0.0, keep compatibilty if v3.0.0 is installed
This commit is contained in:
parent
7fd3df56f7
commit
a538c8c4ee
@ -327,7 +327,7 @@ set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
|
||||
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "10.1.x")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.0")
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "3.0.0")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "8.0.0")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.18")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.11")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.14.0")
|
||||
@ -601,10 +601,16 @@ endif()
|
||||
# Detect availability of std::filesystem and set C++ standard accordingly
|
||||
################################################################################
|
||||
set(FILESYSTEM_FOUND FALSE)
|
||||
if(NOT ENABLE_OWN_GPSTK)
|
||||
find_package(GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "Used in some Extra Tests."
|
||||
)
|
||||
endif()
|
||||
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
# Check if we have std::filesystem
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
|
||||
if(NOT (ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)) # Fix for GPTSk
|
||||
if(NOT GPSTK_FOUND OR NOT (GPSTK_FOUND AND GPSTK_OLDER_THAN_8)) # Fix for GPSTk < 8.0.0
|
||||
find_package(FILESYSTEM COMPONENTS Final Experimental)
|
||||
set_package_properties(FILESYSTEM PROPERTIES
|
||||
URL "https://en.cppreference.com/w/cpp/filesystem"
|
||||
@ -613,7 +619,7 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
endif()
|
||||
if(${FILESYSTEM_FOUND})
|
||||
if(FILESYSTEM_FOUND)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
|
@ -80,6 +80,10 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GPSTK_FOUND AND NOT EXISTS ${GPSTK_INCLUDE_DIR}/gpstk/SatelliteSystem.hpp)
|
||||
set(GPSTK_OLDER_THAN_8 TRUE)
|
||||
endif()
|
||||
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
URL "https://github.com/SGL-UT/GPSTk"
|
||||
)
|
||||
|
@ -322,11 +322,6 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
############################################################################
|
||||
# Local installation of GPSTk https://github.com/SGL-UT/GPSTk
|
||||
############################################################################
|
||||
find_package(GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "Used in some Extra Tests."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||
set_package_properties(GPSTK PROPERTIES
|
||||
PURPOSE "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
@ -348,7 +343,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
PATCH_COMMAND cd ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION} && ${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gpstk_static.patch
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=ON -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -368,7 +363,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
PATCH_COMMAND cd ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION} && ${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gpstk_static.patch
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=ON -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS=ON -DCMAKE_C_STANDARD=11 -DCMAKE_C_EXTENSIONS=ON
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND} ${GPSTK_PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
@ -526,6 +521,9 @@ if(ENABLE_UNIT_TESTING)
|
||||
endif()
|
||||
if(ENABLE_UNIT_TESTING_EXTRA)
|
||||
target_link_libraries(run_tests PRIVATE Gpstk::gpstk)
|
||||
if(GPSTK_OLDER_THAN_8)
|
||||
target_compile_definitions(run_tests PRIVATE -DOLD_GPSTK=1)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
||||
|
@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
--- CMakeLists.txt 2020-10-25 10:06:26.000000000 +0100
|
||||
+++ CMakeLists.txt 2020-10-25 10:06:11.000000000 +0100
|
||||
@@ -74,7 +74,16 @@
|
||||
@@ -77,7 +77,16 @@
|
||||
|
||||
|
||||
include( BuildSetup.cmake )
|
||||
|
@ -1577,13 +1577,25 @@ bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_S
|
||||
switch (gnss.System)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGalileo);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::Galileo);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
}
|
||||
|
||||
gpstk::CommonTime time = r_ref_data.time;
|
||||
@ -1741,7 +1753,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
{
|
||||
// based on true observables metadata (for custom sdr generator)
|
||||
// open true observables log file written by the simulator or based on provided RINEX obs
|
||||
std::vector<std::shared_ptr<Tracking_True_Obs_Reader>> true_reader_vec;
|
||||
std::vector<std::shared_ptr<Tracking_True_Obs_Reader> > true_reader_vec;
|
||||
// read true data from the generator logs
|
||||
true_reader_vec.push_back(std::make_shared<Tracking_True_Obs_Reader>());
|
||||
std::cout << "Loading true observable data for PRN " << n.PRN << '\n';
|
||||
@ -1782,8 +1794,8 @@ TEST_F(HybridObservablesTest, ValidationOfResults)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<TrackingInterface>> tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface>> tlm_ch_vec;
|
||||
std::vector<std::shared_ptr<TrackingInterface> > tracking_ch_vec;
|
||||
std::vector<std::shared_ptr<TelemetryDecoderInterface> > tlm_ch_vec;
|
||||
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sink_vec;
|
||||
for (unsigned int n = 0; n < gnss_synchro_vec.size(); n++)
|
||||
|
@ -1668,13 +1668,25 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
switch (gnss.System)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGalileo);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::Galileo);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn = gpstk::SatID(myprn, gpstk::SatID::systemGPS);
|
||||
#else
|
||||
prn = gpstk::SatID(myprn, gpstk::SatelliteSystem::GPS);
|
||||
#endif
|
||||
}
|
||||
|
||||
gpstk::CommonTime time = r_ref_data.time;
|
||||
|
@ -72,6 +72,10 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND
|
||||
${GPSTK_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(GPSTK_OLDER_THAN_8)
|
||||
target_compile_definitions(obsdiff PUBLIC -DOLD_GPSTK=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(obsdiff PROPERTIES LINK_FLAGS "-s")
|
||||
endif()
|
||||
|
@ -113,15 +113,27 @@ std::map<int, arma::mat> ReadRinexObs(const std::string& rinex_file, char system
|
||||
switch (system)
|
||||
{
|
||||
case 'G':
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGPS;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::GPS;
|
||||
#endif
|
||||
PRN_set = available_gps_prn;
|
||||
break;
|
||||
case 'E':
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGalileo;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::Galileo;
|
||||
#endif
|
||||
PRN_set = available_galileo_prn;
|
||||
break;
|
||||
default:
|
||||
#if OLD_GPSTK
|
||||
prn.system = gpstk::SatID::systemGPS;
|
||||
#else
|
||||
prn.system = gpstk::SatelliteSystem::GPS;
|
||||
#endif
|
||||
PRN_set = available_gps_prn;
|
||||
}
|
||||
|
||||
@ -1241,12 +1253,19 @@ double compute_rx_clock_error(const std::string& rinex_nav_filename, const std::
|
||||
// pointer to the tropospheric model to be applied
|
||||
try
|
||||
{
|
||||
#if OLD_GPSTK
|
||||
std::vector<gpstk::SatID::SatelliteSystem> Syss;
|
||||
#endif
|
||||
gpstk::Matrix<double> invMC;
|
||||
int iret;
|
||||
// Call RAIMCompute.
|
||||
// Call RAIMCompute
|
||||
#if OLD_GPSTK
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, Syss, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#else
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#endif
|
||||
switch (iret)
|
||||
{
|
||||
/// @return Return values:
|
||||
|
Loading…
Reference in New Issue
Block a user