1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-06 01:56:25 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2019-06-09 10:40:00 +02:00
commit f19cc76ca6
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 151 additions and 72 deletions

View File

@ -1,9 +1,14 @@
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
### Improvements in Accuracy
- Local clock correction based on PVT solution (error kept below 1 ms).
### Improvements in Availability
- Fixed bug that caused a random deadlock in the Observables block, preventing the computation of PVT fixes.
- Fixed bug in Galileo INAV message decoding when PLL is locked at 180 degrees, which prevented from correct navigation message decoding in some situations.
- Fixed bug in Galileo INAV/FNAV message decoding when PLL is locked at 180 degrees, which prevented from correct navigation message decoding in some situations.
- Fixed PVT computation continuity through the TOW rollover.
@ -27,7 +32,7 @@
- Fix bug in GLONASS dual frequency receiver.
- Added a custom UDP/IP output for PVT data streaming.
- Improved Monitor block with UDP/IP output for internal receiver's data streaming.
- Custom output formats described with .proto files, making easier to other applications reading them in a forward and backward-compatible fashion upon future format changes.
- Custom output formats described with .proto files, making easier to other applications reading them in a forward and backward-compatible fashion upon future format changes. New dependency: Protocol Buffers >= 3.0.0
- Fixes in RINEX generation: week rollover, annotations are not repeated anymore in navigation files. Parameter rinexnav_rate_ms has been removed, annotations are made as new ephemeris arrive.
- Fixes in RTCM messages generation: week rollover.
@ -45,6 +50,7 @@
- Added interfaces for FPGA off-loading.
- CMake scripts now follow a modern approach (targets and properties) but still work with 2.8.12.
- Improvements for macOS users using Homebrew.
- The volk_gnsssdr library can now be built without requiring Boost if the compiler supports C++17.
### Improvements in Reliability

View File

@ -59,42 +59,87 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
endif()
# Enable C++17 support in GCC >= 8.0.0
# Enable C++14 support in 8.0.0 > GCC >= 6.1.1
# Fallback to C++11 when using GCC < 6.1.1
#### Set C++ standard
set(CMAKE_CXX_EXTENSIONS OFF)
# Check if we have std::filesystem
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
if(CMAKE_VERSION VERSION_LESS 3.8)
set(has_std_filesystem FALSE)
else()
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0"))
set(CMAKE_REQUIRED_LIBRARIES -lstdc++fs)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_REQUIRED_LIBRARIES -lc++)
endif()
endif()
include(CheckCXXSymbolExists)
check_cxx_symbol_exists(std::filesystem::path::preferred_separator filesystem has_std_filesystem)
endif()
set(USE_CXX17 FALSE)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
if(CMAKE_VERSION VERSION_LESS "3.1")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
set(CMAKE_CXX_STANDARD 11)
endif()
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
set(CMAKE_CXX_STANDARD 14)
else()
if(${has_std_filesystem})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(USE_CXX17 TRUE)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
endif()
endif()
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()
# Enable C++17 support in Clang >= 6.0.0
# Enable C++14 support in 6.0.0 > Clang >= 3.5.0 or AppleClang >= 600
# Fallback to C++11 if older version
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# 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")
set(CMAKE_CXX_STANDARD 11)
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
if(CLANG_VERSION VERSION_LESS "1000")
set(CMAKE_CXX_STANDARD 14)
else()
if(${has_std_filesystem})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(USE_CXX17 TRUE)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
endif()
endif()
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_STANDARD 11)
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
set(CMAKE_CXX_STANDARD 14)
else()
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
if(${has_std_filesystem})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND NOT WIN32)
set(USE_CXX17 TRUE)
endif()
else()
set(CMAKE_CXX_STANDARD 14)
endif()
endif()
endif()
endif()
@ -110,11 +155,11 @@ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
if(CMAKE_VERSION VERSION_GREATER "3.0")
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
if(CMAKE_VERSION VERSION_GREATER "3.9")
cmake_policy(SET CMP0068 NEW)
endif()
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif()
option(ENABLE_STRIP "Create a stripped volk_gnsssdr_profile binary (without shared libraries)" OFF)
@ -209,15 +254,19 @@ if(MSVC)
unset(BOOST_REQUIRED_COMPONENTS) # empty components list for static link
endif()
endif()
if(${USE_CXX17})
set(Boost_LIBRARIES "")
set(Boost_INCLUDE_DIRS "")
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH})
else()
include(VolkBoost)
if(NOT Boost_FOUND)
message(FATAL_ERROR "VOLK_GNSSSDR Requires boost to build")
message(FATAL_ERROR "VOLK-GNSSSDR requires Boost to build")
endif()
endif()
# Orc
option(ENABLE_ORC "Enable Orc" True)
option(ENABLE_ORC "Enable Orc" TRUE)
if(ENABLE_ORC)
find_package(ORC)
else()
@ -335,7 +384,6 @@ endif()
########################################################################
# Install our Cmake modules into $prefix/lib/cmake/volk_gnsssdr
# See "Package Configuration Files" on page:

