mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-26 08:56:58 +00:00
Merge branch 'next' into vtl
This commit is contained in:
commit
3f186a0684
2
.github/workflows/citation.yml
vendored
2
.github/workflows/citation.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate CITATION.cff
|
||||
uses: dieghernan/cff-validator@main
|
||||
# Upload artifact in case of failure
|
||||
|
4
.github/workflows/gnss-sdr_archs.yml
vendored
4
.github/workflows/gnss-sdr_archs.yml
vendored
@ -40,8 +40,8 @@ jobs:
|
||||
# compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: uraimo/run-on-arch-action@v2.5.0
|
||||
- uses: actions/checkout@v4
|
||||
- uses: uraimo/run-on-arch-action@v2.6.0
|
||||
name: Test in non-x86 container
|
||||
continue-on-error: ${{ contains(fromJson('["ppc64le", "s390x"]'), matrix.arch) }}
|
||||
id: test
|
||||
|
75
.github/workflows/main.yml
vendored
75
.github/workflows/main.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
@ -39,14 +39,23 @@ jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --overwrite python@3.10 python@3.11
|
||||
python3.11 -m pip install mako
|
||||
brew install ninja pkg-config hdf5 automake armadillo lapack \
|
||||
rm /usr/local/bin/2to3 || true
|
||||
rm /usr/local/bin/idle3 || true
|
||||
rm /usr/local/bin/pydoc3 || true
|
||||
rm /usr/local/bin/python3 || true
|
||||
rm /usr/local/bin/python3-config || true
|
||||
rm /usr/local/bin/2to3-3.1* || true
|
||||
rm /usr/local/bin/idle3.1* || true
|
||||
rm /usr/local/bin/pydoc3.1* || true
|
||||
rm /usr/local/bin/python3.1* || true
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew install ninja hdf5 automake armadillo lapack libmatio \
|
||||
gflags glog gnuradio log4cpp openssl pugixml protobuf
|
||||
pip3 install mako
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
@ -59,14 +68,23 @@ jobs:
|
||||
build-macos-xcode:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --overwrite python@3.10 python@3.11
|
||||
python3.11 -m pip install mako
|
||||
brew install ninja pkg-config hdf5 automake armadillo lapack gflags glog \
|
||||
gnuradio log4cpp openssl pugixml protobuf
|
||||
rm /usr/local/bin/2to3 || true
|
||||
rm /usr/local/bin/idle3 || true
|
||||
rm /usr/local/bin/pydoc3 || true
|
||||
rm /usr/local/bin/python3 || true
|
||||
rm /usr/local/bin/python3-config || true
|
||||
rm /usr/local/bin/2to3-3.1* || true
|
||||
rm /usr/local/bin/idle3.1* || true
|
||||
rm /usr/local/bin/pydoc3.1* || true
|
||||
rm /usr/local/bin/python3.1* || true
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio \
|
||||
gflags glog gnuradio log4cpp openssl pugixml protobuf
|
||||
pip3 install mako
|
||||
- name: configure
|
||||
run: cd build && cmake -GXcode ..
|
||||
- name: build
|
||||
@ -87,7 +105,7 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: run clang-format
|
||||
uses: jidicula/clang-format-action@v4.11.0
|
||||
with:
|
||||
@ -98,14 +116,23 @@ jobs:
|
||||
clang-tidy:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --overwrite python@3.10 python@3.11
|
||||
python3.11 -m pip install mako
|
||||
rm /usr/local/bin/2to3 || true
|
||||
rm /usr/local/bin/idle3 || true
|
||||
rm /usr/local/bin/pydoc3 || true
|
||||
rm /usr/local/bin/python3 || true
|
||||
rm /usr/local/bin/python3-config || true
|
||||
rm /usr/local/bin/2to3-3.1* || true
|
||||
rm /usr/local/bin/idle3.1* || true
|
||||
rm /usr/local/bin/pydoc3.1* || true
|
||||
rm /usr/local/bin/python3.1* || true
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio \
|
||||
log4cpp openssl pugixml protobuf
|
||||
pip3 install mako
|
||||
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin
|
||||
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
|
||||
ln -s $(brew --prefix llvm)/bin/run-clang-tidy /usr/local/bin
|
||||
@ -123,7 +150,7 @@ jobs:
|
||||
cpplint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: sudo apt-get install python3-pip && sudo pip3 install cpplint
|
||||
- name: run checks
|
||||
@ -144,7 +171,7 @@ jobs:
|
||||
prettier-markdown:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: sudo npm install --global prettier
|
||||
- name: check markdown
|
||||
@ -153,7 +180,7 @@ jobs:
|
||||
cmakelint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo python -m pip install --upgrade pip
|
||||
@ -164,8 +191,10 @@ jobs:
|
||||
volk-gnsssdr-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@ -186,7 +215,7 @@ jobs:
|
||||
volk-gnsssdr-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: sudo apt install python3-mako liborc-dev
|
||||
- name: configure
|
||||
@ -201,7 +230,7 @@ jobs:
|
||||
volk-gnsssdr-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: pip3 install mako
|
||||
- name: configure
|
||||
@ -214,7 +243,7 @@ jobs:
|
||||
volk-gnsssdr-macos-xcode:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: pip3 install mako
|
||||
- name: configure
|
||||
@ -229,7 +258,7 @@ jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: install dependencies
|
||||
run: sudo apt install shellcheck
|
||||
- name: check scripts
|
||||
@ -238,7 +267,7 @@ jobs:
|
||||
REUSE-compliance:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check REUSE compliance
|
||||
uses: docker://fsfe/reuse
|
||||
with:
|
||||
|
2
.github/workflows/volk_gnsssdr_android.yml
vendored
2
.github/workflows/volk_gnsssdr_android.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Update repositories
|
||||
run: sudo apt update
|
||||
- name: Install dependencies
|
||||
|
5
.github/workflows/volk_gnsssdr_archs.yml
vendored
5
.github/workflows/volk_gnsssdr_archs.yml
vendored
@ -44,8 +44,8 @@ jobs:
|
||||
compiler: { name: g++-12, cc: gcc-12, cxx: g++-12 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: uraimo/run-on-arch-action@v2.5.0
|
||||
- uses: actions/checkout@v4
|
||||
- uses: uraimo/run-on-arch-action@v2.6.0
|
||||
name: Build in non-x86 container
|
||||
# continue-on-error: ${{ contains(fromJson('["ppc64le", "s390x"]'), matrix.arch) }}
|
||||
id: build
|
||||
@ -71,7 +71,6 @@ jobs:
|
||||
cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/
|
||||
echo "Build with $(nproc) thread(s)"
|
||||
make -j$(nproc)
|
||||
./cpu_features/list_cpu_features
|
||||
./apps/volk_gnsssdr-config-info --alignment
|
||||
./apps/volk_gnsssdr-config-info --avail-machines
|
||||
./apps/volk_gnsssdr-config-info --all-machines
|
||||
|
@ -1,7 +1,7 @@
|
||||
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2010-2023 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-FileCopyrightText: 2010-2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
################################################################################
|
||||
@ -16,7 +16,7 @@ endif()
|
||||
# Build type can still be overridden by setting -DCMAKE_BUILD_TYPE=
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12...3.26)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.28)
|
||||
project(gnss-sdr CXX C)
|
||||
|
||||
set(GNSSSDR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Allows to be a sub-project
|
||||
@ -335,16 +335,16 @@ set(GNSSSDR_PYTHON3_MIN_VERSION "3.4")
|
||||
################################################################################
|
||||
# Versions to download and build (but not to install system-wide) if not found
|
||||
################################################################################
|
||||
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "12.2.x")
|
||||
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "12.6.x")
|
||||
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
|
||||
set(GNSSSDR_GLOG_LOCAL_VERSION "0.6.0")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.23")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "22.4")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.13")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.26")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "25.0")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.14")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.13.0")
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GNSSTK_LOCAL_VERSION "14.0.0")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.8.1")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.8.3")
|
||||
set(GNSSSDR_MATHJAX_EXTERNAL_VERSION "2.7.7")
|
||||
|
||||
# Downgrade versions if requirements are not met
|
||||
@ -361,6 +361,13 @@ if(CMAKE_VERSION VERSION_LESS "3.0.2")
|
||||
set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.4") # Fix for Ubuntu 14.04
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.5")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.13")
|
||||
endif()
|
||||
if(CMAKE_VERSION VERSION_LESS "3.4")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING OR CMAKE_VERSION VERSION_LESS "3.13")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.12")
|
||||
endif()
|
||||
@ -904,6 +911,11 @@ if((Boost_VERSION_STRING VERSION_GREATER 1.71) AND (Boost_VERSION_STRING VERSION
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Workaround for macOS Sonoma
|
||||
if((CMAKE_CXX_STANDARD EQUAL 17) AND ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND ("${DARWIN_VERSION}" VERSION_GREATER "22.99")))
|
||||
add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1)
|
||||
endif()
|
||||
|
||||
# Fix for Boost Asio < 1.70 when using Clang in macOS
|
||||
if(Boost_VERSION_STRING VERSION_LESS 1.70.0)
|
||||
# Check if we have std::string_view
|
||||
@ -1109,7 +1121,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.27 AND PYTHONINTERP_FOUND)
|
||||
set_package_properties(PythonInterp PROPERTIES
|
||||
URL "https://www.python.org/"
|
||||
DESCRIPTION "An interpreted, high-level, general-purpose programming language (found: v${PYTHON_VERSION_STRING})"
|
||||
@ -1201,8 +1213,14 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
include(GNUInstallDirs)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH FALSE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES
|
||||
"(^mips)|(^arm)|(^aarch64)|(x86_64)|(AMD64|amd64)|(^i.86$)|(^powerpc)|(^ppc)|(^s390x)|^riscv")
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "(^aarch64)|(^arm64)|(^ARM64)" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(x86_64)|(AMD64|amd64)|(^i.86$)" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x)" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^riscv" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
endif()
|
||||
if(${CMAKE_INSTALL_LIBDIR} MATCHES lib64)
|
||||
@ -1241,14 +1259,14 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
set_package_properties(CPUFEATURES PROPERTIES
|
||||
DESCRIPTION "A cross platform C99 library to get CPU features at runtime (version: ${CPUFEATURES_VERSION})"
|
||||
)
|
||||
if((CMAKE_SYSTEM_PROCESSOR MATCHES "(^s390x)|^riscv") AND (CPUFEATURES_VERSION VERSION_LESS "0.8.0")) # detect cpu_features without s390x / riscv support
|
||||
if((CMAKE_SYSTEM_PROCESSOR MATCHES "(^s390x)|(^riscv)|(^loongarch)") AND (CPUFEATURES_VERSION VERSION_LESS "0.8.0")) # detect cpu_features without s390x / riscv support
|
||||
set(ENABLE_CPUFEATURES OFF)
|
||||
endif()
|
||||
else()
|
||||
set_package_properties(CPUFEATURES PROPERTIES
|
||||
DESCRIPTION "A cross platform C99 library to get CPU features at runtime"
|
||||
)
|
||||
if(DEFINED VOLK_VERSION AND VOLK_VERSION VERSION_GREATER "2.3") # avoid clash with volk's cpufeatures.
|
||||
if((DEFINED VOLK_VERSION AND VOLK_VERSION VERSION_GREATER "2.3") OR (CMAKE_VERSION VERSION_LESS "3.13")) # avoid clash with volk's cpufeatures.
|
||||
set(ENABLE_CPUFEATURES OFF)
|
||||
else()
|
||||
set_package_properties(CPUFEATURES PROPERTIES
|
||||
@ -1810,7 +1828,7 @@ endif()
|
||||
# Check that BLAS (Basic Linear Algebra Subprograms) is found in the system
|
||||
# See https://www.netlib.org/blas/
|
||||
################################################################################
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND ("${DARWIN_VERSION}" VERSION_LESS "23"))
|
||||
# Avoid using the implementation that comes with the Accelerate framework
|
||||
include(AvoidAccelerate)
|
||||
else()
|
||||
@ -1857,7 +1875,7 @@ endif()
|
||||
# Check that LAPACK (Linear Algebra PACKage) is found in the system
|
||||
# See https://www.netlib.org/lapack/
|
||||
################################################################################
|
||||
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
if(NOT((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND ("${DARWIN_VERSION}" VERSION_LESS "23")))
|
||||
find_package(LAPACK)
|
||||
set_package_properties(LAPACK PROPERTIES
|
||||
URL "https://www.netlib.org/lapack/"
|
||||
@ -1868,13 +1886,15 @@ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
endif()
|
||||
if(NOT LAPACK_FOUND)
|
||||
message(" The LAPACK library has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install lapack-devel")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install lapack-devel")
|
||||
else()
|
||||
message(" sudo apt-get install liblapack-dev")
|
||||
if(LINUX_DISTRIBUTION)
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install lapack-devel")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install lapack-devel")
|
||||
else()
|
||||
message(" sudo apt-get install liblapack-dev")
|
||||
endif()
|
||||
endif()
|
||||
message(FATAL_ERROR "LAPACK is required to build gnss-sdr")
|
||||
endif()
|
||||
@ -2041,7 +2061,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${ARMADILLO_STATIC_LIBRARY}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${ARMADILLO_STATIC_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GNSSSDR_BINARY_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include
|
||||
INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${ARMADILLO_STATIC_LIBRARY}
|
||||
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES};${LAPACK_LIBRARIES};${GFORTRAN};${ARMADILLO_STATIC_LIBRARY}"
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(Armadillo::armadillo PROPERTIES
|
||||
@ -2049,7 +2069,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES};${LAPACK_LIBRARIES};${GFORTRAN};${binary_dir}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
set_package_properties(Armadillo PROPERTIES
|
||||
|
27
README.md
27
README.md
@ -4,7 +4,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
)
|
||||
|
||||
[comment]: # (
|
||||
SPDX-FileCopyrightText: 2011-2021 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
)
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@ -799,7 +799,7 @@ Of course, you will also need a GPU that
|
||||
## macOS
|
||||
|
||||
GNSS-SDR can be built on macOS (or the former Mac OS X), starting from 10.9
|
||||
(Mavericks) and including 11 (Big Sur). If you still have not installed
|
||||
(Mavericks) and including 14 (Sonoma). If you still have not installed
|
||||
[Xcode](https://developer.apple.com/xcode/ "Xcode"), do it now from the App
|
||||
Store (it's free). You will also need the Xcode Command Line Tools, which do not
|
||||
come by default in macOS versions older than Big Sur. If you are using an older
|
||||
@ -830,12 +830,19 @@ In a terminal, type:
|
||||
```
|
||||
$ sudo port selfupdate
|
||||
$ sudo port upgrade outdated
|
||||
$ sudo port install armadillo cmake gnuradio gnutls lapack libad9361-iio libiio \
|
||||
matio pkgconfig protobuf3-cpp pugixml google-glog +gflags
|
||||
$ sudo port install py37-mako
|
||||
$ sudo port install armadillo cmake pkgconfig protobuf3-cpp pugixml gnutls
|
||||
$ sudo port install gnuradio +uhd +grc +zeromq
|
||||
$ sudo port install boost matio libad9361-iio libiio google-glog +gflags
|
||||
$ sudo port install py311-mako
|
||||
$ sudo port install doxygen +docs
|
||||
```
|
||||
|
||||
For macOS versions older than Sonoma, you will also need LAPACK:
|
||||
|
||||
```
|
||||
$ sudo port install lapack
|
||||
```
|
||||
|
||||
You also might need to activate a Python installation. The list of installed
|
||||
versions can be retrieved with:
|
||||
|
||||
@ -846,7 +853,7 @@ $ port select --list python
|
||||
and you can activate a certain version by typing:
|
||||
|
||||
```
|
||||
$ sudo port select --set python python37
|
||||
$ sudo port select --set python python311
|
||||
```
|
||||
|
||||
### Homebrew
|
||||
@ -871,13 +878,19 @@ Install the required dependencies:
|
||||
|
||||
```
|
||||
$ brew update && brew upgrade
|
||||
$ brew install armadillo cmake hdf5 gflags glog gnuradio lapack libmatio log4cpp \
|
||||
$ brew install armadillo cmake hdf5 gflags glog gnuradio libmatio log4cpp \
|
||||
openssl pkg-config protobuf pugixml
|
||||
$ pip3 install mako
|
||||
$ brew install --cask mactex # when completed, restart Terminal
|
||||
$ brew install graphviz doxygen
|
||||
```
|
||||
|
||||
For macOS versions older than Sonoma, you will also need LAPACK:
|
||||
|
||||
```
|
||||
$ brew install lapack
|
||||
```
|
||||
|
||||
### Other package managers
|
||||
|
||||
GNU Radio and other dependencies can also be installed using other package
|
||||
|
@ -27,6 +27,7 @@ find_library(BLAS_LIBRARIES
|
||||
/opt/local/lib/lapack
|
||||
/opt/local/lib/
|
||||
/usr/local/opt/lapack/lib
|
||||
/opt/homebrew/opt/lapack/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
@ -47,6 +48,7 @@ find_library(LAPACK_LIBRARIES
|
||||
${BLAS_ROOT_USER_DEFINED}/lapack
|
||||
/opt/local/lib/lapack
|
||||
/usr/local/opt/lapack/lib
|
||||
/opt/homebrew/opt/lapack/lib
|
||||
NO_DEFAULT_PATH
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
if(NOT GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION)
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "22.4")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "25.0")
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_BINARY_DIR)
|
||||
|
@ -44,6 +44,7 @@ if(APPLE)
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/opt/homebrew/opt/gflags/lib
|
||||
)
|
||||
else()
|
||||
find_path(GFlags_ROOT_DIR
|
||||
@ -84,6 +85,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(GFlags_ROOT_DIR)
|
||||
unset(GFlags_INCLUDE_DIRS CACHE)
|
||||
# We are testing only a couple of files in the include directories
|
||||
find_path(GFlags_INCLUDE_DIRS
|
||||
gflags/gflags.h
|
||||
@ -93,6 +95,7 @@ if(GFlags_ROOT_DIR)
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/opt/homebrew/opt/gflags/include
|
||||
)
|
||||
|
||||
# Find the libraries
|
||||
|
@ -20,7 +20,7 @@ if(DEFINED ENV{GFORTRAN_ROOT})
|
||||
)
|
||||
endif()
|
||||
|
||||
set(GCC_MAJOR_SERIES 13 12 11 10 9 8 7 6 5)
|
||||
set(GCC_MAJOR_SERIES 14 13 12 11 10 9 8 7 6 5)
|
||||
set(GCC4_SERIES 4.9.1 4.9 4.8.3 4.8.1 4.7.2 4.7 4.8.2 4.8 4.7 4.6 4.5 4.4.4 4.4)
|
||||
set(GCC_SERIES ${GCC_MAJOR_SERIES} ${GCC4_SERIES})
|
||||
|
||||
|
@ -109,6 +109,7 @@ else()
|
||||
/usr/include/glog
|
||||
/usr/local/include/glog
|
||||
/opt/local/include/glog # default location in Macports
|
||||
/opt/homebrew/opt/glog/include/glog
|
||||
${GLOG_ROOT}/include/glog
|
||||
)
|
||||
endif()
|
||||
|
@ -406,7 +406,7 @@ if(GNURADIO_RUNTIME_INCLUDE_DIRS)
|
||||
if("#include <log4cpp/Category.hh>" STREQUAL "${_file_line}")
|
||||
set(_uses_log4cpp TRUE)
|
||||
endif()
|
||||
if("#include <spdlog/common.h>" STREQUAL "${_file_line}")
|
||||
if("#include <spdlog/spdlog.h>" STREQUAL "${_file_line}")
|
||||
set(_uses_spdlog TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -47,6 +47,7 @@ find_path(LIBGTEST_DEV_DIR
|
||||
/usr/include/gtest
|
||||
/usr/local/src/googletest/googletest
|
||||
/opt/local/src/gtest-1.7.0
|
||||
/opt/homebrew/opt/googletest/include/googletest/googletest
|
||||
)
|
||||
|
||||
find_path(GTEST_INCLUDE_DIRS
|
||||
@ -57,6 +58,7 @@ find_path(GTEST_INCLUDE_DIRS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/src/gtest-1.7.0/include
|
||||
/opt/homebrew/opt/googletest/include
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -191,9 +191,9 @@ endif()
|
||||
# NOTE: This is not defined on Windows systems.
|
||||
########################################################################
|
||||
if(NOT WIN32)
|
||||
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
||||
set(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
|
||||
"Flags used by the C++ compiler during Address Sanitized builds." FORCE)
|
||||
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING
|
||||
set(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING
|
||||
"Flags used by the C compiler during Address Sanitized builds." FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_ASAN
|
||||
"-W" CACHE STRING
|
||||
|
22
cmake/Modules/RemoveDuplicates.cmake
Normal file
22
cmake/Modules/RemoveDuplicates.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
# Usage:
|
||||
# include(RemoveDuplicates)
|
||||
# remove_duplicate_linked_libraries(my_target)
|
||||
|
||||
if(DEFINED __INCLUDED_REMOVE_DUPLICATE_LINKED_LIBRARIES_MODULE)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_REMOVE_DUPLICATE_LINKED_LIBRARIES_MODULE TRUE)
|
||||
|
||||
function(remove_duplicate_linked_libraries target_name)
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.5)
|
||||
get_target_property(LINK_LIBRARIES ${target_name} LINK_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES LINK_LIBRARIES)
|
||||
set_target_properties(${target_name} PROPERTIES LINK_LIBRARIES "${LINK_LIBRARIES}")
|
||||
endif()
|
||||
endfunction()
|
@ -48,9 +48,25 @@ if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
|
||||
if(IS_PYTHON3 EQUAL -1)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
else()
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
find_package(Python2 COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python2_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
|
||||
endif()
|
||||
else()
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
else()
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python3_Interpreter_FOUND)
|
||||
set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_STRING "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||
endif()
|
||||
endif()
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
@ -59,11 +75,28 @@ if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11)
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
|
||||
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
endif()
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11)
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python2 COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python2_Interpreter_FOUND)
|
||||
set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
|
||||
set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
|
||||
endif()
|
||||
endif()
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
@ -76,13 +109,17 @@ else()
|
||||
set(_previous ${CMAKE_FIND_FRAMEWORK})
|
||||
set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
endif()
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_FIND_FRAMEWORK ${_previous})
|
||||
endif()
|
||||
if(Python3_FOUND)
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||
set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_STRING "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
endif()
|
||||
@ -91,23 +128,60 @@ else()
|
||||
if(Python2_FOUND)
|
||||
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
||||
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
|
||||
set(PYTHON_VERSION_STRING "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}")
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
endif()
|
||||
if(NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
if(CMAKE_VERSION VERSION_LESS "3.24")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
set(PYTHONINTERP_FOUND Python_Interpreter_FOUND)
|
||||
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
|
||||
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
|
||||
endif()
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||
if(NOT MAKO_FOUND)
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
unset(PYTHON_VERSION_STRING)
|
||||
unset(PYTHON_VERSION_MAJOR)
|
||||
find_program(PYTHON_EXECUTABLE NAMES python3 python)
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND TRUE)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} --version OUTPUT_VARIABLE PYTHON_VERSION_STRING_AUX)
|
||||
string(FIND "${PYTHON_VERSION_STRING_AUX}" " " blank_char_index)
|
||||
if(blank_char_index GREATER -1)
|
||||
math(EXPR start_index "${blank_char_index} + 1")
|
||||
string(SUBSTRING "${PYTHON_VERSION_STRING_AUX}" ${start_index} -1 PYTHON_VERSION_STRING)
|
||||
string(STRIP ${PYTHON_VERSION_STRING} PYTHON_VERSION_STRING)
|
||||
string(SUBSTRING "${PYTHON_VERSION_STRING_AUX}" ${start_index} 1 PYTHON_VERSION_MAJOR)
|
||||
message(STATUS "Found Python: ${PYTHON_EXECUTABLE} (found version: ${PYTHON_VERSION_STRING})")
|
||||
else()
|
||||
string(FIND ${PYTHON_EXECUTABLE} "python3" is_python3)
|
||||
if(is_python3 GREATER -1)
|
||||
set(PYTHON_VERSION_MAJOR "3")
|
||||
set(PYTHON_VERSION_STRING "3.10") # ?
|
||||
else()
|
||||
set(PYTHON_VERSION_MAJOR "2")
|
||||
set(PYTHON_VERSION_STRING "2.7")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
gnsssdr_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||
endif()
|
||||
if(MAKO_FOUND AND PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||
if("${PYTHON_VERSION_MAJOR}" VERSION_EQUAL 3)
|
||||
set(PYTHON3 TRUE)
|
||||
endif()
|
||||
|
||||
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
)
|
||||
|
||||
[comment]: # (
|
||||
SPDX-FileCopyrightText: 2011-2023 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez@cttc.es>
|
||||
)
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@ -14,7 +14,45 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||
|
||||
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
||||
|
||||
### Improvements in Repeatability
|
||||
### Improvements in Efficiency:
|
||||
|
||||
- Fixed some performance inefficiencies detected by Coverity Scan.
|
||||
|
||||
### Improvements in Interoperability:
|
||||
|
||||
- Added a new PVT configuration boolean flag (`flag_geohash_log_out`) that
|
||||
enables or disables the Position Geohash tag output in INFO log files. Set to
|
||||
`false` by default.
|
||||
- New fields have been added to the custom output stream defined by
|
||||
`monitor_pvt.proto`:
|
||||
- `utc_time` (a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) datetime
|
||||
string),
|
||||
- velocity in the local ENU frame (`vel_e`, `vel_n`, and `vel_u`), in m/s,
|
||||
- the course over ground, `cog`, in degrees,
|
||||
- the status of the Galileo's High Accuracy Service, `galhas_status`:
|
||||
- 0: HAS data not available
|
||||
- 1: HAS Corrections applied
|
||||
- `geohash`, an
|
||||
[encoded geographic location](https://en.wikipedia.org/wiki/Geohash).
|
||||
|
||||
### Improvements in Maintainability
|
||||
|
||||
- Removed useless casts and shadowed variables, improving source code
|
||||
readability.
|
||||
|
||||
### Improvements in Portability:
|
||||
|
||||
- Updated local `cpu_features` library to v0.9.0.
|
||||
- `volk_gnsssdr`: fix syntax for Python 3.12 without breaking backward
|
||||
compatibility with Python 2.7.
|
||||
- Fixed linking against GNU Radio v3.10.9.1.
|
||||
- Make use of new API if linking against VOLK >= 3.1.
|
||||
- Fixed undefined behaviour in `volk_gnsssdr` arising from incompatibility
|
||||
between complex numbers in C and C++.
|
||||
- Now build system paths are not leaked when cross-compiling.
|
||||
- Enabled building using macOS Sonoma and `arm64` processor architecture.
|
||||
|
||||
### Improvements in Repeatability:
|
||||
|
||||
- A Kalman filter is now available in the PVT block, smoothing the outputs of a
|
||||
simple Least Squares solution and improving the precision of delivered fixes.
|
||||
@ -26,6 +64,43 @@ All notable changes to GNSS-SDR will be documented in this file.
|
||||
`PVT.kf_system_ecef_pos_sd_m=0.01`, in [m]; and
|
||||
`PVT.kf_system_ecef_vel_sd_ms=0.001`, in [m/s].
|
||||
|
||||
### Improvements in Scalability:
|
||||
|
||||
- Fixed some potential data race conditions detected by Coverity Scan.
|
||||
|
||||
### Improvements in Usability:
|
||||
|
||||
- The Galileo E1B Reduced CED parameters usage has been set to `false` by
|
||||
default. You can activate its usage with `Galileo_E1B_Telemetry_Decoder=true`
|
||||
in your configuration file.
|
||||
- The generation of Galileo E6B observables has been disabled if the user sets
|
||||
`PVT.use_e6_for_pvt=false`, fixing the PVT computation in some multi-band
|
||||
configurations.
|
||||
- Fix bug in the custom binary output (`PVT.enable_monitor=true`) output rate.
|
||||
Before this fix, it was outputting data every 20 ms, instead of observing the
|
||||
`PVT.output_rate_ms` setting.
|
||||
- Now the program exits properly if a SIGINT signal is received (_e.g._, the
|
||||
user pressing Ctrl+C, or another user application sending an interruption
|
||||
signal).
|
||||
- The estimated CN0 value is now printed in the terminal when navigation data is
|
||||
succesfully decoded.
|
||||
- Fixed GPS navigation message satellite validation.
|
||||
- Latitude and longitude are now reported in the terminal with six decimal
|
||||
places (the sixth decimal place worths up to 0.11 m), instead of the
|
||||
overkilling nine (the ninth decimal place worths up to 110 microns).
|
||||
Similarly, height in meters is now reported with two decimal places instead of
|
||||
three, and velocity in m/s also with two decimal places instead of three.
|
||||
- Fixed the rate at which KLM, GPX, GeoJSON, and NMEA annotations are made. The
|
||||
rate is now set by `PVT.output_rate_ms` (`500` ms by default), and can be
|
||||
particularized by `PVT.kml_rate_ms`, `PVT.gpx_rate_ms`, `PVT.geojson_rate_ms`,
|
||||
and `PVT.nmea_rate_ms`. Those values should be multiples of
|
||||
`PVT.output_rate_ms`, or the least common multiple will be taken.
|
||||
|
||||
See the definitions of concepts and metrics at
|
||||
https://gnss-sdr.org/design-forces/
|
||||
|
||||
|
||||
|
||||
## [GNSS-SDR v0.0.18](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.18) - 2023-04-06
|
||||
|
||||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7805514.svg)](https://doi.org/10.5281/zenodo.7805514)
|
||||
|
@ -7,39 +7,49 @@ package gnss_sdr;
|
||||
/* MonitorPvt represents a search query, with pagination options to
|
||||
* indicate which results to include in the response. */
|
||||
message MonitorPvt {
|
||||
uint32 tow_at_current_symbol_ms = 1; // Time of week of the current symbol, in ms
|
||||
uint32 week = 2; // PVT GPS week
|
||||
double rx_time = 3; // PVT GPS time
|
||||
double user_clk_offset = 4; // User clock offset, in s
|
||||
uint32 tow_at_current_symbol_ms = 1; // Time of week of the current symbol, in ms
|
||||
uint32 week = 2; // PVT GPS week
|
||||
double rx_time = 3; // PVT GPS time
|
||||
double user_clk_offset = 4; // User clock offset, in s
|
||||
|
||||
double pos_x = 5; // Position X component in ECEF, expressed in m
|
||||
double pos_y = 6; // Position Y component in ECEF, expressed in m
|
||||
double pos_z = 7; // Position Z component in ECEF, expressed in m
|
||||
double vel_x = 8; // Velocity X component in ECEF, in m/s
|
||||
double vel_y = 9; // Velocity Y component in ECEF, in m/s
|
||||
double vel_z = 10; // Velocity Z component in ECEF, in m/s
|
||||
double pos_x = 5; // Position X component in ECEF, expressed in m
|
||||
double pos_y = 6; // Position Y component in ECEF, expressed in m
|
||||
double pos_z = 7; // Position Z component in ECEF, expressed in m
|
||||
double vel_x = 8; // Velocity X component in ECEF, in m/s
|
||||
double vel_y = 9; // Velocity Y component in ECEF, in m/s
|
||||
double vel_z = 10; // Velocity Z component in ECEF, in m/s
|
||||
|
||||
double cov_xx = 11; // Position variance in the Y component, in m2
|
||||
double cov_yy = 12; // Position variance in the Y component, in m2
|
||||
double cov_zz = 13; // Position variance in the Z component, in m2
|
||||
double cov_xy = 14; // Position XY covariance, in m2
|
||||
double cov_yz = 15; // Position YZ covariance, in m2
|
||||
double cov_zx = 16; // Position ZX covariance, in m2
|
||||
double cov_xx = 11; // Position variance in the Y component, in m2
|
||||
double cov_yy = 12; // Position variance in the Y component, in m2
|
||||
double cov_zz = 13; // Position variance in the Z component, in m2
|
||||
double cov_xy = 14; // Position XY covariance, in m2
|
||||
double cov_yz = 15; // Position YZ covariance, in m2
|
||||
double cov_zx = 16; // Position ZX covariance, in m2
|
||||
|
||||
double latitude = 17; // Latitude, in deg. Positive: North
|
||||
double longitude = 18; // Longitude, in deg. Positive: East
|
||||
double height = 19; // Height, in m
|
||||
double latitude = 17; // Latitude, in deg. Positive: North
|
||||
double longitude = 18; // Longitude, in deg. Positive: East
|
||||
double height = 19; // Height, in m
|
||||
|
||||
uint32 valid_sats = 20; // Number of valid satellites
|
||||
uint32 solution_status = 21; // RTKLIB solution status
|
||||
uint32 solution_type = 22; // RTKLIB solution type (0: xyz-ecef, 1: enu-baseline)
|
||||
float ar_ratio_factor = 23; // Ambiguity resolution ratio factor for validation
|
||||
float ar_ratio_threshold = 24; // Ambiguity resolution ratio threshold for validation
|
||||
uint32 valid_sats = 20; // Number of valid satellites
|
||||
uint32 solution_status = 21; // RTKLIB solution status
|
||||
uint32 solution_type = 22; // RTKLIB solution type (0: xyz-ecef, 1: enu-baseline)
|
||||
float ar_ratio_factor = 23; // Ambiguity resolution ratio factor for validation
|
||||
float ar_ratio_threshold = 24; // Ambiguity resolution ratio threshold for validation
|
||||
|
||||
double gdop = 25; // Geometric Dilution of Precision
|
||||
double pdop = 26; // Position (3D) Dilution of Precision
|
||||
double hdop = 27; // Horizontal Dilution of Precision
|
||||
double vdop = 28; // Vertical Dilution of Precision
|
||||
double gdop = 25; // Geometric Dilution of Precision
|
||||
double pdop = 26; // Position (3D) Dilution of Precision
|
||||
double hdop = 27; // Horizontal Dilution of Precision
|
||||
double vdop = 28; // Vertical Dilution of Precision
|
||||
|
||||
double user_clk_drift_ppm = 29; // User clock drift [ppm]
|
||||
double user_clk_drift_ppm = 29; // User clock drift [ppm]
|
||||
string utc_time = 30; // PVT UTC time (rfc 3339 datetime string)
|
||||
|
||||
double vel_e = 31; // Velocity East component in the local frame, in m/s
|
||||
double vel_n = 32; // Velocity North component in the local frame, in m/s
|
||||
double vel_u = 33; // Velocity Up component in the local frame, in m/s
|
||||
|
||||
double cog = 34; // Course Over Ground, in deg
|
||||
|
||||
uint32 galhas_status = 35; // Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not available
|
||||
string geohash = 36; // Encoded geographic location. See https://en.wikipedia.org/wiki/Geohash
|
||||
}
|
||||
|
@ -412,6 +412,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 107; // GPS L1 C/A + Galileo E6B
|
||||
}
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 108; // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
}
|
||||
// BeiDou B1I Receiver
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
@ -857,6 +861,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
|
||||
pvt_output_parameters.xml_output_path = configuration->property(role + ".xml_output_path", default_output_path);
|
||||
pvt_output_parameters.nmea_output_file_path = configuration->property(role + ".nmea_output_file_path", default_output_path);
|
||||
pvt_output_parameters.rtcm_output_file_path = configuration->property(role + ".rtcm_output_file_path", default_output_path);
|
||||
pvt_output_parameters.has_output_file_path = configuration->property(role + ".has_output_file_path", default_output_path);
|
||||
|
||||
// Read PVT MONITOR Configuration
|
||||
pvt_output_parameters.monitor_enabled = configuration->property(role + ".enable_monitor", false);
|
||||
|
@ -230,7 +230,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
{
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
||||
d_dump_filename = dump_filename_;
|
||||
d_dump_filename = std::move(dump_filename_);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -440,10 +440,10 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
}
|
||||
|
||||
// Initialize HAS simple printer
|
||||
d_enable_has_messages = (((d_type_of_rx >= 100) && (d_type_of_rx < 107)) && (conf_.output_enabled));
|
||||
d_enable_has_messages = (((d_type_of_rx >= 100) && (d_type_of_rx < 109)) && (conf_.output_enabled));
|
||||
if (d_enable_has_messages)
|
||||
{
|
||||
d_has_simple_printer = std::make_unique<Has_Simple_Printer>();
|
||||
d_has_simple_printer = std::make_unique<Has_Simple_Printer>(conf_.has_output_file_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -504,7 +504,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
std::ostringstream os;
|
||||
#ifdef HAS_PUT_TIME
|
||||
time_t when = std::time(nullptr);
|
||||
auto const tm = *std::localtime(&when);
|
||||
const auto& tm = *std::localtime(&when);
|
||||
os << std::put_time(&tm, "%z");
|
||||
#endif
|
||||
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"
|
||||
@ -540,22 +540,19 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
{
|
||||
// setup two PVT solvers: internal solver for rx clock and user solver
|
||||
// user PVT solver
|
||||
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat, conf_);
|
||||
d_user_pvt_solver->set_averaging_depth(1);
|
||||
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
|
||||
d_user_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
|
||||
// internal PVT solver, mainly used to estimate the receiver clock
|
||||
rtk_t internal_rtk = rtk;
|
||||
internal_rtk.opt.mode = PMODE_SINGLE; // use single positioning mode in internal PVT solver
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, dump_ls_pvt_filename, d_type_of_rx, false, false, conf_);
|
||||
d_internal_pvt_solver->set_averaging_depth(1);
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, false, false);
|
||||
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
// only one solver, customized by the user options
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat, conf_);
|
||||
d_internal_pvt_solver->set_averaging_depth(1);
|
||||
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
|
||||
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
|
||||
d_user_pvt_solver = d_internal_pvt_solver;
|
||||
}
|
||||
@ -2115,7 +2112,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// old_time_debug = d_gnss_observables_map.cbegin()->second.RX_time * 1000.0;
|
||||
uint32_t current_RX_time_ms = 0;
|
||||
// #### solve PVT and store the corrected observable set
|
||||
if (d_internal_pvt_solver->get_PVT(d_gnss_observables_map, false, d_enable_vtl, d_close_vtl_loop))
|
||||
if (d_internal_pvt_solver->get_PVT(d_gnss_observables_map, d_observable_interval_ms / 1000.0, false, d_enable_vtl, d_close_vtl_loop))
|
||||
{
|
||||
// ****** experimental VTL tests
|
||||
if (d_close_vtl_loop == true and d_enable_vtl == true)
|
||||
@ -2307,6 +2304,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// VTP To.Do: Check why get_PVT is triggered twice. Leave only one get_PVT.
|
||||
|
||||
//flag_pvt_valid = d_user_pvt_solver->get_PVT(d_gnss_observables_map, false, false, false);
|
||||
flag_pvt_valid = d_user_pvt_solver->get_PVT(d_gnss_observables_map, d_observable_interval_ms / 1000.0, false, d_enable_vtl, d_close_vtl_loop);
|
||||
}
|
||||
|
||||
if (flag_pvt_valid == true)
|
||||
@ -2411,28 +2409,28 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
{
|
||||
if (current_RX_time_ms % d_kml_rate_ms == 0)
|
||||
{
|
||||
d_kml_dump->print_position(d_user_pvt_solver.get(), false);
|
||||
d_kml_dump->print_position(d_user_pvt_solver.get());
|
||||
}
|
||||
}
|
||||
if (d_gpx_output_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_gpx_rate_ms == 0)
|
||||
{
|
||||
d_gpx_dump->print_position(d_user_pvt_solver.get(), false);
|
||||
d_gpx_dump->print_position(d_user_pvt_solver.get());
|
||||
}
|
||||
}
|
||||
if (d_geojson_output_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_geojson_rate_ms == 0)
|
||||
{
|
||||
d_geojson_printer->print_position(d_user_pvt_solver.get(), false);
|
||||
d_geojson_printer->print_position(d_user_pvt_solver.get());
|
||||
}
|
||||
}
|
||||
if (d_nmea_output_file_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_nmea_rate_ms == 0)
|
||||
{
|
||||
d_nmea_printer->Print_Nmea_Line(d_user_pvt_solver.get(), false);
|
||||
d_nmea_printer->Print_Nmea_Line(d_user_pvt_solver.get());
|
||||
}
|
||||
}
|
||||
if (d_rinex_output_enabled)
|
||||
@ -2482,22 +2480,17 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
std::cout
|
||||
<< TEXT_BOLD_GREEN
|
||||
<< "Position at " << time_solution << UTC_solution_str
|
||||
<< " using " << d_user_pvt_solver->get_num_valid_observations()
|
||||
<< std::fixed << std::setprecision(9)
|
||||
<< " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
|
||||
<< std::fixed << std::setprecision(3)
|
||||
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]" << TEXT_RESET << '\n';
|
||||
|
||||
std::cout << std::setprecision(ss);
|
||||
<< " using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = "
|
||||
<< std::fixed << std::setprecision(6) << d_user_pvt_solver->get_latitude()
|
||||
<< " [deg], Long = " << d_user_pvt_solver->get_longitude() << " [deg], Height = "
|
||||
<< std::fixed << std::setprecision(2) << d_user_pvt_solver->get_height() << std::setprecision(ss) << " [m]" << TEXT_RESET << std::endl;
|
||||
DLOG(INFO) << "RX clock offset: " << d_user_pvt_solver->get_time_offset_s() << "[s]";
|
||||
|
||||
std::cout
|
||||
<< TEXT_BOLD_GREEN
|
||||
<< "Velocity: " << std::fixed << std::setprecision(3)
|
||||
<< "Velocity: " << std::fixed << std::setprecision(2)
|
||||
<< "East: " << d_user_pvt_solver->get_rx_vel()[0] << " [m/s], North: " << d_user_pvt_solver->get_rx_vel()[1]
|
||||
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << " [m/s]" << TEXT_RESET << '\n';
|
||||
|
||||
std::cout << std::setprecision(ss);
|
||||
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << std::setprecision(ss) << " [m/s]" << TEXT_RESET << std::endl;
|
||||
DLOG(INFO) << "RX clock drift: " << d_user_pvt_solver->get_clock_drift_ppm() << " [ppm]";
|
||||
|
||||
// boost::posix_time::ptime p_time;
|
||||
@ -2506,21 +2499,22 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
// p_time += boost::posix_time::microseconds(round(rtklib_utc_time.sec * 1e6));
|
||||
// std::cout << TEXT_MAGENTA << "Observable RX time (GPST) " << boost::posix_time::to_simple_string(p_time) << TEXT_RESET << '\n';
|
||||
|
||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
|
||||
<< " UTC using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
|
||||
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]";
|
||||
LOG(INFO) << "geohash=" << d_geohash->encode(d_user_pvt_solver->get_latitude(), d_user_pvt_solver->get_longitude());
|
||||
DLOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
|
||||
<< " UTC using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
|
||||
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]";
|
||||
|
||||
/* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
|
||||
<< " UTC using "<< d_user_pvt_solver->get_num_valid_observations() <<" observations is HDOP = " << d_user_pvt_solver->get_hdop() << " VDOP = "
|
||||
<< d_user_pvt_solver->get_vdop()
|
||||
<< " GDOP = " << d_user_pvt_solver->get_gdop() << '\n'; */
|
||||
<< " UTC using "<< d_user_pvt_solver->get_num_valid_observations() <<" observations is HDOP = " << d_user_pvt_solver->get_hdop() << " VDOP = "
|
||||
<< d_user_pvt_solver->get_vdop()
|
||||
<< " GDOP = " << d_user_pvt_solver->get_gdop() << '\n'; */
|
||||
}
|
||||
|
||||
// PVT MONITOR
|
||||
if (d_user_pvt_solver->is_valid_position())
|
||||
if (d_user_pvt_solver->is_valid_position() && flag_compute_pvt_output == true)
|
||||
{
|
||||
const std::shared_ptr<Monitor_Pvt> monitor_pvt = std::make_shared<Monitor_Pvt>(d_user_pvt_solver->get_monitor_pvt());
|
||||
|
||||
monitor_pvt->geohash = d_geohash->encode(d_user_pvt_solver->get_latitude(), d_user_pvt_solver->get_longitude());
|
||||
DLOG(INFO) << "geohash=" << monitor_pvt->geohash;
|
||||
// publish new position to the gnss_flowgraph channel status monitor
|
||||
if (current_RX_time_ms % d_report_rate_ms == 0)
|
||||
{
|
||||
|
@ -171,9 +171,9 @@ void An_Packet_Printer::update_sdr_gnss_packet(sdr_gnss_packet_t* _packet, const
|
||||
_packet->gps_satellites = num_gps_sats;
|
||||
_packet->galileo_satellites = num_gal_sats;
|
||||
_packet->microseconds = static_cast<uint32_t>(elapsed_seconds.count() * 1.0e6);
|
||||
_packet->latitude = static_cast<double>(pvt->get_latitude()) * (M_PI / 180.0);
|
||||
_packet->longitude = static_cast<double>(pvt->get_longitude()) * (M_PI / 180.0);
|
||||
_packet->height = static_cast<double>(pvt->get_height());
|
||||
_packet->latitude = pvt->get_latitude() * (M_PI / 180.0);
|
||||
_packet->longitude = pvt->get_longitude() * (M_PI / 180.0);
|
||||
_packet->height = pvt->get_height();
|
||||
_packet->velocity[0] = static_cast<float>(pvt->get_rx_vel()[1]);
|
||||
_packet->velocity[1] = static_cast<float>(pvt->get_rx_vel()[0]);
|
||||
_packet->velocity[2] = static_cast<float>(-pvt->get_rx_vel()[2]);
|
||||
@ -196,11 +196,11 @@ void An_Packet_Printer::update_sdr_gnss_packet(sdr_gnss_packet_t* _packet, const
|
||||
void An_Packet_Printer::encode_sdr_gnss_packet(sdr_gnss_packet_t* sdr_gnss_packet, an_packet_t* _packet) const
|
||||
{
|
||||
uint8_t offset = 0;
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sdr_gnss_packet->nsvfix), offset, _packet->data, sizeof(sdr_gnss_packet->nsvfix));
|
||||
LSB_bytes_to_array(&sdr_gnss_packet->nsvfix, offset, _packet->data, sizeof(sdr_gnss_packet->nsvfix));
|
||||
offset += sizeof(sdr_gnss_packet->nsvfix);
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sdr_gnss_packet->gps_satellites), offset, _packet->data, sizeof(sdr_gnss_packet->gps_satellites));
|
||||
LSB_bytes_to_array(&sdr_gnss_packet->gps_satellites, offset, _packet->data, sizeof(sdr_gnss_packet->gps_satellites));
|
||||
offset += sizeof(sdr_gnss_packet->gps_satellites);
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sdr_gnss_packet->galileo_satellites), offset, _packet->data, sizeof(sdr_gnss_packet->galileo_satellites));
|
||||
LSB_bytes_to_array(&sdr_gnss_packet->galileo_satellites, offset, _packet->data, sizeof(sdr_gnss_packet->galileo_satellites));
|
||||
offset += sizeof(sdr_gnss_packet->galileo_satellites);
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sdr_gnss_packet->microseconds), offset, _packet->data, sizeof(sdr_gnss_packet->microseconds));
|
||||
offset += sizeof(sdr_gnss_packet->microseconds);
|
||||
@ -218,9 +218,9 @@ void An_Packet_Printer::encode_sdr_gnss_packet(sdr_gnss_packet_t* sdr_gnss_packe
|
||||
offset += sizeof(sdr_gnss_packet->velocity[2]);
|
||||
for (auto& sat : sdr_gnss_packet->sats)
|
||||
{
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sat.prn), offset, _packet->data, sizeof(sat.prn));
|
||||
LSB_bytes_to_array(&sat.prn, offset, _packet->data, sizeof(sat.prn));
|
||||
offset += sizeof(sat.prn);
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sat.snr), offset, _packet->data, sizeof(sat.snr));
|
||||
LSB_bytes_to_array(&sat.snr, offset, _packet->data, sizeof(sat.snr));
|
||||
offset += sizeof(sat.snr);
|
||||
LSB_bytes_to_array(reinterpret_cast<uint8_t*>(&sat.doppler), offset, _packet->data, sizeof(sat.doppler));
|
||||
offset += sizeof(sat.doppler);
|
||||
|
@ -156,24 +156,11 @@ bool GeoJSON_Printer::set_headers(const std::string& filename, bool time_tag_nam
|
||||
}
|
||||
|
||||
|
||||
bool GeoJSON_Printer::print_position(const Pvt_Solution* const position, bool print_average_values)
|
||||
bool GeoJSON_Printer::print_position(const Pvt_Solution* const position)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double height;
|
||||
|
||||
if (print_average_values == false)
|
||||
{
|
||||
latitude = position->get_latitude();
|
||||
longitude = position->get_longitude();
|
||||
height = position->get_height();
|
||||
}
|
||||
else
|
||||
{
|
||||
latitude = position->get_avg_latitude();
|
||||
longitude = position->get_avg_longitude();
|
||||
height = position->get_avg_height();
|
||||
}
|
||||
const double latitude = position->get_latitude();
|
||||
const double longitude = position->get_longitude();
|
||||
const double height = position->get_height();
|
||||
|
||||
if (geojson_file.is_open())
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
explicit GeoJSON_Printer(const std::string& base_path = ".");
|
||||
~GeoJSON_Printer();
|
||||
bool set_headers(const std::string& filename, bool time_tag_name = true);
|
||||
bool print_position(const Pvt_Solution* const position, bool print_average_values);
|
||||
bool print_position(const Pvt_Solution* const position);
|
||||
bool close_file();
|
||||
|
||||
private:
|
||||
|
@ -140,12 +140,8 @@ bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name)
|
||||
}
|
||||
|
||||
|
||||
bool Gpx_Printer::print_position(const Pvt_Solution* const position, bool print_average_values)
|
||||
bool Gpx_Printer::print_position(const Pvt_Solution* const position)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double height;
|
||||
|
||||
positions_printed = true;
|
||||
|
||||
const double speed_over_ground = position->get_speed_over_ground(); // expressed in m/s
|
||||
@ -162,18 +158,9 @@ bool Gpx_Printer::print_position(const Pvt_Solution* const position, bool print_
|
||||
utc_time.resize(23, '0'); // time up to ms
|
||||
utc_time.append("Z"); // UTC time zone
|
||||
|
||||
if (print_average_values == false)
|
||||
{
|
||||
latitude = position->get_latitude();
|
||||
longitude = position->get_longitude();
|
||||
height = position->get_height();
|
||||
}
|
||||
else
|
||||
{
|
||||
latitude = position->get_avg_latitude();
|
||||
longitude = position->get_avg_longitude();
|
||||
height = position->get_avg_height();
|
||||
}
|
||||
const double latitude = position->get_latitude();
|
||||
const double longitude = position->get_longitude();
|
||||
const double height = position->get_height();
|
||||
|
||||
if (gpx_file.is_open())
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
explicit Gpx_Printer(const std::string& base_path = ".");
|
||||
~Gpx_Printer();
|
||||
bool set_headers(const std::string& filename, bool time_tag_name = true);
|
||||
bool print_position(const Pvt_Solution* const position, bool print_average_values);
|
||||
bool print_position(const Pvt_Solution* const position);
|
||||
bool close_file();
|
||||
|
||||
private:
|
||||
|
@ -210,12 +210,8 @@ bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name)
|
||||
}
|
||||
|
||||
|
||||
bool Kml_Printer::print_position(const Pvt_Solution* const position, bool print_average_values)
|
||||
bool Kml_Printer::print_position(const Pvt_Solution* const position)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double height;
|
||||
|
||||
positions_printed = true;
|
||||
|
||||
const double speed_over_ground = position->get_speed_over_ground(); // expressed in m/s
|
||||
@ -232,18 +228,9 @@ bool Kml_Printer::print_position(const Pvt_Solution* const position, bool print_
|
||||
utc_time.resize(23, '0'); // time up to ms
|
||||
utc_time.append("Z"); // UTC time zone
|
||||
|
||||
if (print_average_values == false)
|
||||
{
|
||||
latitude = position->get_latitude();
|
||||
longitude = position->get_longitude();
|
||||
height = position->get_height();
|
||||
}
|
||||
else
|
||||
{
|
||||
latitude = position->get_avg_latitude();
|
||||
longitude = position->get_avg_longitude();
|
||||
height = position->get_avg_height();
|
||||
}
|
||||
const double latitude = position->get_latitude();
|
||||
const double longitude = position->get_longitude();
|
||||
const double height = position->get_height();
|
||||
|
||||
if (kml_file.is_open() && tmp_file.is_open())
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
explicit Kml_Printer(const std::string& base_path = std::string("."));
|
||||
~Kml_Printer();
|
||||
bool set_headers(const std::string& filename, bool time_tag_name = true);
|
||||
bool print_position(const Pvt_Solution* const position, bool print_average_values);
|
||||
bool print_position(const Pvt_Solution* const position);
|
||||
bool close_file();
|
||||
|
||||
private:
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
/** \addtogroup PVT
|
||||
* \{ */
|
||||
@ -63,6 +64,16 @@ public:
|
||||
double longitude;
|
||||
// GEO user position Height [m]
|
||||
double height;
|
||||
// East, Nord, Up (ENU) Velocity [m/s]
|
||||
double vel_e;
|
||||
double vel_n;
|
||||
double vel_u;
|
||||
|
||||
// Course Over Ground (COG) [deg]
|
||||
double cog;
|
||||
|
||||
// Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not avaliable
|
||||
uint32_t galhas_status;
|
||||
|
||||
// NUMBER OF VALID SATS
|
||||
uint8_t valid_sats;
|
||||
@ -84,6 +95,11 @@ public:
|
||||
// User clock drift [ppm]
|
||||
double user_clk_drift_ppm;
|
||||
|
||||
// PVT UTC Time (rfc 3339 datetime string)
|
||||
std::string utc_time;
|
||||
|
||||
std::string geohash; // See https://en.wikipedia.org/wiki/Geohash
|
||||
|
||||
/*!
|
||||
* \brief This member function serializes and restores
|
||||
* Monitor_Pvt objects from a byte stream.
|
||||
@ -131,6 +147,14 @@ public:
|
||||
ar& BOOST_SERIALIZATION_NVP(vdop);
|
||||
|
||||
ar& BOOST_SERIALIZATION_NVP(user_clk_drift_ppm);
|
||||
ar& BOOST_SERIALIZATION_NVP(utc_time);
|
||||
|
||||
ar& BOOST_SERIALIZATION_NVP(vel_e);
|
||||
ar& BOOST_SERIALIZATION_NVP(vel_n);
|
||||
ar& BOOST_SERIALIZATION_NVP(vel_u);
|
||||
|
||||
ar& BOOST_SERIALIZATION_NVP(cog);
|
||||
ar& BOOST_SERIALIZATION_NVP(geohash);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -100,7 +100,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename,
|
||||
{
|
||||
nmea_dev_descriptor = -1;
|
||||
}
|
||||
print_avg_pos = false;
|
||||
|
||||
d_PVT_data = nullptr;
|
||||
}
|
||||
|
||||
@ -190,11 +190,10 @@ void Nmea_Printer::close_serial() const
|
||||
}
|
||||
|
||||
|
||||
bool Nmea_Printer::Print_Nmea_Line(const Rtklib_Solver* const pvt_data, bool print_average_values)
|
||||
bool Nmea_Printer::Print_Nmea_Line(const Rtklib_Solver* const pvt_data)
|
||||
{
|
||||
// set the new PVT data
|
||||
d_PVT_data = pvt_data;
|
||||
print_avg_pos = print_average_values;
|
||||
|
||||
// generate the NMEA sentences
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
/*!
|
||||
* \brief Print NMEA PVT and satellite info to the initialized device
|
||||
*/
|
||||
bool Print_Nmea_Line(const Rtklib_Solver* const pvt_data, bool print_average_values);
|
||||
bool Print_Nmea_Line(const Rtklib_Solver* const pvt_data);
|
||||
|
||||
private:
|
||||
int init_serial(const std::string& serial_device); // serial port control
|
||||
@ -80,8 +80,6 @@ private:
|
||||
std::string nmea_devname;
|
||||
|
||||
int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port)
|
||||
|
||||
bool print_avg_pos;
|
||||
bool d_flag_nmea_output_file;
|
||||
};
|
||||
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
std::string kml_output_path = std::string(".");
|
||||
std::string xml_output_path = std::string(".");
|
||||
std::string rtcm_output_file_path = std::string(".");
|
||||
std::string has_output_file_path = std::string(".");
|
||||
std::string udp_addresses;
|
||||
std::string udp_eph_addresses;
|
||||
std::string log_source_timetag_file;
|
||||
@ -55,13 +56,13 @@ public:
|
||||
|
||||
int32_t output_rate_ms = 0;
|
||||
int32_t display_rate_ms = 0;
|
||||
int32_t kml_rate_ms = 1000;
|
||||
int32_t gpx_rate_ms = 1000;
|
||||
int32_t geojson_rate_ms = 1000;
|
||||
int32_t nmea_rate_ms = 1000;
|
||||
int32_t kml_rate_ms = 20;
|
||||
int32_t gpx_rate_ms = 20;
|
||||
int32_t geojson_rate_ms = 20;
|
||||
int32_t nmea_rate_ms = 20;
|
||||
int32_t rinex_version = 0;
|
||||
int32_t rinexobs_rate_ms = 0;
|
||||
int32_t an_rate_ms = 1000;
|
||||
int32_t an_rate_ms = 20;
|
||||
int32_t max_obs_block_rx_clock_offset_ms = 40;
|
||||
int udp_port = 0;
|
||||
int udp_eph_port = 0;
|
||||
@ -90,7 +91,7 @@ public:
|
||||
bool pre_2009_file = false;
|
||||
bool dump = false;
|
||||
bool dump_mat = true;
|
||||
bool log_source_timetag;
|
||||
bool log_source_timetag = false;
|
||||
bool use_e6_for_pvt = true;
|
||||
bool enable_vtl = false;
|
||||
bool close_vtl_loop = true;
|
||||
|
@ -19,16 +19,16 @@
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
void Pvt_Kf::init_kf(const arma::vec& p,
|
||||
void Pvt_Kf::init_Kf(const arma::vec& p,
|
||||
const arma::vec& v,
|
||||
double solver_interval_s,
|
||||
double update_interval_s,
|
||||
double measures_ecef_pos_sd_m,
|
||||
double measures_ecef_vel_sd_ms,
|
||||
double system_ecef_pos_sd_m,
|
||||
double system_ecef_vel_sd_ms)
|
||||
{
|
||||
// Kalman Filter class variables
|
||||
const double Ti = solver_interval_s;
|
||||
const double Ti = update_interval_s;
|
||||
|
||||
d_F = {{1.0, 0.0, 0.0, Ti, 0.0, 0.0},
|
||||
{0.0, 1.0, 0.0, 0.0, Ti, 0.0},
|
||||
@ -68,7 +68,7 @@ void Pvt_Kf::init_kf(const arma::vec& p,
|
||||
d_x_old_old.subvec(0, 2) = p;
|
||||
d_x_old_old.subvec(3, 5) = v;
|
||||
|
||||
initialized = true;
|
||||
d_initialized = true;
|
||||
|
||||
DLOG(INFO) << "Ti: " << Ti;
|
||||
DLOG(INFO) << "F: " << d_F;
|
||||
@ -80,28 +80,54 @@ void Pvt_Kf::init_kf(const arma::vec& p,
|
||||
}
|
||||
|
||||
|
||||
bool Pvt_Kf::is_initialized() const
|
||||
{
|
||||
return d_initialized;
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Kf::reset_Kf()
|
||||
{
|
||||
d_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Kf::run_Kf(const arma::vec& p, const arma::vec& v)
|
||||
{
|
||||
// Kalman loop
|
||||
// Prediction
|
||||
d_x_new_old = d_F * d_x_old_old;
|
||||
d_P_new_old = d_F * d_P_old_old * d_F.t() + d_Q;
|
||||
if (d_initialized)
|
||||
{
|
||||
// Kalman loop
|
||||
// Prediction
|
||||
d_x_new_old = d_F * d_x_old_old;
|
||||
d_P_new_old = d_F * d_P_old_old * d_F.t() + d_Q;
|
||||
|
||||
// Measurement update
|
||||
arma::vec z = arma::join_cols(p, v);
|
||||
arma::mat K = d_P_new_old * d_H.t() * arma::inv(d_H * d_P_new_old * d_H.t() + d_R); // Kalman gain
|
||||
// Measurement update
|
||||
try
|
||||
{
|
||||
arma::vec z = arma::join_cols(p, v);
|
||||
arma::mat K = d_P_new_old * d_H.t() * arma::inv(d_H * d_P_new_old * d_H.t() + d_R); // Kalman gain
|
||||
|
||||
d_x_new_new = d_x_new_old + K * (z - d_H * d_x_new_old);
|
||||
d_P_new_new = (arma::eye(6, 6) - K * d_H) * d_P_new_old;
|
||||
d_x_new_new = d_x_new_old + K * (z - d_H * d_x_new_old);
|
||||
d_P_new_new = (arma::eye(6, 6) - K * d_H) * d_P_new_old;
|
||||
|
||||
// prepare data for next KF epoch
|
||||
d_x_old_old = d_x_new_new;
|
||||
d_P_old_old = d_P_new_new;
|
||||
// prepare data for next KF epoch
|
||||
d_x_old_old = d_x_new_new;
|
||||
d_P_old_old = d_P_new_new;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
d_x_new_new = d_x_new_old;
|
||||
this->reset_Kf();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Kf::get_pvt(arma::vec& p, arma::vec& v)
|
||||
void Pvt_Kf::get_pv_Kf(arma::vec& p, arma::vec& v) const
|
||||
{
|
||||
p = d_x_new_new.subvec(0, 2);
|
||||
v = d_x_new_new.subvec(3, 5);
|
||||
if (d_initialized)
|
||||
{
|
||||
p = d_x_new_new.subvec(0, 2);
|
||||
v = d_x_new_new.subvec(3, 5);
|
||||
}
|
||||
}
|
||||
|
@ -35,16 +35,17 @@ class Pvt_Kf
|
||||
public:
|
||||
Pvt_Kf() = default;
|
||||
virtual ~Pvt_Kf() = default;
|
||||
void init_kf(const arma::vec& p,
|
||||
void init_Kf(const arma::vec& p,
|
||||
const arma::vec& v,
|
||||
double solver_interval_s,
|
||||
double update_interval_s,
|
||||
double measures_ecef_pos_sd_m,
|
||||
double measures_ecef_vel_sd_ms,
|
||||
double system_ecef_pos_sd_m,
|
||||
double system_ecef_vel_sd_ms);
|
||||
bool is_initialized() const;
|
||||
void run_Kf(const arma::vec& p, const arma::vec& v);
|
||||
void get_pvt(arma::vec& p, arma::vec& v);
|
||||
bool initialized{false};
|
||||
void get_pv_Kf(arma::vec& p, arma::vec& v) const;
|
||||
void reset_Kf();
|
||||
|
||||
private:
|
||||
// Kalman Filter class variables
|
||||
@ -58,6 +59,7 @@ private:
|
||||
arma::vec d_x_old_old;
|
||||
arma::vec d_x_new_old;
|
||||
arma::vec d_x_new_new;
|
||||
bool d_initialized{false};
|
||||
};
|
||||
|
||||
|
||||
|
@ -69,70 +69,6 @@ int Pvt_Solution::cart2geo(double X, double Y, double Z, int elipsoid_selection)
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Solution::set_averaging_depth(int depth)
|
||||
{
|
||||
d_averaging_depth = depth;
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Solution::set_averaging_flag(bool flag)
|
||||
{
|
||||
d_flag_averaging = flag;
|
||||
}
|
||||
|
||||
|
||||
void Pvt_Solution::perform_pos_averaging()
|
||||
{
|
||||
// MOVING AVERAGE PVT
|
||||
bool avg = d_flag_averaging;
|
||||
if (avg == true)
|
||||
{
|
||||
if (d_hist_longitude_d.size() == static_cast<unsigned int>(d_averaging_depth))
|
||||
{
|
||||
// Pop oldest value
|
||||
d_hist_longitude_d.pop_back();
|
||||
d_hist_latitude_d.pop_back();
|
||||
d_hist_height_m.pop_back();
|
||||
// Push new values
|
||||
d_hist_longitude_d.push_front(d_longitude_d);
|
||||
d_hist_latitude_d.push_front(d_latitude_d);
|
||||
d_hist_height_m.push_front(d_height_m);
|
||||
|
||||
d_avg_latitude_d = 0.0;
|
||||
d_avg_longitude_d = 0.0;
|
||||
d_avg_height_m = 0.0;
|
||||
for (size_t i = 0; i < d_hist_longitude_d.size(); i++)
|
||||
{
|
||||
d_avg_latitude_d = d_avg_latitude_d + d_hist_latitude_d.at(i);
|
||||
d_avg_longitude_d = d_avg_longitude_d + d_hist_longitude_d.at(i);
|
||||
d_avg_height_m = d_avg_height_m + d_hist_height_m.at(i);
|
||||
}
|
||||
d_avg_latitude_d = d_avg_latitude_d / static_cast<double>(d_averaging_depth);
|
||||
d_avg_longitude_d = d_avg_longitude_d / static_cast<double>(d_averaging_depth);
|
||||
d_avg_height_m = d_avg_height_m / static_cast<double>(d_averaging_depth);
|
||||
d_valid_position = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// int current_depth=d_hist_longitude_d.size();
|
||||
// Push new values
|
||||
d_hist_longitude_d.push_front(d_longitude_d);
|
||||
d_hist_latitude_d.push_front(d_latitude_d);
|
||||
d_hist_height_m.push_front(d_height_m);
|
||||
|
||||
d_avg_latitude_d = d_latitude_d;
|
||||
d_avg_longitude_d = d_longitude_d;
|
||||
d_avg_height_m = d_height_m;
|
||||
d_valid_position = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
d_valid_position = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double Pvt_Solution::get_time_offset_s() const
|
||||
{
|
||||
return d_rx_dt_s;
|
||||
@ -199,30 +135,6 @@ double Pvt_Solution::get_course_over_ground() const
|
||||
}
|
||||
|
||||
|
||||
double Pvt_Solution::get_avg_latitude() const
|
||||
{
|
||||
return d_avg_latitude_d;
|
||||
}
|
||||
|
||||
|
||||
double Pvt_Solution::get_avg_longitude() const
|
||||
{
|
||||
return d_avg_longitude_d;
|
||||
}
|
||||
|
||||
|
||||
double Pvt_Solution::get_avg_height() const
|
||||
{
|
||||
return d_avg_height_m;
|
||||
}
|
||||
|
||||
|
||||
bool Pvt_Solution::is_averaging() const
|
||||
{
|
||||
return d_flag_averaging;
|
||||
}
|
||||
|
||||
|
||||
bool Pvt_Solution::is_valid_position() const
|
||||
{
|
||||
return d_valid_position;
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <array>
|
||||
#include <deque>
|
||||
|
||||
/** \addtogroup PVT
|
||||
* \{ */
|
||||
@ -38,20 +37,10 @@ public:
|
||||
Pvt_Solution() = default;
|
||||
virtual ~Pvt_Solution() = default;
|
||||
|
||||
void set_rx_pos(const std::array<double, 3> &pos); //!< Set position: X, Y, Z in Cartesian ECEF coordinates [m]
|
||||
void set_rx_vel(const std::array<double, 3> &vel); //!< Set velocity: East [m/s], North [m/s], Up [m/s]
|
||||
void set_position_UTC_time(const boost::posix_time::ptime &pt);
|
||||
void set_time_offset_s(double offset); //!< Set RX time offset [s]
|
||||
void set_clock_drift_ppm(double clock_drift_ppm); //!< Set the Rx clock drift [ppm]
|
||||
void set_speed_over_ground(double speed_m_s); //!< Set RX speed over ground [m/s]
|
||||
void set_course_over_ground(double cog_deg); //!< Set RX course over ground [deg]
|
||||
void set_valid_position(bool is_valid);
|
||||
void set_num_valid_observations(int num); //!< Set the number of valid pseudorange observations (valid satellites)
|
||||
void set_pre_2009_file(bool pre_2009_file); //!< Flag for the week rollover computation in post processing mode for signals older than 2009
|
||||
// averaging
|
||||
void set_averaging_depth(int depth); //!< Set length of averaging window
|
||||
void set_averaging_flag(bool flag);
|
||||
void perform_pos_averaging();
|
||||
virtual double get_hdop() const = 0;
|
||||
virtual double get_vdop() const = 0;
|
||||
virtual double get_pdop() const = 0;
|
||||
virtual double get_gdop() const = 0;
|
||||
|
||||
std::array<double, 3> get_rx_pos() const;
|
||||
std::array<double, 3> get_rx_vel() const;
|
||||
@ -63,18 +52,20 @@ public:
|
||||
double get_clock_drift_ppm() const; //!< Get the Rx clock drift [ppm]
|
||||
double get_speed_over_ground() const; //!< Get RX speed over ground [m/s]
|
||||
double get_course_over_ground() const; //!< Get RX course over ground [deg]
|
||||
double get_avg_latitude() const; //!< Get RX position averaged Latitude WGS84 [deg]
|
||||
double get_avg_longitude() const; //!< Get RX position averaged Longitude WGS84 [deg]
|
||||
double get_avg_height() const; //!< Get RX position averaged height WGS84 [m]
|
||||
int get_num_valid_observations() const; //!< Get the number of valid pseudorange observations (valid satellites)
|
||||
bool is_pre_2009() const;
|
||||
bool is_valid_position() const;
|
||||
bool is_averaging() const;
|
||||
|
||||
virtual double get_hdop() const = 0;
|
||||
virtual double get_vdop() const = 0;
|
||||
virtual double get_pdop() const = 0;
|
||||
virtual double get_gdop() const = 0;
|
||||
void set_rx_pos(const std::array<double, 3> &pos); //!< Set position: X, Y, Z in Cartesian ECEF coordinates [m]
|
||||
void set_rx_vel(const std::array<double, 3> &vel); //!< Set velocity: East [m/s], North [m/s], Up [m/s]
|
||||
void set_position_UTC_time(const boost::posix_time::ptime &pt);
|
||||
void set_time_offset_s(double offset); //!< Set RX time offset [s]
|
||||
void set_clock_drift_ppm(double clock_drift_ppm); //!< Set the Rx clock drift [ppm]
|
||||
void set_speed_over_ground(double speed_m_s); //!< Set RX speed over ground [m/s]
|
||||
void set_course_over_ground(double cog_deg); //!< Set RX course over ground [deg]
|
||||
void set_valid_position(bool is_valid);
|
||||
void set_num_valid_observations(int num); //!< Set the number of valid pseudorange observations (valid satellites)
|
||||
void set_pre_2009_file(bool pre_2009_file); //!< Flag for the week rollover computation in post processing mode for signals older than 2009
|
||||
|
||||
private:
|
||||
/*
|
||||
@ -98,10 +89,6 @@ private:
|
||||
std::array<double, 3> d_rx_vel{};
|
||||
boost::posix_time::ptime d_position_UTC_time;
|
||||
|
||||
std::deque<double> d_hist_latitude_d;
|
||||
std::deque<double> d_hist_longitude_d;
|
||||
std::deque<double> d_hist_height_m;
|
||||
|
||||
double d_latitude_d{0.0}; // RX position Latitude WGS84 [deg]
|
||||
double d_longitude_d{0.0}; // RX position Longitude WGS84 [deg]
|
||||
double d_height_m{0.0}; // RX position height WGS84 [m]
|
||||
@ -110,16 +97,10 @@ private:
|
||||
double d_speed_over_ground_m_s{0.0}; // RX speed over ground [m/s]
|
||||
double d_course_over_ground_d{0.0}; // RX course over ground [deg]
|
||||
|
||||
double d_avg_latitude_d{0.0}; // Averaged latitude in degrees
|
||||
double d_avg_longitude_d{0.0}; // Averaged longitude in degrees
|
||||
double d_avg_height_m{0.0}; // Averaged height [m]
|
||||
|
||||
int d_averaging_depth{0}; // Length of averaging window
|
||||
int d_valid_observations{0}; // Number of valid observations in this epoch
|
||||
|
||||
bool d_pre_2009_file{false}; // Flag to correct week rollover in post processing mode for signals older than 2009
|
||||
bool d_valid_position{false};
|
||||
bool d_flag_averaging{false};
|
||||
};
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -39,14 +39,15 @@
|
||||
#define GNSS_SDR_RINEX_PRINTER_H
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cstdint> // for int32_t
|
||||
#include <cstdlib> // for strtol, strtod
|
||||
#include <fstream> // for fstream
|
||||
#include <iomanip> // for setprecision
|
||||
#include <map> // for map
|
||||
#include <sstream> // for stringstream
|
||||
#include <string> // for string
|
||||
#include <vector>
|
||||
#include <cstdint> // for int32_t
|
||||
#include <cstdlib> // for strtol, strtod
|
||||
#include <fstream> // for fstream
|
||||
#include <iomanip> // for setprecision
|
||||
#include <map> // for map
|
||||
#include <sstream> // for stringstream
|
||||
#include <string> // for string
|
||||
#include <unordered_map> // for unordered_map
|
||||
#include <vector> // for vector
|
||||
|
||||
|
||||
/** \addtogroup PVT
|
||||
@ -143,6 +144,7 @@ public:
|
||||
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
|
||||
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
|
||||
* 107 | GPS L1 C/A + Galileo E6B
|
||||
* 108 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
* 500 | BeiDou B1I
|
||||
* 501 | BeiDou B1I + GPS L1 C/A
|
||||
* 502 | BeiDou B1I + Galileo E1B
|
||||
@ -232,6 +234,14 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
const std::unordered_map<std::string, std::string> satelliteSystem = {
|
||||
{"GPS", "G"},
|
||||
{"GLONASS", "R"},
|
||||
{"SBAS payload", "S"},
|
||||
{"Galileo", "E"},
|
||||
{"Beidou", "C"},
|
||||
{"Mixed", "M"}}; // RINEX v3.02 codes
|
||||
|
||||
/*
|
||||
* Generates the GPS Observation data header
|
||||
*/
|
||||
@ -984,7 +994,6 @@ private:
|
||||
|
||||
inline std::string asFixWidthString(int x, int width, char fill_digit) const;
|
||||
|
||||
std::map<std::string, std::string> satelliteSystem; // GPS, GLONASS, SBAS payload, Galileo or Beidou
|
||||
std::map<std::string, std::string> observationType; // PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
||||
std::map<std::string, std::string> observationCode; // GNSS observation descriptors
|
||||
|
||||
|
@ -929,7 +929,7 @@ int32_t Rtcm::read_MT1005(const std::string& message, uint32_t& ref_id, double&
|
||||
const uint32_t reserved_field_length = 6;
|
||||
uint32_t index = preamble_length + reserved_field_length;
|
||||
|
||||
uint32_t read_message_length = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10)));
|
||||
uint32_t read_message_length = Rtcm::bin_to_uint(message_bin.substr(index, 10));
|
||||
index += 10;
|
||||
if (read_message_length != 19)
|
||||
{
|
||||
@ -1601,7 +1601,7 @@ int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) co
|
||||
const uint32_t reserved_field_length = 6;
|
||||
uint32_t index = preamble_length + reserved_field_length;
|
||||
|
||||
const uint32_t read_message_length = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10)));
|
||||
const uint32_t read_message_length = Rtcm::bin_to_uint(message_bin.substr(index, 10));
|
||||
index += 10;
|
||||
|
||||
if (read_message_length != 61)
|
||||
@ -1621,7 +1621,7 @@ int32_t Rtcm::read_MT1019(const std::string& message, Gps_Ephemeris& gps_eph) co
|
||||
}
|
||||
|
||||
// Fill Gps Ephemeris with message data content
|
||||
gps_eph.PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6)));
|
||||
gps_eph.PRN = Rtcm::bin_to_uint(message_bin.substr(index, 6));
|
||||
index += 6;
|
||||
|
||||
gps_eph.WN = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10)));
|
||||
@ -1835,7 +1835,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
const uint32_t reserved_field_length = 6;
|
||||
uint32_t index = preamble_length + reserved_field_length;
|
||||
|
||||
const uint32_t read_message_length = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10)));
|
||||
const uint32_t read_message_length = Rtcm::bin_to_uint(message_bin.substr(index, 10));
|
||||
index += 10;
|
||||
|
||||
if (read_message_length != 45) // 360 bits = 45 bytes
|
||||
@ -1855,7 +1855,7 @@ int32_t Rtcm::read_MT1020(const std::string& message, Glonass_Gnav_Ephemeris& gl
|
||||
}
|
||||
|
||||
// Fill Gps Ephemeris with message data content
|
||||
glonass_gnav_eph.i_satellite_slot_number = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6)));
|
||||
glonass_gnav_eph.i_satellite_slot_number = Rtcm::bin_to_uint(message_bin.substr(index, 6));
|
||||
index += 6;
|
||||
|
||||
glonass_gnav_eph.i_satellite_freq_channel = static_cast<int32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 5)) - 7.0);
|
||||
@ -2138,7 +2138,7 @@ int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph
|
||||
const uint32_t reserved_field_length = 6;
|
||||
uint32_t index = preamble_length + reserved_field_length;
|
||||
|
||||
const uint32_t read_message_length = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 10)));
|
||||
const uint32_t read_message_length = Rtcm::bin_to_uint(message_bin.substr(index, 10));
|
||||
index += 10;
|
||||
|
||||
if (read_message_length != 62)
|
||||
@ -2158,7 +2158,7 @@ int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph
|
||||
}
|
||||
|
||||
// Fill Galileo Ephemeris with message data content
|
||||
gal_eph.PRN = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 6)));
|
||||
gal_eph.PRN = Rtcm::bin_to_uint(message_bin.substr(index, 6));
|
||||
index += 6;
|
||||
|
||||
gal_eph.WN = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 12)));
|
||||
@ -2233,7 +2233,7 @@ int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph
|
||||
gal_eph.BGD_E1E5a = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 10)));
|
||||
index += 10;
|
||||
|
||||
gal_eph.E5a_HS = static_cast<uint32_t>(Rtcm::bin_to_uint(message_bin.substr(index, 2)));
|
||||
gal_eph.E5a_HS = Rtcm::bin_to_uint(message_bin.substr(index, 2));
|
||||
index += 2;
|
||||
|
||||
gal_eph.E5a_DVS = static_cast<bool>(Rtcm::bin_to_uint(message_bin.substr(index, 1)));
|
||||
|
@ -587,16 +587,24 @@ private:
|
||||
|
||||
inline bool decode_header()
|
||||
{
|
||||
char header[header_length + 1] = "";
|
||||
std::strncat(header, data_.data(), header_length);
|
||||
std::string header(data_.data(), header_length);
|
||||
if (header[0] != 'G' || header[1] != 'S')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char header2_[header_length - 1] = "";
|
||||
std::strncat(header2_, data_.data() + 2, header_length - 2);
|
||||
body_length_ = std::atoi(header2_);
|
||||
auto header2 = header.substr(2);
|
||||
try
|
||||
{
|
||||
body_length_ = std::stoi(header2);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
// invalid stoi conversion
|
||||
body_length_ = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (body_length_ == 0)
|
||||
{
|
||||
return false;
|
||||
@ -612,11 +620,11 @@ private:
|
||||
|
||||
inline void encode_header()
|
||||
{
|
||||
char header[header_length + 1] = "";
|
||||
std::stringstream ss;
|
||||
ss << "GS" << std::setw(4) << std::max(std::min(static_cast<int>(body_length_), static_cast<int>(max_body_length)), 0);
|
||||
std::copy_n(ss.str().c_str(), header_length + 1, header);
|
||||
std::copy_n(header, header_length, data_.data());
|
||||
std::string header = ss.str();
|
||||
header.resize(header_length, ' ');
|
||||
std::copy(header.begin(), header.end(), data_.begin());
|
||||
}
|
||||
|
||||
private:
|
||||
@ -639,7 +647,7 @@ private:
|
||||
inline void join(const std::shared_ptr<RtcmListener>& participant)
|
||||
{
|
||||
participants_.insert(participant);
|
||||
for (auto msg : recent_msgs_)
|
||||
for (const auto& msg : recent_msgs_)
|
||||
{
|
||||
participant->deliver(msg);
|
||||
}
|
||||
@ -802,7 +810,7 @@ private:
|
||||
inline void write(const Rtcm_Message& msg)
|
||||
{
|
||||
io_context_.post(
|
||||
[this, msg]() {
|
||||
[this, &msg]() {
|
||||
bool write_in_progress = !write_msgs_.empty();
|
||||
write_msgs_.push_back(msg);
|
||||
if (!write_in_progress)
|
||||
|
@ -49,16 +49,16 @@
|
||||
using namespace std;
|
||||
|
||||
Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
|
||||
const Pvt_Conf &conf,
|
||||
const std::string &dump_filename,
|
||||
uint32_t type_of_rx,
|
||||
bool flag_dump_to_file,
|
||||
bool flag_dump_to_mat,
|
||||
Pvt_Conf conf) : d_dump_filename(dump_filename),
|
||||
d_rtk(rtk),
|
||||
d_conf(std::move(conf)),
|
||||
d_type_of_rx(type_of_rx),
|
||||
d_flag_dump_enabled(flag_dump_to_file),
|
||||
d_flag_dump_mat_enabled(flag_dump_to_mat)
|
||||
bool flag_dump_to_mat) : d_dump_filename(dump_filename),
|
||||
d_rtk(rtk),
|
||||
d_conf(conf),
|
||||
d_type_of_rx(type_of_rx),
|
||||
d_flag_dump_enabled(flag_dump_to_file),
|
||||
d_flag_dump_mat_enabled(flag_dump_to_mat)
|
||||
{
|
||||
// TODO: temporal VTL config parameters are hardcoded here. Move it to PVT adapter config (javi)
|
||||
Vtl_Conf new_vtl_conf;
|
||||
@ -67,9 +67,6 @@ Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
|
||||
vtl_engine.configure(new_vtl_conf);
|
||||
vtl_engine.reset();
|
||||
|
||||
|
||||
this->set_averaging_flag(false);
|
||||
|
||||
// see freq index at src/algorithms/libs/rtklib/rtklib_rtkcmn.cc
|
||||
// function: satwavelen
|
||||
d_rtklib_freq_index[0] = 0;
|
||||
@ -142,6 +139,10 @@ Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
|
||||
d_rtklib_band_index["E6"] = 1;
|
||||
d_rtklib_freq_index[1] = 3;
|
||||
break;
|
||||
case 108: // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
|
||||
d_rtklib_band_index["E6"] = 2;
|
||||
d_rtklib_freq_index[2] = 3;
|
||||
break;
|
||||
}
|
||||
// auto empty_map = std::map < int, HAS_obs_corrections >> ();
|
||||
// d_has_obs_corr_map["L1 C/A"] = empty_map;
|
||||
@ -1198,8 +1199,7 @@ void Rtklib_Solver::get_current_has_obs_correction(const std::string &signal, ui
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging, bool enable_vtl, bool close_vtl_loop)
|
||||
bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, double kf_update_interval_s, bool flag_averaging, bool enable_vtl, bool close_vtl_loop)
|
||||
{
|
||||
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;
|
||||
std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
|
||||
@ -1210,8 +1210,6 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
|
||||
const Glonass_Gnav_Utc_Model &gnav_utc = this->glonass_gnav_utc_model;
|
||||
|
||||
this->set_averaging_flag(flag_averaging);
|
||||
|
||||
// ********************************************************************************
|
||||
// ****** PREPARE THE DATA (SV EPHEMERIS AND OBSERVATIONS) ************************
|
||||
// ********************************************************************************
|
||||
@ -1813,7 +1811,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
this->set_num_valid_observations(0);
|
||||
if (d_conf.enable_pvt_kf == true)
|
||||
{
|
||||
d_pvt_kf.initialized = false;
|
||||
d_pvt_kf.reset_Kf();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1855,14 +1853,14 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
|
||||
if (d_conf.enable_pvt_kf == true)
|
||||
{
|
||||
if (d_pvt_kf.initialized == false)
|
||||
if (d_pvt_kf.is_initialized() == false)
|
||||
{
|
||||
arma::vec p = {pvt_sol.rr[0], pvt_sol.rr[1], pvt_sol.rr[2]};
|
||||
arma::vec v = {pvt_sol.rr[3], pvt_sol.rr[4], pvt_sol.rr[5]};
|
||||
|
||||
d_pvt_kf.init_kf(p,
|
||||
d_pvt_kf.init_Kf(p,
|
||||
v,
|
||||
d_conf.observable_interval_ms / 1000.0,
|
||||
kf_update_interval_s,
|
||||
d_conf.measures_ecef_pos_sd_m,
|
||||
d_conf.measures_ecef_vel_sd_ms,
|
||||
d_conf.system_ecef_pos_sd_m,
|
||||
@ -1873,7 +1871,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
arma::vec p = {pvt_sol.rr[0], pvt_sol.rr[1], pvt_sol.rr[2]};
|
||||
arma::vec v = {pvt_sol.rr[3], pvt_sol.rr[4], pvt_sol.rr[5]};
|
||||
d_pvt_kf.run_Kf(p, v);
|
||||
d_pvt_kf.get_pvt(p, v);
|
||||
d_pvt_kf.get_pv_Kf(p, v);
|
||||
pvt_sol.rr[0] = p[0]; // [m]
|
||||
pvt_sol.rr[1] = p[1]; // [m]
|
||||
pvt_sol.rr[2] = p[2]; // [m]
|
||||
@ -2000,7 +1998,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
ecef2pos(pvt_sol.rr, pos.data());
|
||||
ecef2enu(pos.data(), &pvt_sol.rr[3], enuv.data());
|
||||
this->set_speed_over_ground(norm_rtk(enuv.data(), 2));
|
||||
double new_cog;
|
||||
double new_cog = -9999.0; // COG not estimated due to insuficient velocity
|
||||
if (ground_speed_ms >= 1.0)
|
||||
{
|
||||
new_cog = atan2(enuv[0], enuv[1]) * R2D;
|
||||
@ -2082,12 +2080,41 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
|
||||
this->set_rx_vel({enuv[0], enuv[1], enuv[2]});
|
||||
|
||||
// ENU vel [m/s]
|
||||
d_monitor_pvt.vel_e = enuv[0];
|
||||
d_monitor_pvt.vel_n = enuv[1];
|
||||
d_monitor_pvt.vel_u = enuv[2];
|
||||
|
||||
// Course Over Ground (cog) [deg]
|
||||
d_monitor_pvt.cog = new_cog;
|
||||
|
||||
// Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not avaliable
|
||||
if (d_has_obs_corr_map.empty())
|
||||
{
|
||||
d_monitor_pvt.galhas_status = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_monitor_pvt.galhas_status = 1;
|
||||
}
|
||||
|
||||
const double clock_drift_ppm = pvt_sol.dtr[5] / SPEED_OF_LIGHT_M_S * 1e6;
|
||||
|
||||
this->set_clock_drift_ppm(clock_drift_ppm);
|
||||
// User clock drift [ppm]
|
||||
d_monitor_pvt.user_clk_drift_ppm = clock_drift_ppm;
|
||||
|
||||
// write UTC time string
|
||||
|
||||
// Use a facet to display time in a custom format (only hour and minutes).
|
||||
auto *facet = new boost::posix_time::time_facet();
|
||||
facet->format("%Y-%m-%dT%H:%M:%S%F");
|
||||
std::stringstream stream;
|
||||
stream.imbue(std::locale(std::locale::classic(), facet));
|
||||
stream << p_time;
|
||||
stream << 'Z';
|
||||
d_monitor_pvt.utc_time = stream.str();
|
||||
|
||||
// ######## LOG FILE #########
|
||||
if (d_flag_dump_enabled == true)
|
||||
{
|
||||
|
@ -84,14 +84,15 @@ class Rtklib_Solver : public Pvt_Solution
|
||||
{
|
||||
public:
|
||||
Rtklib_Solver(const rtk_t& rtk,
|
||||
const Pvt_Conf& conf,
|
||||
const std::string& dump_filename,
|
||||
uint32_t type_of_rx,
|
||||
bool flag_dump_to_file,
|
||||
bool flag_dump_to_mat,
|
||||
Pvt_Conf conf);
|
||||
bool flag_dump_to_mat);
|
||||
|
||||
~Rtklib_Solver();
|
||||
|
||||
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging, bool enable_vtl, bool close_vtl_loop);
|
||||
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, double kf_update_interval_s, bool flag_averaging, bool enable_vtl, bool close_vtl_loop);
|
||||
|
||||
Vtl_Data vtl_data;
|
||||
|
||||
|
@ -112,6 +112,13 @@ public:
|
||||
monitor_.set_hdop(monitor->hdop);
|
||||
monitor_.set_vdop(monitor->vdop);
|
||||
monitor_.set_user_clk_drift_ppm(monitor->user_clk_drift_ppm);
|
||||
monitor_.set_utc_time(monitor->utc_time);
|
||||
monitor_.set_vel_e(monitor->vel_e);
|
||||
monitor_.set_vel_n(monitor->vel_n);
|
||||
monitor_.set_vel_u(monitor->vel_u);
|
||||
monitor_.set_cog(monitor->cog);
|
||||
monitor_.set_galhas_status(monitor->galhas_status);
|
||||
monitor_.set_geohash(monitor->geohash);
|
||||
|
||||
monitor_.SerializeToString(&data);
|
||||
return data;
|
||||
@ -150,6 +157,13 @@ public:
|
||||
monitor.hdop = mon.hdop();
|
||||
monitor.vdop = mon.vdop();
|
||||
monitor.user_clk_drift_ppm = mon.user_clk_drift_ppm();
|
||||
monitor.utc_time = mon.utc_time();
|
||||
monitor.vel_e = mon.vel_e();
|
||||
monitor.vel_n = mon.vel_n();
|
||||
monitor.vel_u = mon.vel_u();
|
||||
monitor.cog = mon.cog();
|
||||
monitor.galhas_status = mon.galhas_status();
|
||||
monitor.geohash = mon.geohash();
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -96,8 +97,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,8 +96,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -92,8 +93,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,8 +96,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -44,7 +44,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
out_streams_(out_streams),
|
||||
acquire_pilot_(configuration->property(role + ".acquire_pilot", false))
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GALILEO_E1_CODE_CHIP_RATE_CPS, GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GALILEO_E1_CODE_CHIP_RATE_CPS, GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -121,8 +122,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -181,9 +182,9 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t fpga_downsampling_factor = 4; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 0; // L1/E1 band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 4;
|
||||
static const uint32_t fpga_buff_num = 0; // L1/E1 band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,8 +94,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,9 +94,10 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,9 +94,10 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of TONG algorithm
|
||||
*/
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,8 +94,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -86,8 +87,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -43,7 +43,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
acq_pilot_(configuration->property(role + ".acquire_pilot", false)),
|
||||
acq_iq_(configuration->property(role + ".acquire_iq", false))
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GALILEO_E5A_CODE_CHIP_RATE_CPS, GALILEO_E5A_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GALILEO_E5A_CODE_CHIP_RATE_CPS, GALILEO_E5A_CODE_LENGTH_CHIPS);
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -121,8 +122,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -188,9 +189,9 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t fpga_downsampling_factor = 1; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 1; // L5/E5a band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 1;
|
||||
static const uint32_t fpga_buff_num = 1; // L5/E5a band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -117,8 +118,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -43,7 +43,7 @@ GalileoE5bPcpsAcquisitionFpga::GalileoE5bPcpsAcquisitionFpga(const Configuration
|
||||
acq_pilot_(configuration->property(role + ".acquire_pilot", false)),
|
||||
acq_iq_(configuration->property(role + ".acquire_iq", false))
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GALILEO_E5B_CODE_CHIP_RATE_CPS, GALILEO_E5B_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role_, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GALILEO_E5B_CODE_CHIP_RATE_CPS, GALILEO_E5B_CODE_LENGTH_CHIPS);
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
acq_parameters_.doppler_max = FLAGS_doppler_max;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -120,8 +121,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -187,9 +188,9 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t fpga_downsampling_factor = 1; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 1; // E5b band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 1;
|
||||
static const uint32_t fpga_buff_num = 1; // E5b band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,8 +96,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -97,8 +98,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -96,8 +97,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* Classes for GNSS signal acquisition
|
||||
@ -101,8 +102,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -55,7 +55,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
acq_parameters.fs_in = fs_in_;
|
||||
acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(acq_parameters.fs_in)));
|
||||
acq_parameters.dump = dump_;
|
||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -95,8 +96,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -43,7 +43,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GPS_L1_CA_CODE_RATE_CPS, GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GPS_L1_CA_CODE_RATE_CPS, GPS_L1_CA_CODE_LENGTH_CHIPS);
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -122,8 +123,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -185,10 +186,9 @@ public:
|
||||
|
||||
private:
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
|
||||
static const uint32_t fpga_downsampling_factor = 4; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 0; // L1/E1 band
|
||||
static const uint32_t fpga_blk_exp = 10; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 4;
|
||||
static const uint32_t fpga_buff_num = 0; // L1/E1 band
|
||||
static const uint32_t fpga_blk_exp = 10; // default block exponent
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
|
@ -46,7 +46,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
{
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
|
||||
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
|
||||
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
|
||||
int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -94,8 +95,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -92,8 +93,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -99,7 +99,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
max_dwells_ = 2;
|
||||
}
|
||||
|
||||
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
|
||||
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
|
||||
|
||||
bool enable_monitor_output = configuration_->property("AcquisitionMonitor.enable_monitor", false);
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -95,8 +96,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -61,7 +61,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
|
||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
|
||||
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,8 +94,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -97,8 +98,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -43,7 +43,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GPS_L2_M_CODE_RATE_CPS, GPS_L2_M_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GPS_L2_M_CODE_RATE_CPS, GPS_L2_M_CODE_LENGTH_CHIPS);
|
||||
|
||||
LOG(INFO) << "role " << role;
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for weak_ptr
|
||||
#include <string> // for string
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -97,8 +98,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -149,9 +150,9 @@ public:
|
||||
void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{};
|
||||
|
||||
private:
|
||||
static const uint32_t fpga_downsampling_factor = 4; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 0; // L2 band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 1;
|
||||
static const uint32_t fpga_buff_num = 0; // L2 band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
static const uint32_t QUANT_BITS_LOCAL_CODE = 16;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -96,8 +97,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -44,7 +44,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_downsampling_factor, fpga_buff_num, fpga_blk_exp, GPS_L5I_CODE_RATE_CPS, GPS_L5I_CODE_LENGTH_CHIPS);
|
||||
acq_parameters_.SetFromConfiguration(configuration, role, fpga_buff_num, fpga_blk_exp, downsampling_factor_default, GPS_L5I_CODE_RATE_CPS, GPS_L5I_CODE_LENGTH_CHIPS);
|
||||
|
||||
LOG(INFO) << "role " << role;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -124,8 +125,8 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -185,10 +186,9 @@ public:
|
||||
|
||||
private:
|
||||
static const uint32_t NUM_PRNs = 32;
|
||||
|
||||
static const uint32_t fpga_downsampling_factor = 1; // downampling factor in the FPGA
|
||||
static const uint32_t fpga_buff_num = 1; // L5/E5a band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
static const uint32_t downsampling_factor_default = 1;
|
||||
static const uint32_t fpga_buff_num = 1; // L5/E5a band
|
||||
static const uint32_t fpga_blk_exp = 13; // default block exponent
|
||||
|
||||
// the following flags are FPGA-specific and they are using arrange the values of the fft of the local code in the way the FPGA
|
||||
// expects. This arrangement is done in the initialisation to avoid consuming unnecessary clock cycles during tracking.
|
||||
|
@ -101,6 +101,14 @@ if(ENABLE_OPENCL)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VOLK_VERSION)
|
||||
if(VOLK_VERSION VERSION_GREATER 3.0.99)
|
||||
target_compile_definitions(acquisition_gr_blocks
|
||||
PRIVATE -DVOLK_EQUAL_OR_GREATER_31=1
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_gr_blocks
|
||||
|
@ -184,10 +184,16 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
|
||||
if (d_sampled_ms > 1)
|
||||
{
|
||||
// DATA CODE B: First replica is inverted (0,1,1)
|
||||
#if VOLK_EQUAL_OR_GREATER_31
|
||||
auto minus_one = gr_complex(-1, 0);
|
||||
volk_32fc_s32fc_multiply2_32fc(&(d_fft_if->get_inbuf())[0],
|
||||
&codeI[0], &minus_one,
|
||||
d_samples_per_code);
|
||||
#else
|
||||
volk_32fc_s32fc_multiply_32fc(&(d_fft_if->get_inbuf())[0],
|
||||
&codeI[0], gr_complex(-1, 0),
|
||||
d_samples_per_code);
|
||||
|
||||
#endif
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
// Conjugate the local code
|
||||
@ -196,9 +202,16 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_local_code(std::complex<f
|
||||
if (d_both_signal_components == true)
|
||||
{
|
||||
// PILOT CODE B: First replica is inverted (0,1,1)
|
||||
#if VOLK_EQUAL_OR_GREATER_31
|
||||
auto minus_one = gr_complex(-1, 0);
|
||||
volk_32fc_s32fc_multiply2_32fc(&(d_fft_if->get_inbuf())[0],
|
||||
&codeQ[0], &minus_one,
|
||||
d_samples_per_code);
|
||||
#else
|
||||
volk_32fc_s32fc_multiply_32fc(&(d_fft_if->get_inbuf())[0],
|
||||
&codeQ[0], gr_complex(-1, 0),
|
||||
d_samples_per_code);
|
||||
#endif
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
// Conjugate the local code
|
||||
@ -613,15 +626,15 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
d_CAF_vector[doppler_index] += d_CAF_vector_I[i] * (1.0F - weighting_factor * static_cast<float>((doppler_index - i)));
|
||||
}
|
||||
d_CAF_vector[doppler_index] /= static_cast<float>(1.0F + static_cast<float>(CAF_bins_half + doppler_index) - weighting_factor * static_cast<float>(CAF_bins_half) * ((static_cast<float>(CAF_bins_half) + 1.0F) / 2.0F) - weighting_factor * static_cast<float>(doppler_index) * (static_cast<float>(doppler_index) + 1.0F) / 2.0F); // triangles = [n*(n+1)/2]
|
||||
d_CAF_vector[doppler_index] /= 1.0F + static_cast<float>(CAF_bins_half + doppler_index) - weighting_factor * static_cast<float>(CAF_bins_half) * ((static_cast<float>(CAF_bins_half) + 1.0F) / 2.0F) - weighting_factor * static_cast<float>(doppler_index) * (static_cast<float>(doppler_index) + 1.0F) / 2.0F; // triangles = [n*(n+1)/2]
|
||||
if (d_both_signal_components)
|
||||
{
|
||||
accum[0] = 0;
|
||||
for (int i = 0; i < CAF_bins_half + doppler_index + 1; i++)
|
||||
{
|
||||
accum[0] += static_cast<float>(d_CAF_vector_Q[i] * (1.0F - weighting_factor * static_cast<float>(abs(doppler_index - i))));
|
||||
accum[0] += d_CAF_vector_Q[i] * (1.0F - weighting_factor * static_cast<float>(abs(doppler_index - i)));
|
||||
}
|
||||
accum[0] /= static_cast<float>(1.0F + static_cast<float>(CAF_bins_half + doppler_index) - weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F - weighting_factor * static_cast<float>(doppler_index) * static_cast<float>(doppler_index + 1) / 2.0F); // triangles = [n*(n+1)/2]
|
||||
accum[0] /= 1.0F + static_cast<float>(CAF_bins_half + doppler_index) - weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F - weighting_factor * static_cast<float>(doppler_index) * static_cast<float>(doppler_index + 1) / 2.0F; // triangles = [n*(n+1)/2]
|
||||
d_CAF_vector[doppler_index] += accum[0];
|
||||
}
|
||||
}
|
||||
@ -629,19 +642,19 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
for (int doppler_index = CAF_bins_half; doppler_index < d_num_doppler_bins - CAF_bins_half; doppler_index++)
|
||||
{
|
||||
d_CAF_vector[doppler_index] = 0;
|
||||
for (int i = doppler_index - CAF_bins_half; i < static_cast<int>(doppler_index + CAF_bins_half + 1); i++)
|
||||
for (int i = doppler_index - CAF_bins_half; i < doppler_index + CAF_bins_half + 1; i++)
|
||||
{
|
||||
d_CAF_vector[doppler_index] += d_CAF_vector_I[i] * (1.0F - weighting_factor * static_cast<float>((doppler_index - i)));
|
||||
}
|
||||
d_CAF_vector[doppler_index] /= static_cast<float>(1.0F + 2.0F * static_cast<float>(CAF_bins_half) - 2.0F * weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F);
|
||||
d_CAF_vector[doppler_index] /= 1.0F + 2.0F * static_cast<float>(CAF_bins_half) - 2.0F * weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F;
|
||||
if (d_both_signal_components)
|
||||
{
|
||||
accum[0] = 0;
|
||||
for (int i = doppler_index - CAF_bins_half; i < static_cast<int>(doppler_index + CAF_bins_half + 1); i++)
|
||||
for (int i = doppler_index - CAF_bins_half; i < doppler_index + CAF_bins_half + 1; i++)
|
||||
{
|
||||
accum[0] += static_cast<float>(d_CAF_vector_Q[i] * (1 - weighting_factor * static_cast<float>((doppler_index - i))));
|
||||
accum[0] += d_CAF_vector_Q[i] * (1 - weighting_factor * static_cast<float>((doppler_index - i)));
|
||||
}
|
||||
accum[0] /= static_cast<float>(1.0F + 2.0F * static_cast<float>(CAF_bins_half) - 2.0F * weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F);
|
||||
accum[0] /= 1.0F + 2.0F * static_cast<float>(CAF_bins_half) - 2.0F * weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1) / 2.0F;
|
||||
d_CAF_vector[doppler_index] += accum[0];
|
||||
}
|
||||
}
|
||||
@ -653,13 +666,13 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
{
|
||||
d_CAF_vector[doppler_index] += d_CAF_vector_I[i] * (1.0F - weighting_factor * static_cast<float>(abs(doppler_index - i)));
|
||||
}
|
||||
d_CAF_vector[doppler_index] /= static_cast<float>(1.0F + static_cast<float>(CAF_bins_half) + static_cast<float>(d_num_doppler_bins - doppler_index - 1) - weighting_factor * static_cast<float>(CAF_bins_half) * (static_cast<float>(CAF_bins_half) + 1.0F) / 2.0F - weighting_factor * static_cast<float>(d_num_doppler_bins - doppler_index - 1) * static_cast<float>(d_num_doppler_bins - doppler_index) / 2.0F);
|
||||
d_CAF_vector[doppler_index] /= 1.0F + static_cast<float>(CAF_bins_half) + static_cast<float>(d_num_doppler_bins - doppler_index - 1) - weighting_factor * static_cast<float>(CAF_bins_half) * (static_cast<float>(CAF_bins_half) + 1.0F) / 2.0F - weighting_factor * (d_num_doppler_bins - doppler_index - 1) * static_cast<float>(d_num_doppler_bins - doppler_index) / 2.0F;
|
||||
if (d_both_signal_components)
|
||||
{
|
||||
accum[0] = 0;
|
||||
for (int i = doppler_index - CAF_bins_half; i < static_cast<int>(d_num_doppler_bins); i++)
|
||||
{
|
||||
accum[0] += static_cast<float>(d_CAF_vector_Q[i] * (1.0F - weighting_factor * static_cast<float>(abs(doppler_index - i))));
|
||||
accum[0] += d_CAF_vector_Q[i] * (1.0F - weighting_factor * static_cast<float>(abs(doppler_index - i)));
|
||||
}
|
||||
accum[0] /= static_cast<float>(1.0F + static_cast<float>(CAF_bins_half) + static_cast<float>(d_num_doppler_bins - doppler_index - 1) - weighting_factor * static_cast<float>(CAF_bins_half) * static_cast<float>(CAF_bins_half + 1.0) / 2.0 - weighting_factor * static_cast<float>(d_num_doppler_bins - doppler_index - 1) * static_cast<float>(d_num_doppler_bins - doppler_index) / 2.0);
|
||||
d_CAF_vector[doppler_index] += accum[0];
|
||||
@ -730,7 +743,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
return_value = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -124,10 +124,16 @@ void galileo_pcps_8ms_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
volk_32fc_conjugate_32fc(d_fft_code_A.data(), d_fft_if->get_outbuf(), d_fft_size);
|
||||
|
||||
// code B: two replicas of a primary code; the second replica is inverted.
|
||||
#if VOLK_EQUAL_OR_GREATER_31
|
||||
auto minus_one = gr_complex(-1, 0);
|
||||
volk_32fc_s32fc_multiply2_32fc(&(d_fft_if->get_inbuf())[d_samples_per_code],
|
||||
&code[d_samples_per_code], &minus_one,
|
||||
d_samples_per_code);
|
||||
#else
|
||||
volk_32fc_s32fc_multiply_32fc(&(d_fft_if->get_inbuf())[d_samples_per_code],
|
||||
&code[d_samples_per_code], gr_complex(-1, 0),
|
||||
d_samples_per_code);
|
||||
|
||||
#endif
|
||||
d_fft_if->execute(); // We need the FFT of local code
|
||||
|
||||
// Conjugate the local code
|
||||
@ -381,7 +387,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void pcps_acquisition::init()
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
|
||||
d_num_doppler_bins = static_cast<uint32_t>(std::ceil(static_cast<double>(static_cast<int32_t>(d_acq_parameters.doppler_max) - static_cast<int32_t>(-d_acq_parameters.doppler_max)) / static_cast<double>(d_doppler_step)));
|
||||
d_num_doppler_bins = static_cast<uint32_t>(std::ceil(static_cast<double>(2 * d_acq_parameters.doppler_max) / static_cast<double>(d_doppler_step)));
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
if (d_grid_doppler_wipeoffs.empty())
|
||||
@ -872,6 +872,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
// Called by gnuradio to enable drivers, etc for i/o devices.
|
||||
bool pcps_acquisition::start()
|
||||
{
|
||||
gr::thread::scoped_lock lk(d_setlock);
|
||||
d_sample_counter = 0ULL;
|
||||
calculate_threshold();
|
||||
return true;
|
||||
@ -1018,7 +1019,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
{
|
||||
Gnss_Synchro current_synchro_data = d_monitor_queue.front();
|
||||
d_monitor_queue.pop();
|
||||
*out[i] = current_synchro_data;
|
||||
*out[i] = std::move(current_synchro_data);
|
||||
}
|
||||
return num_gnss_synchro_objects;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
|
||||
{
|
||||
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
|
||||
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
|
||||
d_dump_filename = dump_filename_;
|
||||
d_dump_filename = std::move(dump_filename_);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -566,7 +566,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
return_value = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
break;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for string
|
||||
#include <utility> // for move
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -118,7 +119,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm)
|
||||
{
|
||||
d_channel_fsm = channel_fsm;
|
||||
d_channel_fsm = std::move(channel_fsm);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -427,7 +427,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
break;
|
||||
|
@ -403,7 +403,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
auto** out = reinterpret_cast<Gnss_Synchro**>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
current_synchro_data = *d_gnss_synchro;
|
||||
*out[0] = current_synchro_data;
|
||||
*out[0] = std::move(current_synchro_data);
|
||||
noutput_items = 1; // Number of Gnss_Synchro objects produced
|
||||
}
|
||||
|
||||
|
@ -21,9 +21,10 @@
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
void Acq_Conf_Fpga::SetFromConfiguration(const ConfigurationInterface *configuration,
|
||||
const std::string &role, uint32_t downs_factor, uint32_t sel_queue_fpga, uint32_t blk_exp, double chip_rate, double code_length_chips)
|
||||
const std::string &role, uint32_t sel_queue_fpga, uint32_t blk_exp, uint32_t downsampling_factor_default, double chip_rate, double code_length_chips)
|
||||
{
|
||||
// sampling frequency
|
||||
const int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", fs_in);
|
||||
@ -33,7 +34,8 @@ void Acq_Conf_Fpga::SetFromConfiguration(const ConfigurationInterface *configura
|
||||
doppler_max = configuration->property(role + ".doppler_max", doppler_max);
|
||||
|
||||
// downsampling factor
|
||||
uint32_t downsampling_factor = configuration->property(role + ".downsampling_factor", downs_factor);
|
||||
downsampling_factor = configuration->property(role + ".downsampling_factor", downsampling_factor_default);
|
||||
|
||||
fs_in = fs_in / downsampling_factor;
|
||||
|
||||
// code length in samples
|
||||
@ -57,7 +59,7 @@ void Acq_Conf_Fpga::SetFromConfiguration(const ConfigurationInterface *configura
|
||||
std::cout << "Cannot find the FPGA uio device file corresponding to device name " << acquisition_device_name << std::endl;
|
||||
throw std::exception();
|
||||
}
|
||||
device_name = device_io_name;
|
||||
device_name = std::move(device_io_name);
|
||||
|
||||
// exclusion limit
|
||||
excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / chip_rate) * static_cast<float>(fs_in)));
|
||||
|
@ -35,7 +35,7 @@ class Acq_Conf_Fpga
|
||||
public:
|
||||
Acq_Conf_Fpga() = default;
|
||||
|
||||
void SetFromConfiguration(const ConfigurationInterface *configuration, const std::string &role, uint32_t downs_factor, uint32_t sel_queue_fpga, uint32_t blk_exp, double chip_rate, double code_length_chips);
|
||||
void SetFromConfiguration(const ConfigurationInterface *configuration, const std::string &role, uint32_t sel_queue_fpga, uint32_t blk_exp, uint32_t downsampling_factor_default, double chip_rate, double code_length_chips);
|
||||
|
||||
/* PCPS Acquisition configuration */
|
||||
std::string device_name = "uio0";
|
||||
|
@ -212,6 +212,13 @@ gr::basic_block_sptr Channel::get_right_block()
|
||||
}
|
||||
|
||||
|
||||
Gnss_Signal Channel::get_signal()
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx_);
|
||||
return gnss_signal_;
|
||||
}
|
||||
|
||||
|
||||
void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mx_);
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
inline std::string role() override { return role_; }
|
||||
inline std::string implementation() override { return std::string("Channel"); } //!< Returns "Channel"
|
||||
inline size_t item_size() override { return 2 * sizeof(float); }
|
||||
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
|
||||
Gnss_Signal get_signal() override;
|
||||
void start_acquisition() override; //!< Start the State Machine
|
||||
void stop_channel() override; //!< Stop the State Machine
|
||||
void set_signal(const Gnss_Signal& gnss_signal_) override; //!< Sets the channel GNSS signal
|
||||
|
@ -73,7 +73,7 @@ void ArraySignalConditioner::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
// data_type_adapt_->disconnect(top_block);
|
||||
in_filt_->disconnect(top_block);
|
||||
res_->disconnect(top_block);
|
||||
res_->disconnect(std::move(top_block));
|
||||
|
||||
connected_ = false;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void SignalConditioner::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
data_type_adapt_->disconnect(top_block);
|
||||
in_filt_->disconnect(top_block);
|
||||
res_->disconnect(top_block);
|
||||
res_->disconnect(std::move(top_block));
|
||||
|
||||
connected_ = false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ ByteToShort::ByteToShort(const ConfigurationInterface* configuration,
|
||||
unsigned int out_streams) : role_(std::move(role)),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams),
|
||||
dump_(configuration->property(role + ".dump", false))
|
||||
dump_(configuration->property(role_ + ".dump", false))
|
||||
{
|
||||
const std::string default_input_item_type("byte");
|
||||
const std::string default_output_item_type("short");
|
||||
|
@ -32,7 +32,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
|
||||
: role_(std::move(role)),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams),
|
||||
dump_(configuration->property(role + ".dump", false))
|
||||
dump_(configuration->property(role_ + ".dump", false))
|
||||
{
|
||||
const std::string default_input_item_type("gr_complex");
|
||||
const std::string default_output_item_type("gr_complex");
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
uint32_t gps_l2c_m_shift(uint32_t x)
|
||||
{
|
||||
return static_cast<uint32_t>((x >> 1U) xor ((x & 1U) * 0445112474U));
|
||||
return ((x >> 1U) xor ((x & 1U) * 0445112474U));
|
||||
}
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user