mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Merge branch 'gnsstk13' into next
Update local version of GNSSTk to 13.4.0
This commit is contained in:
commit
156ed0880b
@ -338,7 +338,7 @@ else()
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.12.1")
|
||||
endif()
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GNSSTK_LOCAL_VERSION "12.1.0")
|
||||
set(GNSSSDR_GNSSTK_LOCAL_VERSION "13.4.0")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.23")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.12")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.1")
|
||||
@ -663,10 +663,17 @@ endif()
|
||||
################################################################################
|
||||
set(FILESYSTEM_FOUND FALSE)
|
||||
if(NOT ENABLE_OWN_GNSSTK)
|
||||
unset(Gnsstk::gnsstk CACHE)
|
||||
find_package(GNSSTK)
|
||||
set_package_properties(GNSSTK PROPERTIES
|
||||
PURPOSE "Used in some Extra Tests."
|
||||
)
|
||||
else()
|
||||
unset(Gnsstk::gnsstk CACHE)
|
||||
unset(GNSSTK_FOUND CACHE)
|
||||
unset(GNSSTK_OLDER_THAN_8 CACHE)
|
||||
unset(GNSSTK_OLDER_THAN_9 CACHE)
|
||||
unset(GNSSTK_OLDER_THAN_13 CACHE)
|
||||
endif()
|
||||
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND (LOG4CPP_READY_FOR_CXX17 OR GNURADIO_USES_SPDLOG))
|
||||
# Check if we have std::filesystem
|
||||
|
@ -83,10 +83,16 @@ if(GNSSTK_LIBRARY AND GNSSTK_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
if(GNSSTK_VERSION)
|
||||
if(GNSSTK_VERSION VERSION_GREATER ${GNSSSDR_GNSSTK_LOCAL_VERSION})
|
||||
unset(GNSSTK_LIBRARY CACHE)
|
||||
unset(GNSSTK_INCLUDE_DIR CACHE)
|
||||
if(GNSSTK_VERSION VERSION_LESS "9.0.0")
|
||||
set(GNSSTK_OLDER_THAN_9 TRUE)
|
||||
endif()
|
||||
if(GNSSTK_VERSION VERSION_LESS "13.0.0")
|
||||
set(GNSSTK_OLDER_THAN_13 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS ${GNSSTK_INCLUDE_DIR}/gnsstk/GPSEphemerisStore.hpp)
|
||||
set(GNSSTK_OLDER_THAN_13 TRUE)
|
||||
endif()
|
||||
|
||||
# handle the QUIET and REQUIRED arguments and set GNSSTK_FOUND to TRUE if
|
||||
@ -136,4 +142,6 @@ mark_as_advanced(GNSSTK_LIBRARY
|
||||
GNSSTK_INCLUDE_DIR
|
||||
GNSSTK_USES_GPSTK_NAMESPACE
|
||||
GNSSTK_OLDER_THAN_8
|
||||
GNSSTK_OLDER_THAN_9
|
||||
GNSSTK_OLDER_THAN_13
|
||||
)
|
||||
|
@ -359,7 +359,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
endif()
|
||||
set(GNSSTK_PATCH_COMMAND
|
||||
cd ${CMAKE_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
|
||||
${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gnsstk_static.patch
|
||||
${Patch_EXECUTABLE} ${CMAKE_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${CMAKE_SOURCE_DIR}/src/tests/data/gnsstk_static13.patch
|
||||
)
|
||||
# Patch only once
|
||||
if(EXISTS ${CMAKE_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt)
|
||||
@ -561,6 +561,9 @@ if(ENABLE_UNIT_TESTING)
|
||||
if(GNSSTK_USES_GPSTK_NAMESPACE)
|
||||
target_compile_definitions(run_tests PRIVATE -DGNSSTK_USES_GPSTK_NAMESPACE=1)
|
||||
endif()
|
||||
if(GNSSTK_OLDER_THAN_9)
|
||||
target_compile_definitions(run_tests PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_STRIP)
|
||||
set_target_properties(run_tests PROPERTIES LINK_FLAGS "-s")
|
||||
|
@ -1,39 +0,0 @@
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
--- CMakeLists.txt 2022-07-02 20:14:59.000000000 +0200
|
||||
+++ CMakeLists.txt 2022-07-02 20:16:55.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
# Is dependend on by $GNSSTK/build.sh
|
||||
#============================================================
|
||||
|
||||
-cmake_minimum_required( VERSION 2.8.5 )
|
||||
+cmake_minimum_required( VERSION 2.8.12 )
|
||||
|
||||
project( GNSSTK )
|
||||
set( GNSSTK_VERSION_MAJOR "12" )
|
||||
@@ -77,6 +77,16 @@
|
||||
|
||||
|
||||
include( BuildSetup.cmake )
|
||||
+set(STADYN "STATIC")
|
||||
+if(POLICY CMP0063)
|
||||
+ cmake_policy(SET CMP0063 NEW)
|
||||
+ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
+else()
|
||||
+ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
+ add_definitions(-fvisibility=hidden)
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
#============================================================
|
||||
# Core Library Target Files
|
||||
@@ -161,7 +171,7 @@
|
||||
add_library( gnsstk ${STADYN} ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
|
||||
|
||||
# GNSSTk library install target
|
||||
-install( TARGETS gnsstk DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${EXPORT_TARGETS_FILENAME}" )
|
||||
+install( TARGETS gnsstk DESTINATION lib EXPORT "${EXPORT_TARGETS_FILENAME}" )
|
||||
|
||||
# GNSSTk header file install target (whether it is version dependent changes based on user flag)
|
||||
install( FILES ${GNSSTK_INC_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
|
38
src/tests/data/gnsstk_static13.patch
Normal file
38
src/tests/data/gnsstk_static13.patch
Normal file
@ -0,0 +1,38 @@
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
--- CMakeLists.txt 2022-07-10 09:58:33.000000000 +0200
|
||||
+++ CMakeLists.txt 2022-07-10 10:02:36.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
# Is dependend on by $GNSSTK/build.sh
|
||||
#============================================================
|
||||
|
||||
-cmake_minimum_required( VERSION 2.8.5 )
|
||||
+cmake_minimum_required( VERSION 2.8.12 )
|
||||
|
||||
project( GNSSTK )
|
||||
set( GNSSTK_VERSION_MAJOR "13" )
|
||||
@@ -21,6 +21,15 @@
|
||||
|
||||
# This sets up variables contining GNU standard installation locations.
|
||||
include( GNUInstallDirs )
|
||||
+if(POLICY CMP0063)
|
||||
+ cmake_policy(SET CMP0063 NEW)
|
||||
+ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
+else()
|
||||
+ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
+ add_definitions(-fvisibility=hidden)
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
# Set a filename for collecting exported targets.
|
||||
set( EXPORT_TARGETS_FILENAME "GNSSTKTargets" )
|
||||
@@ -177,7 +186,7 @@
|
||||
elseif( WIN32 )
|
||||
add_library( gnsstk ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
|
||||
else()
|
||||
- add_library( gnsstk SHARED ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
|
||||
+ add_library( gnsstk STATIC ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
|
||||
endif()
|
||||
|
||||
# always generate the header because it's an include file whose
|
@ -66,6 +66,7 @@
|
||||
#include <unistd.h>
|
||||
#include <utility>
|
||||
#if GNSSTK_USES_GPSTK_NAMESPACE
|
||||
#include <gpstk/GPSWeekSecond.hpp>
|
||||
#include <gpstk/Rinex3ObsBase.hpp>
|
||||
#include <gpstk/Rinex3ObsData.hpp>
|
||||
#include <gpstk/Rinex3ObsHeader.hpp>
|
||||
@ -73,6 +74,7 @@
|
||||
#include <gpstk/RinexUtilities.hpp>
|
||||
namespace gnsstk = gpstk;
|
||||
#else
|
||||
#include <gnsstk/GPSWeekSecond.hpp>
|
||||
#include <gnsstk/Rinex3ObsBase.hpp>
|
||||
#include <gnsstk/Rinex3ObsData.hpp>
|
||||
#include <gnsstk/Rinex3ObsHeader.hpp>
|
||||
@ -1612,8 +1614,12 @@ bool HybridObservablesTest::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gnss_S
|
||||
}
|
||||
|
||||
gnsstk::CommonTime time = r_ref_data.time;
|
||||
#if GNSSTK_OLDER_THAN_9
|
||||
double sow(static_cast<gnsstk::GPSWeekSecond>(time).sow);
|
||||
|
||||
#else
|
||||
gnsstk::GPSWeekSecond gws(time);
|
||||
double sow(gws.getSOW());
|
||||
#endif
|
||||
auto pointer = r_ref_data.obs.find(prn);
|
||||
if (pointer == r_ref_data.obs.end())
|
||||
{
|
||||
|
@ -67,6 +67,7 @@
|
||||
#include <utility>
|
||||
|
||||
#if GNSSTK_USES_GPSTK_NAMESPACE
|
||||
#include <gpstk/GPSWeekSecond.hpp>
|
||||
#include <gpstk/Rinex3ObsBase.hpp>
|
||||
#include <gpstk/Rinex3ObsData.hpp>
|
||||
#include <gpstk/Rinex3ObsHeader.hpp>
|
||||
@ -74,6 +75,7 @@
|
||||
#include <gpstk/RinexUtilities.hpp>
|
||||
namespace gnsstk = gpstk;
|
||||
#else
|
||||
#include <gnsstk/GPSWeekSecond.hpp>
|
||||
#include <gnsstk/Rinex3ObsBase.hpp>
|
||||
#include <gnsstk/Rinex3ObsData.hpp>
|
||||
#include <gnsstk/Rinex3ObsHeader.hpp>
|
||||
@ -1705,7 +1707,12 @@ bool HybridObservablesTestFpga::ReadRinexObs(std::vector<arma::mat>* obs_vec, Gn
|
||||
}
|
||||
|
||||
gnsstk::CommonTime time = r_ref_data.time;
|
||||
#if GNSSTK_OLDER_THAN_9
|
||||
double sow(static_cast<gnsstk::GPSWeekSecond>(time).sow);
|
||||
#else
|
||||
gnsstk::GPSWeekSecond gws(time);
|
||||
double sow(gws.getSOW());
|
||||
#endif
|
||||
|
||||
auto pointer = r_ref_data.obs.find(prn);
|
||||
if (pointer == r_ref_data.obs.end())
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND) OR ENABLE_OWN_ARMADILLO) # requires back(), introduced in Armadillo 9.800
|
||||
message(STATUS "The obsdiff utility tool will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'")
|
||||
if(NOT GNSSTK_FOUND)
|
||||
if(NOT GNSSTK_FOUND AND NOT ENABLE_OWN_GNSSTK)
|
||||
find_package(GNSSTK)
|
||||
endif()
|
||||
if(NOT GNSSTK_FOUND OR ENABLE_OWN_GNSSTK)
|
||||
@ -70,6 +70,9 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND
|
||||
if(GNSSTK_OLDER_THAN_9)
|
||||
target_compile_definitions(obsdiff PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||
endif()
|
||||
if(GNSSTK_OLDER_THAN_13)
|
||||
target_compile_definitions(obsdiff PRIVATE -DGNSSTK_OLDER_THAN_13=1)
|
||||
endif()
|
||||
if(NOT TARGET Gnsstk::gnsstk)
|
||||
if(GNSSTK_USES_GPSTK_NAMESPACE)
|
||||
file(MAKE_DIRECTORY ${GNSSTK_INCLUDE_DIR}/gpstk)
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gpstk/GGTropModel.hpp>
|
||||
#include <gpstk/GNSSconstants.hpp>
|
||||
#include <gpstk/GPSEphemerisStore.hpp>
|
||||
#include <gpstk/GPSWeekSecond.hpp>
|
||||
#include <gpstk/PRSolution.hpp>
|
||||
#include <gpstk/Rinex3NavData.hpp>
|
||||
#include <gpstk/Rinex3NavHeader.hpp>
|
||||
@ -54,12 +55,6 @@ namespace gnsstk = gpstk;
|
||||
#include <gnsstk/Rinex3ObsHeader.hpp>
|
||||
#include <gnsstk/Rinex3ObsStream.hpp>
|
||||
|
||||
// Classes for handling satellite navigation parameters RINEX
|
||||
// files (ephemerides)
|
||||
#include <gnsstk/Rinex3NavData.hpp>
|
||||
#include <gnsstk/Rinex3NavHeader.hpp>
|
||||
#include <gnsstk/Rinex3NavStream.hpp>
|
||||
|
||||
// Classes for handling RINEX files with meteorological parameters
|
||||
#include <gnsstk/RinexMetBase.hpp>
|
||||
#include <gnsstk/RinexMetData.hpp>
|
||||
@ -68,15 +63,20 @@ namespace gnsstk = gpstk;
|
||||
|
||||
// Class for handling tropospheric model
|
||||
#include <gnsstk/GGTropModel.hpp>
|
||||
|
||||
// Class for storing >broadcast-type> ephemerides
|
||||
#include <gnsstk/GPSEphemerisStore.hpp>
|
||||
|
||||
// Class for handling RAIM
|
||||
#include <gnsstk/GNSSconstants.hpp>
|
||||
#include <gnsstk/PRSolution.hpp>
|
||||
|
||||
// Class defining GPS system constants
|
||||
#include <gnsstk/GNSSconstants.hpp>
|
||||
// Class for storing <broadcast-type> ephemeris
|
||||
#include <gnsstk/GPSWeekSecond.hpp>
|
||||
#if GNSSTK_OLDER_THAN_13
|
||||
#include <gnsstk/GPSEphemerisStore.hpp>
|
||||
#include <gnsstk/Rinex3NavData.hpp>
|
||||
#include <gnsstk/Rinex3NavHeader.hpp>
|
||||
#include <gnsstk/Rinex3NavStream.hpp>
|
||||
#else
|
||||
#include <gnsstk/MultiFormatNavDataFactory.hpp>
|
||||
#include <gnsstk/NavLibrary.hpp>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GFLAGS_OLD_NAMESPACE
|
||||
@ -161,7 +161,13 @@ std::map<int, arma::mat> ReadRinexObs(const std::string& rinex_file, char system
|
||||
{
|
||||
prn.id = prn_it;
|
||||
gnsstk::CommonTime time = r_base_data.time;
|
||||
|
||||
#if GNSSTK_OLDER_THAN_9
|
||||
double sow(static_cast<gnsstk::GPSWeekSecond>(time).sow);
|
||||
#else
|
||||
gnsstk::GPSWeekSecond gws(time);
|
||||
double sow(gws.getSOW());
|
||||
#endif
|
||||
|
||||
auto pointer = r_base_data.obs.find(prn);
|
||||
|
||||
@ -1153,8 +1159,17 @@ double compute_rx_clock_error(const std::string& rinex_nav_filename, const std::
|
||||
std::cout << "Warning: RINEX Nav file " << rinex_nav_filename << " does not exist, receiver's clock error could not be computed!\n";
|
||||
return 0.0;
|
||||
}
|
||||
// Declaration of objects for storing ephemerides and handling RAIM
|
||||
// Declaration of objects for storing ephemerides and handling RAIM
|
||||
#if GNSSTK_OLDER_THAN_13
|
||||
gnsstk::GPSEphemerisStore bcestore;
|
||||
#else
|
||||
gnsstk::NavLibrary navLib;
|
||||
// Construct a NavDataFactory object
|
||||
gnsstk::NavDataFactoryPtr ndfp(
|
||||
std::make_shared<gnsstk::MultiFormatNavDataFactory>());
|
||||
// Add the NavDataFactory to the NavLibrary
|
||||
navLib.addFactory(ndfp);
|
||||
#endif
|
||||
gnsstk::PRSolution raimSolver;
|
||||
|
||||
// Object for void-type tropospheric model (in case no meteorological
|
||||
@ -1172,22 +1187,26 @@ double compute_rx_clock_error(const std::string& rinex_nav_filename, const std::
|
||||
double rx_clock_error_s = 0.0;
|
||||
try
|
||||
{
|
||||
#if GNSSTK_OLDER_THAN_13
|
||||
// Read nav file and store unique list of ephemerides
|
||||
gnsstk::Rinex3NavStream rnffs(rinex_nav_filename.c_str()); // Open ephemerides data file
|
||||
gnsstk::Rinex3NavData rne;
|
||||
gnsstk::Rinex3NavHeader hdr;
|
||||
|
||||
// Let's read the header (may be skipped)
|
||||
rnffs >> hdr;
|
||||
|
||||
// Storing the ephemeris in "bcstore"
|
||||
while (rnffs >> rne)
|
||||
{
|
||||
bcestore.addEphemeris(rne);
|
||||
}
|
||||
|
||||
// Setting the criteria for looking up ephemeris
|
||||
bcestore.SearchNear();
|
||||
#else
|
||||
if (!ndfp->addDataSource(rinex_nav_filename))
|
||||
{
|
||||
std::cerr << "Unable to load " << rinex_nav_filename << '\n';
|
||||
return 0.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Open and read the observation file one epoch at a time.
|
||||
// For each epoch, compute and print a position solution
|
||||
@ -1280,8 +1299,13 @@ double compute_rx_clock_error(const std::string& rinex_nav_filename, const std::
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, Syss, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#else
|
||||
#if GNSSTK_OLDER_THAN_13
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, rangeVec, invMC,
|
||||
&bcestore, tropModelPtr);
|
||||
#else
|
||||
iret = raimSolver.RAIMCompute(rod.time, prnVec, rangeVec, invMC,
|
||||
navLib, tropModelPtr);
|
||||
#endif
|
||||
#endif
|
||||
switch (iret)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
# SPDX-FileCopyrightText: 2010-2020 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
if(NOT GNSSTK_FOUND)
|
||||
if(NOT GNSSTK_FOUND AND NOT ENABLE_OWN_GNSSTK)
|
||||
find_package(GNSSTK)
|
||||
endif()
|
||||
|
||||
@ -98,10 +98,8 @@ if(Boost_FOUND)
|
||||
${GNSSTK_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
if(GNSSTK_VERSION)
|
||||
if(GNSSTK_VERSION VERSION_LESS "9.0.0")
|
||||
target_compile_definitions(rinex2assist PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||
endif()
|
||||
if(GNSSTK_OLDER_THAN_9)
|
||||
target_compile_definitions(rinex2assist PRIVATE -DGNSSTK_OLDER_THAN_9=1)
|
||||
endif()
|
||||
|
||||
if(NOT UNCOMPRESS_EXECUTABLE-NOTFOUND)
|
||||
|
@ -32,14 +32,12 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#if GNSSTK_USES_GPSTK_NAMESPACE
|
||||
#include <gpstk/GALWeekSecond.hpp>
|
||||
#include <gpstk/GPSWeekSecond.hpp>
|
||||
#include <gpstk/Rinex3NavData.hpp>
|
||||
#include <gpstk/Rinex3NavHeader.hpp>
|
||||
#include <gpstk/Rinex3NavStream.hpp>
|
||||
namespace gnsstk = gpstk;
|
||||
#else
|
||||
#include <gnsstk/GALWeekSecond.hpp>
|
||||
#include <gnsstk/GPSWeekSecond.hpp>
|
||||
#include <gnsstk/Rinex3NavData.hpp>
|
||||
#include <gnsstk/Rinex3NavHeader.hpp>
|
||||
|
Loading…
Reference in New Issue
Block a user