View File

@ -6,7 +6,7 @@ VOLK's. Please see http://libvolk.org for documentation, source code,
and contact information about the original VOLK library.
The boilerplate of this code was initially generated with
```volk_modtool```, an application provided by VOLK that creates the
`volk_modtool`, an application provided by VOLK that creates the
skeleton that can then be filled with custom kernels. Some modifications
were added to accommodate the specificities of Global Navigation
Satellite Systems (GNSS) signal processing. Those changes are clearly
@ -16,7 +16,7 @@ This library contains kernels of hand-written SIMD code for different
mathematical operations, mainly with 8-bit and 16-bit real and complex
data types, offering a platform/architecture agnostic version that will
run in all machines, plus other versions for different SIMD instruction
sets. Then, the application ```volk_gnsssdr_profile``` runs some
sets. Then, the application `volk_gnsssdr_profile` runs some
iterations of all versions that your machine can execute and annotates
which is the fastest, which will then be selected at runtime when
executing GNSS-SDR. In this way, we can address at the same time
@ -49,6 +49,12 @@ $ sudo apt-get install cmake python-mako python-six libboost-dev \
libboost-filesystem-dev libboost-system-dev
~~~~~~
Please note that if you are using a compiler supporting the C++17 standard
(for instance, gcc >= 8.0), specifically the std::filesystem library, packages
`libboost-dev`, `libboost-filesystem-dev` and `libboost-system-dev` are no
longer required dependencies. The CMake script will detect that availability for
you.
In order to build and install the library, go to the base folder of the
source code and do:
@ -62,7 +68,7 @@ $ sudo make install
That's it!
Before its first use, please execute ```volk_gnsssdr_profile``` to let
Before its first use, please execute `volk_gnsssdr_profile` to let
your system know which is the fastest available implementation. This
only has to be done once:
@ -74,7 +80,7 @@ From now on, GNSS-SDR (and any other program of your own that makes use
of VOLK_GNSSSDR) will benefit from the acceleration provided by SIMD
instructions available in your processor.
The execution of ```volk_gnsssdr_profile``` can be set automatically
The execution of `volk_gnsssdr_profile` can be set automatically
after building, leaving your system ready to use:
~~~~~~

View File

@ -35,13 +35,21 @@ include_directories(
)
set(Clang_required_link "")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CXX_REQUIRED_LINK "")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(Clang_required_link "c++")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CXX_REQUIRED_LINK "c++")
else()
if(${USE_CXX17} AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0"))
set(CXX_REQUIRED_LINK "stdc++fs")
endif()
endif()
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0"))
if(${USE_CXX17})
set(CXX_REQUIRED_LINK "stdc++fs")
endif()
endif()
if(ORC_FOUND)
set(orc_lib ${ORC_LIBRARIES})
@ -66,10 +74,14 @@ add_executable(volk_gnsssdr_profile
${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc
)
if(${USE_CXX17})
add_definitions(-DHAS_STD_FILESYSTEM=1)
endif()
if(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
target_link_libraries(volk_gnsssdr_profile ${CXX_REQUIRED_LINK} volk_gnsssdr_static ${Boost_LIBRARIES} ${orc_lib})
else()
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
target_link_libraries(volk_gnsssdr_profile ${CXX_REQUIRED_LINK} volk_gnsssdr ${Boost_LIBRARIES} ${orc_lib})
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
endif()
@ -92,9 +104,9 @@ install(
# MAKE volk_gnsssdr-config-info
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc ${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc)
if(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr_static ${Clang_required_link} ${orc_lib})
target_link_libraries(volk_gnsssdr-config-info ${CXX_REQUIRED_LINK} volk_gnsssdr_static ${orc_lib})
else()
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Clang_required_link} ${orc_lib})
target_link_libraries(volk_gnsssdr-config-info ${CXX_REQUIRED_LINK} volk_gnsssdr ${orc_lib})
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
endif()

View File

@ -22,9 +22,13 @@
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include "volk_gnsssdr/volk_gnsssdr_prefs.h" // for volk_gnsssdr_get_config_path
#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t
#if HAS_STD_FILESYSTEM
#include <filesystem>
#else
#include <boost/filesystem/operations.hpp> // for create_directories, exists
#include <boost/filesystem/path.hpp> // for path, operator<<
#include <boost/filesystem/path_traits.hpp> // for filesystem
#endif
#include <cstddef> // for size_t
#include <fstream> // IWYU pragma: keep
#include <iostream> // for operator<<, basic_ostream
@ -33,8 +37,11 @@
#include <utility> // for pair
#include <vector> // for vector, vector<>::const_..
#if HAS_STD_FILESYSTEM
namespace fs = std::filesystem;
#else
namespace fs = boost::filesystem;
#endif
volk_gnsssdr_test_params_t test_params(1e-6f, 327.f, 8111, 1987, false, "");