mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-12 11:10:33 +00:00
bds_b3i: merging new changes, fixing small bugs
This commit is contained in:
commit
8782fcba69
131
.clang-tidy
131
.clang-tidy
@ -1,3 +1,130 @@
|
||||
---
|
||||
Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-inefficient-algorithm,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-container-size-empty,readability-named-parameter,readability-non-const-parameter,readability-string-compare'
|
||||
HeaderFilterRegex: '.*'
|
||||
Checks: '-*,
|
||||
boost-use-to-string,
|
||||
cert-dcl21-cpp,
|
||||
cert-dcl58-cpp,
|
||||
cert-env33-c,
|
||||
cert-err52-cpp,
|
||||
cert-err60-cpp,
|
||||
cert-flp30-c,
|
||||
clang-analyzer-cplusplus*,
|
||||
cppcoreguidelines-pro-type-static-cast-downcast,
|
||||
cppcoreguidelines-slicing,
|
||||
google-build-namespaces,
|
||||
google-runtime-int,
|
||||
misc-misplaced-const,
|
||||
misc-new-delete-overloads,
|
||||
misc-non-copyable-objects,
|
||||
misc-static-assert,
|
||||
misc-throw-by-value-catch-by-reference,
|
||||
misc-uniqueptr-reset-release,
|
||||
misc-unused-using-decls,
|
||||
modernize-loop-convert,
|
||||
modernize-pass-by-value,
|
||||
modernize-raw-string-literal,
|
||||
modernize-use-auto,
|
||||
modernize-use-bool-literals,
|
||||
modernize-use-equals-default,
|
||||
modernize-use-equals-delete,
|
||||
modernize-use-noexcept,
|
||||
modernize-use-nullptr,
|
||||
performance-faster-string-find,
|
||||
performance-inefficient-algorithm,
|
||||
performance-move-const-arg,
|
||||
performance-type-promotion-in-math-fn,
|
||||
performance-unnecessary-copy-initialization,
|
||||
performance-unnecessary-value-param,
|
||||
readability-container-size-empty,
|
||||
readability-identifier-naming,
|
||||
readability-inconsistent-declaration-parameter-name,
|
||||
readability-named-parameter,
|
||||
readability-non-const-parameter,
|
||||
readability-string-compare'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: 'file'
|
||||
CheckOptions:
|
||||
- key: google-build-namespaces.HeaderFileExtensions
|
||||
value: ',h'
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||
value: '10'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: google-runtime-int.SignedTypePrefix
|
||||
value: int
|
||||
- key: google-runtime-int.TypeSuffix
|
||||
value: _t
|
||||
- key: google-runtime-int.UnsignedTypePrefix
|
||||
value: uint
|
||||
- key: misc-throw-by-value-catch-by-reference.CheckThrowTemporaries
|
||||
value: '1'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
value: reasonable
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-pass-by-value.ValuesOnly
|
||||
value: '0'
|
||||
- key: modernize-raw-string-literal.ReplaceShorterLiterals
|
||||
value: '0'
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-auto.MinTypeNameLength
|
||||
value: '5'
|
||||
- key: modernize-use-auto.RemoveStars
|
||||
value: '0'
|
||||
- key: modernize-use-equals-default.IgnoreMacros
|
||||
value: '1'
|
||||
- key: modernize-use-noexcept.ReplacementString
|
||||
value: ''
|
||||
- key: modernize-use-noexcept.UseNoexceptFalse
|
||||
value: '1'
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: 'std::basic_string'
|
||||
- key: performance-move-const-arg.CheckTriviallyCopyableMove
|
||||
value: '1'
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-unnecessary-value-param.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-identifier-naming.AbstractClassCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.AbstractClassPrefix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.AbstractClassSuffix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: Camel_Snake_Case
|
||||
- key: readability-identifier-naming.ClassPrefix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.ClassSuffix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.GlobalConstantCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.GlobalConstantPrefix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.GlobalConstantSuffix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.IgnoreFailedSplit
|
||||
value: '0'
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: aNy_CasE
|
||||
- key: readability-identifier-naming.StructPrefix
|
||||
value: ''
|
||||
- key: readability-identifier-naming.StructSuffix
|
||||
value: ''
|
||||
- key: readability-inconsistent-declaration-parameter-name.IgnoreMacros
|
||||
value: '1'
|
||||
- key: readability-inconsistent-declaration-parameter-name.Strict
|
||||
value: '0'
|
||||
...
|
||||
|
242
CMakeLists.txt
242
CMakeLists.txt
@ -41,7 +41,7 @@ endif()
|
||||
|
||||
########################################################################
|
||||
# Determine optional blocks/libraries to be built (default: not built)
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ../'
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..'
|
||||
########################################################################
|
||||
# Support of optional RF front-ends
|
||||
option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON)
|
||||
@ -58,6 +58,9 @@ option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample
|
||||
option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF)
|
||||
option(ENABLE_GPROF "Enable the use of the GNU profiler tool 'gprof'" OFF)
|
||||
|
||||
# Code correctness
|
||||
option(ENABLE_CLANG_TIDY "Enable the use of clang-tidy when compiling" OFF)
|
||||
|
||||
# Acceleration
|
||||
option(ENABLE_PROFILING "Enable execution of volk_gnsssdr_profile at the end of the building" OFF)
|
||||
option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF)
|
||||
@ -407,6 +410,53 @@ endif()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Set C and C++ standard
|
||||
################################################################################
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
else()
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:-std=gnu11>")
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++11>")
|
||||
else()
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++14>")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if(OS_IS_MACOSX)
|
||||
if(CLANG_VERSION VERSION_LESS "600")
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++11>")
|
||||
else()
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++14>")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++11>")
|
||||
else()
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++14>")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Visibility
|
||||
# See https://gcc.gnu.org/wiki/Visibility
|
||||
if(POLICY CMP0053)
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
else()
|
||||
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
add_definitions(-fvisibility=hidden)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
################################################################################
|
||||
# Check if the compiler defines the architecture as ARM
|
||||
################################################################################
|
||||
@ -423,21 +473,25 @@ endif()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Check for availability of SSE
|
||||
################################################################################
|
||||
if(NOT ENABLE_GENERIC_ARCH)
|
||||
include(TestForSSE)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
# Find the POSIX thread (pthread) libraries
|
||||
################################################################################
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
# Workaround for CMake < 3.1
|
||||
find_package(Threads REQUIRED)
|
||||
set(THREAD_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
add_library(Threads::Threads SHARED IMPORTED)
|
||||
set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
set_property(TARGET Threads::Threads PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
|
||||
include(GNUInstallDirs)
|
||||
# Fix bug in Debian 8.11
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Debian")
|
||||
if(${LINUX_VER} VERSION_LESS 8.12)
|
||||
if(ARCH_64BITS)
|
||||
set(FIX_PTHREADS_LOCATION "x86_64-linux-gnu/")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set_property(TARGET Threads::Threads PROPERTY IMPORTED_LOCATION /usr/${CMAKE_INSTALL_LIBDIR}/${FIX_PTHREADS_LOCATION}${CMAKE_FIND_LIBRARY_PREFIXES}pthread${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
else()
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
@ -446,7 +500,6 @@ else()
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
endif()
|
||||
find_package(Threads REQUIRED)
|
||||
set(THREAD_LIBRARIES Threads::Threads)
|
||||
endif()
|
||||
|
||||
|
||||
@ -461,13 +514,13 @@ if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
|
||||
endif()
|
||||
if(GTEST_DIR)
|
||||
message(STATUS "Googletest root folder set at ${GTEST_DIR}")
|
||||
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR})
|
||||
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR} ${GTEST_DIR}/googletest)
|
||||
if(LIBGTEST_DEV_DIR)
|
||||
message(STATUS "Googletest has been found.")
|
||||
else()
|
||||
message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.")
|
||||
endif()
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/include)
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/googletest/include)
|
||||
else()
|
||||
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/googletest/googletest /usr/src/gtest /usr/include/gtest /opt/local/src/gtest-1.7.0)
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS /usr/include /opt/local/src/gtest-1.7.0/include)
|
||||
@ -1101,7 +1154,6 @@ endif()
|
||||
|
||||
if(NOT ENABLE_LOG)
|
||||
message(STATUS "Logging is not enabled")
|
||||
target_compile_definitions(Glog::glog PUBLIC -DGOOGLE_STRIP_LOG=1)
|
||||
endif()
|
||||
|
||||
|
||||
@ -1481,8 +1533,8 @@ endif()
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen found.")
|
||||
message(STATUS "You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.")
|
||||
message(STATUS "When done, point your browser to ${CMAKE_BINARY_DIR}/html/index.html")
|
||||
message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.")
|
||||
message(STATUS " When done, point your browser to ${CMAKE_BINARY_DIR}/html/index.html")
|
||||
set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
|
||||
file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir)
|
||||
@ -1504,7 +1556,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating API documentation with Doxygen." VERBATIM
|
||||
)
|
||||
if(LATEX_COMPILER)
|
||||
message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
add_custom_target(pdfmanual
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf
|
||||
@ -1514,7 +1566,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating PDF manual with Doxygen." VERBATIM
|
||||
)
|
||||
endif()
|
||||
message(STATUS "'${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.")
|
||||
message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc-clean' will clean the documentation.")
|
||||
add_custom_target(doc-clean
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/html
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/docs/latex
|
||||
@ -1552,7 +1604,7 @@ if(ENABLE_OPENCL)
|
||||
else()
|
||||
if(OPENCL_FOUND)
|
||||
message(STATUS "OpenCL has been found and will be used by some processing blocks")
|
||||
message(STATUS "You can disable OpenCL use by doing 'cmake -DENABLE_OPENCL=OFF ../' ")
|
||||
message(STATUS " You can disable OpenCL use by doing 'cmake -DENABLE_OPENCL=OFF ..' ")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_GENERIC_ARCH)
|
||||
@ -1579,10 +1631,10 @@ endif()
|
||||
if(ENABLE_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_CUDA=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'")
|
||||
else()
|
||||
message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_CUDA=ON ../' to add support for GPU-based acceleration using CUDA.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1592,7 +1644,7 @@ endif()
|
||||
###############################################################################
|
||||
if(ENABLE_RAW_UDP)
|
||||
message(STATUS "High-optimized custom UDP IP packet source is enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'")
|
||||
find_package(PCAP)
|
||||
if(NOT PCAP_FOUND)
|
||||
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)")
|
||||
@ -1606,10 +1658,10 @@ endif()
|
||||
###############################################################################
|
||||
if(ENABLE_FPGA)
|
||||
message(STATUS "FPGA Acceleration will be enabled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_FPGA=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_FPGA=OFF ..'")
|
||||
else()
|
||||
message(STATUS "Fpga Acceleration will be not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_FPGA=ON ../' to add support for GPU-based acceleration using the FPGA.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_FPGA=ON ..' to add support for GPU-based acceleration using the FPGA.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1659,7 +1711,7 @@ if(ENABLE_OSMOSDR)
|
||||
find_package(GROSMOSDR)
|
||||
if(GROSMOSDR_FOUND)
|
||||
message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ..'")
|
||||
else()
|
||||
if(ENABLE_PACKAGING)
|
||||
message(WARNING "gr-osmosdr has not been found. Source blocks depending on it will NOT be built.")
|
||||
@ -1669,7 +1721,7 @@ if(ENABLE_OSMOSDR)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_OSMOSDR=ON ../' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1680,6 +1732,7 @@ endif()
|
||||
##############################################
|
||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
find_package(GRIIO)
|
||||
find_package(LIBIIO)
|
||||
endif()
|
||||
|
||||
|
||||
@ -1707,10 +1760,10 @@ endif()
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
message(STATUS "The Teleorbit Flexiband front-end source will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ..'")
|
||||
else()
|
||||
message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_FLEXIBAND=ON ../' to add support for the Teleorbit Flexiband front-end.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.")
|
||||
endif()
|
||||
if(ENABLE_FLEXIBAND)
|
||||
find_package(TELEORBIT)
|
||||
@ -1732,11 +1785,11 @@ if(GN3S_DRIVER)
|
||||
endif()
|
||||
if(ENABLE_GN3S)
|
||||
message(STATUS "The GN3S driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_GN3S=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'")
|
||||
find_package(GRGN3S QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional and experimental) GN3S driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_GN3S=ON ../' to add support for the GN3S dongle.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1754,11 +1807,11 @@ endif()
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
message(STATUS "CTTC's Antenna Array front-end driver will be compiled.")
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_ARRAY=OFF ../'")
|
||||
message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'")
|
||||
find_package(GRDBFCTTC QUIET)
|
||||
else()
|
||||
message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.")
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_ARRAY=ON ../' to add support for the CTTC experimental array front-end.")
|
||||
message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.")
|
||||
endif()
|
||||
|
||||
|
||||
@ -1770,11 +1823,11 @@ if(ENABLE_GPERFTOOLS)
|
||||
find_package(GPERFTOOLS)
|
||||
if(NOT GPERFTOOLS_FOUND)
|
||||
message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.")
|
||||
message(STATUS "Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS "You can install GPerftools from https://github.com/gperftools/gperftools")
|
||||
message(STATUS " Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS " You can install GPerftools from https://github.com/gperftools/gperftools")
|
||||
else()
|
||||
message(STATUS "GPerftools libraries found.")
|
||||
message(STATUS "Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.")
|
||||
message(STATUS " Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_GPERFTOOLS)
|
||||
@ -1782,10 +1835,10 @@ if(ENABLE_GPERFTOOLS)
|
||||
# See https://github.com/gperftools/gperftools/blob/master/README
|
||||
if(GPERFTOOLS_FOUND)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
|
||||
add_compile_options(-fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin")
|
||||
add_compile_options(-fno-builtin)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -1796,7 +1849,7 @@ endif()
|
||||
# GNU gprof (OPTIONAL) - https://sourceware.org/binutils/docs/gprof/
|
||||
########################################################################
|
||||
if(ENABLE_GPROF)
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -pg")
|
||||
add_compile_options(-pg)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
|
||||
endif()
|
||||
@ -1805,92 +1858,48 @@ endif()
|
||||
########################################################################
|
||||
# Set compiler flags
|
||||
########################################################################
|
||||
# Support of C++17 is still not possible due to pm_remez.h (solved in GNU Radio 3.8)
|
||||
# Enable C++14 support in GCC >= 6.1.1
|
||||
# Fallback to C++11 when using GCC < 6.1.1
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||
# Add warning flags
|
||||
# For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
set(cxx_warning_flags -Wall -Wextra)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.3"))
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${cxx_warning_flags}>")
|
||||
else()
|
||||
# if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||
# else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
||||
# set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
||||
# endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${cxx_warning_flags}>")
|
||||
endif()
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wall -Wextra") #Add warning flags: For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
endif()
|
||||
|
||||
# Support of C++17 is still not possible due to pm_remez.h (solved in GNU Radio 3.8)
|
||||
# Enable C++14 support in Clang >= 3.5.0 or AppleClang >= 600
|
||||
# Fallback to C++11 if older version
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if(OS_IS_MACOSX)
|
||||
# See https://trac.macports.org/wiki/XcodeVersionInfo for Apple Clang version equivalences
|
||||
if(CLANG_VERSION VERSION_LESS "600")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||
else()
|
||||
# if(CLANG_VERSION VERSION_LESS "900")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||
# else(CLANG_VERSION VERSION_LESS "900")
|
||||
# set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
||||
# endif(CLANG_VERSION VERSION_LESS "900")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11")
|
||||
else()
|
||||
# if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++14")
|
||||
# else(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
||||
# set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++17")
|
||||
# endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
|
||||
add_compile_options(-Wno-missing-field-initializers)
|
||||
endif()
|
||||
|
||||
if(OS_IS_MACOSX)
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) AND NOT WIN32)
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
add_compile_options(-Wno-psabi)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Processor-architecture related flags
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
if(NOT ARCH_COMPILER_FLAGS)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(OS_IS_MACOSX)
|
||||
set(ARCH_COMPILER_FLAGS "-march=corei7 -mfpmath=sse")
|
||||
else()
|
||||
if(NOT ${ENABLE_GENERIC_ARCH})
|
||||
if(IS_ARM) # ARM-specific options (https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(ARM_VERSION STREQUAL "arm")
|
||||
# Unknown arm version - try our best to detect
|
||||
set(ARCH_COMPILER_FLAGS "-mcpu=native")
|
||||
else()
|
||||
set(ARCH_COMPILER_FLAGS "-march=${ARM_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(ARCH_COMPILER_FLAGS "-march=native -mfpmath=sse")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(OS_IS_MACOSX)
|
||||
add_compile_options(-march=corei7 -mfpmath=sse)
|
||||
else()
|
||||
if(NOT ENABLE_GENERIC_ARCH)
|
||||
if(IS_ARM)
|
||||
# ARM-specific options
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(ARM_VERSION STREQUAL "arm")
|
||||
# Unknown arm version - try our best to detect
|
||||
add_compile_options(-mcpu=native)
|
||||
else()
|
||||
add_compile_options(-march=${ARM_VERSION})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-march=native -mfpmath=sse)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} ${ARCH_COMPILER_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS}")
|
||||
|
||||
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
# https://gcc.gnu.org/wiki/Visibility
|
||||
add_definitions(-fvisibility=hidden)
|
||||
endif()
|
||||
|
||||
|
||||
########################################################################
|
||||
@ -1907,7 +1916,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(STATUS "clang-tidy not found.")
|
||||
else()
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*")
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
message(STATUS " clang-tidy will be used in compilation. You can disable it with 'cmake -DENABLE_CLANG_TIDY=OFF ..'")
|
||||
else()
|
||||
message(STATUS " You can enable clang-tidy usage in compilation with 'cmake -DENABLE_CLANG_TIDY=ON ..'")
|
||||
endif()
|
||||
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-fix")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
endif()
|
||||
endif()
|
||||
|
10
README.md
10
README.md
@ -112,12 +112,12 @@ Once you have installed these packages, you can jump directly to [download the s
|
||||
|
||||
#### Arch Linux
|
||||
|
||||
If you are using Arch Linux (with base-devel group installed):
|
||||
If you are using Arch Linux:
|
||||
|
||||
~~~~~~
|
||||
$ pacman -S cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr \
|
||||
blas lapack gflags google-glog openssl pugixml python-mako python-six \
|
||||
libmatio libpcap gtest
|
||||
$ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \
|
||||
gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \
|
||||
python-mako python-six libmatio libpcap gtest
|
||||
~~~~~~
|
||||
|
||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||
@ -596,7 +596,7 @@ $ pip install six
|
||||
$ brew install openssl
|
||||
~~~~~~
|
||||
|
||||
In the last step, Homebrew installs OpenSSL but it does not link it into `/usr/local`. Thus, you must manually link it instead:
|
||||
In the last step, Homebrew installs OpenSSL but it does not link it to `/usr/local`. Thus, you must manually link it instead:
|
||||
|
||||
~~~~~~
|
||||
$ ln -s /usr/local/opt/openssl/include/openssl /usr/local/include
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -33,6 +33,12 @@
|
||||
# GPERFTOOLS_FOUND System has Gperftools libs/headers
|
||||
# GPERFTOOLS_LIBRARIES The Gperftools libraries (tcmalloc & profiler)
|
||||
# GPERFTOOLS_INCLUDE_DIR The location of Gperftools headers
|
||||
#
|
||||
# Provides the following imported targets:
|
||||
# Gperftools::tcmalloc
|
||||
# Gperftools::profiler
|
||||
# Gperftools::gperftools
|
||||
#
|
||||
|
||||
find_library(GPERFTOOLS_TCMALLOC
|
||||
NAMES tcmalloc
|
||||
@ -41,6 +47,8 @@ find_library(GPERFTOOLS_TCMALLOC
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
find_library(GPERFTOOLS_PROFILER
|
||||
@ -50,6 +58,8 @@ find_library(GPERFTOOLS_PROFILER
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
@ -59,6 +69,8 @@ find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
$ENV{GPERFTOOLS_ROOT}/lib
|
||||
${GPERFTOOLS_ROOT}/lib64
|
||||
$ENV{GPERFTOOLS_ROOT}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
find_path(GPERFTOOLS_INCLUDE_DIR
|
||||
@ -66,6 +78,7 @@ find_path(GPERFTOOLS_INCLUDE_DIR
|
||||
HINTS ${Gperftools_ROOT_DIR}/include
|
||||
${GPERFTOOLS_ROOT}/include
|
||||
$ENV{GPERFTOOLS_ROOT}/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
|
||||
@ -76,10 +89,42 @@ find_package_handle_standard_args(
|
||||
DEFAULT_MSG
|
||||
GPERFTOOLS_LIBRARIES
|
||||
GPERFTOOLS_INCLUDE_DIR
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
|
||||
)
|
||||
|
||||
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::tcmalloc)
|
||||
add_library(Gperftools::tcmalloc SHARED IMPORTED)
|
||||
set_target_properties(Gperftools::tcmalloc PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GPERFTOOLS_TCMALLOC}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_TCMALLOC}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::profiler)
|
||||
add_library(Gperftools::profiler SHARED IMPORTED)
|
||||
set_target_properties(Gperftools::profiler PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GPERFTOOLS_PROFILER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_PROFILER}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(GPERFTOOLS_FOUND AND NOT TARGET Gperftools::gperftools)
|
||||
add_library(Gperftools::gperftools SHARED IMPORTED)
|
||||
set_target_properties(Gperftools::gperftools PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GPERFTOOLS_TCMALLOC_AND_PROFILER}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPERFTOOLS_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES "${GPERFTOOLS_TCMALLOC_AND_PROFILER}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
Gperftools_ROOT_DIR
|
||||
GPERFTOOLS_TCMALLOC
|
||||
GPERFTOOLS_PROFILER
|
||||
GPERFTOOLS_TCMALLOC_AND_PROFILER
|
||||
|
@ -32,9 +32,12 @@ find_path(PUGIXML_INCLUDE_DIR
|
||||
PATHS ${PUGIXML_HOME}/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/local/include/pugixml-1.9
|
||||
/opt/local/include
|
||||
${PUGIXML_ROOT}/include
|
||||
$ENV{PUGIXML_ROOT}/include
|
||||
${PUGIXML_ROOT}/include/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
|
||||
)
|
||||
|
||||
find_library(PUGIXML_LIBRARY
|
||||
@ -51,6 +54,7 @@ find_library(PUGIXML_LIBRARY
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib/pugixml-1.9
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
@ -59,6 +63,10 @@ find_library(PUGIXML_LIBRARY
|
||||
$ENV{PUGIXML_ROOT}/lib
|
||||
${PUGIXML_ROOT}/lib64
|
||||
$ENV{PUGIXML_ROOT}/lib64
|
||||
${PUGIXML_ROOT}/lib/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
|
||||
${PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
|
||||
)
|
||||
|
||||
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
|
||||
|
@ -59,7 +59,7 @@ find_package_handle_standard_args(VOLKGNSSSDR DEFAULT_MSG VOLK_GNSSSDR_LIBRARIES
|
||||
mark_as_advanced(VOLK_GNSSSDR_LIBRARIES VOLK_GNSSSDR_INCLUDE_DIRS)
|
||||
|
||||
|
||||
if(GFLAGS_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
if(VOLKGNSSSDR_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
|
||||
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
|
263
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_ibyte.conf
Normal file
263
conf/gnss-sdr_BDS_B1I_GPS_L1_CA_ibyte.conf
Normal file
@ -0,0 +1,263 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
;
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=10000000
|
||||
Receiver.sources_count=2
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;# Signal Source config for GPS, Galileo signals
|
||||
SignalSource0.implementation=File_Signal_Source
|
||||
SignalSource0.filename=/archive/BDS3_datasets/long/20180713_211400_3.dat
|
||||
SignalSource0.item_type=ibyte
|
||||
SignalSource0.sampling_frequency=10000000
|
||||
SignalSource0.samples=0
|
||||
SignalSource0.repeat=false
|
||||
SignalSource0.dump=false
|
||||
SignalSource0.enable_throttle_control=false
|
||||
|
||||
;# Signal Source config for BDS signals
|
||||
SignalSource1.implementation=File_Signal_Source
|
||||
SignalSource1.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
|
||||
SignalSource1.item_type=ibyte
|
||||
SignalSource1.sampling_frequency=10000000
|
||||
SignalSource1.samples=0
|
||||
SignalSource1.repeat=false
|
||||
SignalSource1.dump=false
|
||||
SignalSource1.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;# Signal Conditioner config for GPS, Galileo signals
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
DataTypeAdapter0.implementation=Ibyte_To_Complex
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
InputFilter0.taps_item_type=float
|
||||
InputFilter0.number_of_taps=5
|
||||
InputFilter0.number_of_bands=2
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.70
|
||||
InputFilter0.band2_begin=0.80
|
||||
InputFilter0.band2_end=1.0
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
InputFilter0.filter_type=bandpass
|
||||
InputFilter0.grid_density=16
|
||||
InputFilter0.sampling_frequency=10000000
|
||||
InputFilter0.IF=420000
|
||||
Resampler0.implementation=Pass_Through
|
||||
Resampler0.sample_freq_in=10000000
|
||||
Resampler0.sample_freq_out=10000000
|
||||
Resampler0.item_type=gr_complex
|
||||
|
||||
;# Signal Conditioner config for BDS signals
|
||||
SignalConditioner1.implementation=Signal_Conditioner
|
||||
DataTypeAdapter1.implementation=Ibyte_To_Complex
|
||||
InputFilter1.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
InputFilter1.taps_item_type=float
|
||||
InputFilter1.number_of_taps=5
|
||||
InputFilter1.number_of_bands=2
|
||||
InputFilter1.band1_begin=0.0
|
||||
InputFilter1.band1_end=0.70
|
||||
InputFilter1.band2_begin=0.80
|
||||
InputFilter1.band2_end=1.0
|
||||
InputFilter1.ampl1_begin=1.0
|
||||
InputFilter1.ampl1_end=1.0
|
||||
InputFilter1.ampl2_begin=0.0
|
||||
InputFilter1.ampl2_end=0.0
|
||||
InputFilter1.band1_error=1.0
|
||||
InputFilter1.band2_error=1.0
|
||||
InputFilter1.filter_type=bandpass
|
||||
InputFilter1.grid_density=16
|
||||
InputFilter1.sampling_frequency=10000000
|
||||
InputFilter1.IF=1098000
|
||||
Resampler1.implementation=Pass_Through
|
||||
Resampler1.sample_freq_in=10000000
|
||||
Resampler1.sample_freq_out=10000000
|
||||
Resampler1.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=7
|
||||
Channels_1B.count=7
|
||||
Channels_B1.count=4
|
||||
Channels.in_acquisition=18
|
||||
|
||||
;# Preparing collection for GPS satellites
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=0
|
||||
Channel3.RF_channel_ID=0
|
||||
Channel4.RF_channel_ID=0
|
||||
Channel5.RF_channel_ID=0
|
||||
Channel6.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel0.satellite = 2
|
||||
Channel1.signal=1C
|
||||
Channel1.satellite = 5
|
||||
Channel2.signal=1C
|
||||
Channel2.satellite = 25
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite = 31
|
||||
Channel4.signal=1C
|
||||
Channel4.satellite = 24
|
||||
Channel5.signal=1C
|
||||
Channel5.satellite = 6
|
||||
Channel6.signal=1C
|
||||
Channel6.satellite = 29
|
||||
|
||||
;# Preparing collection for Galileo satellites
|
||||
Channel7.RF_channel_ID=0
|
||||
Channel8.RF_channel_ID=0
|
||||
Channel9.RF_channel_ID=0
|
||||
Channel10.RF_channel_ID=0
|
||||
Channel11.RF_channel_ID=0
|
||||
Channel12.RF_channel_ID=0
|
||||
Channel13.RF_channel_ID=0
|
||||
Channel7.signal=1B
|
||||
Channel7.satellite = 30
|
||||
Channel8.signal=1B
|
||||
Channel8.satellite = 21
|
||||
Channel9.signal=1B
|
||||
Channel9.satellite = 5
|
||||
Channel10.signal=1B
|
||||
Channel10.satellite = 3
|
||||
Channel11.signal=1B
|
||||
Channel11.satellite = 27
|
||||
Channel12.signal=1B
|
||||
Channel12.satellite = 9
|
||||
Channel13.signal=1B
|
||||
Channel13.satellite = 10
|
||||
|
||||
;# Preparing collection for BDS satellites
|
||||
Channel14.RF_channel_ID=1
|
||||
Channel15.RF_channel_ID=1
|
||||
Channel16.RF_channel_ID=1
|
||||
Channel17.RF_channel_ID=1
|
||||
Channel18.RF_channel_ID=1
|
||||
Channel19.RF_channel_ID=1
|
||||
Channel20.RF_channel_ID=1
|
||||
Channel21.RF_channel_ID=1
|
||||
Channel22.RF_channel_ID=1
|
||||
Channel23.RF_channel_ID=1
|
||||
|
||||
Channel14.signal=B1
|
||||
Channel14.satellite = 29
|
||||
Channel15.signal=B1
|
||||
Channel15.satellite = 19
|
||||
Channel16.signal=B1
|
||||
Channel16.satellite = 20
|
||||
Channel17.signal=B1
|
||||
Channel17.satellite = 30
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
;# Acquisition config for BDS signals
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0005
|
||||
Acquisition_B1.doppler_max=15000
|
||||
Acquisition_B1.doppler_step=100
|
||||
Acquisition_B1.dump=false
|
||||
Acquisition_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for GPS signals
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.0005
|
||||
Acquisition_1C.doppler_max=15000
|
||||
Acquisition_1C.doppler_step=100
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=true;
|
||||
Acquisition_1C.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for Galileo signals
|
||||
Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
|
||||
Acquisition_1B.item_type=gr_complex
|
||||
Acquisition_1B.coherent_integration_time_ms=4
|
||||
Acquisition_1B.threshold=0.0015
|
||||
Acquisition_1B.doppler_max=15000
|
||||
Acquisition_1B.doppler_step=100
|
||||
Acquisition_1B.dump=true
|
||||
Acquisition_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_acq
|
||||
Acquisition_1B.blocking=false;
|
||||
Acquisition_1B.use_CFAR_algorithm=true;
|
||||
Acquisition_1B.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
|
||||
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=2.50;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
|
||||
|
||||
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
|
||||
Tracking_1B.item_type=gr_complex
|
||||
Tracking_1B.pll_bw_hz=25.0;
|
||||
Tracking_1B.dll_bw_hz=2.50;
|
||||
Tracking_1B.dump=true;
|
||||
Tracking_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=false
|
||||
|
||||
TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder
|
||||
TelemetryDecoder_1B.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
|
||||
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.dump=true
|
||||
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
|
||||
PVT.kml_output_enabled = false;
|
||||
PVT.xml_output_enabled = false;
|
||||
PVT.gpx_output_enabled = false;
|
||||
PVT.rinex_output_enabled = false;
|
||||
PVT.rtcm_output_enabled = false;
|
||||
PVT.nmea_output_enabled = false;
|
||||
PVT.geojson_output_enabled = false;
|
127
conf/gnss-sdr_BDS_B1I_ibyte.conf
Normal file
127
conf/gnss-sdr_BDS_B1I_ibyte.conf
Normal file
@ -0,0 +1,127 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
;
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=10000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
|
||||
SignalSource.item_type=ibyte
|
||||
SignalSource.sampling_frequency=10000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Ibyte_To_Complex
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=gr_complex
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=10000000
|
||||
InputFilter.IF=1098000
|
||||
Resampler.implementation=Pass_Through
|
||||
Resampler.sample_freq_in=10000000
|
||||
Resampler.sample_freq_out=10000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_B1.count=4
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=B1
|
||||
|
||||
Channel0.satellite = 29;
|
||||
Channel1.satellite = 19;
|
||||
Channel2.satellite = 20;
|
||||
Channel3.satellite = 30;
|
||||
|
||||
|
||||
;Channel0.satellite = 6;
|
||||
;Channel1.satellite = 8;
|
||||
;Channel2.satellite = 9;
|
||||
;Channel3.satellite = 13;
|
||||
;Channel4.satellite = 17;
|
||||
;Channel5.satellite = 1;
|
||||
;Channel6.satellite = 2;
|
||||
;Channel7.satellite = 3;
|
||||
;Channel8.satellite = 4;
|
||||
;Channel9.satellite = 5;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0004
|
||||
;Acquisition_B1.pfa=0.0000001;
|
||||
Acquisition_B1.doppler_max=10000
|
||||
Acquisition_B1.doppler_step=50
|
||||
Acquisition_B1.dump=true
|
||||
Acquisition_B1.dump_filename=./bds_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
|
||||
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
PVT.flag_rtcm_server=false
|
||||
PVT.flag_rtcm_tty_port=false
|
||||
PVT.rtcm_dump_devname=/dev/pts/1
|
||||
PVT.dump=true
|
263
conf/gnss-sdr_BDS_B3I_GPS_L1_CA_ibyte.conf
Normal file
263
conf/gnss-sdr_BDS_B3I_GPS_L1_CA_ibyte.conf
Normal file
@ -0,0 +1,263 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
;
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=10000000
|
||||
Receiver.sources_count=2
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;# Signal Source config for GPS, Galileo signals
|
||||
SignalSource0.implementation=File_Signal_Source
|
||||
SignalSource0.filename=/archive/BDS3_datasets/long/20180713_211400_3.dat
|
||||
SignalSource0.item_type=ibyte
|
||||
SignalSource0.sampling_frequency=10000000
|
||||
SignalSource0.samples=0
|
||||
SignalSource0.repeat=false
|
||||
SignalSource0.dump=false
|
||||
SignalSource0.enable_throttle_control=false
|
||||
|
||||
;# Signal Source config for BDS signals
|
||||
SignalSource1.implementation=File_Signal_Source
|
||||
SignalSource1.filename=/archive/BDS3_datasets/long/20180713_211400_1.dat
|
||||
SignalSource1.item_type=ibyte
|
||||
SignalSource1.sampling_frequency=10000000
|
||||
SignalSource1.samples=0
|
||||
SignalSource1.repeat=false
|
||||
SignalSource1.dump=false
|
||||
SignalSource1.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;# Signal Conditioner config for GPS, Galileo signals
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
DataTypeAdapter0.implementation=Ibyte_To_Complex
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
InputFilter0.taps_item_type=float
|
||||
InputFilter0.number_of_taps=5
|
||||
InputFilter0.number_of_bands=2
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.70
|
||||
InputFilter0.band2_begin=0.80
|
||||
InputFilter0.band2_end=1.0
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
InputFilter0.filter_type=bandpass
|
||||
InputFilter0.grid_density=16
|
||||
InputFilter0.sampling_frequency=10000000
|
||||
InputFilter0.IF=420000
|
||||
Resampler0.implementation=Pass_Through
|
||||
Resampler0.sample_freq_in=10000000
|
||||
Resampler0.sample_freq_out=10000000
|
||||
Resampler0.item_type=gr_complex
|
||||
|
||||
;# Signal Conditioner config for BDS signals
|
||||
SignalConditioner1.implementation=Signal_Conditioner
|
||||
DataTypeAdapter1.implementation=Ibyte_To_Complex
|
||||
InputFilter1.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
InputFilter1.taps_item_type=float
|
||||
InputFilter1.number_of_taps=5
|
||||
InputFilter1.number_of_bands=2
|
||||
InputFilter1.band1_begin=0.0
|
||||
InputFilter1.band1_end=0.70
|
||||
InputFilter1.band2_begin=0.80
|
||||
InputFilter1.band2_end=1.0
|
||||
InputFilter1.ampl1_begin=1.0
|
||||
InputFilter1.ampl1_end=1.0
|
||||
InputFilter1.ampl2_begin=0.0
|
||||
InputFilter1.ampl2_end=0.0
|
||||
InputFilter1.band1_error=1.0
|
||||
InputFilter1.band2_error=1.0
|
||||
InputFilter1.filter_type=bandpass
|
||||
InputFilter1.grid_density=16
|
||||
InputFilter1.sampling_frequency=10000000
|
||||
InputFilter1.IF=1098000
|
||||
Resampler1.implementation=Pass_Through
|
||||
Resampler1.sample_freq_in=10000000
|
||||
Resampler1.sample_freq_out=10000000
|
||||
Resampler1.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=7
|
||||
Channels_1B.count=7
|
||||
Channels_B1.count=4
|
||||
Channels.in_acquisition=18
|
||||
|
||||
;# Preparing collection for GPS satellites
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=0
|
||||
Channel3.RF_channel_ID=0
|
||||
Channel4.RF_channel_ID=0
|
||||
Channel5.RF_channel_ID=0
|
||||
Channel6.RF_channel_ID=0
|
||||
Channel0.signal=1C
|
||||
Channel0.satellite = 2
|
||||
Channel1.signal=1C
|
||||
Channel1.satellite = 5
|
||||
Channel2.signal=1C
|
||||
Channel2.satellite = 25
|
||||
Channel3.signal=1C
|
||||
Channel3.satellite = 31
|
||||
Channel4.signal=1C
|
||||
Channel4.satellite = 24
|
||||
Channel5.signal=1C
|
||||
Channel5.satellite = 6
|
||||
Channel6.signal=1C
|
||||
Channel6.satellite = 29
|
||||
|
||||
;# Preparing collection for Galileo satellites
|
||||
Channel7.RF_channel_ID=0
|
||||
Channel8.RF_channel_ID=0
|
||||
Channel9.RF_channel_ID=0
|
||||
Channel10.RF_channel_ID=0
|
||||
Channel11.RF_channel_ID=0
|
||||
Channel12.RF_channel_ID=0
|
||||
Channel13.RF_channel_ID=0
|
||||
Channel7.signal=1B
|
||||
Channel7.satellite = 30
|
||||
Channel8.signal=1B
|
||||
Channel8.satellite = 21
|
||||
Channel9.signal=1B
|
||||
Channel9.satellite = 5
|
||||
Channel10.signal=1B
|
||||
Channel10.satellite = 3
|
||||
Channel11.signal=1B
|
||||
Channel11.satellite = 27
|
||||
Channel12.signal=1B
|
||||
Channel12.satellite = 9
|
||||
Channel13.signal=1B
|
||||
Channel13.satellite = 10
|
||||
|
||||
;# Preparing collection for BDS satellites
|
||||
Channel14.RF_channel_ID=1
|
||||
Channel15.RF_channel_ID=1
|
||||
Channel16.RF_channel_ID=1
|
||||
Channel17.RF_channel_ID=1
|
||||
Channel18.RF_channel_ID=1
|
||||
Channel19.RF_channel_ID=1
|
||||
Channel20.RF_channel_ID=1
|
||||
Channel21.RF_channel_ID=1
|
||||
Channel22.RF_channel_ID=1
|
||||
Channel23.RF_channel_ID=1
|
||||
|
||||
Channel14.signal=B1
|
||||
Channel14.satellite = 29
|
||||
Channel15.signal=B1
|
||||
Channel15.satellite = 19
|
||||
Channel16.signal=B1
|
||||
Channel16.satellite = 20
|
||||
Channel17.signal=B1
|
||||
Channel17.satellite = 30
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
;# Acquisition config for BDS signals
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.0005
|
||||
Acquisition_B1.doppler_max=15000
|
||||
Acquisition_B1.doppler_step=100
|
||||
Acquisition_B1.dump=false
|
||||
Acquisition_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_acq
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=true;
|
||||
Acquisition_B1.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for GPS signals
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.0005
|
||||
Acquisition_1C.doppler_max=15000
|
||||
Acquisition_1C.doppler_step=100
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=true;
|
||||
Acquisition_1C.bit_transition_flag = false;
|
||||
|
||||
;# Acquisition config for Galileo signals
|
||||
Acquisition_1B.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
|
||||
Acquisition_1B.item_type=gr_complex
|
||||
Acquisition_1B.coherent_integration_time_ms=4
|
||||
Acquisition_1B.threshold=0.0015
|
||||
Acquisition_1B.doppler_max=15000
|
||||
Acquisition_1B.doppler_step=100
|
||||
Acquisition_1B.dump=true
|
||||
Acquisition_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_acq
|
||||
Acquisition_1B.blocking=false;
|
||||
Acquisition_1B.use_CFAR_algorithm=true;
|
||||
Acquisition_1B.bit_transition_flag = false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=25.0;
|
||||
Tracking_B1.dll_bw_hz=2.50;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/bds_b1i_trk_ch_
|
||||
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=25.0;
|
||||
Tracking_1C.dll_bw_hz=2.50;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gps_l1ca_trk_ch_
|
||||
|
||||
Tracking_1B.implementation=Galileo_E1_DLL_PLL_VEML_Tracking
|
||||
Tracking_1B.item_type=gr_complex
|
||||
Tracking_1B.pll_bw_hz=25.0;
|
||||
Tracking_1B.dll_bw_hz=2.50;
|
||||
Tracking_1B.dump=true;
|
||||
Tracking_1B.dump_filename=/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/gal_e1b_trk_ch_
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B1.implementation=BEIDOU_B1I_Telemetry_Decoder
|
||||
TelemetryDecoder_B1.dump=false
|
||||
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=false
|
||||
|
||||
TelemetryDecoder_1B.implementation=Galileo_E1B_Telemetry_Decoder
|
||||
TelemetryDecoder_1B.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
|
||||
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.dump=true
|
||||
PVT.dump_filename = /home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/pvt_l1
|
||||
PVT.kml_output_enabled = false;
|
||||
PVT.xml_output_enabled = false;
|
||||
PVT.gpx_output_enabled = false;
|
||||
PVT.rinex_output_enabled = false;
|
||||
PVT.rtcm_output_enabled = false;
|
||||
PVT.nmea_output_enabled = false;
|
||||
PVT.geojson_output_enabled = false;
|
131
conf/gnss-sdr_BDS_B3I_ibyte.conf
Normal file
131
conf/gnss-sdr_BDS_B3I_ibyte.conf
Normal file
@ -0,0 +1,131 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
;
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=30000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/archive/BDS3_datasets/long/20180713_211400_2.dat
|
||||
SignalSource.item_type=ibyte
|
||||
SignalSource.sampling_frequency=30000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Ibyte_To_Complex
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=gr_complex
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=30000000
|
||||
InputFilter.IF=1020000
|
||||
Resampler.implementation=Pass_Through
|
||||
Resampler.sample_freq_in=30000000
|
||||
Resampler.sample_freq_out=30000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_B3.count=4
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=B3
|
||||
|
||||
Channel0.satellite = 29;
|
||||
Channel1.satellite = 19;
|
||||
Channel2.satellite = 20;
|
||||
Channel3.satellite = 30;
|
||||
|
||||
|
||||
;Channel0.satellite = 6;
|
||||
;Channel1.satellite = 7;
|
||||
;Channel2.satellite = 9;
|
||||
;Channel3.satellite = 16;
|
||||
;Channel4.satellite = 18;
|
||||
;Channel5.satellite = 1;
|
||||
;Channel6.satellite = 2;
|
||||
;Channel7.satellite = 3;
|
||||
;Channel8.satellite = 4;
|
||||
;Channel9.satellite = 5;
|
||||
;Channel10.satellite = 23;
|
||||
;Channel11.satellite = 25;
|
||||
;Channel12.satellite = 32;
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
||||
Acquisition_B3.item_type=gr_complex
|
||||
Acquisition_B3.coherent_integration_time_ms=1
|
||||
Acquisition_B3.max_dwells = 1
|
||||
Acquisition_B3.threshold=0.0004
|
||||
;Acquisition_B3.pfa=0.0000001;
|
||||
Acquisition_B3.doppler_max=10000
|
||||
Acquisition_B3.doppler_step=50
|
||||
Acquisition_B3.dump=false
|
||||
Acquisition_B3.dump_filename=./bds_acq
|
||||
Acquisition_B3.blocking=false;
|
||||
Acquisition_B3.use_CFAR_algorithm=true;
|
||||
Acquisition_B3.bit_transition_flag = false;
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B3.implementation=BEIDOU_B3I_DLL_PLL_Tracking
|
||||
Tracking_B3.item_type=gr_complex
|
||||
Tracking_B3.pll_bw_hz=25.0;
|
||||
Tracking_B3.dll_bw_hz=2.50;
|
||||
Tracking_B3.dump=false;
|
||||
Tracking_B3.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_B3.implementation=BEIDOU_B3I_Telemetry_Decoder
|
||||
TelemetryDecoder_B3.dump=false
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=false
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=OFF ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
|
||||
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
PVT.flag_rtcm_server=false
|
||||
PVT.flag_rtcm_tty_port=false
|
||||
PVT.rtcm_dump_devname=/dev/pts/1
|
||||
PVT.dump=true
|
@ -6,14 +6,14 @@
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=25000000
|
||||
GNSS-SDR.internal_fs_sps=30000000
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
;SignalSource.filename=/home/dmiralles/Documents/gnss-sdr/src/tests/signal_samples/USRP_BDS_B2a_201805171115_fs_25e6_if0e3_ishort_200ms.bin
|
||||
SignalSource.filename=/archive/USRP_BDS_B3I_201805171118_fs_25e6_if0e3_ishort.bin
|
||||
SignalSource.item_type=ishort
|
||||
SignalSource.sampling_frequency=25000000
|
||||
SignalSource.sampling_frequency=30000000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
@ -23,8 +23,8 @@ SignalConditioner.implementation=Signal_Conditioner
|
||||
InputFilter.implementation=Pass_Through
|
||||
DataTypeAdapter.implementation=Ishort_To_Complex
|
||||
Resampler.implementation=Direct_Resampler
|
||||
Resampler.sample_freq_in=25000000
|
||||
Resampler.sample_freq_out=25000000
|
||||
Resampler.sample_freq_in=30000000
|
||||
Resampler.sample_freq_out=30000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
|
@ -1,14 +1,29 @@
|
||||
## [Unreleased](https://github.com/gnss-sdr/gnss-sdr/tree/next)
|
||||
|
||||
### Improvements in Efficiency
|
||||
|
||||
- Applied clang-tidy checks and fixes related to performance.
|
||||
|
||||
### Improvements in Interoperability:
|
||||
|
||||
- Added the BeiDou B1I receiver chain.
|
||||
- Fix bug in GLONASS dual frequency receiver.
|
||||
|
||||
### Improvements in Maintainability:
|
||||
|
||||
- Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler.
|
||||
- Applied clang-tidy checks and fixes related to readability.
|
||||
|
||||
### Improvements in Portability:
|
||||
|
||||
- CMake scripts now follow a modern approach (targets and properties) but still work in 2.8.12
|
||||
|
||||
|
||||
## Improvements in Reliability
|
||||
|
||||
- Applied clang-tidy checks and fixes related to High Integrity C++.
|
||||
|
||||
|
||||
## [0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
|
||||
|
||||
This release has several improvements in different dimensions, addition of new features and bug fixes:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 92 KiB |
@ -32,19 +32,30 @@ add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS})
|
||||
target_link_libraries(pvt_adapters
|
||||
PUBLIC
|
||||
pvt_gr_blocks
|
||||
Armadillo::armadillo
|
||||
Gnuradio::runtime
|
||||
gnss_system_parameters
|
||||
gnss_rx
|
||||
pvt_lib
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Boost::serialization
|
||||
gnss_sdr_flags
|
||||
pvt_libs
|
||||
)
|
||||
|
||||
target_include_directories(pvt_adapters
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(Boost_VERSION LESS 105800)
|
||||
target_compile_definitions(pvt_adapters PRIVATE -DOLD_BOOST=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET pvt_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -33,9 +33,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "pvt_conf.h"
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <glog/logging.h>
|
||||
#if OLD_BOOST
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
@ -49,7 +46,7 @@ namespace bc = boost::integer;
|
||||
using google::LogMessage;
|
||||
|
||||
|
||||
RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
@ -197,65 +194,195 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
int bds_B1_count = configuration->property("Channels_B1.count", 0);
|
||||
int bds_B3_count = configuration->property("Channels_B3.count", 0);
|
||||
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 1; // L1
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 2;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 3; // L5
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 4; // E1
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 5; // E5a
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 6;
|
||||
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 7;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 8; // L1+L5
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 9; // L1+E1
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 10;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 11;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 12;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 13; // L5+E5a
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 14;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 15;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 1; // L1
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 2;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 3; // L5
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 4; // E1
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 5; // E5a
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 6;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 7;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 8; // L1+L5
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 9; // L1+E1
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 10;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 11;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 12;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 13; // L5+E5a
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 14;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 15;
|
||||
}
|
||||
//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)) pvt_output_parameters.type_of_receiver = 16;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 17;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 18;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 17;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 18;
|
||||
}
|
||||
//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)) pvt_output_parameters.type_of_receiver = 19;
|
||||
//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)) pvt_output_parameters.type_of_receiver = 20;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 21;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 21;
|
||||
}
|
||||
//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)) pvt_output_parameters.type_of_receiver = 22;
|
||||
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) && (glo_1G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 23;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 24;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 25;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 26;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 27;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 28;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 29;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 30;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 31;
|
||||
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) && (glo_1G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 23;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 24;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 25;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 26;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 27;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 28;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 29;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 30;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 31;
|
||||
}
|
||||
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a
|
||||
}
|
||||
// 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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 50;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 51;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 52;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 53;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 54;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0)) pvt_output_parameters.type_of_receiver = 55;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count != 0)) pvt_output_parameters.type_of_receiver = 56;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 50;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 51;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 52;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 53;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 54;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 55;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 56;
|
||||
}
|
||||
// BeiDou B3I 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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) pvt_output_parameters.type_of_receiver = 60;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) pvt_output_parameters.type_of_receiver = 61;
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) pvt_output_parameters.type_of_receiver = 62;
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0)) pvt_output_parameters.type_of_receiver = 63;
|
||||
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 60;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 61;
|
||||
}
|
||||
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) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 62;
|
||||
}
|
||||
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) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
|
||||
{
|
||||
pvt_output_parameters.type_of_receiver = 63;
|
||||
}
|
||||
|
||||
// RTKLIB PVT solver options
|
||||
// Settings 1
|
||||
int positioning_mode = -1;
|
||||
std::string default_pos_mode("Single");
|
||||
std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h
|
||||
if (positioning_mode_str == "Single") positioning_mode = PMODE_SINGLE;
|
||||
if (positioning_mode_str == "Static") positioning_mode = PMODE_STATIC;
|
||||
if (positioning_mode_str == "Kinematic") positioning_mode = PMODE_KINEMA;
|
||||
if (positioning_mode_str == "PPP_Static") positioning_mode = PMODE_PPP_STATIC;
|
||||
if (positioning_mode_str == "PPP_Kinematic") positioning_mode = PMODE_PPP_KINEMA;
|
||||
if (positioning_mode_str == "Single")
|
||||
{
|
||||
positioning_mode = PMODE_SINGLE;
|
||||
}
|
||||
if (positioning_mode_str == "Static")
|
||||
{
|
||||
positioning_mode = PMODE_STATIC;
|
||||
}
|
||||
if (positioning_mode_str == "Kinematic")
|
||||
{
|
||||
positioning_mode = PMODE_KINEMA;
|
||||
}
|
||||
if (positioning_mode_str == "PPP_Static")
|
||||
{
|
||||
positioning_mode = PMODE_PPP_STATIC;
|
||||
}
|
||||
if (positioning_mode_str == "PPP_Kinematic")
|
||||
{
|
||||
positioning_mode = PMODE_PPP_KINEMA;
|
||||
}
|
||||
|
||||
if (positioning_mode == -1)
|
||||
{
|
||||
@ -269,10 +396,22 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
|
||||
int num_bands = 0;
|
||||
|
||||
if (( gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) num_bands = 1;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0))) num_bands = 2;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0))) num_bands = 2;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0))) num_bands = 3;
|
||||
if ((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0))
|
||||
{
|
||||
num_bands = 1;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)))
|
||||
{
|
||||
num_bands = 2;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
{
|
||||
num_bands = 2;
|
||||
}
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
|
||||
{
|
||||
num_bands = 3;
|
||||
}
|
||||
|
||||
int number_of_frequencies = configuration->property(role + ".num_bands", num_bands); /* (1:L1, 2:L1+L2, 3:L1+L2+L5) */
|
||||
if ((number_of_frequencies < 1) || (number_of_frequencies > 3))
|
||||
@ -300,12 +439,30 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
std::string default_iono_model("OFF");
|
||||
std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /* (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
int iono_model = -1;
|
||||
if (iono_model_str == "OFF") iono_model = IONOOPT_OFF;
|
||||
if (iono_model_str == "Broadcast") iono_model = IONOOPT_BRDC;
|
||||
if (iono_model_str == "SBAS") iono_model = IONOOPT_SBAS;
|
||||
if (iono_model_str == "Iono-Free-LC") iono_model = IONOOPT_IFLC;
|
||||
if (iono_model_str == "Estimate_STEC") iono_model = IONOOPT_EST;
|
||||
if (iono_model_str == "IONEX") iono_model = IONOOPT_TEC;
|
||||
if (iono_model_str == "OFF")
|
||||
{
|
||||
iono_model = IONOOPT_OFF;
|
||||
}
|
||||
if (iono_model_str == "Broadcast")
|
||||
{
|
||||
iono_model = IONOOPT_BRDC;
|
||||
}
|
||||
if (iono_model_str == "SBAS")
|
||||
{
|
||||
iono_model = IONOOPT_SBAS;
|
||||
}
|
||||
if (iono_model_str == "Iono-Free-LC")
|
||||
{
|
||||
iono_model = IONOOPT_IFLC;
|
||||
}
|
||||
if (iono_model_str == "Estimate_STEC")
|
||||
{
|
||||
iono_model = IONOOPT_EST;
|
||||
}
|
||||
if (iono_model_str == "IONEX")
|
||||
{
|
||||
iono_model = IONOOPT_TEC;
|
||||
}
|
||||
if (iono_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
@ -319,11 +476,26 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
std::string default_trop_model("OFF");
|
||||
int trop_model = -1;
|
||||
std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /* (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if (trop_model_str == "OFF") trop_model = TROPOPT_OFF;
|
||||
if (trop_model_str == "Saastamoinen") trop_model = TROPOPT_SAAS;
|
||||
if (trop_model_str == "SBAS") trop_model = TROPOPT_SBAS;
|
||||
if (trop_model_str == "Estimate_ZTD") trop_model = TROPOPT_EST;
|
||||
if (trop_model_str == "Estimate_ZTD_Grad") trop_model = TROPOPT_ESTG;
|
||||
if (trop_model_str == "OFF")
|
||||
{
|
||||
trop_model = TROPOPT_OFF;
|
||||
}
|
||||
if (trop_model_str == "Saastamoinen")
|
||||
{
|
||||
trop_model = TROPOPT_SAAS;
|
||||
}
|
||||
if (trop_model_str == "SBAS")
|
||||
{
|
||||
trop_model = TROPOPT_SBAS;
|
||||
}
|
||||
if (trop_model_str == "Estimate_ZTD")
|
||||
{
|
||||
trop_model = TROPOPT_EST;
|
||||
}
|
||||
if (trop_model_str == "Estimate_ZTD_Grad")
|
||||
{
|
||||
trop_model = TROPOPT_ESTG;
|
||||
}
|
||||
if (trop_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
@ -353,10 +525,22 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
int earth_tide = configuration->property(role + ".earth_tide", 0);
|
||||
|
||||
int nsys = 0;
|
||||
if ((gps_1C_count > 0) || (gps_2S_count > 0) || (gps_L5_count > 0)) nsys += SYS_GPS;
|
||||
if ((gal_1B_count > 0) || (gal_E5a_count > 0) || (gal_E5b_count > 0)) nsys += SYS_GAL;
|
||||
if ((glo_1G_count > 0) || (glo_2G_count > 0)) nsys += SYS_GLO;
|
||||
if ((bds_B1_count > 0) || (bds_B3_count > 0)) nsys += SYS_BDS;
|
||||
if ((gps_1C_count > 0) || (gps_2S_count > 0) || (gps_L5_count > 0))
|
||||
{
|
||||
nsys += SYS_GPS;
|
||||
}
|
||||
if ((gal_1B_count > 0) || (gal_E5a_count > 0) || (gal_E5b_count > 0))
|
||||
{
|
||||
nsys += SYS_GAL;
|
||||
}
|
||||
if ((glo_1G_count > 0) || (glo_2G_count > 0))
|
||||
{
|
||||
nsys += SYS_GLO;
|
||||
}
|
||||
if ((bds_B1_count > 0) || (bds_B3_count > 0))
|
||||
{
|
||||
nsys += SYS_BDS;
|
||||
}
|
||||
|
||||
int navigation_system = configuration->property(role + ".navigation_system", nsys); /* (SYS_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if ((navigation_system < 1) || (navigation_system > 255)) /* GPS: 1 SBAS: 2 GPS+SBAS: 3 Galileo: 8 Galileo+GPS: 9 GPS+SBAS+Galileo: 11 All: 255 */
|
||||
@ -370,11 +554,26 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
std::string default_gps_ar("Continuous");
|
||||
std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
|
||||
int integer_ambiguity_resolution_gps = -1;
|
||||
if (integer_ambiguity_resolution_gps_str == "OFF") integer_ambiguity_resolution_gps = ARMODE_OFF;
|
||||
if (integer_ambiguity_resolution_gps_str == "Continuous") integer_ambiguity_resolution_gps = ARMODE_CONT;
|
||||
if (integer_ambiguity_resolution_gps_str == "Instantaneous") integer_ambiguity_resolution_gps = ARMODE_INST;
|
||||
if (integer_ambiguity_resolution_gps_str == "Fix-and-Hold") integer_ambiguity_resolution_gps = ARMODE_FIXHOLD;
|
||||
if (integer_ambiguity_resolution_gps_str == "PPP-AR") integer_ambiguity_resolution_gps = ARMODE_PPPAR;
|
||||
if (integer_ambiguity_resolution_gps_str == "OFF")
|
||||
{
|
||||
integer_ambiguity_resolution_gps = ARMODE_OFF;
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps_str == "Continuous")
|
||||
{
|
||||
integer_ambiguity_resolution_gps = ARMODE_CONT;
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps_str == "Instantaneous")
|
||||
{
|
||||
integer_ambiguity_resolution_gps = ARMODE_INST;
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps_str == "Fix-and-Hold")
|
||||
{
|
||||
integer_ambiguity_resolution_gps = ARMODE_FIXHOLD;
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps_str == "PPP-AR")
|
||||
{
|
||||
integer_ambiguity_resolution_gps = ARMODE_PPPAR;
|
||||
}
|
||||
if (integer_ambiguity_resolution_gps == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
@ -549,13 +748,13 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
}
|
||||
|
||||
|
||||
RtklibPvt::~RtklibPvt()
|
||||
Rtklib_Pvt::~Rtklib_Pvt()
|
||||
{
|
||||
rtkfree(&rtk);
|
||||
}
|
||||
|
||||
|
||||
bool RtklibPvt::get_latest_PVT(double* longitude_deg,
|
||||
bool Rtklib_Pvt::get_latest_PVT(double* longitude_deg,
|
||||
double* latitude_deg,
|
||||
double* height_m,
|
||||
double* ground_speed_kmh,
|
||||
@ -571,37 +770,37 @@ bool RtklibPvt::get_latest_PVT(double* longitude_deg,
|
||||
}
|
||||
|
||||
|
||||
void RtklibPvt::clear_ephemeris()
|
||||
void Rtklib_Pvt::clear_ephemeris()
|
||||
{
|
||||
pvt_->clear_ephemeris();
|
||||
}
|
||||
|
||||
|
||||
std::map<int, Gps_Ephemeris> RtklibPvt::get_gps_ephemeris() const
|
||||
std::map<int, Gps_Ephemeris> Rtklib_Pvt::get_gps_ephemeris() const
|
||||
{
|
||||
return pvt_->get_gps_ephemeris_map();
|
||||
}
|
||||
|
||||
|
||||
std::map<int, Galileo_Ephemeris> RtklibPvt::get_galileo_ephemeris() const
|
||||
std::map<int, Galileo_Ephemeris> Rtklib_Pvt::get_galileo_ephemeris() const
|
||||
{
|
||||
return pvt_->get_galileo_ephemeris_map();
|
||||
}
|
||||
|
||||
|
||||
std::map<int, Gps_Almanac> RtklibPvt::get_gps_almanac() const
|
||||
std::map<int, Gps_Almanac> Rtklib_Pvt::get_gps_almanac() const
|
||||
{
|
||||
return pvt_->get_gps_almanac_map();
|
||||
}
|
||||
|
||||
|
||||
std::map<int, Galileo_Almanac> RtklibPvt::get_galileo_almanac() const
|
||||
std::map<int, Galileo_Almanac> Rtklib_Pvt::get_galileo_almanac() const
|
||||
{
|
||||
return pvt_->get_galileo_almanac_map();
|
||||
}
|
||||
|
||||
|
||||
void RtklibPvt::connect(gr::top_block_sptr top_block)
|
||||
void Rtklib_Pvt::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
@ -611,7 +810,7 @@ void RtklibPvt::connect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
void RtklibPvt::disconnect(gr::top_block_sptr top_block)
|
||||
void Rtklib_Pvt::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
@ -620,13 +819,13 @@ void RtklibPvt::disconnect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr RtklibPvt::get_left_block()
|
||||
gr::basic_block_sptr Rtklib_Pvt::get_left_block()
|
||||
{
|
||||
return pvt_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr RtklibPvt::get_right_block()
|
||||
gr::basic_block_sptr Rtklib_Pvt::get_right_block()
|
||||
{
|
||||
return pvt_; // this is a sink, nothing downstream
|
||||
return nullptr; // this is a sink, nothing downstream
|
||||
}
|
||||
|
@ -32,8 +32,14 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_PVT_H_
|
||||
#define GNSS_SDR_RTKLIB_PVT_H_
|
||||
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "gps_almanac.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "pvt_interface.h"
|
||||
#include "rtklib.h"
|
||||
#include "rtklib_pvt_cc.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
@ -42,15 +48,15 @@ class ConfigurationInterface;
|
||||
/*!
|
||||
* \brief This class implements a PvtInterface for the RTKLIB PVT block
|
||||
*/
|
||||
class RtklibPvt : public PvtInterface
|
||||
class Rtklib_Pvt : public PvtInterface
|
||||
{
|
||||
public:
|
||||
RtklibPvt(ConfigurationInterface* configuration,
|
||||
Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~RtklibPvt();
|
||||
virtual ~Rtklib_Pvt();
|
||||
|
||||
inline std::string role() override
|
||||
{
|
||||
|
@ -30,23 +30,28 @@ add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS})
|
||||
|
||||
target_link_libraries(pvt_gr_blocks
|
||||
PUBLIC
|
||||
pvt_libs
|
||||
core_system_parameters
|
||||
Boost::date_time
|
||||
pvt_lib
|
||||
Gnuradio::pmt
|
||||
Gnuradio::runtime
|
||||
gnss_system_parameters
|
||||
gnss_rx
|
||||
PRIVATE
|
||||
algorithms_libs
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::serialization
|
||||
)
|
||||
|
||||
target_include_directories(pvt_gr_blocks
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
)
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Boost_VERSION LESS 105800)
|
||||
target_compile_definitions(pvt_gr_blocks PRIVATE -DOLD_BOOST=1)
|
||||
@ -55,5 +60,4 @@ endif()
|
||||
set_property(TARGET pvt_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/core/system_parameters>
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,13 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_PVT_CC_H
|
||||
#define GNSS_SDR_RTKLIB_PVT_CC_H
|
||||
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "geojson_printer.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_almanac.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "gpx_printer.h"
|
||||
#include "kml_printer.h"
|
||||
@ -44,21 +50,24 @@
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <gnuradio/sync_block.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/types.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class rtklib_pvt_cc;
|
||||
|
||||
typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr;
|
||||
using rtklib_pvt_cc_sptr = boost::shared_ptr<rtklib_pvt_cc>;
|
||||
|
||||
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels,
|
||||
rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels,
|
||||
const Pvt_Conf& conf_,
|
||||
const rtk_t& rtk);
|
||||
|
||||
@ -85,15 +94,15 @@ private:
|
||||
|
||||
bool b_rtcm_writing_started;
|
||||
bool b_rtcm_enabled;
|
||||
int32_t d_rtcm_MT1045_rate_ms; //!< Galileo Broadcast Ephemeris
|
||||
int32_t d_rtcm_MT1019_rate_ms; //!< GPS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1020_rate_ms; //!< GLONASS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1077_rate_ms; //!< The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
||||
int32_t d_rtcm_MT1087_rate_ms; //!< GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
||||
int32_t d_rtcm_MT1097_rate_ms; //!< Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||
int32_t d_rtcm_MT1045_rate_ms; // Galileo Broadcast Ephemeris
|
||||
int32_t d_rtcm_MT1019_rate_ms; // GPS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1020_rate_ms; // GLONASS Broadcast Ephemeris (orbits)
|
||||
int32_t d_rtcm_MT1077_rate_ms; // The type 7 Multiple Signal Message format for the USA’s GPS system, popular
|
||||
int32_t d_rtcm_MT1087_rate_ms; // GLONASS MSM7. The type 7 Multiple Signal Message format for the Russian GLONASS system
|
||||
int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||
int32_t d_rtcm_MSM_rate_ms;
|
||||
|
||||
int32_t d_last_status_print_seg; //for status printer
|
||||
int32_t d_last_status_print_seg; // for status printer
|
||||
|
||||
uint32_t d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
@ -114,7 +123,7 @@ private:
|
||||
bool d_kml_output_enabled;
|
||||
bool d_nmea_output_file_enabled;
|
||||
|
||||
std::shared_ptr<rtklib_solver> d_pvt_solver;
|
||||
std::shared_ptr<Rtklib_Solver> d_pvt_solver;
|
||||
|
||||
std::map<int, Gnss_Synchro> gnss_observables_map;
|
||||
bool observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b);
|
||||
@ -132,29 +141,31 @@ private:
|
||||
bool send_sys_v_ttff_msg(ttff_msgbuf ttff);
|
||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
|
||||
bool save_gnss_synchro_map_xml(const std::string& file_name); //debug helper function
|
||||
bool save_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
|
||||
bool load_gnss_synchro_map_xml(const std::string& file_name); //debug helper function
|
||||
bool load_gnss_synchro_map_xml(const std::string& file_name); // debug helper function
|
||||
|
||||
bool d_xml_storage;
|
||||
std::string xml_base_path;
|
||||
|
||||
inline std::time_t to_time_t(boost::posix_time::ptime pt)
|
||||
inline std::time_t convert_to_time_t(const boost::posix_time::ptime pt) const
|
||||
{
|
||||
return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
|
||||
}
|
||||
|
||||
bool flag_monitor_pvt_enabled;
|
||||
std::unique_ptr<Monitor_Pvt_Udp_Sink> udp_sink_ptr;
|
||||
std::vector<std::string> split_string(const std::string& s, char delim);
|
||||
std::vector<std::string> split_string(const std::string& s, char delim) const;
|
||||
|
||||
public:
|
||||
rtklib_pvt_cc(uint32_t nchannels,
|
||||
const Pvt_Conf& conf_,
|
||||
const rtk_t& rtk);
|
||||
|
||||
~rtklib_pvt_cc(); //!< Default destructor
|
||||
|
||||
/*!
|
||||
* \brief Get latest set of ephemeris from PVT block
|
||||
* \brief Get latest set of GPS ephemeris from PVT block
|
||||
*
|
||||
*/
|
||||
std::map<int, Gps_Ephemeris> get_gps_ephemeris_map() const;
|
||||
@ -183,9 +194,7 @@ public:
|
||||
double* height_m,
|
||||
double* ground_speed_kmh,
|
||||
double* course_over_ground_deg,
|
||||
time_t* UTC_time);
|
||||
|
||||
~rtklib_pvt_cc(); //!< Default destructor
|
||||
time_t* UTC_time) const;
|
||||
|
||||
int work(int noutput_items, gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items); //!< PVT Signal Processing
|
||||
|
@ -53,16 +53,15 @@ list(SORT PVT_LIB_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${PVT_LIB_HEADERS})
|
||||
|
||||
add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
|
||||
add_library(pvt_libs ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS})
|
||||
|
||||
target_link_libraries(pvt_lib
|
||||
target_link_libraries(pvt_libs
|
||||
PUBLIC
|
||||
Armadillo::armadillo
|
||||
Boost::date_time
|
||||
gnss_system_parameters
|
||||
gnss_sp_libs
|
||||
rtklib_lib
|
||||
gnss_rx
|
||||
algorithms_libs
|
||||
algorithms_libs_rtklib
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
@ -71,15 +70,25 @@ target_link_libraries(pvt_lib
|
||||
Matio::matio
|
||||
)
|
||||
|
||||
target_include_directories(pvt_lib
|
||||
target_include_directories(pvt_libs
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
)
|
||||
|
||||
target_compile_definitions(pvt_lib PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||
|
||||
set_property(TARGET pvt_lib APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(pvt_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET pvt_libs APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/algorithms/libs/rtklib>
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
@ -79,7 +80,14 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
|
||||
|
||||
GeoJSON_Printer::~GeoJSON_Printer()
|
||||
{
|
||||
GeoJSON_Printer::close_file();
|
||||
try
|
||||
{
|
||||
GeoJSON_Printer::close_file();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -213,7 +221,10 @@ bool GeoJSON_Printer::close_file()
|
||||
// if nothing is written, erase the file
|
||||
if (first_pos == true)
|
||||
{
|
||||
if (remove(filename_.c_str()) != 0) LOG(INFO) << "Error deleting temporary file";
|
||||
if (remove(filename_.c_str()) != 0)
|
||||
{
|
||||
LOG(INFO) << "Error deleting temporary file";
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
|
||||
using google::LogMessage;
|
||||
@ -154,14 +155,14 @@ bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name)
|
||||
}
|
||||
|
||||
|
||||
bool Gpx_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values)
|
||||
bool Gpx_Printer::print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
double height;
|
||||
|
||||
positions_printed = true;
|
||||
const std::shared_ptr<rtklib_solver>& position_ = position;
|
||||
const std::shared_ptr<Rtklib_Solver>& position_ = position;
|
||||
|
||||
double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s
|
||||
double course_over_ground = position_->get_course_over_ground(); // expressed in deg
|
||||
@ -170,7 +171,10 @@ bool Gpx_Printer::print_position(const std::shared_ptr<rtklib_solver>& position,
|
||||
double vdop = position_->get_vdop();
|
||||
double pdop = position_->get_pdop();
|
||||
std::string utc_time = to_iso_extended_string(position_->get_position_UTC_time());
|
||||
if (utc_time.length() < 23) utc_time += ".";
|
||||
if (utc_time.length() < 23)
|
||||
{
|
||||
utc_time += ".";
|
||||
}
|
||||
utc_time.resize(23, '0'); // time up to ms
|
||||
utc_time.append("Z"); // UTC time zone
|
||||
|
||||
@ -218,9 +222,19 @@ bool Gpx_Printer::close_file()
|
||||
|
||||
Gpx_Printer::~Gpx_Printer()
|
||||
{
|
||||
close_file();
|
||||
try
|
||||
{
|
||||
close_file();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
if (!positions_printed)
|
||||
{
|
||||
if (remove(gpx_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary GPX file";
|
||||
if (remove(gpx_filename.c_str()) != 0)
|
||||
{
|
||||
LOG(INFO) << "Error deleting temporary GPX file";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
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 std::shared_ptr<rtklib_solver>& position, bool print_average_values);
|
||||
bool print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values);
|
||||
bool close_file();
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
|
||||
Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
|
||||
{
|
||||
// init empty ephemeris for all the available GNSS channels
|
||||
d_nchannels = nchannels;
|
||||
@ -69,7 +69,7 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag
|
||||
}
|
||||
|
||||
|
||||
hybrid_ls_pvt::~hybrid_ls_pvt()
|
||||
Hybrid_Ls_Pvt::~Hybrid_Ls_Pvt()
|
||||
{
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
@ -85,7 +85,7 @@ hybrid_ls_pvt::~hybrid_ls_pvt()
|
||||
}
|
||||
|
||||
|
||||
bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging)
|
||||
bool Hybrid_Ls_Pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging)
|
||||
{
|
||||
std::map<int, Gnss_Synchro>::iterator gnss_observables_iter;
|
||||
std::map<int, Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||
@ -133,7 +133,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
|
||||
// COMMON RX TIME PVT ALGORITHM
|
||||
double Rx_time = hybrid_current_time;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GALILEO_C_m_s;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GALILEO_C_M_S;
|
||||
|
||||
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
||||
SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
||||
@ -150,7 +150,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
|
||||
// 4- fill the observations vector with the corrected observables
|
||||
obs.resize(valid_obs + 1, 1);
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s - this->get_time_offset_s() * GALILEO_C_m_s;
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_M_S - this->get_time_offset_s() * GALILEO_C_M_S;
|
||||
|
||||
Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST
|
||||
GST = galileo_ephemeris_iter->second.Galileo_System_Time(Galileo_week_number, hybrid_current_time);
|
||||
@ -188,7 +188,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
||||
// first estimate of transmit time
|
||||
double Rx_time = hybrid_current_time;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_M_S;
|
||||
|
||||
// 2- compute the clock drift using the clock model (broadcast) for this SV, not including relativistic effect
|
||||
SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time); //- gps_ephemeris_iter->second.d_TGD;
|
||||
@ -208,10 +208,10 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
// See IS-GPS-200E section 20.3.3.3.3.2
|
||||
double sqrt_Gamma = GPS_L1_FREQ_HZ / GPS_L2_FREQ_HZ;
|
||||
double Gamma = sqrt_Gamma * sqrt_Gamma;
|
||||
double P1_P2 = (1.0 - Gamma) * (gps_ephemeris_iter->second.d_TGD * GPS_C_m_s);
|
||||
double P1_P2 = (1.0 - Gamma) * (gps_ephemeris_iter->second.d_TGD * GPS_C_M_S);
|
||||
double Code_bias_m = P1_P2 / (1.0 - Gamma);
|
||||
obs.resize(valid_obs + 1, 1);
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s - Code_bias_m - this->get_time_offset_s() * GPS_C_m_s;
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_M_S - Code_bias_m - this->get_time_offset_s() * GPS_C_M_S;
|
||||
|
||||
// SV ECEF DEBUG OUTPUT
|
||||
LOG(INFO) << "(new)ECEF GPS L1 CA satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN
|
||||
@ -243,7 +243,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
|
||||
// first estimate of transmit time
|
||||
double Rx_time = hybrid_current_time;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s;
|
||||
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_M_S;
|
||||
|
||||
// 2- compute the clock drift using the clock model (broadcast) for this SV
|
||||
SV_clock_bias_s = gps_cnav_ephemeris_iter->second.sv_clock_drift(Tx_time);
|
||||
@ -261,7 +261,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
|
||||
// 4- fill the observations vector with the corrected observables
|
||||
obs.resize(valid_obs + 1, 1);
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s + SV_clock_bias_s * GPS_C_m_s;
|
||||
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_M_S + SV_clock_bias_s * GPS_C_M_S;
|
||||
|
||||
GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week;
|
||||
GPS_week = GPS_week % 1024; //Necessary due to the increase of WN bits in CNAV message (10 in GPS NAV and 13 in CNAV)
|
||||
@ -311,17 +311,17 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
|
||||
DLOG(INFO) << " Executing Bancroft algorithm...";
|
||||
rx_position_and_time = bancroftPos(satpos.t(), obs);
|
||||
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
|
||||
this->set_time_offset_s(rx_position_and_time(3) / GPS_C_m_s); // save time for the next iteration [meters]->[seconds]
|
||||
this->set_time_offset_s(rx_position_and_time(3) / GPS_C_M_S); // save time for the next iteration [meters]->[seconds]
|
||||
}
|
||||
|
||||
// Execute WLS using previous position as the initialization point
|
||||
rx_position_and_time = leastSquarePos(satpos, obs, W);
|
||||
|
||||
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
|
||||
this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / GPS_C_m_s); // accumulate the rx time error for the next iteration [meters]->[seconds]
|
||||
this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / GPS_C_M_S); // accumulate the rx time error for the next iteration [meters]->[seconds]
|
||||
|
||||
DLOG(INFO) << "Hybrid Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;
|
||||
DLOG(INFO) << "Accumulated rx clock error=" << this->get_time_offset_s() << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_m_s << " [s]";
|
||||
DLOG(INFO) << "Accumulated rx clock error=" << this->get_time_offset_s() << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_M_S << " [s]";
|
||||
|
||||
// Compute GST and Gregorian time
|
||||
if (GST != 0.0)
|
||||
|
@ -46,7 +46,7 @@
|
||||
/*!
|
||||
* \brief This class implements a simple PVT Least Squares solution
|
||||
*/
|
||||
class hybrid_ls_pvt : public Ls_Pvt
|
||||
class Hybrid_Ls_Pvt : public Ls_Pvt
|
||||
{
|
||||
private:
|
||||
int count_valid_position;
|
||||
@ -57,10 +57,10 @@ private:
|
||||
double d_galileo_current_time;
|
||||
|
||||
public:
|
||||
hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file);
|
||||
~hybrid_ls_pvt();
|
||||
Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file);
|
||||
~Hybrid_Ls_Pvt();
|
||||
|
||||
bool get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging);
|
||||
bool get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging);
|
||||
|
||||
std::map<int, Galileo_Ephemeris> galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris
|
||||
std::map<int, Gps_Ephemeris> gps_ephemeris_map; //!< Map storing new GPS_Ephemeris
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <boost/filesystem/path.hpp> // for path, operator<<
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
|
||||
using google::LogMessage;
|
||||
@ -211,7 +212,7 @@ bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name)
|
||||
}
|
||||
|
||||
|
||||
bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values)
|
||||
bool Kml_Printer::print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values)
|
||||
{
|
||||
double latitude;
|
||||
double longitude;
|
||||
@ -219,7 +220,7 @@ bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position,
|
||||
|
||||
positions_printed = true;
|
||||
|
||||
const std::shared_ptr<rtklib_solver>& position_ = position;
|
||||
const std::shared_ptr<Rtklib_Solver>& position_ = position;
|
||||
|
||||
double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s
|
||||
double course_over_ground = position_->get_course_over_ground(); // expressed in deg
|
||||
@ -228,7 +229,10 @@ bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position,
|
||||
double vdop = position_->get_vdop();
|
||||
double pdop = position_->get_pdop();
|
||||
std::string utc_time = to_iso_extended_string(position_->get_position_UTC_time());
|
||||
if (utc_time.length() < 23) utc_time += ".";
|
||||
if (utc_time.length() < 23)
|
||||
{
|
||||
utc_time += ".";
|
||||
}
|
||||
utc_time.resize(23, '0'); // time up to ms
|
||||
utc_time.append("Z"); // UTC time zone
|
||||
|
||||
@ -319,9 +323,19 @@ bool Kml_Printer::close_file()
|
||||
|
||||
Kml_Printer::~Kml_Printer()
|
||||
{
|
||||
close_file();
|
||||
try
|
||||
{
|
||||
close_file();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
if (!positions_printed)
|
||||
{
|
||||
if (remove(kml_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary KML file";
|
||||
if (remove(kml_filename.c_str()) != 0)
|
||||
{
|
||||
LOG(INFO) << "Error deleting temporary KML file";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
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 std::shared_ptr<rtklib_solver>& position, bool print_average_values);
|
||||
bool print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values);
|
||||
bool close_file();
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ arma::vec Ls_Pvt::bancroftPos(const arma::mat& satpos, const arma::vec& obs)
|
||||
{
|
||||
int z = B(i, 2);
|
||||
double rho = (x - pos(0)) * (x - pos(0)) + (y - pos(1)) * (y - pos(1)) + (z - pos(2)) * (z - pos(2));
|
||||
traveltime = sqrt(rho) / GPS_C_m_s;
|
||||
traveltime = sqrt(rho) / GPS_C_M_S;
|
||||
}
|
||||
double angle = traveltime * 7.292115147e-5;
|
||||
double cosa = cos(angle);
|
||||
@ -228,7 +228,7 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs,
|
||||
(X(1, i) - pos(1)) +
|
||||
(X(2, i) - pos(2)) *
|
||||
(X(2, i) - pos(2));
|
||||
traveltime = sqrt(rho2) / GPS_C_m_s;
|
||||
traveltime = sqrt(rho2) / GPS_C_M_S;
|
||||
|
||||
//--- Correct satellite position (do to earth rotation) --------
|
||||
Rot_X = Ls_Pvt::rotateSatellite(traveltime, X.col(i)); //armadillo
|
||||
@ -253,7 +253,10 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs,
|
||||
{
|
||||
//--- Find delay due to troposphere (in meters)
|
||||
Ls_Pvt::tropo(&trop, sin(*elev * GPS_PI / 180.0), h / 1000.0, 1013.0, 293.0, 50.0, 0.0, 0.0, 0.0);
|
||||
if (trop > 5.0) trop = 0.0; //check for erratic values
|
||||
if (trop > 5.0)
|
||||
{
|
||||
trop = 0.0; //check for erratic values
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -280,9 +283,9 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs,
|
||||
}
|
||||
|
||||
// check the consistency of the PVT solution
|
||||
if (((fabs(pos(3)) * 1000.0) / GPS_C_m_s) > GPS_STARTOFFSET_ms * 2)
|
||||
if (((fabs(pos(3)) * 1000.0) / GPS_C_M_S) > GPS_STARTOFFSET_MS * 2)
|
||||
{
|
||||
LOG(WARNING) << "Receiver time offset out of range! Estimated RX Time error [s]:" << pos(3) / GPS_C_m_s;
|
||||
LOG(WARNING) << "Receiver time offset out of range! Estimated RX Time error [s]:" << pos(3) / GPS_C_M_S;
|
||||
throw std::runtime_error("Receiver time offset out of range!");
|
||||
}
|
||||
return pos;
|
||||
|
@ -28,8 +28,8 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef MONITOR_PVT_H_
|
||||
#define MONITOR_PVT_H_
|
||||
#ifndef GNSS_SDR_MONITOR_PVT_H_
|
||||
#define GNSS_SDR_MONITOR_PVT_H_
|
||||
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <cstdint>
|
||||
@ -137,4 +137,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* MONITOR_PVT_H_ */
|
||||
#endif /* GNSS_SDR_MONITOR_PVT_H_ */
|
||||
|
@ -31,27 +31,56 @@
|
||||
|
||||
#include "monitor_pvt_udp_sink.h"
|
||||
#include <boost/archive/binary_oarchive.hpp>
|
||||
//#include <boost/serialization/vector.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(std::vector<std::string> addresses, const uint16_t& port) : socket{io_service}
|
||||
{
|
||||
for (auto address : addresses)
|
||||
for (const auto& address : addresses)
|
||||
{
|
||||
boost::asio::ip::udp::endpoint endpoint(boost::asio::ip::address::from_string(address, error), port);
|
||||
endpoints.push_back(endpoint);
|
||||
}
|
||||
monitor_pvt.TOW_at_current_symbol_ms = 0U;
|
||||
monitor_pvt.week = 0U;
|
||||
monitor_pvt.RX_time = 0.0;
|
||||
monitor_pvt.user_clk_offset = 0.0;
|
||||
monitor_pvt.pos_x = 0.0;
|
||||
monitor_pvt.pos_y = 0.0;
|
||||
monitor_pvt.pos_z = 0.0;
|
||||
monitor_pvt.vel_x = 0.0;
|
||||
monitor_pvt.vel_y = 0.0;
|
||||
monitor_pvt.vel_z = 0.0;
|
||||
monitor_pvt.cov_xx = 0.0;
|
||||
monitor_pvt.cov_yy = 0.0;
|
||||
monitor_pvt.cov_zz = 0.0;
|
||||
monitor_pvt.cov_xy = 0.0;
|
||||
monitor_pvt.cov_yz = 0.0;
|
||||
monitor_pvt.cov_zx = 0.0;
|
||||
monitor_pvt.latitude = 0.0;
|
||||
monitor_pvt.longitude = 0.0;
|
||||
monitor_pvt.height = 0.0;
|
||||
monitor_pvt.valid_sats = 0;
|
||||
monitor_pvt.solution_status = 0;
|
||||
monitor_pvt.solution_type = 0;
|
||||
monitor_pvt.AR_ratio_factor = 0.0;
|
||||
monitor_pvt.AR_ratio_threshold = 0.0;
|
||||
monitor_pvt.gdop = 0.0;
|
||||
monitor_pvt.pdop = 0.0;
|
||||
monitor_pvt.hdop = 0.0;
|
||||
monitor_pvt.vdop = 0.0;
|
||||
}
|
||||
|
||||
bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(Monitor_Pvt monitor_pvt)
|
||||
|
||||
bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(const Monitor_Pvt& monitor_pvt)
|
||||
{
|
||||
std::ostringstream archive_stream;
|
||||
boost::archive::binary_oarchive oa{archive_stream};
|
||||
oa << monitor_pvt;
|
||||
std::string outbound_data = archive_stream.str();
|
||||
|
||||
for (auto endpoint : endpoints)
|
||||
for (const auto& endpoint : endpoints)
|
||||
{
|
||||
socket.open(endpoint.protocol(), error);
|
||||
socket.connect(endpoint, error);
|
||||
|
@ -29,8 +29,8 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef MONITOR_PVT_UDP_SINK_H_
|
||||
#define MONITOR_PVT_UDP_SINK_H_
|
||||
#ifndef GNSS_SDR_MONITOR_PVT_UDP_SINK_H_
|
||||
#define GNSS_SDR_MONITOR_PVT_UDP_SINK_H_
|
||||
|
||||
#include "monitor_pvt.h"
|
||||
#include <boost/asio.hpp>
|
||||
@ -39,7 +39,7 @@ class Monitor_Pvt_Udp_Sink
|
||||
{
|
||||
public:
|
||||
Monitor_Pvt_Udp_Sink(std::vector<std::string> addresses, const uint16_t &port);
|
||||
bool write_monitor_pvt(Monitor_Pvt monitor_pvt);
|
||||
bool write_monitor_pvt(const Monitor_Pvt &monitor_pvt);
|
||||
|
||||
private:
|
||||
boost::asio::io_service io_service;
|
||||
@ -50,4 +50,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif /* MONITOR_PVT_UDP_SINK_H_ */
|
||||
#endif /* GNSS_SDR_MONITOR_PVT_UDP_SINK_H_ */
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
#include <exception>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
|
||||
@ -118,11 +119,29 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
|
||||
|
||||
Nmea_Printer::~Nmea_Printer()
|
||||
{
|
||||
if (nmea_file_descriptor.is_open())
|
||||
try
|
||||
{
|
||||
nmea_file_descriptor.close();
|
||||
if (nmea_file_descriptor.is_open())
|
||||
{
|
||||
nmea_file_descriptor.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure& e)
|
||||
{
|
||||
std::cerr << "Problem closing NMEA dump file: " << nmea_filename << '\n';
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
try
|
||||
{
|
||||
close_serial();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
close_serial();
|
||||
}
|
||||
|
||||
|
||||
@ -142,10 +161,16 @@ int Nmea_Printer::init_serial(const std::string& serial_device)
|
||||
int64_t PARITY;
|
||||
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY | O_CLOEXEC);
|
||||
if (fd == -1) return fd; // failed to open TTY port
|
||||
if (fd == -1)
|
||||
{
|
||||
return fd; // failed to open TTY port
|
||||
}
|
||||
|
||||
if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
if (fcntl(fd, F_SETFL, 0) == -1)
|
||||
{
|
||||
LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
}
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
|
||||
BAUD = B9600;
|
||||
// BAUD = B38400;
|
||||
@ -174,7 +199,7 @@ void Nmea_Printer::close_serial()
|
||||
}
|
||||
|
||||
|
||||
bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_data, bool print_average_values)
|
||||
bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<Rtklib_Solver>& pvt_data, bool print_average_values)
|
||||
{
|
||||
std::string GPRMC;
|
||||
std::string GPGGA;
|
||||
@ -348,13 +373,22 @@ std::string Nmea_Printer::get_UTC_NMEA_time(boost::posix_time::ptime d_position_
|
||||
utc_seconds = td.seconds();
|
||||
utc_milliseconds = td.total_milliseconds() - td.total_seconds() * 1000;
|
||||
|
||||
if (utc_hours < 10) sentence_str << "0"; // two digits for hours
|
||||
if (utc_hours < 10)
|
||||
{
|
||||
sentence_str << "0"; // two digits for hours
|
||||
}
|
||||
sentence_str << utc_hours;
|
||||
|
||||
if (utc_mins < 10) sentence_str << "0"; // two digits for minutes
|
||||
if (utc_mins < 10)
|
||||
{
|
||||
sentence_str << "0"; // two digits for minutes
|
||||
}
|
||||
sentence_str << utc_mins;
|
||||
|
||||
if (utc_seconds < 10) sentence_str << "0"; // two digits for seconds
|
||||
if (utc_seconds < 10)
|
||||
{
|
||||
sentence_str << "0"; // two digits for seconds
|
||||
}
|
||||
sentence_str << utc_seconds;
|
||||
|
||||
if (utc_milliseconds < 10)
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
/*!
|
||||
* \brief Print NMEA PVT and satellite info to the initialized device
|
||||
*/
|
||||
bool Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_data, bool print_average_values);
|
||||
bool Print_Nmea_Line(const std::shared_ptr<Rtklib_Solver>& pvt_data, bool print_average_values);
|
||||
|
||||
/*!
|
||||
* \brief Default destructor.
|
||||
@ -72,7 +72,7 @@ private:
|
||||
std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file
|
||||
std::string nmea_devname;
|
||||
int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port)
|
||||
std::shared_ptr<rtklib_solver> d_PVT_data;
|
||||
std::shared_ptr<Rtklib_Solver> d_PVT_data;
|
||||
int init_serial(const std::string& serial_device); //serial port control
|
||||
void close_serial();
|
||||
std::string get_GPGGA(); // fix data
|
||||
|
@ -67,4 +67,7 @@ Pvt_Conf::Pvt_Conf()
|
||||
kml_output_path = std::string(".");
|
||||
xml_output_path = std::string(".");
|
||||
rtcm_output_file_path = std::string(".");
|
||||
|
||||
monitor_enabled = false;
|
||||
udp_port = 0;
|
||||
}
|
||||
|
@ -37,8 +37,6 @@
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <deque>
|
||||
|
||||
const unsigned int PVT_MAX_CHANNELS = 90;
|
||||
const unsigned int PVT_MAX_PRN = 127; // 126 is SBAS
|
||||
|
||||
/*!
|
||||
* \brief Base class for a PVT solution
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -186,17 +186,17 @@ public:
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS L1 C/A /GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
||||
*/
|
||||
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glo_bands = "1C");
|
||||
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands = "1C");
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (Galileo/GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
||||
*/
|
||||
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B", const std::string& glo_bands = "1C");
|
||||
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B", const std::string& glonass_bands = "1C");
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS L2C/GLONASS) Observation data header. Example: galileo_bands("1G")... Default: "1G".
|
||||
*/
|
||||
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glo_bands = "1G");
|
||||
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands = "1G");
|
||||
|
||||
/*!
|
||||
* \brief Generates the a Beidou B1I Observation data header. Example: beidou_bands("B1")
|
||||
@ -351,12 +351,12 @@ public:
|
||||
/*!
|
||||
* \brief Writes Mixed GPS L2C - GLONASS observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||
|
||||
/*!
|
||||
* \brief Writes Mixed Galileo/GLONASS observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double galileo_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
||||
|
||||
/*!
|
||||
* \brief Writes BDS B1I observables into the RINEX file
|
||||
@ -374,7 +374,7 @@ public:
|
||||
*/
|
||||
//void log_rinex_sbs(std::fstream & out, const Sbas_Raw_Msg & sbs_message);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Gps_Utc_Model& gps_utc, const Gps_Iono& gps_iono);
|
||||
void update_nav_header(std::fstream& out, const Gps_Utc_Model& utc_model, const Gps_Iono& gps_iono);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono);
|
||||
|
||||
@ -388,11 +388,11 @@ public:
|
||||
|
||||
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_cnav_iono, const Gps_CNAV_Utc_Model& gps_cnav_utc, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_Model& beidou_dnav_utc, const Beidou_Dnav_Iono& beidou_dnav_iono);
|
||||
void update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model, const Beidou_Dnav_Iono& beidou_dnav_iono);
|
||||
|
||||
void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model);
|
||||
|
||||
@ -676,8 +676,15 @@ inline std::string Rinex_Printer::doub2for(const double& d,
|
||||
short exponentLength = expLen;
|
||||
|
||||
/* Validate the assumptions regarding the input arguments */
|
||||
if (exponentLength < 0) exponentLength = 1;
|
||||
if (exponentLength > 3 && checkSwitch) exponentLength = 3;
|
||||
if (exponentLength < 0)
|
||||
{
|
||||
exponentLength = 1;
|
||||
}
|
||||
|
||||
if (exponentLength > 3 && checkSwitch)
|
||||
{
|
||||
exponentLength = 3;
|
||||
}
|
||||
|
||||
std::string toReturn = doub2sci(d, length, exponentLength, true, checkSwitch);
|
||||
sci2for(toReturn, 0, length, exponentLength, checkSwitch);
|
||||
@ -696,8 +703,15 @@ inline std::string Rinex_Printer::doub2sci(const double& d,
|
||||
short exponentLength = expLen;
|
||||
|
||||
/* Validate the assumptions regarding the input arguments */
|
||||
if (exponentLength < 0) exponentLength = 1;
|
||||
if (exponentLength > 3 && checkSwitch) exponentLength = 3;
|
||||
if (exponentLength < 0)
|
||||
{
|
||||
exponentLength = 1;
|
||||
}
|
||||
|
||||
if (exponentLength > 3 && checkSwitch)
|
||||
{
|
||||
exponentLength = 3;
|
||||
}
|
||||
|
||||
std::stringstream c;
|
||||
c.setf(std::ios::scientific, std::ios::floatfield);
|
||||
@ -709,7 +723,10 @@ inline std::string Rinex_Printer::doub2sci(const double& d,
|
||||
// an extra -1 for '-' or ' ' if it's positive or negative
|
||||
int expSize = 0;
|
||||
if (showSign)
|
||||
expSize = 1;
|
||||
{
|
||||
expSize = 1;
|
||||
}
|
||||
|
||||
c.precision(length - 3 - exponentLength - 1 - expSize);
|
||||
c << d;
|
||||
c >> toReturn;
|
||||
@ -751,7 +768,9 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
||||
aStr[idx - 1] = '.';
|
||||
// Only add one to the exponent if the number is non-zero
|
||||
if (asDouble(aStr.substr(startPos, length)) != 0.0)
|
||||
expAdd = 1;
|
||||
{
|
||||
expAdd = 1;
|
||||
}
|
||||
}
|
||||
|
||||
idx = aStr.find('e', startPos);
|
||||
@ -766,9 +785,13 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
||||
|
||||
// Change the exponent character to D normally, or E of checkSwitch is false.
|
||||
if (checkSwitch)
|
||||
aStr[idx] = 'D';
|
||||
{
|
||||
aStr[idx] = 'D';
|
||||
}
|
||||
else
|
||||
aStr[idx] = 'E';
|
||||
{
|
||||
aStr[idx] = 'E';
|
||||
}
|
||||
|
||||
// Change the exponent itself
|
||||
if (redoexp)
|
||||
@ -784,7 +807,10 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
||||
iexp -= iexp * 2;
|
||||
}
|
||||
else
|
||||
aStr += "+";
|
||||
{
|
||||
aStr += "+";
|
||||
}
|
||||
|
||||
aStr += Rinex_Printer::rightJustify(asString(iexp), expLen, '0');
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <boost/filesystem/path_traits.hpp> // for filesystem
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
#include <exception>
|
||||
#include <fcntl.h> // for O_RDWR
|
||||
#include <iomanip>
|
||||
#include <termios.h> // for tcgetattr
|
||||
@ -190,13 +191,30 @@ Rtcm_Printer::~Rtcm_Printer()
|
||||
{
|
||||
int64_t pos;
|
||||
pos = rtcm_file_descriptor.tellp();
|
||||
rtcm_file_descriptor.close();
|
||||
try
|
||||
{
|
||||
rtcm_file_descriptor.close();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
if (pos == 0)
|
||||
{
|
||||
if (remove(rtcm_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary RTCM file";
|
||||
if (remove(rtcm_filename.c_str()) != 0)
|
||||
{
|
||||
LOG(INFO) << "Error deleting temporary RTCM file";
|
||||
}
|
||||
}
|
||||
}
|
||||
close_serial();
|
||||
try
|
||||
{
|
||||
close_serial();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -353,10 +371,16 @@ int Rtcm_Printer::init_serial(const std::string& serial_device)
|
||||
int64_t PARITY;
|
||||
|
||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY | O_CLOEXEC);
|
||||
if (fd == -1) return fd; // failed to open TTY port
|
||||
if (fd == -1)
|
||||
{
|
||||
return fd; // failed to open TTY port
|
||||
}
|
||||
|
||||
if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
if (fcntl(fd, F_SETFL, 0) == -1)
|
||||
{
|
||||
LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||
}
|
||||
tcgetattr(fd, &options); // read serial port options
|
||||
|
||||
BAUD = B9600;
|
||||
//BAUD = B38400;
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
/*!
|
||||
* \brief Default constructor.
|
||||
*/
|
||||
Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = ".");
|
||||
Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name = true, const std::string& base_path = ".");
|
||||
|
||||
/*!
|
||||
* \brief Default destructor.
|
||||
@ -112,7 +112,7 @@ public:
|
||||
* \param utc_model GLONASS GNAV Clock Information broadcast in string 5
|
||||
* \return true or false upon operation success
|
||||
*/
|
||||
bool Print_Rtcm_MT1020(const Glonass_Gnav_Ephemeris& glo_gnav_eph, const Glonass_Gnav_Utc_Model& utc_model);
|
||||
bool Print_Rtcm_MT1020(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glonass_Gnav_Utc_Model& utc_model);
|
||||
|
||||
bool Print_Rtcm_MSM(uint32_t msm_number,
|
||||
const Gps_Ephemeris& gps_eph,
|
||||
|
@ -60,12 +60,13 @@
|
||||
#include "rtklib_solution.h"
|
||||
#include <glog/logging.h>
|
||||
#include <matio.h>
|
||||
#include <exception>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
|
||||
Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
|
||||
{
|
||||
// init empty ephemeris for all the available GNSS channels
|
||||
d_nchannels = nchannels;
|
||||
@ -75,7 +76,10 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
||||
count_valid_position = 0;
|
||||
this->set_averaging_flag(false);
|
||||
rtk_ = rtk;
|
||||
for (double &i : dop_) i = 0.0;
|
||||
for (double &i : dop_)
|
||||
{
|
||||
i = 0.0;
|
||||
}
|
||||
pvt_sol = {{0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, '0', '0', '0', 0, 0, 0};
|
||||
ssat_t ssat0 = {0, 0, {0.0}, {0.0}, {0.0}, {'0'}, {'0'}, {'0'}, {'0'}, {'0'}, {}, {}, {}, {}, 0.0, 0.0, 0.0, 0.0, {{{0, 0}}, {{0, 0}}}, {{}, {}}};
|
||||
for (auto &i : pvt_ssat)
|
||||
@ -89,19 +93,48 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
||||
{
|
||||
try
|
||||
{
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str();
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
LOG(WARNING) << "Exception opening RTKLIB dump file " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
// PVT MONITOR
|
||||
monitor_pvt.TOW_at_current_symbol_ms = 0U;
|
||||
monitor_pvt.week = 0U;
|
||||
monitor_pvt.RX_time = 0.0;
|
||||
monitor_pvt.user_clk_offset = 0.0;
|
||||
monitor_pvt.pos_x = 0.0;
|
||||
monitor_pvt.pos_y = 0.0;
|
||||
monitor_pvt.pos_z = 0.0;
|
||||
monitor_pvt.vel_x = 0.0;
|
||||
monitor_pvt.vel_y = 0.0;
|
||||
monitor_pvt.vel_z = 0.0;
|
||||
monitor_pvt.cov_xx = 0.0;
|
||||
monitor_pvt.cov_yy = 0.0;
|
||||
monitor_pvt.cov_zz = 0.0;
|
||||
monitor_pvt.cov_xy = 0.0;
|
||||
monitor_pvt.cov_yz = 0.0;
|
||||
monitor_pvt.cov_zx = 0.0;
|
||||
monitor_pvt.latitude = 0.0;
|
||||
monitor_pvt.longitude = 0.0;
|
||||
monitor_pvt.height = 0.0;
|
||||
monitor_pvt.valid_sats = 0;
|
||||
monitor_pvt.solution_status = 0;
|
||||
monitor_pvt.solution_type = 0;
|
||||
monitor_pvt.AR_ratio_factor = 0.0;
|
||||
monitor_pvt.AR_ratio_threshold = 0.0;
|
||||
monitor_pvt.gdop = 0.0;
|
||||
monitor_pvt.pdop = 0.0;
|
||||
monitor_pvt.hdop = 0.0;
|
||||
monitor_pvt.vdop = 0.0;
|
||||
}
|
||||
|
||||
bool rtklib_solver::save_matfile()
|
||||
bool Rtklib_Solver::save_matfile()
|
||||
{
|
||||
// READ DUMP FILE
|
||||
std::string dump_filename = d_dump_filename;
|
||||
@ -397,7 +430,8 @@ bool rtklib_solver::save_matfile()
|
||||
return true;
|
||||
}
|
||||
|
||||
rtklib_solver::~rtklib_solver()
|
||||
|
||||
Rtklib_Solver::~Rtklib_Solver()
|
||||
{
|
||||
if (d_dump_file.is_open() == true)
|
||||
{
|
||||
@ -412,40 +446,47 @@ rtklib_solver::~rtklib_solver()
|
||||
}
|
||||
if (d_flag_dump_mat_enabled)
|
||||
{
|
||||
save_matfile();
|
||||
try
|
||||
{
|
||||
save_matfile();
|
||||
}
|
||||
catch (const std::exception &ex)
|
||||
{
|
||||
LOG(WARNING) << "Exception in destructor saving the PVT .mat dump file " << ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double rtklib_solver::get_gdop() const
|
||||
double Rtklib_Solver::get_gdop() const
|
||||
{
|
||||
return dop_[0];
|
||||
}
|
||||
|
||||
|
||||
double rtklib_solver::get_pdop() const
|
||||
double Rtklib_Solver::get_pdop() const
|
||||
{
|
||||
return dop_[1];
|
||||
}
|
||||
|
||||
|
||||
double rtklib_solver::get_hdop() const
|
||||
double Rtklib_Solver::get_hdop() const
|
||||
{
|
||||
return dop_[2];
|
||||
}
|
||||
|
||||
|
||||
double rtklib_solver::get_vdop() const
|
||||
double Rtklib_Solver::get_vdop() const
|
||||
{
|
||||
return dop_[3];
|
||||
}
|
||||
|
||||
Monitor_Pvt rtklib_solver::get_monitor_pvt() const
|
||||
Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const
|
||||
{
|
||||
return monitor_pvt;
|
||||
}
|
||||
|
||||
bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging)
|
||||
bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging)
|
||||
{
|
||||
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;
|
||||
std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
|
||||
@ -496,7 +537,10 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
}
|
||||
}
|
||||
}
|
||||
if (band1 == true and band2 == true) gps_dual_band = true;
|
||||
if (band1 == true and band2 == true)
|
||||
{
|
||||
gps_dual_band = true;
|
||||
}
|
||||
|
||||
for (gnss_observables_iter = gnss_observables_map.cbegin();
|
||||
gnss_observables_iter != gnss_observables_map.cend();
|
||||
@ -855,7 +899,10 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
}
|
||||
}
|
||||
|
||||
if (index_aux > 0) dops(index_aux, azel.data(), 0.0, dop_.data());
|
||||
if (index_aux > 0)
|
||||
{
|
||||
dops(index_aux, azel.data(), 0.0, dop_.data());
|
||||
}
|
||||
this->set_valid_position(true);
|
||||
arma::vec rx_position_and_time(4);
|
||||
rx_position_and_time(0) = pvt_sol.rr[0]; // [m]
|
||||
@ -869,7 +916,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
}
|
||||
else
|
||||
{
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_m_s; // the receiver clock offset is expressed in [meters], so we convert it into [s]
|
||||
rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_M_S; // the receiver clock offset is expressed in [meters], so we convert it into [s]
|
||||
}
|
||||
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
|
||||
|
||||
@ -884,7 +931,10 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
if (ground_speed_ms >= 1.0)
|
||||
{
|
||||
new_cog = atan2(enuv[0], enuv[1]) * R2D;
|
||||
if (new_cog < 0.0) new_cog += 360.0;
|
||||
if (new_cog < 0.0)
|
||||
{
|
||||
new_cog += 360.0;
|
||||
}
|
||||
this->set_course_over_ground(new_cog);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
/*!
|
||||
* \brief This class implements a simple PVT Least Squares solution
|
||||
*/
|
||||
class rtklib_solver : public Pvt_Solution
|
||||
class Rtklib_Solver : public Pvt_Solution
|
||||
{
|
||||
private:
|
||||
rtk_t rtk_;
|
||||
@ -91,8 +91,8 @@ private:
|
||||
public:
|
||||
sol_t pvt_sol;
|
||||
ssat_t pvt_ssat[MAXSAT];
|
||||
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk);
|
||||
~rtklib_solver();
|
||||
Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk);
|
||||
~Rtklib_Solver();
|
||||
|
||||
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging);
|
||||
double get_hdop() const;
|
||||
|
@ -91,25 +91,38 @@ list(SORT ACQ_ADAPTER_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${ACQ_ADAPTER_HEADERS})
|
||||
|
||||
add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
|
||||
add_library(acquisition_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS})
|
||||
|
||||
target_link_libraries(acq_adapters
|
||||
target_link_libraries(acquisition_adapters
|
||||
PUBLIC
|
||||
gnss_sp_libs
|
||||
gnss_sdr_flags
|
||||
acq_gr_blocks
|
||||
rx_core_lib
|
||||
Gnuradio::blocks
|
||||
gnss_system_parameters
|
||||
algorithms_libs
|
||||
gnss_sdr_flags
|
||||
acquisition_gr_blocks
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
acquisition_lib
|
||||
acquisition_libs
|
||||
)
|
||||
|
||||
set_property(TARGET acq_adapters
|
||||
target_include_directories(acquisition_adapters
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acquisition_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -68,7 +68,10 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
@ -81,7 +84,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<uint32_t>(std::round(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@ -144,7 +147,7 @@ void BeidouB1iPcpsAcquisition::stop_acquisition()
|
||||
{
|
||||
}
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_channel(unsigned int channel)
|
||||
void BeidouB1iPcpsAcquisition::set_channel(uint32_t channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
acquisition_->set_channel(channel_);
|
||||
@ -170,7 +173,7 @@ void BeidouB1iPcpsAcquisition::set_threshold(float threshold)
|
||||
}
|
||||
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||
void BeidouB1iPcpsAcquisition::set_doppler_max(uint32_t doppler_max)
|
||||
{
|
||||
doppler_max_ = doppler_max;
|
||||
|
||||
@ -178,7 +181,7 @@ void BeidouB1iPcpsAcquisition::set_doppler_max(unsigned int doppler_max)
|
||||
}
|
||||
|
||||
|
||||
void BeidouB1iPcpsAcquisition::set_doppler_step(unsigned int doppler_step)
|
||||
void BeidouB1iPcpsAcquisition::set_doppler_step(uint32_t doppler_step)
|
||||
{
|
||||
doppler_step_ = doppler_step;
|
||||
|
||||
@ -213,7 +216,7 @@ void BeidouB1iPcpsAcquisition::set_local_code()
|
||||
|
||||
beidou_b1i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
for (unsigned int i = 0; i < sampled_ms_; i++)
|
||||
for (uint32_t i = 0; i < sampled_ms_; i++)
|
||||
{
|
||||
memcpy(&(code_[i * code_length_]), code,
|
||||
sizeof(gr_complex) * code_length_);
|
||||
@ -239,7 +242,7 @@ void BeidouB1iPcpsAcquisition::set_state(int state)
|
||||
float BeidouB1iPcpsAcquisition::calculate_threshold(float pfa)
|
||||
{
|
||||
//Calculate the threshold
|
||||
unsigned int frequency_bins = 0;
|
||||
uint32_t frequency_bins = 0;
|
||||
/*
|
||||
for (int doppler = (int)(-doppler_max_); doppler <= (int)doppler_max_; doppler += doppler_step_)
|
||||
{
|
||||
@ -250,7 +253,7 @@ float BeidouB1iPcpsAcquisition::calculate_threshold(float pfa)
|
||||
frequency_bins = (2 * doppler_max_ + doppler_step_) / doppler_step_;
|
||||
|
||||
DLOG(INFO) << "Channel " << channel_ << " Pfa = " << pfa;
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
uint32_t ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
auto lambda = static_cast<double>(vector_length_);
|
||||
@ -315,7 +318,7 @@ gr::basic_block_sptr BeidouB1iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
@ -92,7 +93,7 @@ public:
|
||||
/*!
|
||||
* \brief Set acquisition channel unique ID
|
||||
*/
|
||||
void set_channel(unsigned int channel) override;
|
||||
void set_channel(uint32_t channel) override;
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
@ -102,12 +103,12 @@ public:
|
||||
/*!
|
||||
* \brief Set maximum Doppler off grid search
|
||||
*/
|
||||
void set_doppler_max(unsigned int doppler_max) override;
|
||||
void set_doppler_max(uint32_t doppler_max) override;
|
||||
|
||||
/*!
|
||||
* \brief Set Doppler steps for the grid search
|
||||
*/
|
||||
void set_doppler_step(unsigned int doppler_step) override;
|
||||
void set_doppler_step(uint32_t doppler_step) override;
|
||||
|
||||
/*!
|
||||
* \brief Initializes acquisition algorithm.
|
||||
@ -153,25 +154,25 @@ private:
|
||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
||||
size_t item_size_;
|
||||
std::string item_type_;
|
||||
unsigned int vector_length_;
|
||||
unsigned int code_length_;
|
||||
uint32_t vector_length_;
|
||||
uint32_t code_length_;
|
||||
bool bit_transition_flag_;
|
||||
bool use_CFAR_algorithm_flag_;
|
||||
unsigned int channel_;
|
||||
uint32_t channel_;
|
||||
float threshold_;
|
||||
unsigned int doppler_max_;
|
||||
unsigned int doppler_step_;
|
||||
unsigned int sampled_ms_;
|
||||
unsigned int max_dwells_;
|
||||
long fs_in_;
|
||||
uint32_t doppler_max_;
|
||||
uint32_t doppler_step_;
|
||||
uint32_t sampled_ms_;
|
||||
uint32_t max_dwells_;
|
||||
int64_t fs_in_;
|
||||
bool dump_;
|
||||
bool blocking_;
|
||||
std::string dump_filename_;
|
||||
std::complex<float>* code_;
|
||||
Gnss_Synchro* gnss_synchro_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
|
||||
float calculate_threshold(float pfa);
|
||||
};
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -24,7 +24,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
@ -24,7 +24,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -61,7 +61,10 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
if (sampled_ms_ % 4 != 0)
|
||||
@ -79,7 +82,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = round(
|
||||
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
@ -145,7 +148,10 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
@ -62,7 +62,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
acq_parameters_.fs_in = fs_in_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters_.doppler_max = doppler_max_;
|
||||
acq_parameters_.ms_per_code = 4;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", acq_parameters_.ms_per_code);
|
||||
@ -95,10 +98,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > Galileo_E1_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GALILEO_E1_OPT_ACQ_FS_HZ)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / Galileo_E1_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / Galileo_E1_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E1_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E1_OPT_ACQ_FS_HZ;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -107,19 +110,19 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast<int>(acq_parameters_.resampler_ratio);
|
||||
}
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(Galileo_E1_CODE_PERIOD_MS);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E1_CODE_PERIOD_MS);
|
||||
vector_length_ = sampled_ms_ * acq_parameters_.samples_per_ms;
|
||||
if (bit_transition_flag_)
|
||||
{
|
||||
@ -187,7 +190,10 @@ void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
// dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
// acq_parameters.dump_filename = dump_filename_;
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
//acq_parameters.samples_per_code = code_length_;
|
||||
//int samples_per_ms = static_cast<int>(std::round(static_cast<double>(fs_in_) * 0.001));
|
||||
//acq_parameters.samples_per_ms = samples_per_ms;
|
||||
@ -101,8 +101,8 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
// }
|
||||
|
||||
//printf("fs_in = %d\n", fs_in);
|
||||
//printf("Galileo_E1_B_CODE_LENGTH_CHIPS = %f\n", Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
//printf("Galileo_E1_CODE_CHIP_RATE_HZ = %f\n", Galileo_E1_CODE_CHIP_RATE_HZ);
|
||||
//printf("GALILEO_E1_B_CODE_LENGTH_CHIPS = %f\n", GALILEO_E1_B_CODE_LENGTH_CHIPS);
|
||||
//printf("GALILEO_E1_CODE_CHIP_RATE_HZ = %f\n", GALILEO_E1_CODE_CHIP_RATE_HZ);
|
||||
//printf("acq adapter code_length = %d\n", code_length);
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
@ -123,12 +123,12 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
auto* fft_if = new gr::fft::fft_complex(nsamples_total, true); // Direct FFT
|
||||
auto* code = new std::complex<float>[nsamples_total]; // buffer for the local code
|
||||
auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * Galileo_E1_NUMBER_OF_CODES]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * GALILEO_E1_NUMBER_OF_CODES]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
float max; // temporary maxima search
|
||||
|
||||
//int tmp_re, tmp_im;
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++)
|
||||
for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++)
|
||||
{
|
||||
//code_ = new gr_complex[vector_length_];
|
||||
|
||||
@ -258,7 +258,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
}
|
||||
|
||||
|
||||
// for (unsigned int PRN = 1; PRN <= Galileo_E1_NUMBER_OF_CODES; PRN++)
|
||||
// for (unsigned int PRN = 1; PRN <= GALILEO_E1_NUMBER_OF_CODES; PRN++)
|
||||
// {
|
||||
// // debug
|
||||
// char filename2[25];
|
||||
|
@ -60,7 +60,10 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
if (sampled_ms_ % 4 != 0)
|
||||
@ -79,7 +82,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
|
@ -61,12 +61,15 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8);
|
||||
|
||||
/*--- Find number of samples per spreading code (4 ms) -----------------*/
|
||||
code_length_ = round(
|
||||
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
int samples_per_ms = round(code_length_ / 4.0);
|
||||
|
||||
@ -179,7 +182,10 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
@ -61,7 +61,10 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
if (sampled_ms_ % 4 != 0)
|
||||
@ -82,7 +85,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
//--- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
@ -149,7 +152,10 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
@ -66,7 +66,10 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
CAF_window_hz_ = configuration_->property(role + ".CAF_window_hz", 0);
|
||||
Zero_padding = configuration_->property(role + ".Zero_padding", 0);
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
@ -88,7 +91,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
|
||||
//--- Find number of samples per spreading code (1ms)-------------------------
|
||||
code_length_ = round(static_cast<double>(fs_in_) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS));
|
||||
code_length_ = round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@ -155,7 +158,10 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
|
||||
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
@ -70,7 +70,10 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
acq_parameters_.dump = dump_;
|
||||
acq_parameters_.dump_channel = configuration_->property(role + ".dump_channel", 0);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters_.doppler_max = doppler_max_;
|
||||
sampled_ms_ = 1;
|
||||
max_dwells_ = configuration_->property(role + ".max_dwells", 1);
|
||||
@ -93,10 +96,10 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
}
|
||||
if (acq_parameters_.use_automatic_resampler)
|
||||
{
|
||||
if (acq_parameters_.fs_in > Galileo_E5a_OPT_ACQ_FS_HZ)
|
||||
if (acq_parameters_.fs_in > GALILEO_E5A_OPT_ACQ_FS_HZ)
|
||||
{
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / Galileo_E5a_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / Galileo_E5a_OPT_ACQ_FS_HZ;
|
||||
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E5A_OPT_ACQ_FS_HZ);
|
||||
uint32_t decimation = acq_parameters_.fs_in / GALILEO_E5A_OPT_ACQ_FS_HZ;
|
||||
while (acq_parameters_.fs_in % decimation > 0)
|
||||
{
|
||||
decimation--;
|
||||
@ -106,21 +109,21 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code (1ms)-------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
code_ = new gr_complex[vector_length_];
|
||||
@ -141,7 +144,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
|
||||
acq_parameters_.it_size = item_size_;
|
||||
acq_parameters_.sampled_ms = sampled_ms_;
|
||||
acq_parameters_.ms_per_code = 1;
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E5a_CODE_PERIOD_MS);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E5A_CODE_PERIOD_MS);
|
||||
acq_parameters_.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
|
||||
acq_parameters_.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false);
|
||||
|
@ -89,7 +89,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
acq_pilot_ = false;
|
||||
}
|
||||
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f((float)code_length));
|
||||
@ -111,13 +111,13 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
||||
auto* fft_if = new gr::fft::fft_complex(nsamples_total, true); // Direct FFT
|
||||
auto* code = new std::complex<float>[nsamples_total]; // buffer for the local code
|
||||
auto* fft_codes_padded = static_cast<gr_complex*>(volk_gnsssdr_malloc(nsamples_total * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * Galileo_E5a_NUMBER_OF_CODES]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
d_all_fft_codes_ = new lv_16sc_t[nsamples_total * GALILEO_E5A_NUMBER_OF_CODES]; // memory containing all the possible fft codes for PRN 0 to 32
|
||||
float max; // temporary maxima search
|
||||
|
||||
//printf("creating the E5A acquisition CONT");
|
||||
//printf("nsamples_total = %d\n", nsamples_total);
|
||||
|
||||
for (unsigned int PRN = 1; PRN <= Galileo_E5a_NUMBER_OF_CODES; PRN++)
|
||||
for (unsigned int PRN = 1; PRN <= GALILEO_E5A_NUMBER_OF_CODES; PRN++)
|
||||
{
|
||||
// gr_complex* code = new gr_complex[code_length_];
|
||||
char signal_[3];
|
||||
|
@ -71,7 +71,10 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
|
@ -70,7 +70,10 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
|
@ -70,7 +70,10 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters_.blocking = blocking_;
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters_.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters_.sampled_ms = sampled_ms_;
|
||||
|
@ -67,7 +67,10 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
acq_parameters.dump_filename = dump_filename_;
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
|
||||
acq_parameters.sampled_ms = sampled_ms_;
|
||||
|
@ -61,7 +61,10 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
doppler_min_ = configuration->property(role + ".doppler_min", -doppler_max_);
|
||||
sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1);
|
||||
max_dwells_ = configuration->property(role + ".max_dwells", 1);
|
||||
|
@ -61,7 +61,10 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
|
@ -61,7 +61,10 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1);
|
||||
|
||||
tong_init_val_ = configuration->property(role + ".tong_init_val", 1);
|
||||
|
@ -68,7 +68,10 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters_.blocking = blocking_;
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters_.doppler_max = doppler_max_;
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
acq_parameters_.bit_transition_flag = bit_transition_flag_;
|
||||
|
@ -69,7 +69,10 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
blocking_ = configuration_->property(role + ".blocking", true);
|
||||
acq_parameters_.blocking = blocking_;
|
||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
}
|
||||
acq_parameters_.doppler_max = doppler_max_;
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
acq_parameters_.bit_transition_flag = bit_transition_flag_;
|
||||
@ -118,20 +121,20 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
}
|
||||
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5i_CODE_RATE_HZ / GPS_L5i_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
|
||||
}
|
||||
else
|
||||
{
|
||||
acq_parameters_.resampled_fs = fs_in_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5i_CODE_RATE_HZ / GPS_L5i_CODE_LENGTH_CHIPS)));
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
|
||||
}
|
||||
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5i_PERIOD * 1000.0);
|
||||
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5I_PERIOD * 1000.0);
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
code_ = new gr_complex[vector_length_];
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
|
@ -89,7 +89,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
//dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
//acq_parameters.dump_filename = dump_filename_;
|
||||
//--- Find number of samples per spreading code -------------------------
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GPS_L5i_CODE_RATE_HZ / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS))));
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f((float)code_length));
|
||||
|
@ -64,15 +64,15 @@ list(SORT ACQ_GR_BLOCKS_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS})
|
||||
|
||||
add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
|
||||
add_library(acquisition_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS})
|
||||
|
||||
target_link_libraries(acq_gr_blocks
|
||||
target_link_libraries(acquisition_gr_blocks
|
||||
PUBLIC
|
||||
Gnuradio::runtime
|
||||
Gnuradio::fft
|
||||
Volk::volk
|
||||
gnss_system_parameters
|
||||
acquisition_lib
|
||||
acquisition_libs
|
||||
core_system_parameters
|
||||
${OPT_LIBRARIES}
|
||||
PRIVATE
|
||||
Boost::filesystem
|
||||
@ -80,17 +80,30 @@ target_link_libraries(acq_gr_blocks
|
||||
Glog::glog
|
||||
Matio::matio
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
algorithms_libs
|
||||
)
|
||||
|
||||
target_include_directories(acquisition_gr_blocks
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
)
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
target_include_directories(acq_gr_blocks PUBLIC ${OPENCL_INCLUDE_DIRS})
|
||||
target_include_directories(acquisition_gr_blocks PUBLIC ${OPENCL_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_include_directories(acq_gr_blocks PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acq_gr_blocks
|
||||
set_property(TARGET acquisition_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -36,11 +36,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -214,9 +214,20 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::~galileo_e5a_noncoherentIQ_acquisi
|
||||
delete d_fft_if;
|
||||
delete d_ifft;
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
||||
|
||||
typedef boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc> galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr;
|
||||
using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr
|
||||
galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(unsigned int sampled_ms,
|
||||
|
@ -30,11 +30,11 @@
|
||||
*/
|
||||
|
||||
#include "galileo_pcps_8ms_acquisition_cc.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -54,6 +54,7 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
|
||||
samples_per_code, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t max_dwells,
|
||||
@ -126,9 +127,20 @@ galileo_pcps_8ms_acquisition_cc::~galileo_pcps_8ms_acquisition_cc()
|
||||
delete d_ifft;
|
||||
delete d_fft_if;
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
class galileo_pcps_8ms_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<galileo_pcps_8ms_acquisition_cc> galileo_pcps_8ms_acquisition_cc_sptr;
|
||||
using galileo_pcps_8ms_acquisition_cc_sptr = boost::shared_ptr<galileo_pcps_8ms_acquisition_cc>;
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
|
||||
|
@ -317,7 +317,10 @@ void pcps_acquisition::init()
|
||||
d_num_doppler_bins = static_cast<uint32_t>(std::ceil(static_cast<double>(static_cast<int32_t>(acq_parameters.doppler_max) - static_cast<int32_t>(-acq_parameters.doppler_max)) / static_cast<double>(d_doppler_step)));
|
||||
|
||||
// Create the carrier Doppler wipeoff signals
|
||||
if (d_grid_doppler_wipeoffs == nullptr) d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
|
||||
if (d_grid_doppler_wipeoffs == nullptr)
|
||||
{
|
||||
d_grid_doppler_wipeoffs = new gr_complex*[d_num_doppler_bins];
|
||||
}
|
||||
if (acq_parameters.make_2_steps && (d_grid_doppler_wipeoffs_step_two == nullptr))
|
||||
{
|
||||
d_grid_doppler_wipeoffs_step_two = new gr_complex*[d_num_doppler_bins_step2];
|
||||
@ -629,7 +632,10 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int32_t
|
||||
{
|
||||
d_tmp_buffer[idx] = 0.0;
|
||||
idx++;
|
||||
if (idx == static_cast<int32_t>(d_fft_size)) idx = 0;
|
||||
if (idx == static_cast<int32_t>(d_fft_size))
|
||||
{
|
||||
idx = 0;
|
||||
}
|
||||
}
|
||||
while (idx != excludeRangeIndex2);
|
||||
|
||||
@ -842,7 +848,10 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
|
||||
|
||||
if (d_num_noncoherent_integrations_counter == acq_parameters.max_dwells)
|
||||
{
|
||||
if (d_state != 0) send_negative_acquisition();
|
||||
if (d_state != 0)
|
||||
{
|
||||
send_negative_acquisition();
|
||||
}
|
||||
d_state = 0;
|
||||
d_active = false;
|
||||
d_step_two = false;
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
class pcps_acquisition;
|
||||
|
||||
typedef boost::shared_ptr<pcps_acquisition> pcps_acquisition_sptr;
|
||||
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
|
||||
|
||||
pcps_acquisition_sptr
|
||||
pcps_make_acquisition(const Acq_Conf& conf_);
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_sdr_signal_processing.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
@ -314,7 +313,10 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF()
|
||||
{
|
||||
d_grid_data[index_doppler][idx] = 0.0;
|
||||
idx++;
|
||||
if (idx == static_cast<int>(d_fft_size)) idx = 0;
|
||||
if (idx == static_cast<int>(d_fft_size))
|
||||
{
|
||||
idx = 0;
|
||||
}
|
||||
}
|
||||
while (idx != excludeRangeIndex2);
|
||||
|
||||
|
@ -55,13 +55,13 @@
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/fft/fft.h>
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
class pcps_acquisition_fine_doppler_cc;
|
||||
|
||||
typedef boost::shared_ptr<pcps_acquisition_fine_doppler_cc>
|
||||
pcps_acquisition_fine_doppler_cc_sptr;
|
||||
using pcps_acquisition_fine_doppler_cc_sptr = boost::shared_ptr<pcps_acquisition_fine_doppler_cc>;
|
||||
|
||||
pcps_acquisition_fine_doppler_cc_sptr
|
||||
pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_);
|
||||
@ -87,7 +87,7 @@ private:
|
||||
bool start();
|
||||
|
||||
Acq_Conf acq_parameters;
|
||||
long d_fs_in;
|
||||
int64_t d_fs_in;
|
||||
int d_samples_per_ms;
|
||||
int d_max_dwells;
|
||||
int d_gnuradio_forecast_samples;
|
||||
|
@ -33,16 +33,16 @@
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "concurrent_map.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "gps_acq_assist.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -132,9 +132,20 @@ pcps_assisted_acquisition_cc::~pcps_assisted_acquisition_cc()
|
||||
volk_gnsssdr_free(d_fft_codes);
|
||||
delete d_ifft;
|
||||
delete d_fft_if;
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,7 +392,10 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
switch (d_state)
|
||||
{
|
||||
case 0: // S0. StandBy
|
||||
if (d_active == true) d_state = 1;
|
||||
if (d_active == true)
|
||||
{
|
||||
d_state = 1;
|
||||
}
|
||||
d_sample_counter += static_cast<uint64_t>(ninput_items[0]); // sample counter
|
||||
consume_each(ninput_items[0]);
|
||||
break;
|
||||
|
@ -57,8 +57,7 @@
|
||||
|
||||
class pcps_assisted_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<pcps_assisted_acquisition_cc>
|
||||
pcps_assisted_acquisition_cc_sptr;
|
||||
using pcps_assisted_acquisition_cc_sptr = boost::shared_ptr<pcps_assisted_acquisition_cc>;
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr
|
||||
pcps_make_assisted_acquisition_cc(
|
||||
|
@ -36,11 +36,11 @@
|
||||
|
||||
#include "pcps_cccwsr_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" // GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -118,6 +118,7 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
|
||||
d_channel = 0;
|
||||
}
|
||||
|
||||
|
||||
pcps_cccwsr_acquisition_cc::~pcps_cccwsr_acquisition_cc()
|
||||
{
|
||||
if (d_num_doppler_bins > 0)
|
||||
@ -140,12 +141,24 @@ pcps_cccwsr_acquisition_cc::~pcps_cccwsr_acquisition_cc()
|
||||
delete d_ifft;
|
||||
delete d_fft_if;
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_cccwsr_acquisition_cc::set_local_code(std::complex<float> *code_data,
|
||||
std::complex<float> *code_pilot)
|
||||
{
|
||||
@ -166,6 +179,7 @@ void pcps_cccwsr_acquisition_cc::set_local_code(std::complex<float> *code_data,
|
||||
volk_32fc_conjugate_32fc(d_fft_code_pilot, d_fft_if->get_outbuf(), d_fft_size);
|
||||
}
|
||||
|
||||
|
||||
void pcps_cccwsr_acquisition_cc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
class pcps_cccwsr_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<pcps_cccwsr_acquisition_cc> pcps_cccwsr_acquisition_cc_sptr;
|
||||
using pcps_cccwsr_acquisition_cc_sptr = boost::shared_ptr<pcps_cccwsr_acquisition_cc>;
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr
|
||||
pcps_cccwsr_make_acquisition_cc(
|
||||
|
@ -50,7 +50,6 @@
|
||||
|
||||
#include "pcps_opencl_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" //GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include "opencl/fft_base_kernels.h"
|
||||
#include "opencl/fft_internal.h"
|
||||
#include <glog/logging.h>
|
||||
@ -58,6 +57,7 @@
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@ -187,9 +187,20 @@ pcps_opencl_acquisition_cc::~pcps_opencl_acquisition_cc()
|
||||
delete d_fft_if;
|
||||
}
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,12 +30,12 @@
|
||||
|
||||
#include "pcps_quicksync_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <cmath>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -159,11 +159,21 @@ pcps_quicksync_acquisition_cc::~pcps_quicksync_acquisition_cc()
|
||||
delete d_corr_output_f;
|
||||
delete[] d_code_folded;
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure& e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
// DLOG(INFO) << "END DESTROYER";
|
||||
}
|
||||
|
||||
|
||||
@ -208,7 +218,10 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
d_mag = 0.0;
|
||||
d_input_power = 0.0;
|
||||
|
||||
if (d_doppler_step == 0) d_doppler_step = 250;
|
||||
if (d_doppler_step == 0)
|
||||
{
|
||||
d_doppler_step = 250;
|
||||
}
|
||||
|
||||
// Count the number of bins
|
||||
d_num_doppler_bins = 0;
|
||||
@ -535,7 +548,10 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay correlation output";
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
}
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
@ -564,7 +580,10 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
DLOG(INFO) << "test statistics threshold " << d_threshold;
|
||||
DLOG(INFO) << "folding factor " << d_folding_factor;
|
||||
DLOG(INFO) << "possible delay corr output";
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++) DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
for (int32_t i = 0; i < static_cast<int32_t>(d_folding_factor); i++)
|
||||
{
|
||||
DLOG(INFO) << d_possible_delay[i] << "\t\t\t" << d_corr_output_f[i];
|
||||
}
|
||||
DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples;
|
||||
DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz;
|
||||
DLOG(INFO) << "magnitude folded " << d_mag;
|
||||
|
@ -63,8 +63,7 @@
|
||||
|
||||
class pcps_quicksync_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<pcps_quicksync_acquisition_cc>
|
||||
pcps_quicksync_acquisition_cc_sptr;
|
||||
using pcps_quicksync_acquisition_cc_sptr = boost::shared_ptr<pcps_quicksync_acquisition_cc>;
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr
|
||||
pcps_quicksync_make_acquisition_cc(
|
||||
|
@ -50,11 +50,11 @@
|
||||
|
||||
#include "pcps_tong_acquisition_cc.h"
|
||||
#include "GPS_L1_CA.h" // for GPS_TWO_PI
|
||||
#include "control_message_factory.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
@ -76,6 +76,7 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
tong_init_val, tong_max_val, tong_max_dwells, dump, std::move(dump_filename)));
|
||||
}
|
||||
|
||||
|
||||
pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
uint32_t doppler_max,
|
||||
@ -153,12 +154,24 @@ pcps_tong_acquisition_cc::~pcps_tong_acquisition_cc()
|
||||
delete d_ifft;
|
||||
delete d_fft_if;
|
||||
|
||||
if (d_dump)
|
||||
try
|
||||
{
|
||||
d_dump_file.close();
|
||||
if (d_dump)
|
||||
{
|
||||
d_dump_file.close();
|
||||
}
|
||||
}
|
||||
catch (const std::ofstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem closing Acquisition dump file: " << d_dump_filename << '\n';
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << e.what() << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_tong_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
{
|
||||
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
|
||||
@ -169,6 +182,7 @@ void pcps_tong_acquisition_cc::set_local_code(std::complex<float> *code)
|
||||
volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size);
|
||||
}
|
||||
|
||||
|
||||
void pcps_tong_acquisition_cc::init()
|
||||
{
|
||||
d_gnss_synchro->Flag_valid_acquisition = false;
|
||||
@ -213,6 +227,7 @@ void pcps_tong_acquisition_cc::init()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pcps_tong_acquisition_cc::set_state(int32_t state)
|
||||
{
|
||||
d_state = state;
|
||||
@ -245,6 +260,7 @@ void pcps_tong_acquisition_cc::set_state(int32_t state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items __attribute__((unused)))
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
class pcps_tong_acquisition_cc;
|
||||
|
||||
typedef boost::shared_ptr<pcps_tong_acquisition_cc> pcps_tong_acquisition_cc_sptr;
|
||||
using pcps_tong_acquisition_cc_sptr = boost::shared_ptr<pcps_tong_acquisition_cc>;
|
||||
|
||||
pcps_tong_acquisition_cc_sptr
|
||||
pcps_tong_make_acquisition_cc(
|
||||
|
@ -29,24 +29,32 @@ list(SORT ACQUISITION_LIB_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${ACQUISITION_LIB_HEADERS})
|
||||
|
||||
add_library(acquisition_lib
|
||||
add_library(acquisition_libs
|
||||
${ACQUISITION_LIB_SOURCES}
|
||||
${ACQUISITION_LIB_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(acquisition_lib
|
||||
target_link_libraries(acquisition_libs
|
||||
PUBLIC
|
||||
Volk::volk
|
||||
Gnuradio::fft
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
gnss_system_parameters
|
||||
gnss_rx
|
||||
gnss_sp_libs
|
||||
algorithms_libs
|
||||
core_system_parameters
|
||||
)
|
||||
|
||||
set_property(TARGET acquisition_lib
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(acquisition_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET acquisition_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -29,14 +29,27 @@ source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS})
|
||||
target_link_libraries(channel_adapters
|
||||
PUBLIC
|
||||
Gnuradio::runtime
|
||||
channel_fsm
|
||||
gnss_rx
|
||||
channel_libs
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
gnss_sdr_flags
|
||||
)
|
||||
|
||||
target_include_directories(channel_adapters
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(channel_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET channel_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -75,14 +75,23 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
|
||||
// IMPORTANT: Do not change the order between set_doppler_step and set_threshold
|
||||
|
||||
uint32_t doppler_step = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".doppler_step", 0);
|
||||
if (doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500);
|
||||
if (FLAGS_doppler_step != 0) doppler_step = static_cast<uint32_t>(FLAGS_doppler_step);
|
||||
if (doppler_step == 0)
|
||||
{
|
||||
doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500);
|
||||
}
|
||||
if (FLAGS_doppler_step != 0)
|
||||
{
|
||||
doppler_step = static_cast<uint32_t>(FLAGS_doppler_step);
|
||||
}
|
||||
DLOG(INFO) << "Channel " << channel_ << " Doppler_step = " << doppler_step;
|
||||
|
||||
acq_->set_doppler_step(doppler_step);
|
||||
|
||||
float threshold = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".threshold", 0.0);
|
||||
if (threshold == 0.0) threshold = configuration->property("Acquisition_" + implementation_ + ".threshold", 0.0);
|
||||
if (threshold == 0.0)
|
||||
{
|
||||
threshold = configuration->property("Acquisition_" + implementation_ + ".threshold", 0.0);
|
||||
}
|
||||
|
||||
acq_->set_threshold(threshold);
|
||||
|
||||
|
@ -31,18 +31,28 @@ list(SORT CHANNEL_FSM_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${CHANNEL_FSM_HEADERS})
|
||||
|
||||
add_library(channel_fsm ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
|
||||
add_library(channel_libs ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS})
|
||||
|
||||
target_link_libraries(channel_fsm
|
||||
target_link_libraries(channel_libs
|
||||
PUBLIC
|
||||
gnss_rx
|
||||
Gnuradio::runtime
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
core_receiver
|
||||
)
|
||||
|
||||
set_property(TARGET channel_fsm
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(channel_libs
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET channel_libs
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
class channel_msg_receiver_cc;
|
||||
|
||||
typedef boost::shared_ptr<channel_msg_receiver_cc> channel_msg_receiver_cc_sptr;
|
||||
using channel_msg_receiver_cc_sptr = boost::shared_ptr<channel_msg_receiver_cc>;
|
||||
|
||||
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);
|
||||
|
||||
|
@ -36,13 +36,26 @@ add_library(conditioner_adapters ${COND_ADAPTER_SOURCES} ${COND_ADAPTER_HEADERS}
|
||||
|
||||
target_link_libraries(conditioner_adapters
|
||||
PUBLIC
|
||||
gnss_rx
|
||||
Gnuradio::runtime
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
target_include_directories(conditioner_adapters
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(conditioner_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET conditioner_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -40,30 +40,39 @@ list(SORT DATATYPE_ADAPTER_SOURCES)
|
||||
|
||||
source_group(Headers FILES ${DATATYPE_ADAPTER_HEADERS})
|
||||
|
||||
add_library(datatype_adapters
|
||||
add_library(data_type_adapters
|
||||
${DATATYPE_ADAPTER_SOURCES}
|
||||
${DATATYPE_ADAPTER_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(datatype_adapters
|
||||
target_link_libraries(data_type_adapters
|
||||
PUBLIC
|
||||
Gnuradio::blocks
|
||||
gnss_system_parameters
|
||||
gnss_rx
|
||||
data_type_gr_blocks
|
||||
gnss_sp_libs
|
||||
algorithms_libs
|
||||
core_system_parameters
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Volk::volk
|
||||
)
|
||||
|
||||
target_include_directories(datatype_adapters
|
||||
target_include_directories(data_type_adapters
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
set_property(TARGET datatype_adapters
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(data_type_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET data_type_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
|
@ -43,7 +43,7 @@ target_link_libraries(data_type_gr_blocks
|
||||
PUBLIC
|
||||
Gnuradio::runtime
|
||||
Boost::boost
|
||||
gnss_sp_libs
|
||||
algorithms_libs
|
||||
PRIVATE
|
||||
Volk::volk
|
||||
)
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
class interleaved_byte_to_complex_byte;
|
||||
|
||||
typedef boost::shared_ptr<interleaved_byte_to_complex_byte> interleaved_byte_to_complex_byte_sptr;
|
||||
using interleaved_byte_to_complex_byte_sptr = boost::shared_ptr<interleaved_byte_to_complex_byte>;
|
||||
|
||||
interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
class interleaved_byte_to_complex_short;
|
||||
|
||||
typedef boost::shared_ptr<interleaved_byte_to_complex_short> interleaved_byte_to_complex_short_sptr;
|
||||
using interleaved_byte_to_complex_short_sptr = boost::shared_ptr<interleaved_byte_to_complex_short>;
|
||||
|
||||
interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short();
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
class interleaved_short_to_complex_short;
|
||||
|
||||
typedef boost::shared_ptr<interleaved_short_to_complex_short> interleaved_short_to_complex_short_sptr;
|
||||
using interleaved_short_to_complex_short_sptr = boost::shared_ptr<interleaved_short_to_complex_short>;
|
||||
|
||||
interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();
|
||||
|
||||
|
@ -49,20 +49,32 @@ target_link_libraries(input_filter_adapters
|
||||
Gnuradio::blocks
|
||||
Gnuradio::filter
|
||||
input_filter_gr_blocks
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
algorithms_libs
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Volk::volk
|
||||
)
|
||||
|
||||
target_include_directories(input_filter_adapters
|
||||
PUBLIC ${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
)
|
||||
|
||||
if(${PC_GNURADIO_RUNTIME_VERSION} VERSION_GREATER "3.7.13.4")
|
||||
target_compile_definitions(input_filter_adapters PUBLIC -DGR_GREATER_38=1)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(input_filter_adapters
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET input_filter_adapters
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -67,7 +67,7 @@ BeamformerFilter::BeamformerFilter(
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
DLOG(INFO) << "file_sink(" << file_sink_->unique_id() << ")";
|
||||
}
|
||||
samples_ = 0;
|
||||
samples_ = 0ULL;
|
||||
if (in_stream_ > 8)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports eight input streams";
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@ -78,7 +79,7 @@ private:
|
||||
unsigned int out_stream_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
unsigned long long samples_;
|
||||
uint64_t samples_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
gr::block_sptr beamformer_;
|
||||
|
@ -299,11 +299,8 @@ gr::basic_block_sptr FirFilter::get_left_block()
|
||||
{
|
||||
return cshort_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
LOG(ERROR) << " Unknown item type conversion";
|
||||
}
|
||||
LOG(WARNING) << "Unknown item type conversion";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -329,11 +326,8 @@ gr::basic_block_sptr FirFilter::get_right_block()
|
||||
{
|
||||
return float_to_complex_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
LOG(ERROR) << " unknown input filter item type";
|
||||
}
|
||||
LOG(WARNING) << "Unknown input filter taps item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -339,7 +339,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
|
||||
{
|
||||
return gr_char_to_short_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return gr_char_to_short_;
|
||||
}
|
||||
@ -373,7 +373,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return complex_to_complex_byte_;
|
||||
}
|
||||
|
@ -46,11 +46,18 @@ target_link_libraries(input_filter_gr_blocks
|
||||
Gnuradio::filter
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Log4cpp::log4cpp
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(input_filter_gr_blocks
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET input_filter_gr_blocks
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user