mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
Merge branch 'next' into arribas_next
Conflicts: src/algorithms/signal_source/adapters/uhd_signal_source.cc src/core/receiver/gnss_flowgraph.cc
This commit is contained in:
commit
e72a743e22
273
CMakeLists.txt
273
CMakeLists.txt
@ -21,7 +21,7 @@
|
||||
# Project setup
|
||||
########################################################################
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree build. This is bad practice. Try 'cd build && cmake ../' ")
|
||||
message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ../' ")
|
||||
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(gnss-sdr CXX C)
|
||||
@ -37,6 +37,7 @@ file(RELATIVE_PATH RELATIVE_CMAKE_CALL ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRE
|
||||
|
||||
option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF)
|
||||
option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF)
|
||||
option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF)
|
||||
option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source (experimental)" OFF)
|
||||
option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF)
|
||||
option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF)
|
||||
@ -50,9 +51,9 @@ endif(ENABLE_PACKAGING)
|
||||
|
||||
|
||||
###############################
|
||||
# GNSS-SDR version information
|
||||
# GNSS-SDR version information
|
||||
###############################
|
||||
set(THIS_IS_A_RELEASE OFF) # only related to version name, no further implications.
|
||||
set(THIS_IS_A_RELEASE OFF) # only related to version name, no further implications.
|
||||
if(NOT ${THIS_IS_A_RELEASE})
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
@ -95,7 +96,7 @@ endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set(OS_IS_MACOSX "")
|
||||
set(OS_IS_LINUX "")
|
||||
|
||||
# Detect Linux Distribution
|
||||
# Detect Linux Distribution
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(OperatingSystem "Linux")
|
||||
set(OS_IS_LINUX TRUE)
|
||||
@ -134,7 +135,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
RESULT_VARIABLE LINUX_VER_RESULT
|
||||
)
|
||||
endif(EXISTS "/etc/linuxmint/info")
|
||||
endif(NOT LINUX_DISTRIBUTION)
|
||||
endif(NOT LINUX_DISTRIBUTION)
|
||||
if(NOT LINUX_DISTRIBUTION)
|
||||
if(EXISTS "/etc/os-release")
|
||||
execute_process(COMMAND cat /etc/os-release
|
||||
@ -157,7 +158,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(LINUX_DISTRIBUTION "Debian")
|
||||
file(READ /etc/debian_version LINUX_VER)
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Debian")
|
||||
endif(EXISTS "/etc/os-release")
|
||||
endif(EXISTS "/etc/os-release")
|
||||
endif(NOT LINUX_DISTRIBUTION)
|
||||
if(NOT LINUX_DISTRIBUTION)
|
||||
if(EXISTS "/etc/redhat-release")
|
||||
@ -174,7 +175,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if(NOT LINUX_DISTRIBUTION)
|
||||
set(LINUX_DISTRIBUTION "Generic")
|
||||
set(LINUX_VER "Unknown")
|
||||
endif(NOT LINUX_DISTRIBUTION)
|
||||
endif(NOT LINUX_DISTRIBUTION)
|
||||
message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on ${LINUX_DISTRIBUTION} GNU/Linux Release ${LINUX_VER} ${ARCH_}")
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
@ -217,7 +218,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
else(ENABLE_GPERFTOOLS)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
message(STATUS "Build type not specified: defaulting to Release.")
|
||||
endif(ENABLE_GPERFTOOLS)
|
||||
endif(ENABLE_GPERFTOOLS)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
||||
|
||||
@ -284,8 +285,8 @@ if(GTEST_DIR)
|
||||
endif(LIBGTEST_DEV_DIR)
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/include)
|
||||
else(GTEST_DIR)
|
||||
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/gtest /opt/local/src/gtest)
|
||||
find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS /usr/include /opt/local/include)
|
||||
find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/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)
|
||||
if(LIBGTEST_DEV_DIR)
|
||||
message (STATUS "Googletest (libgtest-dev package) has been found.")
|
||||
else(LIBGTEST_DEV_DIR)
|
||||
@ -318,7 +319,7 @@ set(Boost_ADDITIONAL_VERSIONS
|
||||
)
|
||||
set(Boost_USE_MULTITHREAD ON)
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono REQUIRED)
|
||||
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono REQUIRED)
|
||||
if(NOT Boost_FOUND)
|
||||
message(FATAL_ERROR "Fatal error: Boost (version >=1.45.0) required.")
|
||||
endif(NOT Boost_FOUND)
|
||||
@ -397,11 +398,15 @@ if(OS_IS_MACOSX)
|
||||
endif(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
endif(OS_IS_MACOSX)
|
||||
if(NOT VOLK_GNSSSDR_FOUND)
|
||||
set(VOLK_GNSSSDR_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON ${STRIP_VOLK_GNSSSDR_PROFILE} ${USE_MACPORTS_PYTHON})
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
|
||||
endif(CMAKE_TOOLCHAIN_FILE)
|
||||
ExternalProject_Add(volk_gnsssdr_module
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON ${STRIP_VOLK_GNSSSDR_PROFILE} ${USE_MACPORTS_PYTHON}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build
|
||||
CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}
|
||||
DOWNLOAD_COMMAND ""
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -413,7 +418,7 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
||||
set(ORC_LIBRARIES "")
|
||||
set(ORC_INCLUDE_DIRS "")
|
||||
endif(NOT ORC_FOUND)
|
||||
|
||||
|
||||
add_library(volk_gnsssdr UNKNOWN IMPORTED)
|
||||
set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr.a)
|
||||
set(VOLK_GNSSSDR_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/build/include/;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include;${ORC_INCLUDE_DIRS}")
|
||||
@ -426,65 +431,42 @@ endif(NOT VOLK_GNSSSDR_FOUND)
|
||||
|
||||
|
||||
################################################################################
|
||||
# gflags - http://code.google.com/p/gflags/
|
||||
# gflags - https://github.com/gflags/gflags
|
||||
################################################################################
|
||||
set(LOCAL_GFLAGS false)
|
||||
set(gflags_RELEASE 2.0)
|
||||
set(gflags_RELEASE 2.1.2)
|
||||
find_package(GFlags)
|
||||
if (NOT GFlags_FOUND)
|
||||
message (STATUS " gflags library has not been found.")
|
||||
message (STATUS " gflags will be downloaded and built automatically ")
|
||||
message (STATUS " when doing 'make'. ")
|
||||
set(gflags_MD5 "5fd4554d2ba84bf222a2fec0870d28df")
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_osx
|
||||
"#!/bin/sh
|
||||
export CXXFLAGS=\"-stdlib=libc++\"
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_osx
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
set(CONF_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/configure_osx)
|
||||
else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_linux
|
||||
"#!/bin/sh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_linux
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
set(CONF_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/configure_linux)
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
||||
ExternalProject_Add(
|
||||
gflags-${gflags_RELEASE}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}
|
||||
URL http://gflags.googlecode.com/files/gflags-${gflags_RELEASE}.zip
|
||||
GIT_REPOSITORY git://github.com/gflags/gflags.git
|
||||
GIT_TAG v${gflags_RELEASE}
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/gflags-${gflags_RELEASE}
|
||||
URL_MD5 ${gflags_MD5}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}
|
||||
CONFIGURE_COMMAND ${CONF_SCRIPT} --prefix=${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
BUILD_COMMAND make
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/src CACHE PATH "Local Gflags headers"
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/include CACHE PATH "Local Gflags headers"
|
||||
)
|
||||
|
||||
|
||||
add_library(gflags UNKNOWN IMPORTED)
|
||||
set_property(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}gflags.a)
|
||||
set_property(TARGET gflags PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags.a)
|
||||
add_dependencies(gflags gflags-${gflags_RELEASE})
|
||||
set(GFlags_LIBS gflags)
|
||||
file(GLOB GFlags_SHARED_LIBS "${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
||||
file(GLOB GFlags_SHARED_LIBS "${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*")
|
||||
set(GFlags_LIBRARY gflags-${gflags_RELEASE})
|
||||
set(GFlags_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs )
|
||||
set(GFlags_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib )
|
||||
link_directories(${GFlags_LIBRARY_PATH})
|
||||
set(GFlags_lib ${GFlags_LIBS} CACHE FILEPATH "Local Gflags library")
|
||||
set(GFlags_LIBRARY_PATH ${GFlags_LIBS})
|
||||
@ -493,7 +475,7 @@ endif(NOT GFlags_FOUND)
|
||||
|
||||
|
||||
################################################################################
|
||||
# glog - http://code.google.com/p/google-glog/
|
||||
# glog - https://github.com/google/glog
|
||||
################################################################################
|
||||
if(NOT ${ENABLE_OWN_GLOG})
|
||||
find_package(GLOG)
|
||||
@ -501,7 +483,7 @@ if(NOT ${ENABLE_OWN_GLOG})
|
||||
set(GLOG_FOUND ON)
|
||||
endif(GLOG_INCLUDE_DIRS)
|
||||
endif(NOT ${ENABLE_OWN_GLOG})
|
||||
set(glog_RELEASE 0.3.3)
|
||||
set(glog_RELEASE 0.3.4)
|
||||
if (NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
message (STATUS " glog library has not been found")
|
||||
if(NOT GFlags_FOUND)
|
||||
@ -513,19 +495,17 @@ if (NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
add_library(gflags-${gflags_RELEASE} UNKNOWN IMPORTED)
|
||||
set_property(TARGET gflags-${gflags_RELEASE} PROPERTY IMPORTED_LOCATION "${GFlags_LIBS}")
|
||||
endif(NOT ${LOCAL_GFLAGS})
|
||||
set(glog_RELEASE 0.3.3)
|
||||
set(glog_MD5 "a6fd2c22f8996846e34c763422717c18")
|
||||
|
||||
|
||||
if(${LOCAL_GFLAGS})
|
||||
set(TARGET_GFLAGS ${gflags})
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
"#!/bin/sh
|
||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib
|
||||
export LIBS=${GFlags_SHARED_LIBS}
|
||||
export CXXFLAGS=\"-stdlib=libc++\"
|
||||
export CC=clang
|
||||
export CXXFLAGS=\"-stdlib=libc++\"
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
@ -536,15 +516,15 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
"#!/bin/sh
|
||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib
|
||||
export LIBS=${GFlags_SHARED_LIBS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
||||
else(${LOCAL_GFLAGS})
|
||||
set(TARGET_GFLAGS gflags-${gflags_RELEASE})
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
@ -553,8 +533,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||
export LDFLAGS=-L${GFlags_LIBRARY_DIRS}
|
||||
export LIBS=\"${GFlags_LIBS} -lc++\"
|
||||
export CXXFLAGS=\"-stdlib=libc++\"
|
||||
export CC=clang
|
||||
export CXXFLAGS=\"-stdlib=libc++\"
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
@ -565,60 +545,44 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
"#!/bin/sh
|
||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs
|
||||
export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib
|
||||
export LIBS=${GFlags_SHARED_LIBS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/configure")
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
endif(${LOCAL_GFLAGS})
|
||||
|
||||
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags)
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
ExternalProject_Add(
|
||||
glog-${glog_RELEASE}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
SVN_REPOSITORY http://google-glog.googlecode.com/svn/trunk
|
||||
SVN_REVISION -r "142"
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND make
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
ExternalProject_Add(
|
||||
glog-${glog_RELEASE}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
URL http://google-glog.googlecode.com/files/glog-${glog_RELEASE}.tar.gz
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE}
|
||||
URL_MD5 ${glog_MD5}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND make
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags)
|
||||
|
||||
ExternalProject_Add(
|
||||
glog-${glog_RELEASE}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
GIT_REPOSITORY https://github.com/google/glog/
|
||||
GIT_TAG v${glog_RELEASE}
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND make
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
# Set up variables
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/src/
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/src/
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/src
|
||||
)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog.a
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog.a
|
||||
)
|
||||
set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE)
|
||||
else(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
else(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
add_library(glog-${glog_RELEASE} UNKNOWN IMPORTED)
|
||||
set_property(TARGET glog-${glog_RELEASE} PROPERTY IMPORTED_LOCATION "${GLOG_LIBRARIES}")
|
||||
endif(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
@ -630,7 +594,7 @@ endif(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
################################################################################
|
||||
if(OS_IS_LINUX)
|
||||
#############################################################################
|
||||
# Check that LAPACK is found in the system
|
||||
# Check that LAPACK is found in the system
|
||||
# LAPACK is required for matrix decompositions (eg. SVD) and matrix inverse.
|
||||
#############################################################################
|
||||
find_library(LAPACK lapack)
|
||||
@ -638,11 +602,11 @@ if(OS_IS_LINUX)
|
||||
message(" The LAPACK library has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install lapack-devel")
|
||||
message(" sudo yum install lapack-devel")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install lapack-devel")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo apt-get install liblapack-dev")
|
||||
message(" sudo apt-get install liblapack-dev")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(FATAL_ERROR "LAPACK is required to build gnss-sdr")
|
||||
endif(NOT LAPACK)
|
||||
@ -656,14 +620,14 @@ if(OS_IS_LINUX)
|
||||
message(" The BLAS library has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install blas-devel")
|
||||
message(" sudo yum install blas-devel")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo apt-get install libopenblas-dev")
|
||||
message(" sudo apt-get install libopenblas-dev")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(FATAL_ERROR "BLAS is required to build gnss-sdr")
|
||||
endif(NOT BLAS)
|
||||
#############################################
|
||||
# Check that GFORTRAN is found in the system
|
||||
# Check if GFORTRAN is found in the system
|
||||
#############################################
|
||||
find_library(GFORTRAN NAMES gfortran
|
||||
PATHS /usr/lib
|
||||
@ -714,28 +678,27 @@ if(OS_IS_LINUX)
|
||||
/usr/lib/gcc/arm-linux-gnueabi/4.9
|
||||
)
|
||||
if(NOT GFORTRAN)
|
||||
message(" The gfortran library has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
message(STATUS "The gfortran library has not been found.")
|
||||
message(STATUS " You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install gcc-fortran")
|
||||
message(STATUS " sudo yum install gcc-fortran")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install gcc-fortran")
|
||||
message(STATUS " sudo zypper install gcc-fortran")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo apt-get install gfortran")
|
||||
message(STATUS " sudo apt-get install gfortran")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(FATAL_ERROR "gfortran is required to build gnss-sdr")
|
||||
endif(NOT GFORTRAN)
|
||||
endif(OS_IS_LINUX)
|
||||
|
||||
find_package(Armadillo)
|
||||
if(NOT ARMADILLO_FOUND)
|
||||
message (STATUS " Armadillo has not been found.")
|
||||
message (STATUS " Armadillo will be downloaded and built automatically ")
|
||||
message (STATUS " when doing 'make'. ")
|
||||
|
||||
set(armadillo_RELEASE 4.600.2)
|
||||
set(armadillo_MD5 "cfa4962bfa48bf3953d012b2f8fcfa35")
|
||||
|
||||
message(STATUS " Armadillo has not been found.")
|
||||
message(STATUS " Armadillo will be downloaded and built automatically ")
|
||||
message(STATUS " when doing 'make'. ")
|
||||
|
||||
set(armadillo_RELEASE 4.650.4)
|
||||
set(armadillo_MD5 "e575dc01cf60e290a467c7c6d3171ef3")
|
||||
|
||||
ExternalProject_Add(
|
||||
armadillo-${armadillo_RELEASE}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
@ -745,13 +708,13 @@ if(NOT ARMADILLO_FOUND)
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND make
|
||||
UPDATE_COMMAND ""
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
# Set up variables
|
||||
ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir)
|
||||
set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include )
|
||||
set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include )
|
||||
find_library(LAPACK NAMES lapack HINTS /usr/lib /usr/local/lib /usr/lib64)
|
||||
if(OS_IS_MACOSX)
|
||||
find_library(BLAS blas)
|
||||
@ -760,6 +723,9 @@ if(NOT ARMADILLO_FOUND)
|
||||
if(OPENBLAS_FOUND)
|
||||
set(BLAS ${OPENBLAS})
|
||||
endif(OPENBLAS_FOUND)
|
||||
if(NOT GFORTRAN)
|
||||
set(GFORTRAN "")
|
||||
endif(NOT GFORTRAN)
|
||||
set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a)
|
||||
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
|
||||
# Save a copy at the thirdparty folder
|
||||
@ -767,7 +733,7 @@ if(NOT ARMADILLO_FOUND)
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo
|
||||
)
|
||||
else(NOT ARMADILLO_FOUND)
|
||||
set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING})
|
||||
set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING})
|
||||
add_library(armadillo-${armadillo_RELEASE} UNKNOWN IMPORTED)
|
||||
set_property(TARGET armadillo-${armadillo_RELEASE} PROPERTY IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}")
|
||||
endif(NOT ARMADILLO_FOUND)
|
||||
@ -781,13 +747,13 @@ find_package(OpenSSL)
|
||||
if(NOT OPENSSL_FOUND)
|
||||
message(" The OpenSSL library has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(OS_IS_LINUX)
|
||||
if(OS_IS_LINUX)
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum install openssl-devel")
|
||||
message(" sudo yum install openssl-devel")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo apt-get install libssl-dev")
|
||||
message(" sudo apt-get install libssl-dev")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
endif(OS_IS_LINUX)
|
||||
endif(OS_IS_LINUX)
|
||||
if(OS_IS_MACOSX)
|
||||
message(" sudo port install openssl")
|
||||
endif(OS_IS_MACOSX)
|
||||
@ -841,7 +807,7 @@ if(DOXYGEN_FOUND)
|
||||
COMMENT "Generating API documentation with Doxygen." VERBATIM
|
||||
)
|
||||
if(LATEX_COMPILER)
|
||||
message(STATUS "'make pdfmanual' will generate a manual at ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
message(STATUS "'make pdfmanual' will generate a manual at ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf")
|
||||
add_custom_target(pdfmanual
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy refman.pdf ${CMAKE_SOURCE_DIR}/docs/GNSS-SDR_manual.pdf
|
||||
@ -864,9 +830,9 @@ else(DOXYGEN_FOUND)
|
||||
message(STATUS " Get it from http://www.stack.nl/~dimitri/doxygen/index.html")
|
||||
if(OS_IS_LINUX)
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" or simply by doing 'sudo yum install doxygen-latex'.")
|
||||
message(" or simply by doing 'sudo yum install doxygen-latex'.")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" or simply by doing 'sudo apt-get install doxygen-latex'.")
|
||||
message(" or simply by doing 'sudo apt-get install doxygen-latex'.")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
endif(OS_IS_LINUX)
|
||||
if(OS_IS_MACOSX)
|
||||
@ -937,10 +903,10 @@ if(GN3S_DRIVER)
|
||||
endif(GN3S_DRIVER)
|
||||
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 ../'" )
|
||||
else(ENABLE_GN3S)
|
||||
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(ENABLE_GN3S)
|
||||
|
||||
|
||||
@ -948,12 +914,14 @@ if($ENV{RAW_ARRAY_DRIVER})
|
||||
message(STATUS "RAW_ARRAY_DRIVER environment variable found." )
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif($ENV{RAW_ARRAY_DRIVER})
|
||||
|
||||
if(RAW_ARRAY_DRIVER)
|
||||
set(ENABLE_ARRAY ON)
|
||||
endif(RAW_ARRAY_DRIVER)
|
||||
|
||||
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 ../'" )
|
||||
# copy firmware to install folder
|
||||
# Build project gr-dbfcttc
|
||||
else(ENABLE_ARRAY)
|
||||
@ -961,22 +929,35 @@ else(ENABLE_ARRAY)
|
||||
message(STATUS "Enable it with 'cmake -DENABLE_ARRAY=ON ../' to add support for the CTTC experimental array front-end." )
|
||||
endif(ENABLE_ARRAY)
|
||||
|
||||
|
||||
if($ENV{RTLSDR_DRIVER})
|
||||
message(STATUS "RTLSDR_DRIVER environment variable found." )
|
||||
set(ENABLE_OSMOSDR ON)
|
||||
endif($ENV{RTLSDR_DRIVER})
|
||||
if(RAW_ARRAY_DRIVER)
|
||||
set(ENABLE_OSMOSDR ON)
|
||||
endif(RAW_ARRAY_DRIVER)
|
||||
|
||||
if(ENABLE_OSMOSDR)
|
||||
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(ENABLE_OSMOSDR)
|
||||
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.)" )
|
||||
endif(ENABLE_OSMOSDR)
|
||||
|
||||
if($ENV{FLEXIBAND_DRIVER})
|
||||
message(STATUS "FLEXIBAND_DRIVER environment variable found." )
|
||||
set(ENABLE_FLEXIBAND ON)
|
||||
endif($ENV{FLEXIBAND_DRIVER})
|
||||
|
||||
if(FLEXIBAND_DRIVER)
|
||||
set(ENABLE_FLEXIBAND ON)
|
||||
endif(FLEXIBAND_DRIVER)
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
message(STATUS "CTTC's Antenna Array front-end driver will be compiled." )
|
||||
message(STATUS "You can disable it with 'cmake -DENABLE_FLEXIBAND=OFF ../'" )
|
||||
else(ENABLE_FLEXIBAND)
|
||||
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." )
|
||||
endif(ENABLE_FLEXIBAND)
|
||||
|
||||
########################################################################
|
||||
# Set compiler flags
|
||||
@ -988,9 +969,9 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11 -Wall -Wextra") #Add warning flags: For "-Wall" see http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wno-c++11-narrowing")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wno-c++11-narrowing")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wno-unused-private-field")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -Wno-unused-private-field")
|
||||
endif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
||||
@ -1028,21 +1009,21 @@ if(ENABLE_GPERFTOOLS)
|
||||
# See http://gperftools.googlecode.com/svn/trunk/README
|
||||
if(GPERFTOOLS_FOUND)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin")
|
||||
set(MY_CXX_FLAGS "${MY_CXX_FLAGS} -fno-builtin")
|
||||
endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
endif(GPERFTOOLS_FOUND)
|
||||
endif(ENABLE_GPERFTOOLS)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS}")
|
||||
|
||||
if(OS_IS_LINUX)
|
||||
if(OS_IS_LINUX)
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
link_libraries(pthread)
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
endif(OS_IS_LINUX)
|
||||
endif(OS_IS_LINUX)
|
||||
|
||||
|
||||
########################################################################
|
||||
@ -1064,5 +1045,3 @@ add_subdirectory(src)
|
||||
if(ENABLE_PACKAGING)
|
||||
include(GnssSdrPackaging)
|
||||
endif(ENABLE_PACKAGING)
|
||||
|
||||
|
||||
|
39
README.md
39
README.md
@ -33,7 +33,7 @@ Before building GNSS-SDR, you need to install all the required dependencies. If
|
||||
$ sudo apt-get install build-essential cmake git libboost-dev libboost-date-time-dev \
|
||||
libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \
|
||||
libboost-serialization-dev libboost-program-options-dev libboost-test-dev \
|
||||
liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev gfortran \
|
||||
liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev \
|
||||
libarmadillo-dev libgflags-dev libgoogle-glog-dev libssl-dev libgtest-dev
|
||||
~~~~~~
|
||||
|
||||
@ -94,10 +94,9 @@ In case you do not want to use PyBOMBS and prefer to build and install GNU Radio
|
||||
$ sudo apt-get install libopenblas-dev liblapack-dev gfortran # For Debian/Ubuntu/LinuxMint
|
||||
$ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL
|
||||
$ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE
|
||||
|
||||
$ wget http://sourceforge.net/projects/arma/files/armadillo-4.600.2.tar.gz
|
||||
$ tar xvfz armadillo-4.600.2.tar.gz
|
||||
$ cd armadillo-4.600.2
|
||||
$ wget http://sourceforge.net/projects/arma/files/armadillo-4.650.4.tar.gz
|
||||
$ tar xvfz armadillo-4.650.4.tar.gz
|
||||
$ cd armadillo-4.650.4
|
||||
$ cmake .
|
||||
$ make
|
||||
$ sudo make install
|
||||
@ -107,13 +106,13 @@ The full stop separated from ```cmake``` by a space is important. [CMake](http:/
|
||||
|
||||
|
||||
|
||||
#### Install [Gflags](http://code.google.com/p/gflags/ "Gflags' Homepage"), a commandline flags processing module for C++:
|
||||
#### Install [Gflags](https://github.com/gflags/gflags "Gflags' Homepage"), a commandline flags processing module for C++:
|
||||
|
||||
~~~~~~
|
||||
$ wget http://gflags.googlecode.com/files/gflags-2.0.zip
|
||||
$ unzip gflags-2.0.zip
|
||||
$ cd gflags-2.0
|
||||
$ ./configure
|
||||
$ wget https://github.com/gflags/gflags/archive/v2.1.2.tar.gz
|
||||
$ tar xvfz v2.1.2.tar.gz
|
||||
$ cd gflags-2.1.2
|
||||
$ cmake -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DBUILD_gflags_nothreads_LIB=OFF .
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ sudo ldconfig
|
||||
@ -121,12 +120,12 @@ $ sudo ldconfig
|
||||
|
||||
|
||||
|
||||
#### Install [Glog](http://code.google.com/p/google-glog/ "Glog's Homepage"), a library that implements application-level logging:
|
||||
#### Install [Glog](https://github.com/google/glog "Glog's Homepage"), a library that implements application-level logging:
|
||||
|
||||
~~~~~~
|
||||
$ wget http://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
|
||||
$ tar xvfz glog-0.3.3.tar.gz
|
||||
$ cd glog-0.3.3
|
||||
$ wget https://github.com/google/glog/archive/v0.3.4.tar.gz
|
||||
$ tar xvfz v0.3.4.tar.gz
|
||||
$ cd glog-0.3.4
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
@ -382,6 +381,18 @@ $ sudo port install armadillo
|
||||
$ sudo port install google-glog +gflags
|
||||
~~~~~~
|
||||
|
||||
You also might need to activate a Python installation. The list of installed versions can be retrieved with:
|
||||
|
||||
~~~~~~
|
||||
$ port select list python
|
||||
~~~~~~
|
||||
|
||||
and you can activate a certain version by typing:
|
||||
|
||||
~~~~~~
|
||||
$ sudo port select --set python python27
|
||||
~~~~~~
|
||||
|
||||
Finally, you are ready to clone the GNSS-SDR repository and build the software:
|
||||
|
||||
~~~~~~
|
||||
|
29
cmake/Modules/FindTeleorbit.cmake
Normal file
29
cmake/Modules/FindTeleorbit.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_TELEORBIT teleorbit)
|
||||
|
||||
FIND_PATH(
|
||||
TELEORBIT_INCLUDE_DIRS
|
||||
NAMES teleorbit/api.h
|
||||
HINTS $ENV{TELEORBIT_DIR}/include
|
||||
${PC_TELEORBIT_INCLUDEDIR}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
TELEORBIT_LIBRARIES
|
||||
NAMES gnuradio-teleorbit
|
||||
HINTS $ENV{TELEORBIT_DIR}/lib
|
||||
${PC_TELEORBIT_LIBDIR}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
|
@ -26,7 +26,7 @@ set (ARM_VERSION "")
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
execute_process(COMMAND echo "int main(){}"
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -dM -E -
|
||||
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dM -E -
|
||||
OUTPUT_VARIABLE TEST_FOR_ARM_RESULTS)
|
||||
|
||||
string(REGEX MATCH "__arm" ARM_FOUND "${TEST_FOR_ARM_RESULTS}")
|
||||
|
@ -8,7 +8,7 @@
|
||||
function (test_for_sse h_file result_var name)
|
||||
if (NOT DEFINED ${result_var})
|
||||
execute_process(COMMAND echo "#include <${h_file}>"
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -c -x c++ -
|
||||
COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -c -x c++ -
|
||||
RESULT_VARIABLE COMPILE_RESULT
|
||||
OUTPUT_QUIET ERROR_QUIET)
|
||||
set(detected 0)
|
||||
|
@ -17,7 +17,7 @@ ControlThread.wait_for_flowgraph=false
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
|
||||
;#filename: path to file with the captured GNSS signal samples to be processed
|
||||
SignalSource.filename=../data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
|
||||
SignalSource.filename=../../../Documents/workspace/code2/trunk/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=short
|
||||
@ -166,7 +166,7 @@ Resampler.sample_freq_out=4000000
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=0
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=4
|
||||
Channels_Galileo.count=8
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
@ -193,7 +193,7 @@ Acquisition_Galileo.implementation=Galileo_E1_PCPS_Ambiguous_Acquisition
|
||||
;#threshold: Acquisition threshold
|
||||
;Acquisition_Galileo.threshold=0
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_Galileo.pfa=0.0000002
|
||||
Acquisition_Galileo.pfa=0.000002
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_Galileo.doppler_max=15000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
|
415
conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf
Normal file
415
conf/gnss-sdr_Galileo_E5a_IFEN_CTTC.conf
Normal file
@ -0,0 +1,415 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=50000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
;GNSS-SDR.SUPL_gps_enabled=false
|
||||
;GNSS-SDR.SUPL_read_gps_assistance_xml=false
|
||||
;GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
;GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
;GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
;GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
;GNSS-SDR.SUPL_MCC=244
|
||||
;GNSS-SDR.SUPL_MNS=5
|
||||
;GNSS-SDR.SUPL_LAC=0x59e2
|
||||
;GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
|
||||
;#filename: path to file with the captured GNSS signal samples to be processed
|
||||
;SignalSource.filename=/home/marc/E5a_acquisitions/signal_source_5X_primary.dat
|
||||
;SignalSource.filename=/home/marc/E5a_acquisitions/galileo_E5_8M_r2_upsampled_12.dat
|
||||
;SignalSource.filename=/home/marc/E5a_acquisitions/Tiered_sim_4sat_stup4_2s_up.dat
|
||||
;SignalSource.filename=/home/marc/E5a_acquisitions/signal_source_sec21M_long.dat
|
||||
SignalSource.filename=/datalogger/captures/Galileo_E5ab_IFEN_CTTC_run1.dat
|
||||
|
||||
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Original Signal sampling frequency in [Hz]
|
||||
SignalSource.sampling_frequency=50000000
|
||||
|
||||
;#freq: RF front-end center frequency in [Hz]
|
||||
SignalSource.freq=1176450000
|
||||
|
||||
;#gain: Front-end Gain in [dB]
|
||||
SignalSource.gain=50
|
||||
|
||||
;#subdevice: UHD subdevice specification (for USRP1 use A:0 or B:0)
|
||||
SignalSource.subdevice=B:0
|
||||
|
||||
;#samples: Number of samples to be processed. Notice that 0 indicates the entire file.
|
||||
SignalSource.samples=0
|
||||
|
||||
;#repeat: Repeat the processing file. Disable this option in this version
|
||||
SignalSource.repeat=false
|
||||
|
||||
;#dump: Dump the Signal source data to a file. Disable this option in this version
|
||||
SignalSource.dump=false
|
||||
|
||||
SignalSource.dump_filename=../data/signal_source.dat
|
||||
|
||||
|
||||
;#enable_throttle_control: Enabling this option tells the signal source to keep the delay between samples in post processing.
|
||||
; it helps to not overload the CPU, but the processing time will be longer.
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Signal_Conditioner]
|
||||
;#[Pass_Through] disables this block and the [DataTypeAdapter], [InputFilter] and [Resampler] blocks
|
||||
;#[Signal_Conditioner] enables this block. Then you have to configure [DataTypeAdapter], [InputFilter] and [Resampler] blocks
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER CONFIG ############
|
||||
;## Changes the type of input data. Please disable it in this version.
|
||||
;#implementation: [Pass_Through] disables this block
|
||||
DataTypeAdapter.implementation=Pass_Through
|
||||
|
||||
;######### INPUT_FILTER CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
;InputFilter.implementation=Fir_Filter
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges, the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.45
|
||||
InputFilter.band2_begin=0.55
|
||||
InputFilter.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
|
||||
InputFilter.sampling_frequency=50000000
|
||||
InputFilter.IF=-15345000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=1
|
||||
|
||||
|
||||
;######### RESAMPLER CONFIG ############
|
||||
;## Resamples the input data.
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Direct_Resampler]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Direct_Resampler] enables a resampler that implements a nearest neigbourhood interpolation
|
||||
;Resampler.implementation=Direct_Resampler
|
||||
Resampler.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the resamplered data to a file.
|
||||
Resampler.dump=false
|
||||
;#dump_filename: Log path and filename.
|
||||
Resampler.dump_filename=../data/resampler.dat
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
;#sample_freq_in: the sample frequency of the input signal
|
||||
Resampler.sample_freq_in=8000000
|
||||
|
||||
;#sample_freq_out: the desired sample frequency of the output signal
|
||||
Resampler.sample_freq_out=4000000
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available satellite channels.
|
||||
Channels_Galileo.count=1
|
||||
;#in_acquisition: Number of channels simultaneously acquiring
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, Galileo, SBAS or Compass
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=Galileo
|
||||
|
||||
;#signal:
|
||||
;# "1C" GPS L1 C/A
|
||||
;# "1P" GPS L1 P
|
||||
;# "1W" GPS L1 Z-tracking and similar (AS on)
|
||||
;# "1Y" GPS L1 Y
|
||||
;# "1M" GPS L1 M
|
||||
;# "1N" GPS L1 codeless
|
||||
;# "2C" GPS L2 C/A
|
||||
;# "2D" GPS L2 L1(C/A)+(P2-P1) semi-codeless
|
||||
;# "2S" GPS L2 L2C (M)
|
||||
;# "2L" GPS L2 L2C (L)
|
||||
;# "2X" GPS L2 L2C (M+L)
|
||||
;# "2P" GPS L2 P
|
||||
;# "2W" GPS L2 Z-tracking and similar (AS on)
|
||||
;# "2Y" GPS L2 Y
|
||||
;# "2M" GPS GPS L2 M
|
||||
;# "2N" GPS L2 codeless
|
||||
;# "5I" GPS L5 I
|
||||
;# "5Q" GPS L5 Q
|
||||
;# "5X" GPS L5 I+Q
|
||||
;# "1C" GLONASS G1 C/A
|
||||
;# "1P" GLONASS G1 P
|
||||
;# "2C" GLONASS G2 C/A (Glonass M)
|
||||
;# "2P" GLONASS G2 P
|
||||
;# "1A" GALILEO E1 A (PRS)
|
||||
;# "1B" GALILEO E1 B (I/NAV OS/CS/SoL)
|
||||
;# "1C" GALILEO E1 C (no data)
|
||||
;# "1X" GALILEO E1 B+C
|
||||
;# "1Z" GALILEO E1 A+B+C
|
||||
;# "5I" GALILEO E5a I (F/NAV OS)
|
||||
;# "5Q" GALILEO E5a Q (no data)
|
||||
;# "5X" GALILEO E5a I+Q
|
||||
;# "7I" GALILEO E5b I
|
||||
;# "7Q" GALILEO E5b Q
|
||||
;# "7X" GALILEO E5b I+Q
|
||||
;# "8I" GALILEO E5 I
|
||||
;# "8Q" GALILEO E5 Q
|
||||
;# "8X" GALILEO E5 I+Q
|
||||
;# "6A" GALILEO E6 A
|
||||
;# "6B" GALILEO E6 B
|
||||
;# "6C" GALILEO E6 C
|
||||
;# "6X" GALILEO E6 B+C
|
||||
;# "6Z" GALILEO E6 A+B+C
|
||||
;# "1C" SBAS L1 C/A
|
||||
;# "5I" SBAS L5 I
|
||||
;# "5Q" SBAS L5 Q
|
||||
;# "5X" SBAS L5 I+Q
|
||||
;# "2I" COMPASS E2 I
|
||||
;# "2Q" COMPASS E2 Q
|
||||
;# "2X" COMPASS E2 IQ
|
||||
;# "7I" COMPASS E5b I
|
||||
;# "7Q" COMPASS E5b Q
|
||||
;# "7X" COMPASS E5b IQ
|
||||
;# "6I" COMPASS E6 I
|
||||
;# "6Q" COMPASS E6 Q
|
||||
;# "6X" COMPASS E6 IQ
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=5X
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
;######### CHANNEL 0 CONFIG ############
|
||||
|
||||
Channel0.system=Galileo
|
||||
Channel0.signal=5X
|
||||
|
||||
;#satellite: Satellite PRN ID for this channel. Disable this option to random search
|
||||
Channel0.satellite=19
|
||||
;Channel0.repeat_satellite=true
|
||||
|
||||
;######### CHANNEL 1 CONFIG ############
|
||||
|
||||
;Channel1.system=Galileo
|
||||
;Channel1.signal=5Q
|
||||
;Channel1.satellite=12
|
||||
|
||||
;######### CHANNEL 2 CONFIG ############
|
||||
|
||||
;Channel2.system=Galileo
|
||||
;Channel2.signal=5Q
|
||||
;Channel2.satellite=11
|
||||
|
||||
;######### CHANNEL 3 CONFIG ############
|
||||
|
||||
;Channel3.system=Galileo
|
||||
;Channel3.signal=5Q
|
||||
;Channel3.satellite=20
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_Galileo.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_Galileo.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_Galileo.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_Galileo.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_Galileo.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_Galileo.implementation=Galileo_E5a_Noncoherent_IQ_Acquisition_CAF
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_Galileo.threshold=0.002
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_Galileo.pfa=0.0003
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_Galileo.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_Galileo.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition] (should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_Galileo.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_Galileo.max_dwells=1
|
||||
|
||||
;#CAF filter: **Only for E5a** Resolves doppler ambiguity averaging the specified BW in the winner code delay. If set to 0 CAF filter is desactivated. Recommended value 3000 Hz
|
||||
Acquisition_Galileo.CAF_window_hz=0
|
||||
;#Zero_padding: **Only for E5a** Avoids power loss and doppler ambiguity in bit transitions by correlating one code with twice the input data length, ensuring that at least one full code is present without transitions.
|
||||
;#If set to 1 it is ON, if set to 0 it is OFF.
|
||||
Acquisition_Galileo.Zero_padding=0
|
||||
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_Galileo.implementation=Galileo_E5a_DLL_PLL_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_Galileo.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_Galileo.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_Galileo.dump=true
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_Galileo.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz_init: **Only for E5a** PLL loop filter bandwidth during initialization [Hz]
|
||||
Tracking_Galileo.pll_bw_hz_init=20.0;
|
||||
;#dll_bw_hz_init: **Only for E5a** DLL loop filter bandwidth during initialization [Hz]
|
||||
Tracking_Galileo.dll_bw_hz_init=20.0;
|
||||
;#dll_ti_ms: **Only for E5a** loop filter integration time after initialization (secondary code delay search)[ms]
|
||||
;Tracking_Galileo.ti_ms=3;
|
||||
Tracking_Galileo.ti_ms=1;
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
;Tracking.pll_bw_hz=5.0;
|
||||
Tracking_Galileo.pll_bw_hz=20.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
;Tracking.dll_bw_hz=2.0;
|
||||
Tracking_Galileo.dll_bw_hz=20.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
;Tracking_Galileo.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_Galileo.order=2;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_Galileo.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A.
|
||||
TelemetryDecoder_Galileo.implementation=Galileo_E5a_Telemetry_Decoder
|
||||
TelemetryDecoder_Galileo.dump=false
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
;Use [Galileo_E1B_Observables] for E5a also.
|
||||
Observables.implementation=Galileo_E1B_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
;Use [GALILEO_E1_PVT] for E5a also.
|
||||
PVT.implementation=GALILEO_E1_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=100
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=true;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
@ -17,7 +17,7 @@ ControlThread.wait_for_flowgraph=false
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
|
||||
;#filename: path to file with the captured GNSS signal samples to be processed
|
||||
SignalSource.filename=../data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
|
||||
SignalSource.filename=../../../Documents/workspace/code2/trunk/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=short
|
||||
@ -164,9 +164,9 @@ Resampler.sample_freq_out=4000000
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=2
|
||||
Channels_GPS.count=4
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=2
|
||||
Channels_Galileo.count=4
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
|
346
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf
Normal file
346
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_bin_file_III_1a.conf
Normal file
@ -0,0 +1,346 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=2500000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
GNSS-SDR.SUPL_gps_enabled=false
|
||||
GNSS-SDR.SUPL_read_gps_assistance_xml=true
|
||||
GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
GNSS-SDR.SUPL_MCC=244
|
||||
GNSS-SDR.SUPL_MNS=5
|
||||
GNSS-SDR.SUPL_LAC=0x59e2
|
||||
GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=Flexiband_Signal_Source
|
||||
|
||||
SignalSource.flag_read_file=true
|
||||
SignalSource.signal_file=/datalogger/captures/eclipse/eclipse_IIIa_2.bin
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;# FPGA firmware file
|
||||
SignalSource.firmware_file=flexiband_III-1a.bit
|
||||
|
||||
;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file
|
||||
SignalSource.RF_channels=1
|
||||
|
||||
;#frontend channels gain. Not usable yet!
|
||||
SignalSource.gain1=0
|
||||
SignalSource.gain2=0
|
||||
SignalSource.gain3=0
|
||||
|
||||
;#frontend channels AGC
|
||||
SignalSource.AGC=true
|
||||
|
||||
;# USB 3.0 packet buffer size (number of SuperSpeed packets)
|
||||
SignalSource.usb_packet_buffer=128
|
||||
|
||||
;######### SIGNAL_CONDITIONER 0 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 0 CONFIG ############
|
||||
DataTypeAdapter0.implementation=Pass_Through
|
||||
DataTypeAdapter0.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 0 CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter0.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter0.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges,
|
||||
;#the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter0.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter0.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter0.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.45
|
||||
InputFilter0.band2_begin=0.55
|
||||
InputFilter0.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter0.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter0.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
|
||||
; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
|
||||
InputFilter0.sampling_frequency=20000000
|
||||
;# IF deviation due to front-end LO inaccuracies [HZ]
|
||||
InputFilter0.IF=-205000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=8
|
||||
|
||||
;######### RESAMPLER CONFIG 0 ############
|
||||
;## Resamples the input data.
|
||||
Resampler0.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 1 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 1 CONFIG ############
|
||||
DataTypeAdapter1.implementation=Pass_Through
|
||||
DataTypeAdapter1.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 1 CONFIG ############
|
||||
InputFilter1.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter1.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter1.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 1 ############
|
||||
;## Resamples the input data.
|
||||
Resampler1.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 2 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner2.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 2 CONFIG ############
|
||||
DataTypeAdapter2.implementation=Pass_Through
|
||||
DataTypeAdapter2.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 2 CONFIG ############
|
||||
InputFilter2.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter2.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter2.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 2 ############
|
||||
;## Resamples the input data.
|
||||
Resampler2.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=8
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=0
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=GPS
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
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
|
||||
Channel7.RF_channel_ID=0
|
||||
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1C
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_GPS.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_GPS.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_GPS.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_GPS.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_GPS.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_GPS.threshold=0.012
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_GPS.pfa=0.0001
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_GPS.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_GPS.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition]
|
||||
;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_GPS.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_GPS.max_dwells=1
|
||||
|
||||
|
||||
;######### ACQUISITION CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_GPS.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_GPS.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_GPS.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_GPS.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.pll_bw_hz=40.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.dll_bw_hz=3.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_GPS.order=3;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_GPS.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A
|
||||
TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_GPS.dump=false
|
||||
;#decimation factor
|
||||
TelemetryDecoder_GPS.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=10
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf
Normal file
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1a.conf
Normal file
@ -0,0 +1,343 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=2500000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
GNSS-SDR.SUPL_gps_enabled=false
|
||||
GNSS-SDR.SUPL_read_gps_assistance_xml=true
|
||||
GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
GNSS-SDR.SUPL_MCC=244
|
||||
GNSS-SDR.SUPL_MNS=5
|
||||
GNSS-SDR.SUPL_LAC=0x59e2
|
||||
GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=Flexiband_Signal_Source
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;# FPGA firmware file
|
||||
SignalSource.firmware_file=flexiband_III-1a.bit
|
||||
|
||||
;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file
|
||||
SignalSource.RF_channels=1
|
||||
|
||||
;#frontend channels gain. Not usable yet!
|
||||
SignalSource.gain1=0
|
||||
SignalSource.gain2=0
|
||||
SignalSource.gain3=0
|
||||
|
||||
;#frontend channels AGC
|
||||
SignalSource.AGC=true
|
||||
|
||||
;# USB 3.0 packet buffer size (number of SuperSpeed packets)
|
||||
SignalSource.usb_packet_buffer=128
|
||||
|
||||
;######### SIGNAL_CONDITIONER 0 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 0 CONFIG ############
|
||||
DataTypeAdapter0.implementation=Pass_Through
|
||||
DataTypeAdapter0.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 0 CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter0.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter0.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges,
|
||||
;#the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter0.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter0.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter0.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.45
|
||||
InputFilter0.band2_begin=0.55
|
||||
InputFilter0.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter0.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter0.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
|
||||
; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
|
||||
InputFilter0.sampling_frequency=20000000
|
||||
;# IF deviation due to front-end LO inaccuracies [HZ]
|
||||
InputFilter0.IF=-205000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=8
|
||||
|
||||
;######### RESAMPLER CONFIG 0 ############
|
||||
;## Resamples the input data.
|
||||
Resampler0.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 1 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 1 CONFIG ############
|
||||
DataTypeAdapter1.implementation=Pass_Through
|
||||
DataTypeAdapter1.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 1 CONFIG ############
|
||||
InputFilter1.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter1.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter1.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 1 ############
|
||||
;## Resamples the input data.
|
||||
Resampler1.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 2 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner2.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 2 CONFIG ############
|
||||
DataTypeAdapter2.implementation=Pass_Through
|
||||
DataTypeAdapter2.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 2 CONFIG ############
|
||||
InputFilter2.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter2.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter2.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 2 ############
|
||||
;## Resamples the input data.
|
||||
Resampler2.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=8
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=0
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=GPS
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
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
|
||||
Channel7.RF_channel_ID=0
|
||||
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1C
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_GPS.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_GPS.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_GPS.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_GPS.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_GPS.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_GPS.threshold=0.012
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_GPS.pfa=0.0001
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_GPS.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_GPS.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition]
|
||||
;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_GPS.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_GPS.max_dwells=1
|
||||
|
||||
|
||||
;######### ACQUISITION CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_GPS.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_GPS.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_GPS.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_GPS.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.pll_bw_hz=40.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.dll_bw_hz=3.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_GPS.order=3;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_GPS.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A
|
||||
TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_GPS.dump=false
|
||||
;#decimation factor
|
||||
TelemetryDecoder_GPS.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=10
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf
Normal file
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_III_1b.conf
Normal file
@ -0,0 +1,343 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=2500000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
GNSS-SDR.SUPL_gps_enabled=false
|
||||
GNSS-SDR.SUPL_read_gps_assistance_xml=true
|
||||
GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
GNSS-SDR.SUPL_MCC=244
|
||||
GNSS-SDR.SUPL_MNS=5
|
||||
GNSS-SDR.SUPL_LAC=0x59e2
|
||||
GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=Flexiband_Signal_Source
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;# FPGA firmware file
|
||||
SignalSource.firmware_file=flexiband_III-1b.bit
|
||||
|
||||
;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file
|
||||
SignalSource.RF_channels=1
|
||||
|
||||
;#frontend channels gain. Not usable yet!
|
||||
SignalSource.gain1=0
|
||||
SignalSource.gain2=0
|
||||
SignalSource.gain3=0
|
||||
|
||||
;#frontend channels AGC
|
||||
SignalSource.AGC=true
|
||||
|
||||
;# USB 3.0 packet buffer size (number of SuperSpeed packets)
|
||||
SignalSource.usb_packet_buffer=128
|
||||
|
||||
;######### SIGNAL_CONDITIONER 0 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 0 CONFIG ############
|
||||
DataTypeAdapter0.implementation=Pass_Through
|
||||
DataTypeAdapter0.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 0 CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter0.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter0.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges,
|
||||
;#the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter0.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter0.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter0.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.45
|
||||
InputFilter0.band2_begin=0.55
|
||||
InputFilter0.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter0.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter0.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
|
||||
; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
|
||||
InputFilter0.sampling_frequency=20000000
|
||||
;# IF deviation due to front-end LO inaccuracies [HZ]
|
||||
InputFilter0.IF=-205000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=8
|
||||
|
||||
;######### RESAMPLER CONFIG 0 ############
|
||||
;## Resamples the input data.
|
||||
Resampler0.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 1 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 1 CONFIG ############
|
||||
DataTypeAdapter1.implementation=Pass_Through
|
||||
DataTypeAdapter1.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 1 CONFIG ############
|
||||
InputFilter1.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter1.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter1.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 1 ############
|
||||
;## Resamples the input data.
|
||||
Resampler1.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 2 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner2.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 2 CONFIG ############
|
||||
DataTypeAdapter2.implementation=Pass_Through
|
||||
DataTypeAdapter2.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 2 CONFIG ############
|
||||
InputFilter2.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter2.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter2.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 2 ############
|
||||
;## Resamples the input data.
|
||||
Resampler2.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=8
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=0
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=GPS
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
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
|
||||
Channel7.RF_channel_ID=0
|
||||
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1C
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_GPS.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_GPS.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_GPS.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_GPS.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_GPS.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_GPS.threshold=0.012
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_GPS.pfa=0.0001
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_GPS.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_GPS.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition]
|
||||
;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_GPS.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_GPS.max_dwells=1
|
||||
|
||||
|
||||
;######### ACQUISITION CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_GPS.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_GPS.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_GPS.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_GPS.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.pll_bw_hz=40.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.dll_bw_hz=3.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_GPS.order=3;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_GPS.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A
|
||||
TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_GPS.dump=false
|
||||
;#decimation factor
|
||||
TelemetryDecoder_GPS.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=10
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf
Normal file
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_II_3b.conf
Normal file
@ -0,0 +1,343 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=2500000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
GNSS-SDR.SUPL_gps_enabled=false
|
||||
GNSS-SDR.SUPL_read_gps_assistance_xml=true
|
||||
GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
GNSS-SDR.SUPL_MCC=244
|
||||
GNSS-SDR.SUPL_MNS=5
|
||||
GNSS-SDR.SUPL_LAC=0x59e2
|
||||
GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=Flexiband_Signal_Source
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;# FPGA firmware file
|
||||
SignalSource.firmware_file=flexiband_II-3b.bit
|
||||
|
||||
;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file
|
||||
SignalSource.RF_channels=1
|
||||
|
||||
;#frontend channels gain. Not usable yet!
|
||||
SignalSource.gain1=0
|
||||
SignalSource.gain2=0
|
||||
SignalSource.gain3=0
|
||||
|
||||
;#frontend channels AGC
|
||||
SignalSource.AGC=true
|
||||
|
||||
;# USB 3.0 packet buffer size (number of SuperSpeed packets)
|
||||
SignalSource.usb_packet_buffer=128
|
||||
|
||||
;######### SIGNAL_CONDITIONER 0 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 0 CONFIG ############
|
||||
DataTypeAdapter0.implementation=Pass_Through
|
||||
DataTypeAdapter0.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 0 CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter0.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter0.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges,
|
||||
;#the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter0.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter0.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter0.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.45
|
||||
InputFilter0.band2_begin=0.55
|
||||
InputFilter0.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter0.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter0.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
|
||||
; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
|
||||
InputFilter0.sampling_frequency=40000000
|
||||
;# IF deviation due to front-end LO inaccuracies [HZ]
|
||||
InputFilter0.IF=-205000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=16
|
||||
|
||||
;######### RESAMPLER CONFIG 0 ############
|
||||
;## Resamples the input data.
|
||||
Resampler0.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 1 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 1 CONFIG ############
|
||||
DataTypeAdapter1.implementation=Pass_Through
|
||||
DataTypeAdapter1.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 1 CONFIG ############
|
||||
InputFilter1.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter1.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter1.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 1 ############
|
||||
;## Resamples the input data.
|
||||
Resampler1.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 2 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner2.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 2 CONFIG ############
|
||||
DataTypeAdapter2.implementation=Pass_Through
|
||||
DataTypeAdapter2.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 2 CONFIG ############
|
||||
InputFilter2.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter2.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter2.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 2 ############
|
||||
;## Resamples the input data.
|
||||
Resampler2.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=8
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=0
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=GPS
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
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
|
||||
Channel7.RF_channel_ID=0
|
||||
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1C
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_GPS.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_GPS.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_GPS.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_GPS.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_GPS.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_GPS.threshold=0.012
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_GPS.pfa=0.0001
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_GPS.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_GPS.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition]
|
||||
;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_GPS.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_GPS.max_dwells=1
|
||||
|
||||
|
||||
;######### ACQUISITION CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_GPS.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_GPS.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_GPS.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_GPS.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.pll_bw_hz=40.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.dll_bw_hz=3.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_GPS.order=3;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_GPS.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A
|
||||
TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_GPS.dump=false
|
||||
;#decimation factor
|
||||
TelemetryDecoder_GPS.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=10
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf
Normal file
343
conf/gnss-sdr_multichannel_GPS_L1_Flexiband_realtime_I_1b.conf
Normal file
@ -0,0 +1,343 @@
|
||||
; Default configuration file
|
||||
; 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_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=5000000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SUPL RRLP GPS assistance configuration #####
|
||||
GNSS-SDR.SUPL_gps_enabled=false
|
||||
GNSS-SDR.SUPL_read_gps_assistance_xml=true
|
||||
GNSS-SDR.SUPL_gps_ephemeris_server=supl.nokia.com
|
||||
GNSS-SDR.SUPL_gps_ephemeris_port=7275
|
||||
GNSS-SDR.SUPL_gps_acquisition_server=supl.google.com
|
||||
GNSS-SDR.SUPL_gps_acquisition_port=7275
|
||||
GNSS-SDR.SUPL_MCC=244
|
||||
GNSS-SDR.SUPL_MNS=5
|
||||
GNSS-SDR.SUPL_LAC=0x59e2
|
||||
GNSS-SDR.SUPL_CI=0x31b0
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
;#implementation: Use [File_Signal_Source] or [UHD_Signal_Source] or [GN3S_Signal_Source] (experimental)
|
||||
SignalSource.implementation=Flexiband_Signal_Source
|
||||
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
SignalSource.item_type=gr_complex
|
||||
|
||||
;# FPGA firmware file
|
||||
SignalSource.firmware_file=flexiband_I-1b.bit
|
||||
|
||||
;#RF_channels: Number of RF channels present in the frontend device, must agree the FPGA firmware file
|
||||
SignalSource.RF_channels=1
|
||||
|
||||
;#frontend channels gain. Not usable yet!
|
||||
SignalSource.gain1=0
|
||||
SignalSource.gain2=0
|
||||
SignalSource.gain3=0
|
||||
|
||||
;#frontend channels AGC
|
||||
SignalSource.AGC=true
|
||||
|
||||
;# USB 3.0 packet buffer size (number of SuperSpeed packets)
|
||||
SignalSource.usb_packet_buffer=128
|
||||
|
||||
;######### SIGNAL_CONDITIONER 0 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner0.implementation=Signal_Conditioner
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 0 CONFIG ############
|
||||
DataTypeAdapter0.implementation=Pass_Through
|
||||
DataTypeAdapter0.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 0 CONFIG ############
|
||||
;## Filter the input data. Can be combined with frequency translation for IF signals
|
||||
|
||||
;#implementation: Use [Pass_Through] or [Fir_Filter] or [Freq_Xlating_Fir_Filter]
|
||||
;#[Pass_Through] disables this block
|
||||
;#[Fir_Filter] enables a FIR Filter
|
||||
;#[Freq_Xlating_Fir_Filter] enables FIR filter and a composite frequency translation that shifts IF down to zero Hz.
|
||||
|
||||
InputFilter0.implementation=Freq_Xlating_Fir_Filter
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter0.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter0.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#The following options are used in the filter design of Fir_Filter and Freq_Xlating_Fir_Filter implementation.
|
||||
;#These options are based on parameters of gnuradio's function: gr_remez.
|
||||
;#These function calculates the optimal (in the Chebyshev/minimax sense) FIR filter inpulse reponse given a set of band edges,
|
||||
;#the desired reponse on those bands, and the weight given to the error in those bands.
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter0.output_item_type=gr_complex
|
||||
|
||||
;#taps_item_type: Type and resolution for the taps of the filter. Use only float in this version.
|
||||
InputFilter0.taps_item_type=float
|
||||
|
||||
;#number_of_taps: Number of taps in the filter. Increasing this parameter increases the processing time
|
||||
InputFilter0.number_of_taps=5
|
||||
|
||||
;#number_of _bands: Number of frequency bands in the filter.
|
||||
InputFilter0.number_of_bands=2
|
||||
|
||||
;#bands: frequency at the band edges [ b1 e1 b2 e2 b3 e3 ...].
|
||||
;#Frequency is in the range [0, 1], with 1 being the Nyquist frequency (Fs/2)
|
||||
;#The number of band_begin and band_end elements must match the number of bands
|
||||
|
||||
InputFilter0.band1_begin=0.0
|
||||
InputFilter0.band1_end=0.45
|
||||
InputFilter0.band2_begin=0.55
|
||||
InputFilter0.band2_end=1.0
|
||||
|
||||
;#ampl: desired amplitude at the band edges [ a(b1) a(e1) a(b2) a(e2) ...].
|
||||
;#The number of ampl_begin and ampl_end elements must match the number of bands
|
||||
|
||||
InputFilter0.ampl1_begin=1.0
|
||||
InputFilter0.ampl1_end=1.0
|
||||
InputFilter0.ampl2_begin=0.0
|
||||
InputFilter0.ampl2_end=0.0
|
||||
|
||||
;#band_error: weighting applied to each band (usually 1).
|
||||
;#The number of band_error elements must match the number of bands
|
||||
InputFilter0.band1_error=1.0
|
||||
InputFilter0.band2_error=1.0
|
||||
|
||||
;#filter_type: one of "bandpass", "hilbert" or "differentiator"
|
||||
InputFilter0.filter_type=bandpass
|
||||
|
||||
;#grid_density: determines how accurately the filter will be constructed.
|
||||
;The minimum value is 16; higher values are slower to compute the filter.
|
||||
InputFilter0.grid_density=16
|
||||
|
||||
;#The following options are used only in Freq_Xlating_Fir_Filter implementation.
|
||||
;#InputFilter0.IF is the intermediate frequency (in Hz) shifted down to zero Hz
|
||||
;FOR USE GNSS-SDR WITH RTLSDR DONGLES USER MUST SET THE CALIBRATED SAMPLE RATE HERE
|
||||
; i.e. using front-end-cal as reported here:http://www.cttc.es/publication/turning-a-television-into-a-gnss-receiver/
|
||||
InputFilter0.sampling_frequency=40000000
|
||||
;# IF deviation due to front-end LO inaccuracies [HZ]
|
||||
InputFilter0.IF=-205000
|
||||
|
||||
;# Decimation factor after the frequency tranaslating block
|
||||
InputFilter0.decimation_factor=8
|
||||
|
||||
;######### RESAMPLER CONFIG 0 ############
|
||||
;## Resamples the input data.
|
||||
Resampler0.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 1 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner1.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 1 CONFIG ############
|
||||
DataTypeAdapter1.implementation=Pass_Through
|
||||
DataTypeAdapter1.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 1 CONFIG ############
|
||||
InputFilter1.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter1.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter1.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter1.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 1 ############
|
||||
;## Resamples the input data.
|
||||
Resampler1.implementation=Pass_Through
|
||||
|
||||
;######### SIGNAL_CONDITIONER 2 CONFIG ############
|
||||
;## It holds blocks to change data type, filter and resample input data.
|
||||
SignalConditioner2.implementation=Pass_Through
|
||||
|
||||
;######### DATA_TYPE_ADAPTER 2 CONFIG ############
|
||||
DataTypeAdapter2.implementation=Pass_Through
|
||||
DataTypeAdapter2.item_type=gr_complex
|
||||
|
||||
;######### INPUT_FILTER 2 CONFIG ############
|
||||
InputFilter2.implementation=Pass_Through
|
||||
|
||||
;#dump: Dump the filtered data to a file.
|
||||
InputFilter2.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
InputFilter2.dump_filename=../data/input_filter.dat
|
||||
|
||||
;#input_item_type: Type and resolution for input signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.input_item_type=gr_complex
|
||||
|
||||
;#outut_item_type: Type and resolution for output filtered signal samples. Use only gr_complex in this version.
|
||||
InputFilter2.output_item_type=gr_complex
|
||||
|
||||
;######### RESAMPLER CONFIG 2 ############
|
||||
;## Resamples the input data.
|
||||
Resampler2.implementation=Pass_Through
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
;#count: Number of available GPS satellite channels.
|
||||
Channels_GPS.count=4
|
||||
;#count: Number of available Galileo satellite channels.
|
||||
Channels_Galileo.count=0
|
||||
;#in_acquisition: Number of channels simultaneously acquiring for the whole receiver
|
||||
Channels.in_acquisition=1
|
||||
;#system: GPS, GLONASS, GALILEO, SBAS or COMPASS
|
||||
;#if the option is disabled by default is assigned GPS
|
||||
Channel.system=GPS
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
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
|
||||
Channel7.RF_channel_ID=0
|
||||
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1C
|
||||
|
||||
;######### SPECIFIC CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
|
||||
;#dump: Enable or disable the acquisition internal data file logging [true] or [false]
|
||||
Acquisition_GPS.dump=false
|
||||
;#filename: Log path and filename
|
||||
Acquisition_GPS.dump_filename=./acq_dump.dat
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only gr_complex in this version.
|
||||
Acquisition_GPS.item_type=gr_complex
|
||||
;#if: Signal intermediate frequency in [Hz]
|
||||
Acquisition_GPS.if=0
|
||||
;#sampled_ms: Signal block duration for the acquisition signal detection [ms]
|
||||
Acquisition_GPS.coherent_integration_time_ms=1
|
||||
;#implementation: Acquisition algorithm selection for this channel: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
Acquisition_GPS.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
;#threshold: Acquisition threshold. It will be ignored if pfa is defined.
|
||||
Acquisition_GPS.threshold=0.011
|
||||
;#pfa: Acquisition false alarm probability. This option overrides the threshold option. Only use with implementations: [GPS_L1_CA_PCPS_Acquisition] or [Galileo_E1_PCPS_Ambiguous_Acquisition]
|
||||
;Acquisition_GPS.pfa=0.0001
|
||||
;#doppler_max: Maximum expected Doppler shift [Hz]
|
||||
Acquisition_GPS.doppler_max=10000
|
||||
;#doppler_max: Doppler step in the grid search [Hz]
|
||||
Acquisition_GPS.doppler_step=250
|
||||
;#bit_transition_flag: Enable or disable a strategy to deal with bit transitions in GPS signals: process two dwells and take
|
||||
;#maximum test statistics. Only use with implementation: [GPS_L1_CA_PCPS_Acquisition]
|
||||
;#(should not be used for Galileo_E1_PCPS_Ambiguous_Acquisition])
|
||||
Acquisition_GPS.bit_transition_flag=false
|
||||
;#max_dwells: Maximum number of consecutive dwells to be processed. It will be ignored if bit_transition_flag=true
|
||||
Acquisition_GPS.max_dwells=1
|
||||
|
||||
|
||||
;######### ACQUISITION CHANNELS CONFIG ######
|
||||
;#The following options are specific to each channel and overwrite the generic options
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
|
||||
;#implementation: Selected tracking algorithm: [GPS_L1_CA_DLL_PLL_Tracking] or [GPS_L1_CA_DLL_FLL_PLL_Tracking]
|
||||
Tracking_GPS.implementation=GPS_L1_CA_DLL_PLL_Optim_Tracking
|
||||
;#item_type: Type and resolution for each of the signal samples. Use only [gr_complex] in this version.
|
||||
Tracking_GPS.item_type=gr_complex
|
||||
|
||||
;#sampling_frequency: Signal Intermediate Frequency in [Hz]
|
||||
Tracking_GPS.if=0
|
||||
|
||||
;#dump: Enable or disable the Tracking internal binary data file logging [true] or [false]
|
||||
Tracking_GPS.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename. Notice that the tracking channel will add "x.dat" where x is the channel number.
|
||||
Tracking_GPS.dump_filename=./tracking_ch_
|
||||
|
||||
;#pll_bw_hz: PLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.pll_bw_hz=40.0;
|
||||
|
||||
;#dll_bw_hz: DLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.dll_bw_hz=3.0;
|
||||
|
||||
;#fll_bw_hz: FLL loop filter bandwidth [Hz]
|
||||
Tracking_GPS.fll_bw_hz=10.0;
|
||||
|
||||
;#order: PLL/DLL loop filter order [2] or [3]
|
||||
Tracking_GPS.order=3;
|
||||
|
||||
;#early_late_space_chips: correlator early-late space [chips]. Use [0.5]
|
||||
Tracking_GPS.early_late_space_chips=0.5;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Telemetry_Decoder] for GPS L1 C/A
|
||||
TelemetryDecoder_GPS.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_GPS.dump=false
|
||||
;#decimation factor
|
||||
TelemetryDecoder_GPS.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
;#implementation: Use [GPS_L1_CA_Observables] for GPS L1 C/A.
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;#dump: Enable or disable the Observables internal binary data file logging [true] or [false]
|
||||
Observables.dump=false
|
||||
|
||||
;#dump_filename: Log path and filename.
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
;#implementation: Position Velocity and Time (PVT) implementation algorithm: Use [GPS_L1_CA_PVT] in this version.
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
|
||||
;#averaging_depth: Number of PVT observations in the moving average algorithm
|
||||
PVT.averaging_depth=10
|
||||
|
||||
;#flag_average: Enables the PVT averaging between output intervals (arithmetic mean) [true] or [false]
|
||||
PVT.flag_averaging=true
|
||||
|
||||
;#output_rate_ms: Period between two PVT outputs. Notice that the minimum period is equal to the tracking integration time (for GPS CA L1 is 1ms) [ms]
|
||||
PVT.output_rate_ms=100
|
||||
|
||||
;#display_rate_ms: Position console print (std::out) interval [ms]. Notice that output_rate_ms<=display_rate_ms.
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
;# RINEX, KML, and NMEA output configuration
|
||||
|
||||
;#dump_filename: Log path and filename without extension. Notice that PVT will add ".dat" to the binary dump and ".kml" to GoogleEarth dump.
|
||||
PVT.dump_filename=./PVT
|
||||
|
||||
;#nmea_dump_filename: NMEA log path and filename
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
|
||||
;#flag_nmea_tty_port: Enable or disable the NMEA log to a serial TTY port (Can be used with real hardware or virtual one)
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
|
||||
;#nmea_dump_devname: serial device descriptor for NMEA logging
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
|
||||
|
||||
;#dump: Enable or disable the PVT internal binary data file logging [true] or [false]
|
||||
PVT.dump=false
|
||||
|
||||
;######### OUTPUT_FILTER CONFIG ############
|
||||
;# Receiver output filter: Leave this block disabled in this version
|
||||
OutputFilter.implementation=Null_Sink_Output_Filter
|
||||
OutputFilter.filename=data/gnss-sdr.dat
|
||||
OutputFilter.item_type=gr_complex
|
@ -307,10 +307,10 @@ Channels.in_acquisition=1
|
||||
Channel.system=GPS, Galileo
|
||||
|
||||
;# CHANNEL CONNECTION
|
||||
Channel0.SignalSource_ID=0
|
||||
Channel1.SignalSource_ID=0
|
||||
Channel2.SignalSource_ID=1
|
||||
Channel3.SignalSource_ID=1
|
||||
Channel0.RF_channel_ID=0
|
||||
Channel1.RF_channel_ID=0
|
||||
Channel2.RF_channel_ID=1
|
||||
Channel3.RF_channel_ID=1
|
||||
;#signal:
|
||||
;#if the option is disabled by default is assigned "1C" GPS L1 C/A
|
||||
Channel.signal=1B
|
||||
|
@ -92,6 +92,7 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<g
|
||||
d_rx_time = 0.0;
|
||||
|
||||
b_rinex_header_writen = false;
|
||||
b_rinex_header_updated = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
@ -154,22 +155,62 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
|
||||
if (global_galileo_utc_model_map.size() > 0)
|
||||
{
|
||||
// UTC MODEL data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
|
||||
// UTC MODEL data is shared for all the Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_galileo_utc_model_map.read(i, d_ls_pvt->galileo_utc_model);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_galileo_iono_map.size() > 0)
|
||||
{
|
||||
// IONO data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_iono_map.read(0, d_ls_pvt->galileo_iono);
|
||||
// IONO data is shared for all Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_galileo_iono_map.read(i, d_ls_pvt->galileo_iono);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_galileo_almanac_map.size() > 0)
|
||||
{
|
||||
// Almanac data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_almanac_map.read(0, d_ls_pvt->galileo_almanac);
|
||||
// ALMANAC data is shared for all Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_galileo_almanac_map.read(i, d_ls_pvt->galileo_almanac);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ############ 2 COMPUTE THE PVT ################################
|
||||
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->galileo_ephemeris_map.size() > 0)
|
||||
{
|
||||
@ -185,7 +226,7 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
//ToDo: Implement Galileo RINEX and Galileo NMEA outputs
|
||||
// d_nmea_printer->Print_Nmea_Line(d_ls_pvt, d_flag_averaging);
|
||||
//
|
||||
if (!b_rinex_header_writen) // & we have utc data in nav message!
|
||||
if (!b_rinex_header_writen)
|
||||
{
|
||||
std::map<int,Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
|
||||
@ -205,12 +246,18 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map);
|
||||
d_last_sample_nav_output = d_sample_counter;
|
||||
}
|
||||
std::map<int, Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
|
||||
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
|
||||
{
|
||||
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map);
|
||||
}
|
||||
std::map<int, Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
|
||||
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
|
||||
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
|
||||
{
|
||||
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map);
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0))
|
||||
{
|
||||
rp->update_nav_header(rp->navGalFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model);
|
||||
b_rinex_header_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -219,11 +266,11 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
|
||||
if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true)
|
||||
{
|
||||
std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl;
|
||||
|
||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]";
|
||||
|
||||
LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
|
@ -96,6 +96,7 @@ private:
|
||||
boost::shared_ptr<gr::msg_queue> d_queue;
|
||||
bool d_dump;
|
||||
bool b_rinex_header_writen;
|
||||
bool b_rinex_header_updated;
|
||||
std::shared_ptr<Rinex_Printer> rp;
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
|
@ -106,6 +106,7 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
|
||||
d_rx_time = 0.0;
|
||||
|
||||
b_rinex_header_writen = false;
|
||||
b_rinex_header_updated = false;
|
||||
b_rinex_sbs_header_writen = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
@ -150,6 +151,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
std::map<int,Gnss_Synchro> gnss_pseudoranges_map;
|
||||
|
||||
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
|
||||
//Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //Get the output pointer
|
||||
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
@ -166,14 +168,40 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
|
||||
if (global_gps_utc_model_map.size() > 0)
|
||||
{
|
||||
// UTC MODEL data is shared for all the GPS satellites. Read always at ID=0
|
||||
global_gps_utc_model_map.read(0, d_ls_pvt->gps_utc_model);
|
||||
// UTC MODEL data is shared for all the GPS satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_gps_utc_model_map.read(i, d_ls_pvt->gps_utc_model);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_gps_iono_map.size() > 0)
|
||||
{
|
||||
// IONO data is shared for all the GPS satellites. Read always at ID=0
|
||||
global_gps_iono_map.read(0, d_ls_pvt->gps_iono);
|
||||
// IONO data is shared for all the GPS satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_gps_iono_map.read(i, d_ls_pvt->gps_iono);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update SBAS data collections
|
||||
@ -223,7 +251,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
}
|
||||
|
||||
// ############ 2 COMPUTE THE PVT ################################
|
||||
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->gps_ephemeris_map.size() >0)
|
||||
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->gps_ephemeris_map.size() > 0)
|
||||
{
|
||||
// compute on the fly PVT solution
|
||||
//mod 8/4/2012 Set the PVT computation rate in this block
|
||||
@ -236,13 +264,13 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
d_kml_dump->print_position(d_ls_pvt, d_flag_averaging);
|
||||
d_nmea_printer->Print_Nmea_Line(d_ls_pvt, d_flag_averaging);
|
||||
|
||||
if (!b_rinex_header_writen) // & we have utc data in nav message!
|
||||
if (!b_rinex_header_writen)
|
||||
{
|
||||
std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
|
||||
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
|
||||
if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
|
||||
{
|
||||
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second,d_rx_time);
|
||||
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time);
|
||||
rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
|
||||
b_rinex_header_writen = true; // do not write header anymore
|
||||
}
|
||||
@ -262,6 +290,12 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
{
|
||||
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map);
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->gps_utc_model.d_A0 != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->gps_utc_model);
|
||||
rp->update_nav_header(rp->navFile, d_ls_pvt->gps_utc_model, d_ls_pvt->gps_iono);
|
||||
b_rinex_header_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -270,11 +304,11 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true)
|
||||
{
|
||||
std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl;
|
||||
|
||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]";
|
||||
|
||||
LOG(INFO) << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
@ -304,7 +338,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
|
||||
}
|
||||
|
||||
consume_each(1); //one by one
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
||||
|
@ -96,6 +96,7 @@ private:
|
||||
bool d_dump;
|
||||
bool b_rinex_header_writen;
|
||||
bool b_rinex_sbs_header_writen;
|
||||
bool b_rinex_header_updated;
|
||||
std::shared_ptr<Rinex_Printer> rp;
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
|
@ -98,6 +98,7 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_q
|
||||
d_rx_time = 0.0;
|
||||
d_TOW_at_curr_symbol_constellation = 0.0;
|
||||
b_rinex_header_writen = false;
|
||||
b_rinex_header_updated = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
@ -163,20 +164,59 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
|
||||
if (global_galileo_utc_model_map.size() > 0)
|
||||
{
|
||||
// UTC MODEL data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
|
||||
// UTC MODEL data is shared for all the Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_galileo_utc_model_map.read(i, d_ls_pvt->galileo_utc_model);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_galileo_iono_map.size() > 0)
|
||||
{
|
||||
// IONO data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_galileo_iono_map.read(0, d_ls_pvt->galileo_iono);
|
||||
// IONO data is shared for all Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_galileo_iono_map.read(i, d_ls_pvt->galileo_iono);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_galileo_almanac_map.size() > 0)
|
||||
{
|
||||
// Almanac data is shared for all the Galileo satellites. Read always at ID=0
|
||||
arrived_galileo_almanac = global_galileo_almanac_map.read(0, d_ls_pvt->galileo_almanac);
|
||||
// data is shared for all Galileo satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
arrived_galileo_almanac = global_galileo_almanac_map.read(i, d_ls_pvt->galileo_almanac);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ############ 1. READ GPS EPHEMERIS/UTC_MODE/IONO FROM GLOBAL MAPS ####
|
||||
@ -188,14 +228,40 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
|
||||
if (global_gps_utc_model_map.size() > 0)
|
||||
{
|
||||
// UTC MODEL data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_gps_utc_model_map.read(0, d_ls_pvt->gps_utc_model);
|
||||
// UTC MODEL data is shared for all the GPS satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_gps_utc_model_map.read(i, d_ls_pvt->gps_utc_model);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global_gps_iono_map.size() > 0)
|
||||
{
|
||||
// IONO data is shared for all the Galileo satellites. Read always at ID=0
|
||||
global_gps_iono_map.read(0, d_ls_pvt->gps_iono);
|
||||
// IONO data is shared for all the GPS satellites. Read always at a locked channel
|
||||
signed int i = 0;
|
||||
while(true)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
{
|
||||
global_gps_iono_map.read(i, d_ls_pvt->gps_iono);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if (i == (signed int)d_nchannels - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -250,6 +316,12 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
{
|
||||
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map);
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->gps_utc_model.d_A0 != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->gps_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
b_rinex_header_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,15 +330,15 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
if (((d_sample_counter % d_display_rate_ms) == 0) and d_ls_pvt->b_valid_position == true)
|
||||
{
|
||||
std::cout << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " using "<<d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]" << std::endl;
|
||||
|
||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " using "<<d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is Lat = " << d_ls_pvt->d_latitude_d << " [deg], Long = " << d_ls_pvt->d_longitude_d
|
||||
<< " [deg], Height= " << d_ls_pvt->d_height_m << " [m]";
|
||||
|
||||
std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_ls_pvt->d_position_UTC_time)
|
||||
<< " using "<<d_ls_pvt->d_valid_observations<<" observations is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = "
|
||||
<< " UTC using "<< d_ls_pvt->d_valid_observations<<" observations is HDOP = " << d_ls_pvt->d_HDOP << " VDOP = "
|
||||
<< d_ls_pvt->d_VDOP <<" TDOP = " << d_ls_pvt->d_TDOP
|
||||
<< " GDOP = " << d_ls_pvt->d_GDOP;
|
||||
}
|
||||
@ -294,7 +366,7 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
|
||||
}
|
||||
|
||||
consume_each(1); //one by one
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,6 +100,7 @@ private:
|
||||
boost::shared_ptr<gr::msg_queue> d_queue;
|
||||
bool d_dump;
|
||||
bool b_rinex_header_writen;
|
||||
bool b_rinex_header_updated;
|
||||
std::shared_ptr<Rinex_Printer> rp;
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <algorithm> // for min and max
|
||||
#include <cmath> // for floor
|
||||
#include <cstdlib> // for getenv()
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@ -57,11 +58,11 @@ Rinex_Printer::Rinex_Printer()
|
||||
navGalfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_GAL_NAV");
|
||||
navMixfilename = Rinex_Printer::createFilename("RINEX_FILE_TYPE_MIXED_NAV");
|
||||
|
||||
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::app);
|
||||
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::app);
|
||||
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||
Rinex_Printer::sbsFile.open(sbsfilename, std::ios::out | std::ios::app);
|
||||
Rinex_Printer::navGalFile.open(navGalfilename, std::ios::out | std::ios::app);
|
||||
Rinex_Printer::navMixFile.open(navMixfilename, std::ios::out | std::ios::app);
|
||||
Rinex_Printer::navGalFile.open(navGalfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||
Rinex_Printer::navMixFile.open(navMixfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||
|
||||
// RINEX v3.02 codes
|
||||
satelliteSystem["GPS"] = "G";
|
||||
@ -391,7 +392,7 @@ std::string Rinex_Printer::getLocalTime()
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
{
|
||||
std::string line;
|
||||
stringVersion = "3.02";
|
||||
@ -501,9 +502,257 @@ void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Galileo_Iono& ion
|
||||
out << line << std::endl;
|
||||
}
|
||||
|
||||
void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model)
|
||||
{
|
||||
|
||||
void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
{
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
long pos = out.tellp();
|
||||
out.seekp(0);
|
||||
data.clear();
|
||||
|
||||
bool no_more_finds = false;
|
||||
std::string line_str;
|
||||
|
||||
while(!out.eof())
|
||||
{
|
||||
std::getline(out, line_str);
|
||||
|
||||
if(!no_more_finds)
|
||||
{
|
||||
line_aux.clear();
|
||||
|
||||
if ((line_str.find("GAL", 0) != std::string::npos) && (line_str.find("IONOSPHERIC CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GAL ");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai0_5, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai1_5, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai2_5, 10, 2), 12);
|
||||
double zero = 0.0;
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(zero, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GAUT", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GAUT");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A0_6, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.A1_6, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.t0t_6), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.WNot_6), 5);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GPGA", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GPGA");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.Delta_tLS_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.Delta_tLSF_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.WN_LSF_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.DN_6), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
out.open(navGalfilename, std::ios::out | std::ios::trunc);
|
||||
out.seekp(0);
|
||||
for (int i = 0; i < (int) data.size() - 1; i++)
|
||||
{
|
||||
out << data[i] << std::endl;
|
||||
}
|
||||
out.close();
|
||||
out.open(navGalfilename, std::ios::out | std::ios::app);
|
||||
out.seekp(pos);
|
||||
std::cout << "The RINEX Navigation file header has been updated with UTC and IONO info." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Utc_Model& utc_model, const Gps_Iono& iono)
|
||||
{
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
long pos = out.tellp();
|
||||
out.seekp(0);
|
||||
data.clear();
|
||||
|
||||
bool no_more_finds = false;
|
||||
std::string line_str;
|
||||
|
||||
while(!out.eof())
|
||||
{
|
||||
std::getline(out, line_str);
|
||||
|
||||
if(!no_more_finds)
|
||||
{
|
||||
line_aux.clear();
|
||||
|
||||
if (version == 2)
|
||||
{
|
||||
if (line_str.find("ION ALPHA", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string(2, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha3, 10, 2), 12);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("ION ALPHA", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("ION BETA", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string(2, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta3, 10, 2), 12);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("ION BETA", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("DELTA-UTC", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string(3, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_t_OT), 9);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_T + 1024), 9); // valid until 2019
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("DELTA-UTC: A0,A1,T,W", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += std::string(54, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
if (version == 3)
|
||||
{
|
||||
if (line_str.find("GPSA", 0) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string("GPSA");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_alpha3, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("GPSB", 0) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string("GPSB");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(iono.d_beta3, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("GPUT", 0) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string("GPUT");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_t_OT), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_T + 1024), 5); // valid until 2019
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
out.open(navfilename, std::ios::out | std::ios::trunc);
|
||||
out.seekp(0);
|
||||
for (int i = 0; i < (int) data.size() - 1; i++)
|
||||
{
|
||||
out << data[i] << std::endl;
|
||||
}
|
||||
out.close();
|
||||
out.open(navfilename, std::ios::out | std::ios::app);
|
||||
out.seekp(pos);
|
||||
std::cout << "The RINEX Navigation file header has been updated with UTC and IONO info." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model)
|
||||
{
|
||||
std::string line;
|
||||
|
||||
// -------- Line 1
|
||||
@ -680,7 +929,139 @@ void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Gps_Iono& iono, c
|
||||
out << line << std::endl;
|
||||
}
|
||||
|
||||
void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
|
||||
void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
{
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
long pos = out.tellp();
|
||||
out.seekp(0);
|
||||
data.clear();
|
||||
|
||||
bool no_more_finds = false;
|
||||
std::string line_str;
|
||||
|
||||
while(!out.eof())
|
||||
{
|
||||
std::getline(out, line_str);
|
||||
|
||||
if(!no_more_finds)
|
||||
{
|
||||
line_aux.clear();
|
||||
|
||||
if (line_str.find("GPSA", 0) != std::string::npos)
|
||||
{
|
||||
line_aux += std::string("GPSA");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha3, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GAL", 0) != std::string::npos) && (line_str.find("IONOSPHERIC CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GAL ");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai0_5, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai1_5, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai2_5, 10, 2), 12);
|
||||
double zero = 0.0;
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(zero, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GPSB", 0) != std::string::npos) && (line_str.find("IONOSPHERIC CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GPSB");
|
||||
line_aux += std::string(1, ' ');
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_beta0, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_beta1, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_beta2, 10, 2), 12);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_beta3, 10, 2), 12);
|
||||
line_aux += std::string(7, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GPUT", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GPUT");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_t_OT), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_T + 1024), 5); // valid until 2019
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GAUT", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GAUT");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A0_6, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A1_6, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.t0t_6), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WNot_6), 5);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if ((line_str.find("GPGA", 0) != std::string::npos) && (line_str.find("TIME SYSTEM CORR", 59) != std::string::npos))
|
||||
{
|
||||
line_aux += std::string("GPGA");
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18);
|
||||
line_aux += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5);
|
||||
line_aux += std::string(10, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("LEAP SECONDS", 59) != std::string::npos)
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_DN), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
out.open(navMixfilename, std::ios::out | std::ios::trunc);
|
||||
out.seekp(0);
|
||||
for (int i = 0; i < (int) data.size() - 1; i++)
|
||||
{
|
||||
out << data[i] << std::endl;
|
||||
}
|
||||
out.close();
|
||||
out.open(navMixfilename, std::ios::out | std::ios::app);
|
||||
out.seekp(pos);
|
||||
std::cout << "The RINEX Navigation file header has been updated with UTC and IONO info." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac)
|
||||
{
|
||||
std::string line;
|
||||
stringVersion = "3.02";
|
||||
@ -814,7 +1195,8 @@ void Rinex_Printer::rinex_nav_header(std::ofstream& out, const Gps_Iono& gps_ion
|
||||
out << line << std::endl;
|
||||
}
|
||||
|
||||
void Rinex_Printer::rinex_sbs_header(std::ofstream& out)
|
||||
|
||||
void Rinex_Printer::rinex_sbs_header(std::fstream& out)
|
||||
{
|
||||
std::string line;
|
||||
|
||||
@ -922,7 +1304,7 @@ void Rinex_Printer::rinex_sbs_header(std::ofstream& out)
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Ephemeris>& eph_map)
|
||||
void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int,Gps_Ephemeris>& eph_map)
|
||||
{
|
||||
std::string line;
|
||||
std::map<int,Gps_Ephemeris>::const_iterator gps_ephemeris_iter;
|
||||
@ -932,7 +1314,7 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
|
||||
gps_ephemeris_iter++)
|
||||
{
|
||||
// -------- SV / EPOCH / SV CLK
|
||||
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_GPS_time(gps_ephemeris_iter->second, gps_ephemeris_iter->second.d_Toe);
|
||||
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_GPS_time(gps_ephemeris_iter->second, gps_ephemeris_iter->second.d_Toc);
|
||||
std::string timestring = boost::posix_time::to_iso_string(p_utc_time);
|
||||
std::string month (timestring, 4, 2);
|
||||
std::string day (timestring, 6, 2);
|
||||
@ -1125,7 +1507,6 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
|
||||
|
||||
|
||||
|
||||
|
||||
// -------- BROADCAST ORBIT - 4
|
||||
line.clear();
|
||||
if (version == 2)
|
||||
@ -1254,7 +1635,7 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int, Galileo_Ephemeris>& eph_map)
|
||||
void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int, Galileo_Ephemeris>& eph_map)
|
||||
{
|
||||
std::string line;
|
||||
std::map<int,Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
|
||||
@ -1264,7 +1645,7 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int, Galile
|
||||
galileo_ephemeris_iter++)
|
||||
{
|
||||
// -------- SV / EPOCH / SV CLK
|
||||
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_Galileo_time(galileo_ephemeris_iter->second, galileo_ephemeris_iter->second.TOW_5);
|
||||
boost::posix_time::ptime p_utc_time = Rinex_Printer::compute_Galileo_time(galileo_ephemeris_iter->second, galileo_ephemeris_iter->second.t0e_1);
|
||||
std::string timestring = boost::posix_time::to_iso_string(p_utc_time);
|
||||
std::string month (timestring, 4, 2);
|
||||
std::string day (timestring, 6, 2);
|
||||
@ -1433,7 +1814,7 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int, Galile
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Galileo_Ephemeris>& galileo_eph_map)
|
||||
void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Galileo_Ephemeris>& galileo_eph_map)
|
||||
{
|
||||
version = 3;
|
||||
stringVersion = "3.02";
|
||||
@ -1441,10 +1822,91 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int, Gps_Ep
|
||||
Rinex_Printer::log_rinex_nav(out, galileo_eph_map);
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation)
|
||||
void Rinex_Printer::update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model)
|
||||
{
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
out.seekp(0);
|
||||
data.clear();
|
||||
|
||||
bool no_more_finds = false;
|
||||
std::string line_str;
|
||||
|
||||
while(!out.eof())
|
||||
{
|
||||
std::getline(out, line_str);
|
||||
|
||||
if(!no_more_finds)
|
||||
{
|
||||
line_aux.clear();
|
||||
|
||||
if (version == 2)
|
||||
{
|
||||
if (line_str.find("TIME OF FIRST OBS", 59) != std::string::npos) // TIME OF FIRST OBS last header annotation might change in the future
|
||||
{
|
||||
data.push_back(line_str);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += std::string(54, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
if (version == 3)
|
||||
{
|
||||
if (line_str.find("TIME OF FIRST OBS", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
out.open(obsfilename, std::ios::out | std::ios::trunc);
|
||||
out.seekp(0);
|
||||
for (int i = 0; i < (int) data.size() - 1; i++)
|
||||
{
|
||||
out << data[i] << std::endl;
|
||||
}
|
||||
out.close();
|
||||
out.open(obsfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||
out.seekp(0, std::ios_base::end);
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation)
|
||||
{
|
||||
std::string line;
|
||||
|
||||
// -------- Line 1
|
||||
@ -1704,8 +2166,67 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& ep
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::update_obs_header(std::fstream& out, const Galileo_Utc_Model& galileo_utc_model)
|
||||
{
|
||||
std::vector<std::string> data;
|
||||
std::string line_aux;
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation)
|
||||
out.seekp(0);
|
||||
data.clear();
|
||||
|
||||
bool no_more_finds = false;
|
||||
std::string line_str;
|
||||
|
||||
while(!out.eof())
|
||||
{
|
||||
std::getline(out, line_str);
|
||||
|
||||
if(!no_more_finds)
|
||||
{
|
||||
line_aux.clear();
|
||||
|
||||
if (line_str.find("TIME OF FIRST OBS", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.Delta_tLS_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.Delta_tLSF_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WN_LSF_6), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.DN_6), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
}
|
||||
else if (line_str.find("END OF HEADER", 59) != std::string::npos)
|
||||
{
|
||||
data.push_back(line_str);
|
||||
no_more_finds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
out.open(obsfilename, std::ios::out | std::ios::trunc);
|
||||
out.seekp(0);
|
||||
for (int i = 0; i < (int) data.size() - 1; i++)
|
||||
{
|
||||
out << data[i] << std::endl;
|
||||
}
|
||||
out.close();
|
||||
out.open(obsfilename, std::ios::out | std::ios::in |std::ios::app);
|
||||
out.seekp(0, std::ios_base::end);
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation)
|
||||
{
|
||||
std::string line;
|
||||
version = 3;
|
||||
@ -1907,8 +2428,9 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Galileo_Ephemeris
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation)
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation)
|
||||
{
|
||||
if(galileo_eph.e_1){} // avoid warning, not needed
|
||||
std::string line;
|
||||
version = 3;
|
||||
|
||||
@ -2135,7 +2657,8 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& gp
|
||||
out << line << std::endl;
|
||||
}
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph, const double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
{
|
||||
// RINEX observations timestamps are GPS timestamps.
|
||||
std::string line;
|
||||
@ -2378,8 +2901,7 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph,
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
{
|
||||
// RINEX observations timestamps are Galileo timestamps.
|
||||
// See http://gage14.upc.es/gLAB/HTML/Observation_Rinex_v3.01.html
|
||||
@ -2499,8 +3021,9 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Galileo_Ephemeris& e
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int,Gnss_Synchro>& pseudoranges)
|
||||
{
|
||||
if(galileo_eph.e_1){} // avoid warning, not needed
|
||||
std::string line;
|
||||
|
||||
boost::posix_time::ptime p_gps_time = Rinex_Printer::compute_GPS_time(gps_eph, gps_obs_time);
|
||||
@ -2692,7 +3215,7 @@ void Rinex_Printer::to_date_time(int gps_week, int gps_tow, int &year, int &mont
|
||||
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_sbs(std::ofstream& out, const Sbas_Raw_Msg& sbs_message)
|
||||
void Rinex_Printer::log_rinex_sbs(std::fstream& out, const Sbas_Raw_Msg& sbs_message)
|
||||
{
|
||||
// line 1: PRN / EPOCH / RCVR
|
||||
std::stringstream line1;
|
||||
|
@ -59,6 +59,8 @@
|
||||
#include <map>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_utc_model.h"
|
||||
#include "gps_iono.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "sbas_telemetry_data.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
@ -84,46 +86,46 @@ public:
|
||||
*/
|
||||
~Rinex_Printer();
|
||||
|
||||
std::ofstream obsFile ; //<! Output file stream for RINEX observation file
|
||||
std::ofstream navFile ; //<! Output file stream for RINEX navigation data file
|
||||
std::ofstream sbsFile ; //<! Output file stream for RINEX SBAS raw data file
|
||||
std::ofstream navGalFile ; //<! Output file stream for RINEX Galileo navigation data file
|
||||
std::ofstream navMixFile ; //<! Output file stream for RINEX Mixed navigation data file
|
||||
std::fstream obsFile ; //<! Output file stream for RINEX observation file
|
||||
std::fstream navFile ; //<! Output file stream for RINEX navigation data file
|
||||
std::fstream sbsFile ; //<! Output file stream for RINEX SBAS raw data file
|
||||
std::fstream navGalFile ; //<! Output file stream for RINEX Galileo navigation data file
|
||||
std::fstream navMixFile ; //<! Output file stream for RINEX Mixed navigation data file
|
||||
|
||||
/*!
|
||||
* \brief Generates the GPS Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::ofstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model);
|
||||
void rinex_nav_header(std::fstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Galileo Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::ofstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS/Galileo) Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::ofstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the GPS Observation data header
|
||||
*/
|
||||
void rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation);
|
||||
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Galileo Observation data header
|
||||
*/
|
||||
void rinex_obs_header(std::ofstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation);
|
||||
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS/Galileo) Observation data header
|
||||
*/
|
||||
void rinex_obs_header(std::ofstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation);
|
||||
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation);
|
||||
|
||||
/*!
|
||||
* \brief Generates the SBAS raw data header
|
||||
*/
|
||||
void rinex_sbs_header(std::ofstream& out);
|
||||
void rinex_sbs_header(std::fstream& out);
|
||||
|
||||
/*!
|
||||
* \brief Computes the UTC time and returns a boost::posix_time::ptime object
|
||||
@ -143,32 +145,32 @@ public:
|
||||
/*!
|
||||
* \brief Writes data from the GPS navigation message into the RINEX file
|
||||
*/
|
||||
void log_rinex_nav(std::ofstream& out, const std::map<int, Gps_Ephemeris>& eph_map);
|
||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& eph_map);
|
||||
|
||||
/*!
|
||||
* \brief Writes data from the Galileo navigation message into the RINEX file
|
||||
*/
|
||||
void log_rinex_nav(std::ofstream& out, const std::map<int, Galileo_Ephemeris>& eph_map);
|
||||
void log_rinex_nav(std::fstream& out, const std::map<int, Galileo_Ephemeris>& eph_map);
|
||||
|
||||
/*!
|
||||
* \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file
|
||||
*/
|
||||
void log_rinex_nav(std::ofstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Galileo_Ephemeris>& galileo_eph_map);
|
||||
void log_rinex_nav(std::fstream& out, const std::map<int, Gps_Ephemeris>& gps_eph_map, const std::map<int, Galileo_Ephemeris>& galileo_eph_map);
|
||||
|
||||
/*!
|
||||
* \brief Writes GPS observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
|
||||
/*!
|
||||
* \brief Writes Galileo observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::ofstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
|
||||
/*!
|
||||
* \brief Writes Galileo observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::ofstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro>& pseudoranges);
|
||||
|
||||
/*!
|
||||
* \brief Represents GPS time in the date time format. Leap years are considered, but leap seconds are not.
|
||||
@ -178,7 +180,17 @@ public:
|
||||
/*!
|
||||
* \brief Writes raw SBAS messages into the RINEX file
|
||||
*/
|
||||
void log_rinex_sbs(std::ofstream& out, const Sbas_Raw_Msg& sbs_message);
|
||||
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_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
|
||||
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
|
||||
void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model);
|
||||
|
||||
void update_obs_header(std::fstream& out, const Galileo_Utc_Model& galileo_utc_model);
|
||||
|
||||
std::map<std::string,std::string> satelliteSystem; //<! GPS, GLONASS, SBAS payload, Galileo or Compass
|
||||
std::map<std::string,std::string> observationType; //<! PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
||||
|
@ -773,6 +773,6 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
||||
|
@ -402,5 +402,5 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -398,5 +398,5 @@ int pcps_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -504,5 +504,5 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items,
|
||||
//DLOG(INFO)<<"d_sample_counter="<<d_sample_counter<<std::endl;
|
||||
d_sample_counter += d_fft_size; // sample counter
|
||||
consume_each(d_fft_size);
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -466,5 +466,5 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -427,5 +427,5 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -455,5 +455,5 @@ int pcps_multithread_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -821,5 +821,5 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
||||
|
||||
consume_each(ninput_items[0]);
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -557,5 +557,5 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
//DLOG(INFO) << "END GENERAL WORK";
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -420,5 +420,5 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configura
|
||||
queue_(queue)
|
||||
{
|
||||
connected_ = false;
|
||||
if(configuration){ };
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,6 +51,7 @@ SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
|
||||
queue_(queue)
|
||||
{
|
||||
connected_ = false;
|
||||
if(configuration){ };
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,14 +34,11 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn,
|
||||
unsigned int _chip_shift)
|
||||
void galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn, unsigned int _chip_shift)
|
||||
{
|
||||
std::string _galileo_signal = _Signal;
|
||||
signed int prn = _prn - 1;
|
||||
int index = 0;
|
||||
//int* dest = _dest;
|
||||
|
||||
/* A simple error check */
|
||||
if ((_prn < 1) || (_prn > 50))
|
||||
@ -53,8 +50,7 @@ galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn,
|
||||
{
|
||||
for (size_t i = 0; i < Galileo_E1_B_PRIMARY_CODE[prn].length(); i++)
|
||||
{
|
||||
hex_to_binary_converter(&_dest[index],
|
||||
Galileo_E1_B_PRIMARY_CODE[prn].at(i));
|
||||
hex_to_binary_converter(&_dest[index], Galileo_E1_B_PRIMARY_CODE[prn].at(i));
|
||||
index = index + 4;
|
||||
}
|
||||
|
||||
@ -63,9 +59,8 @@ galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn,
|
||||
{
|
||||
for (size_t i = 0; i < Galileo_E1_C_PRIMARY_CODE[prn].length(); i++)
|
||||
{
|
||||
hex_to_binary_converter(&_dest[index],
|
||||
Galileo_E1_C_PRIMARY_CODE[prn].at(i));
|
||||
index = index +4;
|
||||
hex_to_binary_converter(&_dest[index], Galileo_E1_C_PRIMARY_CODE[prn].at(i));
|
||||
index = index + 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -76,29 +71,26 @@ galileo_e1_code_gen_int(int* _dest, char _Signal[3], signed int _prn,
|
||||
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_sinboc_11_gen(std::complex<float>* _dest, int* _prn,
|
||||
unsigned int _length_out)
|
||||
void galileo_e1_sinboc_11_gen(std::complex<float>* _dest, int* _prn, unsigned int _length_out)
|
||||
{
|
||||
const unsigned int _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
unsigned int _period = (unsigned int) (_length_out / _length_in);
|
||||
for (unsigned int i = 0; i < _length_in; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < (_period / 2); j++)
|
||||
_dest[i * _period + j] = std::complex<float>((float) _prn[i],
|
||||
0.0);
|
||||
|
||||
{
|
||||
_dest[i * _period + j] = std::complex<float>((float) _prn[i], 0.0);
|
||||
}
|
||||
for (unsigned int j = (_period / 2); j < _period; j++)
|
||||
_dest[i * _period + j] = std::complex<float>((float) (-_prn[i]),
|
||||
0.0);
|
||||
{
|
||||
_dest[i * _period + j] = std::complex<float>((float) (- _prn[i]), 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_sinboc_61_gen(std::complex<float>* _dest, int* _prn,
|
||||
unsigned int _length_out)
|
||||
void galileo_e1_sinboc_61_gen(std::complex<float>* _dest, int* _prn, unsigned int _length_out)
|
||||
{
|
||||
const unsigned int _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
unsigned int _period = (unsigned int) (_length_out / _length_in);
|
||||
@ -106,26 +98,27 @@ galileo_e1_sinboc_61_gen(std::complex<float>* _dest, int* _prn,
|
||||
for (unsigned int i = 0; i < _length_in; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < _period; j += 2)
|
||||
_dest[i * _period + j] = std::complex<float>((float) _prn[i],
|
||||
0.0);
|
||||
{
|
||||
_dest[i * _period + j] = std::complex<float>((float) _prn[i], 0.0);
|
||||
}
|
||||
for (unsigned int j = 1; j < _period; j += 2)
|
||||
_dest[i * _period + j] = std::complex<float>((float) (-_prn[i]),
|
||||
0.0);
|
||||
{
|
||||
_dest[i * _period + j] = std::complex<float>((float) (- _prn[i]), 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_gen(std::complex<float>* _dest, int* _prn, char _Signal[3])
|
||||
void galileo_e1_gen(std::complex<float>* _dest, int* _prn, char _Signal[3])
|
||||
{
|
||||
std::string _galileo_signal = _Signal;
|
||||
const unsigned int _codeLength = 12 * Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
const float alpha = sqrt(10.0 / 11.0);
|
||||
const float beta = sqrt(1.0 / 11.0);
|
||||
|
||||
std::complex<float> sinboc_11[12*4092]; // _codeLength not accepted by Clang
|
||||
std::complex<float> sinboc_61[12*4092];
|
||||
std::complex<float> sinboc_11[12 * 4092]; // _codeLength not accepted by Clang
|
||||
std::complex<float> sinboc_61[12 * 4092];
|
||||
|
||||
galileo_e1_sinboc_11_gen(sinboc_11, _prn, _codeLength); //generate sinboc(1,1) 12 samples per chip
|
||||
galileo_e1_sinboc_61_gen(sinboc_61, _prn, _codeLength); //generate sinboc(6,1) 12 samples per chip
|
||||
@ -150,14 +143,11 @@ galileo_e1_gen(std::complex<float>* _dest, int* _prn, char _Signal[3])
|
||||
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
bool _cboc, unsigned int _prn, signed int _fs, unsigned int _chip_shift,
|
||||
bool _secondary_flag)
|
||||
{
|
||||
|
||||
// This function is based on the GNU software GPS for MATLAB in Kay Borre's book
|
||||
|
||||
std::string _galileo_signal = _Signal;
|
||||
unsigned int _samplesPerCode;
|
||||
const int _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; //Hz
|
||||
@ -183,8 +173,7 @@ galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
}
|
||||
else
|
||||
{
|
||||
galileo_e1_sinboc_11_gen(_signal_E1, primary_code_E1_chips,
|
||||
_codeLength); //generate sinboc(1,1) 2 samples per chip
|
||||
galileo_e1_sinboc_11_gen(_signal_E1, primary_code_E1_chips, _codeLength); //generate sinboc(1,1) 2 samples per chip
|
||||
}
|
||||
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
@ -223,17 +212,15 @@ galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
|
||||
for (unsigned int i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i+delay)%_samplesPerCode] = _signal_E1[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _signal_E1[i];
|
||||
}
|
||||
|
||||
delete[] _signal_E1;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signal[3],
|
||||
bool _cboc, unsigned int _prn, signed int _fs, unsigned int _chip_shift)
|
||||
{
|
||||
galileo_e1_code_gen_complex_sampled(_dest, _Signal, _cboc, _prn,
|
||||
_fs, _chip_shift, false);
|
||||
galileo_e1_code_gen_complex_sampled(_dest, _Signal, _cboc, _prn, _fs, _chip_shift, false);
|
||||
}
|
||||
|
@ -35,71 +35,63 @@
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, signed int _prn, char _Signal[3])
|
||||
{
|
||||
unsigned int prn=_prn-1;
|
||||
unsigned int index=0;
|
||||
unsigned int prn = _prn - 1;
|
||||
unsigned int index = 0;
|
||||
int a[4];
|
||||
if ((_prn < 1) || (_prn > 50))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_Signal[0]=='5' && _Signal[1]=='Q')
|
||||
if (_Signal[0] == '5' && _Signal[1] == 'Q')
|
||||
{
|
||||
for (size_t i = 0; i < Galileo_E5a_Q_PRIMARY_CODE[prn].length()-1; i++)
|
||||
for (size_t i = 0; i < Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1; i++)
|
||||
{
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_Q_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index]=std::complex<float>(0.0,float(a[0]));
|
||||
_dest[index+1]=std::complex<float>(0.0,float(a[1]));
|
||||
_dest[index+2]=std::complex<float>(0.0,float(a[2]));
|
||||
_dest[index+3]=std::complex<float>(0.0,float(a[3]));
|
||||
hex_to_binary_converter(a, Galileo_E5a_Q_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index] = std::complex<float>(0.0, float(a[0]));
|
||||
_dest[index + 1] = std::complex<float>(0.0, float(a[1]));
|
||||
_dest[index + 2] = std::complex<float>(0.0, float(a[2]));
|
||||
_dest[index + 3] = std::complex<float>(0.0, float(a[3]));
|
||||
index = index + 4;
|
||||
}
|
||||
// last 2 bits are filled up zeros
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length()-1));
|
||||
_dest[index]=std::complex<float>(float(0.0),a[0]);
|
||||
_dest[index+1]=std::complex<float>(float(0.0),a[1]);
|
||||
hex_to_binary_converter(a, Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1));
|
||||
_dest[index] = std::complex<float>(float(0.0), a[0]);
|
||||
_dest[index + 1] = std::complex<float>(float(0.0), a[1]);
|
||||
}
|
||||
else if (_Signal[0]=='5' && _Signal[1]=='I')
|
||||
else if (_Signal[0] == '5' && _Signal[1] == 'I')
|
||||
{
|
||||
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length()-1; i++)
|
||||
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1; i++)
|
||||
{
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_I_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index]=std::complex<float>(float(a[0]),0.0);
|
||||
_dest[index+1]=std::complex<float>(float(a[1]),0.0);
|
||||
_dest[index+2]=std::complex<float>(float(a[2]),0.0);
|
||||
_dest[index+3]=std::complex<float>(float(a[3]),0.0);
|
||||
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index] = std::complex<float>(float(a[0]), 0.0);
|
||||
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
|
||||
_dest[index + 2] = std::complex<float>(float(a[2]), 0.0);
|
||||
_dest[index + 3] = std::complex<float>(float(a[3]), 0.0);
|
||||
index = index + 4;
|
||||
}
|
||||
// last 2 bits are filled up zeros
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length()-1));
|
||||
_dest[index]=std::complex<float>(float(a[0]),0.0);
|
||||
_dest[index+1]=std::complex<float>(float(a[1]),0.0);
|
||||
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1));
|
||||
_dest[index] = std::complex<float>(float(a[0]), 0.0);
|
||||
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
|
||||
}
|
||||
else if (_Signal[0]=='5' && _Signal[1]=='X')
|
||||
else if (_Signal[0] == '5' && _Signal[1] == 'X')
|
||||
{
|
||||
int b[4];
|
||||
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length()-1; i++)
|
||||
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1; i++)
|
||||
{
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_I_PRIMARY_CODE[prn].at(i));
|
||||
hex_to_binary_converter(b,
|
||||
Galileo_E5a_Q_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index]=std::complex<float>(float(a[0]),float(b[0]));
|
||||
_dest[index+1]=std::complex<float>(float(a[1]),float(b[1]));
|
||||
_dest[index+2]=std::complex<float>(float(a[2]),float(b[2]));
|
||||
_dest[index+3]=std::complex<float>(float(a[3]),float(b[3]));
|
||||
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(i));
|
||||
hex_to_binary_converter(b, Galileo_E5a_Q_PRIMARY_CODE[prn].at(i));
|
||||
_dest[index] = std::complex<float>(float(a[0]),float(b[0]));
|
||||
_dest[index + 1] = std::complex<float>(float(a[1]),float(b[1]));
|
||||
_dest[index + 2] = std::complex<float>(float(a[2]),float(b[2]));
|
||||
_dest[index + 3] = std::complex<float>(float(a[3]),float(b[3]));
|
||||
index = index + 4;
|
||||
}
|
||||
// last 2 bits are filled up zeros
|
||||
hex_to_binary_converter(a,
|
||||
Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length()-1));
|
||||
hex_to_binary_converter(b,
|
||||
Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length()-1));
|
||||
_dest[index]=std::complex<float>(float(a[0]),float(b[0]));
|
||||
_dest[index+1]=std::complex<float>(float(a[1]),float(b[1]));
|
||||
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1));
|
||||
hex_to_binary_converter(b, Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1));
|
||||
_dest[index] = std::complex<float>(float(a[0]), float(b[0]));
|
||||
_dest[index + 1] = std::complex<float>(float(a[1]), float(b[1]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,39 +99,33 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
||||
unsigned int _prn, signed int _fs, unsigned int _chip_shift)
|
||||
{
|
||||
// This function is based on the GNU software GPS for MATLAB in the Kay Borre book
|
||||
|
||||
unsigned int _samplesPerCode;
|
||||
unsigned int delay;
|
||||
unsigned int _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS;
|
||||
const int _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ; //Hz
|
||||
|
||||
|
||||
std::complex<float>* _code;
|
||||
_code=new std::complex<float>[_codeLength];
|
||||
_code = new std::complex<float>[_codeLength];
|
||||
|
||||
galileo_e5_a_code_gen_complex_primary(_code , _prn , _Signal);
|
||||
|
||||
_samplesPerCode = round(_fs / (_codeFreqBasis / _codeLength));
|
||||
|
||||
delay = ((_codeLength - _chip_shift)
|
||||
% _codeLength) * _samplesPerCode / _codeLength;
|
||||
|
||||
delay = ((_codeLength - _chip_shift) % _codeLength) * _samplesPerCode / _codeLength;
|
||||
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
std::complex<float>* _resampled_signal;
|
||||
if (posix_memalign((void**)&_resampled_signal, 16, _samplesPerCode * sizeof(gr_complex)) == 0){};
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs,
|
||||
_codeLength, _samplesPerCode); //resamples code to fs
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs, _codeLength, _samplesPerCode); //resamples code to fs
|
||||
delete[] _code;
|
||||
_code = _resampled_signal;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i+delay)%_samplesPerCode] = _code[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||
}
|
||||
|
||||
free(_code);
|
||||
|
||||
}
|
||||
|
@ -178,9 +178,9 @@ void resampler(std::complex<float>* _from, std::complex<float>* _dest, float _fs
|
||||
{
|
||||
unsigned int _codeValueIndex;
|
||||
//--- Find time constants --------------------------------------------------
|
||||
const float _t_in = 1/_fs_in; // Incoming sampling period in sec
|
||||
const float _t_out = 1/_fs_out; // Out sampling period in sec
|
||||
for (unsigned int i=0; i<_length_out-1; i++)
|
||||
const float _t_in = 1 / _fs_in; // Incoming sampling period in sec
|
||||
const float _t_out = 1 / _fs_out; // Out sampling period in sec
|
||||
for (unsigned int i = 0; i < _length_out - 1; i++)
|
||||
{
|
||||
//=== Digitizing =======================================================
|
||||
//--- compute index array to read sampled values -------------------------
|
||||
@ -189,5 +189,5 @@ void resampler(std::complex<float>* _from, std::complex<float>* _dest, float _fs
|
||||
_dest[i] = _from[_codeValueIndex];
|
||||
}
|
||||
//--- Correct the last index (due to number rounding issues) -----------
|
||||
_dest[_length_out-1] = _from[_length_in - 1];
|
||||
_dest[_length_out - 1] = _from[_length_in - 1];
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) #allows this to be a sub-proje
|
||||
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) #allows this to be a sub-project
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) #location for custom "Modules"
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
########################################################################
|
||||
# Environment setup
|
||||
|
@ -50,6 +50,7 @@ add_executable(volk_gnsssdr_profile
|
||||
)
|
||||
|
||||
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link})
|
||||
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
|
||||
|
||||
if(ENABLE_STRIP)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
|
||||
@ -67,6 +68,7 @@ install(
|
||||
# MAKE volk_gnsssdr-config-info
|
||||
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc)
|
||||
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link})
|
||||
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
|
||||
|
||||
install(
|
||||
TARGETS volk_gnsssdr-config-info
|
||||
|
@ -20,8 +20,7 @@
|
||||
#include "volk_gnsssdr/volk_gnsssdr_malloc.h"
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* For #defines used to determine support for allocation functions,
|
||||
@ -52,12 +51,20 @@
|
||||
//#else // _ISOC11_SOURCE
|
||||
|
||||
// Otherwise, test if we are a POSIX or X/Open system
|
||||
// This only has a restriction that alignment be a power of 2.
|
||||
// This only has a restriction that alignment be a power of 2and a
|
||||
// multiple of sizeof(void *).
|
||||
#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || HAVE_POSIX_MEMALIGN
|
||||
|
||||
void *volk_gnsssdr_malloc(size_t size, size_t alignment)
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
// quoting posix_memalign() man page:
|
||||
// "alignment must be a power of two and a multiple of sizeof(void *)"
|
||||
// volk_get_alignment() could return 1 for some machines (e.g. generic_orc)
|
||||
if (alignment == 1)
|
||||
return malloc(size);
|
||||
|
||||
int err = posix_memalign(&ptr, alignment, size);
|
||||
if(err == 0)
|
||||
{
|
||||
@ -65,7 +72,9 @@ void *volk_gnsssdr_malloc(size_t size, size_t alignment)
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "VOLK: Error allocating memory (posix_memalign: %d)\n", err);
|
||||
fprintf(stderr,
|
||||
"VOLK: Error allocating memory "
|
||||
"(posix_memalign: error %d: %s)\n", err, strerror(err));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ GalileoE1Observables::~GalileoE1Observables()
|
||||
|
||||
void GalileoE1Observables::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ void GalileoE1Observables::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GalileoE1Observables::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ GpsL1CaObservables::~GpsL1CaObservables()
|
||||
void GpsL1CaObservables::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ void GpsL1CaObservables::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GpsL1CaObservables::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,8 +72,8 @@ HybridObservables::~HybridObservables()
|
||||
|
||||
void HybridObservables::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ void HybridObservables::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void HybridObservables::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,17 +137,17 @@ int hybrid_observables_cc::general_work (int noutput_items, gr_vector_int &ninpu
|
||||
{
|
||||
//record the word structure in a map for pseudorange computation
|
||||
current_gnss_synchro_map.insert(std::pair<int, Gnss_Synchro>(current_gnss_synchro[i].Channel_ID, current_gnss_synchro[i]));
|
||||
if (current_gnss_synchro[i].System=='G')
|
||||
{
|
||||
current_gnss_synchro_map_gps_only.insert(std::pair<int, Gnss_Synchro>(current_gnss_synchro[i].Channel_ID, current_gnss_synchro[i]));
|
||||
}
|
||||
if (current_gnss_synchro[i].System == 'G')
|
||||
{
|
||||
current_gnss_synchro_map_gps_only.insert(std::pair<int, Gnss_Synchro>(current_gnss_synchro[i].Channel_ID, current_gnss_synchro[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 2. Compute RAW pseudoranges using COMMON RECEPTION TIME algorithm. Use only the valid channels (channels that are tracking a satellite)
|
||||
*/
|
||||
DLOG(INFO)<<"gnss_synchro set size="<<current_gnss_synchro_map.size()<<std::endl;
|
||||
DLOG(INFO) << "gnss_synchro set size=" << current_gnss_synchro_map.size();
|
||||
|
||||
if(current_gnss_synchro_map.size() > 0)// and current_gnss_synchro_map_gps_only.size()>0)
|
||||
{
|
||||
@ -157,12 +157,12 @@ int hybrid_observables_cc::general_work (int noutput_items, gr_vector_int &ninpu
|
||||
*/
|
||||
// what is the most recent symbol TOW in the current set? -> this will be the reference symbol
|
||||
gnss_synchro_iter = max_element(current_gnss_synchro_map.begin(), current_gnss_synchro_map.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol);
|
||||
//gnss_synchro_iter = max_element(current_gnss_synchro_map_gps_only.begin(), current_gnss_synchro_map_gps_only.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol);
|
||||
double d_TOW_reference = gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol;
|
||||
char ref_sat_system=gnss_synchro_iter->second.System;
|
||||
DLOG(INFO)<<"d_TOW_hybrid_reference [ms] = "<< d_TOW_reference*1000 <<std::endl;
|
||||
//gnss_synchro_iter = max_element(current_gnss_synchro_map_gps_only.begin(), current_gnss_synchro_map_gps_only.end(), Hybrid_pairCompare_gnss_synchro_d_TOW_hybrid_at_current_symbol);
|
||||
double d_TOW_reference = gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol;
|
||||
char ref_sat_system = gnss_synchro_iter->second.System;
|
||||
DLOG(INFO) << "d_TOW_hybrid_reference [ms] = " << d_TOW_reference * 1000;
|
||||
double d_ref_PRN_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms;
|
||||
DLOG(INFO)<<"ref_PRN_rx_time_ms [ms] = "<< d_ref_PRN_rx_time_ms <<std::endl;
|
||||
DLOG(INFO) << "ref_PRN_rx_time_ms [ms] = " << d_ref_PRN_rx_time_ms;
|
||||
//int reference_channel= gnss_synchro_iter->second.Channel_ID;
|
||||
|
||||
// Now compute RX time differences due to the PRN alignment in the correlators
|
||||
@ -170,31 +170,31 @@ int hybrid_observables_cc::general_work (int noutput_items, gr_vector_int &ninpu
|
||||
double pseudorange_m;
|
||||
double delta_rx_time_ms;
|
||||
double delta_TOW_ms;
|
||||
//std::cout<<"d_sample_counter="<<d_sample_counter<<std::endl;
|
||||
for(gnss_synchro_iter = current_gnss_synchro_map.begin(); gnss_synchro_iter != current_gnss_synchro_map.end(); gnss_synchro_iter++)
|
||||
for(gnss_synchro_iter = current_gnss_synchro_map.begin(); gnss_synchro_iter != current_gnss_synchro_map.end(); gnss_synchro_iter++)
|
||||
{
|
||||
// check and correct synchronization in cross-system pseudoranges!
|
||||
delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms-d_ref_PRN_rx_time_ms;
|
||||
delta_TOW_ms = (d_TOW_reference - gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol)*1000.0;
|
||||
//std::cout<<"delta_rx_time_ms["<<gnss_synchro_iter->second.Channel_ID<<","<<gnss_synchro_iter->second.System<<"]="<<delta_rx_time_ms<<std::endl;
|
||||
//std::cout<<"delta_TOW_ms["<<gnss_synchro_iter->second.Channel_ID<<","<<gnss_synchro_iter->second.System<<"]="<<delta_TOW_ms<<std::endl;
|
||||
delta_rx_time_ms = gnss_synchro_iter->second.Prn_timestamp_ms - d_ref_PRN_rx_time_ms;
|
||||
delta_TOW_ms = (d_TOW_reference - gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol) * 1000.0;
|
||||
|
||||
//compute the pseudorange
|
||||
traveltime_ms = delta_TOW_ms + delta_rx_time_ms + GALILEO_STARTOFFSET_ms;
|
||||
pseudorange_m = traveltime_ms * GALILEO_C_m_ms; // [m]
|
||||
DLOG(INFO)<<"CH "<<gnss_synchro_iter->second.Channel_ID<<" tracking GNSS System "<<gnss_synchro_iter->second.System<<" has PRN start at= "<<gnss_synchro_iter->second.Prn_timestamp_ms<<" [ms], d_TOW_at_current_symbol = "<<(gnss_synchro_iter->second.d_TOW_at_current_symbol)*1000<<" [ms], d_TOW_hybrid_at_current_symbol = "<<(gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol)*1000<<"[ms], delta_rx_time_ms = "<< delta_rx_time_ms << "[ms], travel_time = " << traveltime_ms << ", pseudorange[m] = "<< pseudorange_m << std::endl;
|
||||
DLOG(INFO) << "CH " << gnss_synchro_iter->second.Channel_ID << " tracking GNSS System "
|
||||
<< gnss_synchro_iter->second.System << " has PRN start at= " << gnss_synchro_iter->second.Prn_timestamp_ms
|
||||
<< " [ms], d_TOW_at_current_symbol = " << (gnss_synchro_iter->second.d_TOW_at_current_symbol) * 1000
|
||||
<< " [ms], d_TOW_hybrid_at_current_symbol = "<< (gnss_synchro_iter->second.d_TOW_hybrid_at_current_symbol) * 1000
|
||||
<< "[ms], delta_rx_time_ms = " << delta_rx_time_ms << "[ms], travel_time = " << traveltime_ms
|
||||
<< ", pseudorange[m] = "<< pseudorange_m;
|
||||
|
||||
// update the pseudorange object
|
||||
//current_gnss_synchro[gnss_synchro_iter->second.Channel_ID] = gnss_synchro_iter->second;
|
||||
current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Pseudorange_m = pseudorange_m;
|
||||
current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].Flag_valid_pseudorange = true;
|
||||
current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_hybrid_at_current_symbol = round(d_TOW_reference*1000)/1000 + GALILEO_STARTOFFSET_ms/1000.0;
|
||||
|
||||
current_gnss_synchro[gnss_synchro_iter->second.Channel_ID].d_TOW_hybrid_at_current_symbol = round(d_TOW_reference * 1000) / 1000 + GALILEO_STARTOFFSET_ms / 1000.0;
|
||||
}
|
||||
//std::cout<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
if(d_dump == true)
|
||||
if(d_dump == true)
|
||||
{
|
||||
// MULTIPLEXED FILE RECORDING - Record results to file
|
||||
try
|
||||
|
@ -51,6 +51,28 @@ if(ENABLE_GN3S)
|
||||
)
|
||||
endif(ENABLE_GN3S)
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
##############################################
|
||||
# TELEORBIT FLEXIBAND FRONTEND ADAPTER
|
||||
##############################################
|
||||
if(OS_IS_MACOSX)
|
||||
set(MACOSX_ARGS "-DCMAKE_CXX_COMPILER=/usr/bin/clang++")
|
||||
endif(OS_IS_MACOSX)
|
||||
find_package(teleorbit REQUIRED)
|
||||
if(NOT TELEORBIT_FOUND)
|
||||
message(FATAL_ERROR "Teleorbit Flexiband GNURadio driver required to build gnss-sdr with the optional FLEXIBAND adapter")
|
||||
endif(NOT TELEORBIT_FOUND)
|
||||
|
||||
# Set up variables
|
||||
set(FLEXIBAND_DRIVER_INCLUDE_DIRS
|
||||
${OPT_DRIVER_INCLUDE_DIRS}
|
||||
${TELEORBIT_INCLUDE_DIR}/teleorbit
|
||||
)
|
||||
set(OPT_LIBRARIES ${OPT_LIBRARIES} ${TELEORBIT_LIBRARIES})
|
||||
set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${FLEXIBAND_DRIVER_INCLUDE_DIRS})
|
||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} flexiband_signal_source.cc)
|
||||
endif(ENABLE_FLEXIBAND)
|
||||
|
||||
|
||||
if(ENABLE_ARRAY)
|
||||
##############################################
|
||||
|
147
src/algorithms/signal_source/adapters/flexiband_signal_source.cc
Normal file
147
src/algorithms/signal_source/adapters/flexiband_signal_source.cc
Normal file
@ -0,0 +1,147 @@
|
||||
/*!
|
||||
* \file raw_array_signal_source.cc
|
||||
* \brief CTTC Experimental GNSS 8 channels array signal source
|
||||
* \author Javier Arribas, jarribas(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "flexiband_signal_source.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <glog/logging.h>
|
||||
#include <teleorbit/frontend.h>
|
||||
#include "configuration_interface.h"
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
FlexibandSignalSource::FlexibandSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) :
|
||||
role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
{
|
||||
std::string default_item_type = "byte";
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
|
||||
std::string default_firmware_file = "flexiband_I-1b.bit";
|
||||
firmware_filename_ = configuration->property(role + ".firmware_file", default_firmware_file);
|
||||
|
||||
gain1_ = configuration->property(role + ".gain1", 0); // check gain DAC values for Flexiband frontend!
|
||||
gain2_ = configuration->property(role + ".gain2", 0); // check gain DAC values for Flexiband frontend!
|
||||
gain3_ = configuration->property(role + ".gain3", 0); // check gain DAC values for Flexiband frontend!
|
||||
|
||||
AGC_ = configuration->property(role + ".AGC", true); // enabled AGC by default
|
||||
flag_read_file = configuration->property(role + ".flag_read_file", false); //disable read samples from file by default
|
||||
std::string default_signal_file = "flexiband_frame_samples.bin";
|
||||
signal_file = configuration->property(role + ".signal_file", default_signal_file);
|
||||
|
||||
usb_packet_buffer_size_ = configuration->property(role + ".usb_packet_buffer", 128);
|
||||
|
||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
flexiband_source_ = gr::teleorbit::frontend::make(firmware_filename_.c_str(), gain1_, gain2_, gain3_, AGC_, usb_packet_buffer_size_, signal_file.c_str(), flag_read_file);
|
||||
|
||||
//create I, Q -> gr_complex type conversion blocks
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
{
|
||||
char_to_float.push_back(gr::blocks::char_to_float::make());
|
||||
}
|
||||
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
{
|
||||
float_to_complex_.push_back(gr::blocks::float_to_complex::make());
|
||||
}
|
||||
|
||||
DLOG(INFO) << "Item size " << item_size_;
|
||||
DLOG(INFO) << "Firmware file " << firmware_filename_;
|
||||
DLOG(INFO) << "flexiband_source_(" << flexiband_source_->unique_id() << ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unrecognized item type for flexiband_source_";
|
||||
item_size_ = sizeof(gr_complex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
FlexibandSignalSource::~FlexibandSignalSource()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
void FlexibandSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
{
|
||||
top_block->connect(flexiband_source_, n, char_to_float.at(n), 0);
|
||||
DLOG(INFO) << "connected flexiband_source_ to char_to_float CH" << n;
|
||||
}
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
{
|
||||
top_block->connect(char_to_float.at(n * 2), 0, float_to_complex_.at(n), 0);
|
||||
top_block->connect(char_to_float.at(n * 2 + 1), 0, float_to_complex_.at(n), 1);
|
||||
DLOG(INFO) << "connected char_to_float to float_to_complex_ CH" << n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FlexibandSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
for (int n = 0; n < (RF_channels_ * 2); n++)
|
||||
{
|
||||
top_block->disconnect(flexiband_source_, n, char_to_float.at(n), 0);
|
||||
DLOG(INFO) << "disconnect flexiband_source_ to char_to_float CH" << n;
|
||||
}
|
||||
for (int n = 0; n < RF_channels_; n++)
|
||||
{
|
||||
top_block->disconnect(char_to_float.at(n * 2), 0, float_to_complex_.at(n), 0);
|
||||
top_block->disconnect(char_to_float.at(n * 2 + 1), 0, float_to_complex_.at(n), 1);
|
||||
DLOG(INFO) << "disconnect char_to_float to float_to_complex_ CH" << n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr FlexibandSignalSource::get_left_block()
|
||||
{
|
||||
LOG(WARNING) << "Left block of a signal source should not be retrieved";
|
||||
return gr::block_sptr();
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr FlexibandSignalSource::get_right_block()
|
||||
{
|
||||
return get_right_block(0);
|
||||
}
|
||||
|
||||
gr::basic_block_sptr FlexibandSignalSource::get_right_block(int RF_channel)
|
||||
{
|
||||
return float_to_complex_.at(RF_channel);
|
||||
}
|
||||
|
108
src/algorithms/signal_source/adapters/flexiband_signal_source.h
Normal file
108
src/algorithms/signal_source/adapters/flexiband_signal_source.h
Normal file
@ -0,0 +1,108 @@
|
||||
/*!
|
||||
* \file raw_array_signal_source.h
|
||||
* \brief Signal Source adapter for the Teleorbit Flexiband front-end device.
|
||||
* This adapter requires a Flexiband GNURadio driver installed (not included with GNSS-SDR)
|
||||
* \author Javier Arribas, jarribas(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* 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/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FLEXIBAND_SIGNAL_SOURCE_H_
|
||||
#define FLEXIBAND_SIGNAL_SOURCE_H_
|
||||
|
||||
#include <string>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/char_to_float.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <vector>
|
||||
#include "gnss_block_interface.h"
|
||||
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
/*!
|
||||
* \brief This class configures and reads samples from Teleorbit Flexiband front-end.
|
||||
* This software requires a Flexiband GNU Radio driver installed (not included with GNSS-SDR).
|
||||
*/
|
||||
class FlexibandSignalSource: public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
FlexibandSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
|
||||
virtual ~FlexibandSignalSource();
|
||||
std::string role()
|
||||
{
|
||||
return role_;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns "Flexiband_Signal_Source".
|
||||
*/
|
||||
std::string implementation()
|
||||
{
|
||||
return "Flexiband_Signal_Source";
|
||||
}
|
||||
size_t item_size()
|
||||
{
|
||||
return item_size_;
|
||||
}
|
||||
void connect(gr::top_block_sptr top_block);
|
||||
void disconnect(gr::top_block_sptr top_block);
|
||||
gr::basic_block_sptr get_left_block();
|
||||
gr::basic_block_sptr get_right_block();
|
||||
gr::basic_block_sptr get_right_block(int RF_channel);
|
||||
|
||||
private:
|
||||
std::string role_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
|
||||
std::string firmware_filename_;
|
||||
int gain1_;
|
||||
int gain2_;
|
||||
int gain3_;
|
||||
int usb_packet_buffer_size_;
|
||||
bool AGC_;
|
||||
std::string signal_file;
|
||||
bool flag_read_file;
|
||||
|
||||
int RF_channels_;
|
||||
|
||||
gr::block_sptr flexiband_source_;
|
||||
|
||||
std::vector<boost::shared_ptr<gr::block>> char_to_float;
|
||||
std::vector<boost::shared_ptr<gr::block>> float_to_complex_;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
};
|
||||
|
||||
#endif /*FLEXIBAND_SIGNAL_SOURCE_H_*/
|
@ -51,50 +51,52 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
std::string default_item_type = "cshort";
|
||||
|
||||
// UHD COMMON PARAMETERS
|
||||
uhd::device_addr_t dev_addr;
|
||||
device_address_= configuration->property(role + ".device_address", empty);
|
||||
// When left empty, the device discovery routines will search all
|
||||
// available transports on the system (ethernet, usb...).
|
||||
// To narrow down the discovery process to a particular device,
|
||||
// specify a transport key/value pair specific to your device.
|
||||
if (empty.compare(device_address_) != 0) // if not empty
|
||||
{
|
||||
dev_addr["addr"] = device_address_;
|
||||
}
|
||||
// UHD COMMON PARAMETERS
|
||||
uhd::device_addr_t dev_addr;
|
||||
device_address_ = configuration->property(role + ".device_address", empty);
|
||||
// When left empty, the device discovery routines will search all
|
||||
// available transports on the system (ethernet, usb...).
|
||||
// To narrow down the discovery process to a particular device,
|
||||
// specify a transport key/value pair specific to your device.
|
||||
if (empty.compare(device_address_) != 0) // if not empty
|
||||
{
|
||||
dev_addr["addr"] = device_address_;
|
||||
}
|
||||
|
||||
subdevice_=configuration->property(role + ".subdevice", empty);
|
||||
RF_channels_=configuration->property(role + ".RF_channels", 1);
|
||||
sample_rate_ = configuration->property(role + ".sampling_frequency", (double)4.0e6);
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
subdevice_ = configuration->property(role + ".subdevice", empty);
|
||||
RF_channels_ = configuration->property(role + ".RF_channels", 1);
|
||||
sample_rate_ = configuration->property(role + ".sampling_frequency", (double)4.0e6);
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
|
||||
if (RF_channels_==1)
|
||||
{
|
||||
// Single RF channel UHD operation (backward compatible config file format)
|
||||
samples_.push_back(configuration->property(role + ".samples", 0));
|
||||
dump_.push_back(configuration->property(role + ".dump", false));
|
||||
dump_filename_.push_back(configuration->property(role + ".dump_filename", default_dump_file));
|
||||
if (RF_channels_ == 1)
|
||||
{
|
||||
// Single RF channel UHD operation (backward compatible config file format)
|
||||
samples_.push_back(configuration->property(role + ".samples", 0));
|
||||
dump_.push_back(configuration->property(role + ".dump", false));
|
||||
dump_filename_.push_back(configuration->property(role + ".dump_filename", default_dump_file));
|
||||
|
||||
freq_.push_back(configuration->property(role + ".freq", GPS_L1_FREQ_HZ));
|
||||
gain_.push_back(configuration->property(role + ".gain", (double)50.0));
|
||||
freq_.push_back(configuration->property(role + ".freq", GPS_L1_FREQ_HZ));
|
||||
gain_.push_back(configuration->property(role + ".gain", (double)50.0));
|
||||
|
||||
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz", sample_rate_/2));
|
||||
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz", sample_rate_/2));
|
||||
|
||||
}else{
|
||||
// multiple RF channels selected
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
// Single RF channel UHD operation (backward compatible config file format)
|
||||
samples_.push_back(configuration->property(role + ".samples" + boost::lexical_cast<std::string>(i), 0));
|
||||
dump_.push_back(configuration->property(role + ".dump" + boost::lexical_cast<std::string>(i), false));
|
||||
dump_filename_.push_back(configuration->property(role + ".dump_filename" + boost::lexical_cast<std::string>(i), default_dump_file));
|
||||
}
|
||||
else
|
||||
{
|
||||
// multiple RF channels selected
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
// Single RF channel UHD operation (backward compatible config file format)
|
||||
samples_.push_back(configuration->property(role + ".samples" + boost::lexical_cast<std::string>(i), 0));
|
||||
dump_.push_back(configuration->property(role + ".dump" + boost::lexical_cast<std::string>(i), false));
|
||||
dump_filename_.push_back(configuration->property(role + ".dump_filename" + boost::lexical_cast<std::string>(i), default_dump_file));
|
||||
|
||||
freq_.push_back(configuration->property(role + ".freq" + boost::lexical_cast<std::string>(i), GPS_L1_FREQ_HZ));
|
||||
gain_.push_back(configuration->property(role + ".gain" + boost::lexical_cast<std::string>(i), (double)50.0));
|
||||
freq_.push_back(configuration->property(role + ".freq" + boost::lexical_cast<std::string>(i), GPS_L1_FREQ_HZ));
|
||||
gain_.push_back(configuration->property(role + ".gain" + boost::lexical_cast<std::string>(i), (double)50.0));
|
||||
|
||||
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + boost::lexical_cast<std::string>(i), sample_rate_/2));
|
||||
}
|
||||
}
|
||||
IF_bandwidth_hz_.push_back(configuration->property(role + ".IF_bandwidth_hz" + boost::lexical_cast<std::string>(i), sample_rate_/2));
|
||||
}
|
||||
}
|
||||
// 1. Make the uhd driver instance
|
||||
//uhd_source_= uhd::usrp::multi_usrp::make(dev_addr);
|
||||
|
||||
@ -108,44 +110,44 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
||||
if (item_type_.compare("cbyte") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_8sc_t);
|
||||
uhd_stream_args_=uhd::stream_args_t("sc8");
|
||||
uhd_stream_args_ = uhd::stream_args_t("sc8");
|
||||
}
|
||||
else if (item_type_.compare("cshort") == 0)
|
||||
{
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
uhd_stream_args_=uhd::stream_args_t("sc16");
|
||||
uhd_stream_args_ = uhd::stream_args_t("sc16");
|
||||
}
|
||||
else if (item_type_.compare("gr_complex") == 0)
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
uhd_stream_args_=uhd::stream_args_t("fc32");
|
||||
uhd_stream_args_ = uhd::stream_args_t("fc32");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << item_type_ << " unrecognized item type. Using cshort.";
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
uhd_stream_args_=uhd::stream_args_t("sc16");
|
||||
uhd_stream_args_ = uhd::stream_args_t("sc16");
|
||||
}
|
||||
|
||||
// select the number of channels and the subdevice specifications
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
uhd_stream_args_.channels.push_back(i);
|
||||
}
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
uhd_stream_args_.channels.push_back(i);
|
||||
}
|
||||
|
||||
// 1.2 Make the UHD source object
|
||||
uhd_source_ = gr::uhd::usrp_source::make(dev_addr, uhd_stream_args_);
|
||||
|
||||
// Set subdevice specification string for USRP family devices. It is composed of:
|
||||
// <motherboard slot name>:<daughterboard frontend name>
|
||||
// For motherboards: All USRP family motherboards have a first slot named A:.
|
||||
// The USRP1 has two daughterboard subdevice slots, known as A: and B:.
|
||||
// For daughterboards, see http://files.ettus.com/uhd_docs/manual/html/dboards.html
|
||||
// "0" is valid for DBSRX, DBSRX2, WBX Series
|
||||
// Set subdevice specification string for USRP family devices. It is composed of:
|
||||
// <motherboard slot name>:<daughterboard frontend name>
|
||||
// For motherboards: All USRP family motherboards have a first slot named A:.
|
||||
// The USRP1 has two daughterboard subdevice slots, known as A: and B:.
|
||||
// For daughterboards, see http://files.ettus.com/uhd_docs/manual/html/dboards.html
|
||||
// "0" is valid for DBSRX, DBSRX2, WBX Series
|
||||
// Dual channel example: "A:0 B:0"
|
||||
// TODO: Add support for multiple motherboards (i.e. four channels "A:0 B:0 A:1 B1")
|
||||
|
||||
uhd_source_->set_subdev_spec(subdevice_, 0);
|
||||
uhd_source_->set_subdev_spec(subdevice_, 0);
|
||||
|
||||
// 2.1 set sampling clock reference
|
||||
// Set the clock source for the usrp device.
|
||||
@ -159,71 +161,70 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
||||
std::cout << boost::format("Sampling Rate for the USRP device: %f [sps]...") % (uhd_source_->get_samp_rate()) << std::endl;
|
||||
LOG(INFO) << boost::format("Sampling Rate for the USRP device: %f [sps]...") % (uhd_source_->get_samp_rate());
|
||||
|
||||
std::vector<std::string> sensor_names;
|
||||
std::vector<std::string> sensor_names;
|
||||
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
std::cout<< "UHD RF CHANNEL #"<<i<< " SETTINGS"<<std::endl;
|
||||
// 3. Tune the usrp device to the desired center frequency
|
||||
uhd_source_->set_center_freq(freq_.at(i),i);
|
||||
std::cout << boost::format("Actual USRP center freq.: %f [Hz]...") % (uhd_source_->get_center_freq(i)) << std::endl << std::endl;
|
||||
LOG(INFO) << boost::format("Actual USRP center freq. set to: %f [Hz]...") % (uhd_source_->get_center_freq(i));
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
std::cout << "UHD RF CHANNEL #" << i << " SETTINGS" << std::endl;
|
||||
// 3. Tune the usrp device to the desired center frequency
|
||||
uhd_source_->set_center_freq(freq_.at(i), i);
|
||||
std::cout << boost::format("Actual USRP center freq.: %f [Hz]...") % (uhd_source_->get_center_freq(i)) << std::endl;
|
||||
LOG(INFO) << boost::format("Actual USRP center freq. set to: %f [Hz]...") % (uhd_source_->get_center_freq(i));
|
||||
|
||||
// TODO: Assign the remnant IF from the PLL tune error
|
||||
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i)) << std::endl;
|
||||
LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i));
|
||||
// TODO: Assign the remnant IF from the PLL tune error
|
||||
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i)) << std::endl;
|
||||
LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i));
|
||||
|
||||
// 4. set the gain for the daughterboard
|
||||
uhd_source_->set_gain(gain_.at(i),i);
|
||||
std::cout << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i) << std::endl;
|
||||
LOG(INFO) << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i);
|
||||
// 4. set the gain for the daughterboard
|
||||
uhd_source_->set_gain(gain_.at(i), i);
|
||||
std::cout << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i) << std::endl;
|
||||
LOG(INFO) << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i);
|
||||
|
||||
//5. Set the bandpass filter on the RF frontend
|
||||
std::cout << boost::format("Setting RF bandpass filter bandwidth to: %f [Hz]...") % IF_bandwidth_hz_.at(i) << std::endl;
|
||||
uhd_source_->set_bandwidth(IF_bandwidth_hz_.at(i),i);
|
||||
//5. Set the bandpass filter on the RF frontend
|
||||
std::cout << boost::format("Setting RF bandpass filter bandwidth to: %f [Hz]...") % IF_bandwidth_hz_.at(i) << std::endl;
|
||||
uhd_source_->set_bandwidth(IF_bandwidth_hz_.at(i), i);
|
||||
|
||||
//set the antenna (optional)
|
||||
//uhd_source_->set_antenna(ant);
|
||||
//set the antenna (optional)
|
||||
//uhd_source_->set_antenna(ant);
|
||||
|
||||
// We should wait? #include <boost/thread.hpp>
|
||||
// boost::this_thread::sleep(boost::posix_time::seconds(1));
|
||||
// We should wait? #include <boost/thread.hpp>
|
||||
// boost::this_thread::sleep(boost::posix_time::seconds(1));
|
||||
|
||||
// Check out the status of the lo_locked sensor (boolean for LO lock state)
|
||||
sensor_names = uhd_source_->get_sensor_names(i);
|
||||
if (std::find(sensor_names.begin(), sensor_names.end(), "lo_locked") != sensor_names.end())
|
||||
{
|
||||
uhd::sensor_value_t lo_locked = uhd_source_->get_sensor("lo_locked", i);
|
||||
std::cout << boost::format("Check for front-end %s ...") % lo_locked.to_pp_string() << " is ";
|
||||
if (lo_locked.to_bool() == true)
|
||||
{
|
||||
std::cout << "Locked" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "UNLOCKED!" <<std::endl;
|
||||
}
|
||||
//UHD_ASSERT_THROW(lo_locked.to_bool());
|
||||
}
|
||||
}
|
||||
// Check out the status of the lo_locked sensor (boolean for LO lock state)
|
||||
sensor_names = uhd_source_->get_sensor_names(i);
|
||||
if (std::find(sensor_names.begin(), sensor_names.end(), "lo_locked") != sensor_names.end())
|
||||
{
|
||||
uhd::sensor_value_t lo_locked = uhd_source_->get_sensor("lo_locked", i);
|
||||
std::cout << boost::format("Check for front-end %s ...") % lo_locked.to_pp_string() << " is ";
|
||||
if (lo_locked.to_bool() == true)
|
||||
{
|
||||
std::cout << "Locked" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "UNLOCKED!" << std::endl;
|
||||
}
|
||||
//UHD_ASSERT_THROW(lo_locked.to_bool());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
LOG(INFO) << "RF_channel "<<i<<" Send STOP signal after " << samples_.at(i) << " samples";
|
||||
valve_.push_back(gnss_sdr_make_valve(item_size_, samples_.at(i), queue_));
|
||||
DLOG(INFO) << "valve(" << valve_.at(i)->unique_id() << ")";
|
||||
}
|
||||
|
||||
if (dump_.at(i))
|
||||
{
|
||||
LOG(INFO) << "RF_channel "<<i<< "Dumping output into file " << dump_filename_.at(i);
|
||||
file_sink_.push_back(gr::blocks::file_sink::make(item_size_, dump_filename_.at(i).c_str()));
|
||||
DLOG(INFO) << "file_sink(" << file_sink_.at(i)->unique_id() << ")";
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
LOG(INFO) << "RF_channel "<< i << " Send STOP signal after " << samples_.at(i) << " samples";
|
||||
valve_.push_back(gnss_sdr_make_valve(item_size_, samples_.at(i), queue_));
|
||||
DLOG(INFO) << "valve(" << valve_.at(i)->unique_id() << ")";
|
||||
}
|
||||
|
||||
if (dump_.at(i))
|
||||
{
|
||||
LOG(INFO) << "RF_channel "<< i << "Dumping output into file " << dump_filename_.at(i);
|
||||
file_sink_.push_back(gr::blocks::file_sink::make(item_size_, dump_filename_.at(i).c_str()));
|
||||
DLOG(INFO) << "file_sink(" << file_sink_.at(i)->unique_id() << ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -231,56 +232,55 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
||||
UhdSignalSource::~UhdSignalSource()
|
||||
{}
|
||||
|
||||
|
||||
void UhdSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
top_block->connect(uhd_source_, i, valve_.at(i), 0);
|
||||
DLOG(INFO) << "connected usrp source to valve RF Channel "<< i;
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->connect(valve_.at(i), 0, file_sink_.at(i), 0);
|
||||
DLOG(INFO) << "connected valve to file sink RF Channel "<< i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->connect(uhd_source_, i, file_sink_.at(i), 0);
|
||||
DLOG(INFO) << "connected usrp source to file sink RF Channel "<< i;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
top_block->connect(uhd_source_, i, valve_.at(i), 0);
|
||||
DLOG(INFO) << "connected usrp source to valve RF Channel " << i;
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->connect(valve_.at(i), 0, file_sink_.at(i), 0);
|
||||
DLOG(INFO) << "connected valve to file sink RF Channel " << i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->connect(uhd_source_, i, file_sink_.at(i), 0);
|
||||
DLOG(INFO) << "connected usrp source to file sink RF Channel " << i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UhdSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
for (int i=0;i<RF_channels_;i++)
|
||||
{
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
top_block->disconnect(uhd_source_, i, valve_.at(i), 0);
|
||||
LOG(INFO) << "UHD source disconnected";
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->disconnect(valve_.at(i), 0, file_sink_.at(i), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->disconnect(uhd_source_, i, file_sink_.at(i), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < RF_channels_; i++)
|
||||
{
|
||||
if (samples_.at(i) != 0)
|
||||
{
|
||||
top_block->disconnect(uhd_source_, i, valve_.at(i), 0);
|
||||
LOG(INFO) << "UHD source disconnected";
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->disconnect(valve_.at(i), 0, file_sink_.at(i), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dump_.at(i))
|
||||
{
|
||||
top_block->disconnect(uhd_source_, i, file_sink_.at(i), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -295,12 +295,13 @@ gr::basic_block_sptr UhdSignalSource::get_left_block()
|
||||
|
||||
gr::basic_block_sptr UhdSignalSource::get_right_block()
|
||||
{
|
||||
return get_right_block(0);
|
||||
return get_right_block(0);
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr UhdSignalSource::get_right_block(int RF_channel)
|
||||
{
|
||||
//TODO: There is a incoherence here: Multichannel UHD is a single block with multiple outputs, but if the sample imit is enable, the output is a multiple block!
|
||||
//TODO: There is a incoherence here: Multichannel UHD is a single block with multiple outputs, but if the sample limit is enabled, the output is a multiple block!
|
||||
if (samples_.at(RF_channel) != 0)
|
||||
{
|
||||
return valve_.at(RF_channel);
|
||||
|
@ -93,16 +93,16 @@ void GalileoE1BTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
|
||||
|
||||
void GalileoE1BTelemetryDecoder::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
|
||||
void GalileoE1BTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configu
|
||||
telemetry_decoder_->set_utc_model_queue(&global_gps_utc_model_queue);
|
||||
|
||||
//decimation factor
|
||||
int decimation_factor=configuration->property(role + ".decimation_factor", 1);
|
||||
int decimation_factor = configuration->property(role + ".decimation_factor", 1);
|
||||
telemetry_decoder_->set_decimation(decimation_factor);
|
||||
DLOG(INFO) << "global navigation message queue assigned to telemetry_decoder ("<< telemetry_decoder_->unique_id() << ")";
|
||||
}
|
||||
@ -97,16 +97,16 @@ void GpsL1CaTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
|
||||
|
||||
void GpsL1CaTelemetryDecoder::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaTelemetryDecoder::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
if(top_block) { /* top_block is not null */};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +231,7 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
||||
else
|
||||
{
|
||||
std::cout << "Galileo CRC error on channel " << d_channel << std::endl;
|
||||
LOG(INFO)<< "Galileo CRC error on channel " << d_channel;
|
||||
LOG(INFO) << "Galileo CRC error on channel " << d_channel;
|
||||
}
|
||||
flag_even_word_arrived = 0;
|
||||
}
|
||||
@ -262,23 +262,23 @@ void galileo_e1b_telemetry_decoder_cc::decode_word(double *page_part_symbols,int
|
||||
//std::cout<<"New Galileo UTC model received for SV "<<d_satellite.get_PRN()<<std::endl;
|
||||
d_utc_model_queue->push(utc_model);
|
||||
}
|
||||
if (d_nav.have_new_almanac()==true)
|
||||
{
|
||||
Galileo_Almanac almanac=d_nav.get_almanac();
|
||||
d_almanac_queue->push(almanac);
|
||||
//debug
|
||||
std::cout << "Almanac received!" << std::endl;
|
||||
LOG(INFO) << "GPS_to_Galileo time conversion:";
|
||||
LOG(INFO) << "A0G=" << almanac.A_0G_10;
|
||||
LOG(INFO) << "A1G=" << almanac.A_1G_10;
|
||||
LOG(INFO) << "T0G=" << almanac.t_0G_10;
|
||||
LOG(INFO) << "WN_0G_10=" << almanac.WN_0G_10;
|
||||
LOG(INFO) << "Current parameters:";
|
||||
LOG(INFO) << "d_TOW_at_current_symbol="<< d_TOW_at_current_symbol;
|
||||
LOG(INFO) << "d_nav.WN_0=" << d_nav.WN_0;
|
||||
delta_t = almanac.A_0G_10 + almanac.A_1G_10 * (d_TOW_at_current_symbol - almanac.t_0G_10 + 604800 * (fmod((d_nav.WN_0 - almanac.WN_0G_10), 64)));
|
||||
LOG(INFO) << "delta_t=" << delta_t << "[s]";
|
||||
}
|
||||
if (d_nav.have_new_almanac() == true)
|
||||
{
|
||||
Galileo_Almanac almanac = d_nav.get_almanac();
|
||||
d_almanac_queue->push(almanac);
|
||||
//debug
|
||||
std::cout << "Galileo almanac received!" << std::endl;
|
||||
LOG(INFO) << "GPS_to_Galileo time conversion:";
|
||||
LOG(INFO) << "A0G=" << almanac.A_0G_10;
|
||||
LOG(INFO) << "A1G=" << almanac.A_1G_10;
|
||||
LOG(INFO) << "T0G=" << almanac.t_0G_10;
|
||||
LOG(INFO) << "WN_0G_10=" << almanac.WN_0G_10;
|
||||
LOG(INFO) << "Current parameters:";
|
||||
LOG(INFO) << "d_TOW_at_current_symbol=" << d_TOW_at_current_symbol;
|
||||
LOG(INFO) << "d_nav.WN_0=" << d_nav.WN_0;
|
||||
delta_t = almanac.A_0G_10 + almanac.A_1G_10 * (d_TOW_at_current_symbol - almanac.t_0G_10 + 604800 * (fmod((d_nav.WN_0 - almanac.WN_0G_10), 64)));
|
||||
LOG(INFO) << "delta_t=" << delta_t << "[s]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -317,7 +317,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
if (abs(corr_value) >= d_symbols_per_preamble)
|
||||
{
|
||||
d_preamble_index = d_sample_counter;//record the preamble sample stamp
|
||||
LOG(INFO) << "Preamble detection for Galileo SAT " << this->d_satellite << std::endl;
|
||||
LOG(INFO) << "Preamble detection for Galileo SAT " << this->d_satellite;
|
||||
d_stat = 1; // enter into frame pre-detection status
|
||||
}
|
||||
}
|
||||
@ -330,7 +330,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
if (abs(preamble_diff - GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS) == 0)
|
||||
{
|
||||
//try to decode frame
|
||||
LOG(INFO) << "Starting page decoder for Galileo SAT " << this->d_satellite << std::endl;
|
||||
LOG(INFO) << "Starting page decoder for Galileo SAT " << this->d_satellite;
|
||||
d_preamble_index = d_sample_counter; //record the preamble sample stamp
|
||||
d_stat = 2;
|
||||
}
|
||||
@ -345,7 +345,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
}
|
||||
else if (d_stat == 2)
|
||||
{
|
||||
if (d_sample_counter == d_preamble_index+GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS)
|
||||
if (d_sample_counter == d_preamble_index + GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS)
|
||||
{
|
||||
// NEW Galileo page part is received
|
||||
// 0. fetch the symbols into an array
|
||||
@ -364,20 +364,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
page_part_symbols[i] = -in[0][i + d_symbols_per_preamble].Prompt_I; // because last symbol of the preamble is just received now!
|
||||
}
|
||||
}
|
||||
//debug
|
||||
//std::cout<<"ch["<<d_channel<<"] Decoder call at preamble index "<<d_sample_counter<<std::endl;
|
||||
// std::cout<<"ch["<<d_channel<<"] frame symbols: ";
|
||||
// for (int j=0;j<frame_length;j++)
|
||||
// {
|
||||
// if (page_part_symbols[j]>0)
|
||||
// {
|
||||
// std::cout<<"1";
|
||||
// }else{
|
||||
// std::cout<<"0";
|
||||
// }
|
||||
// }
|
||||
// std::cout<<std::endl;
|
||||
//end debug
|
||||
|
||||
//call the decoder
|
||||
decode_word(page_part_symbols, frame_length);
|
||||
if (d_nav.flag_CRC_test == true)
|
||||
@ -389,7 +376,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
if (!d_flag_frame_sync)
|
||||
{
|
||||
d_flag_frame_sync = true;
|
||||
LOG(INFO) <<" Frame sync SAT " << this->d_satellite << " with preamble start at " << d_preamble_time_seconds << " [s]";
|
||||
LOG(INFO) << " Frame sync SAT " << this->d_satellite << " with preamble start at " << d_preamble_time_seconds << " [s]";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -416,55 +403,53 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
// JAVI: 30/06/2014
|
||||
// TOW, in Galileo, is referred to the START of the PAGE PART, that is, THE FIRST SYMBOL OF THAT PAGE, NOT THE PREAMBLE.
|
||||
// thus, no correction should be done. d_TOW_at_Preamble should be renamed to d_TOW_at_page_start.
|
||||
// Sice we detected the preable, then, we are in the last symbol of that preable, or just at the start of the first page symbol.
|
||||
//flag preamble is true after the all page (even and odd) is recevived. I/NAV page period is 2 SECONDS
|
||||
// Since we detected the preamble, then, we are in the last symbol of that preamble, or just at the start of the first page symbol.
|
||||
//flag preamble is true after the all page (even and odd) is received. I/NAV page period is 2 SECONDS
|
||||
{
|
||||
Prn_timestamp_at_preamble_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
|
||||
if(d_nav.flag_TOW_5 == true) //page 5 arrived and decoded, so we are in the odd page (since Tow refers to the even page, we have to add 1 sec)
|
||||
{
|
||||
//std::cout<< "Using TOW_5 for timestamping" << std::endl;
|
||||
d_TOW_at_Preamble = d_nav.TOW_5+GALILEO_INAV_PAGE_PART_SECONDS; //TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later
|
||||
/* 1 sec (GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD) is added because
|
||||
* if we have a TOW value it means that we are at the begining of the last page part
|
||||
* (GNU Radio history keeps in a buffer the rest of the incomming frame part)*/
|
||||
d_TOW_at_current_symbol=d_TOW_at_Preamble;//-GALIELO_E1_CODE_PERIOD;//+ (double)GALILEO_INAV_PREAMBLE_LENGTH_BITS/(double)GALILEO_TELEMETRY_RATE_BITS_SECOND;
|
||||
d_TOW_at_Preamble = d_nav.TOW_5 + GALILEO_INAV_PAGE_PART_SECONDS; //TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later
|
||||
/* 1 sec (GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD) is added because
|
||||
* if we have a TOW value it means that we are at the beginning of the last page part
|
||||
* (GNU Radio history keeps in a buffer the rest of the incoming frame part)*/
|
||||
d_TOW_at_current_symbol = d_TOW_at_Preamble;//-GALILEO_E1_CODE_PERIOD;//+ (double)GALILEO_INAV_PREAMBLE_LENGTH_BITS/(double)GALILEO_TELEMETRY_RATE_BITS_SECOND;
|
||||
d_nav.flag_TOW_5 = false;
|
||||
}
|
||||
|
||||
else if(d_nav.flag_TOW_6 == true) //page 6 arrived and decoded, so we are in the odd page (since Tow refers to the even page, we have to add 1 sec)
|
||||
{
|
||||
//std::cout<< "Using TOW_6 for timestamping" << std::endl;
|
||||
d_TOW_at_Preamble = d_nav.TOW_6+GALILEO_INAV_PAGE_PART_SECONDS;
|
||||
d_TOW_at_Preamble = d_nav.TOW_6 + GALILEO_INAV_PAGE_PART_SECONDS;
|
||||
//TOW_6 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later
|
||||
/* 1 sec (GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD) is added because
|
||||
* if we have a TOW value it means that we are at the begining of the last page part
|
||||
* (GNU Radio history keeps in a buffer the rest of the incomming frame part)*/
|
||||
d_TOW_at_current_symbol=d_TOW_at_Preamble;//-GALIELO_E1_CODE_PERIOD;//+ (double)GALILEO_INAV_PREAMBLE_LENGTH_BITS/(double)GALILEO_TELEMETRY_RATE_BITS_SECOND;
|
||||
/* 1 sec (GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD) is added because
|
||||
* if we have a TOW value it means that we are at the beginning of the last page part
|
||||
* (GNU Radio history keeps in a buffer the rest of the incoming frame part)*/
|
||||
d_TOW_at_current_symbol = d_TOW_at_Preamble;//-GALILEO_E1_CODE_PERIOD;//+ (double)GALILEO_INAV_PREAMBLE_LENGTH_BITS/(double)GALILEO_TELEMETRY_RATE_BITS_SECOND;
|
||||
d_nav.flag_TOW_6 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//this page has no timing information
|
||||
d_TOW_at_Preamble = d_TOW_at_Preamble + GALILEO_INAV_PAGE_SECONDS;
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GALIELO_E1_CODE_PERIOD;// + GALILEO_INAV_PAGE_PART_SYMBOLS*GALIELO_E1_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GALILEO_E1_CODE_PERIOD;// + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else //if there is not a new preamble, we define the TOW of the current symbol
|
||||
{
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GALIELO_E1_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol = d_TOW_at_current_symbol + GALILEO_E1_CODE_PERIOD;
|
||||
}
|
||||
|
||||
//if (d_flag_frame_sync == true and d_nav.flag_TOW_set==true and d_nav.flag_CRC_test == true)
|
||||
|
||||
if(d_nav.flag_GGTO_1 == true and d_nav.flag_GGTO_2 == true and d_nav.flag_GGTO_3 == true and d_nav.flag_GGTO_4 == true) //all GGTO parameters arrived
|
||||
{
|
||||
delta_t=d_nav.A_0G_10+d_nav.A_1G_10*(d_TOW_at_current_symbol-d_nav.t_0G_10+604800.0*(fmod((d_nav.WN_0-d_nav.WN_0G_10),64)));
|
||||
delta_t = d_nav.A_0G_10 + d_nav.A_1G_10 * (d_TOW_at_current_symbol - d_nav.t_0G_10 + 604800.0 * (fmod((d_nav.WN_0 - d_nav.WN_0G_10), 64)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (d_flag_frame_sync == true and d_nav.flag_TOW_set == true)
|
||||
{
|
||||
current_synchro_data.Flag_valid_word = true;
|
||||
@ -474,13 +459,12 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
current_synchro_data.Flag_valid_word = false;
|
||||
}
|
||||
|
||||
|
||||
DLOG(INFO) << "delta_t = " << delta_t;
|
||||
|
||||
current_synchro_data.d_TOW = d_TOW_at_Preamble;
|
||||
current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol;
|
||||
current_synchro_data.d_TOW_hybrid_at_current_symbol= current_synchro_data.d_TOW_at_current_symbol - delta_t; //delta_t = t_gal - t_gps ----> t_gps = t_gal -delta_t
|
||||
DLOG(INFO)<< "delta_t = " << delta_t << std::endl;
|
||||
current_synchro_data.Flag_preamble = d_flag_preamble;
|
||||
current_synchro_data.d_TOW_hybrid_at_current_symbol = current_synchro_data.d_TOW_at_current_symbol - delta_t; //delta_t = t_gal - t_gps ----> t_gps = t_gal -delta_t
|
||||
current_synchro_data.Flag_preamble = d_flag_preamble;
|
||||
current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
|
||||
current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms;
|
||||
|
||||
@ -505,7 +489,6 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
|
||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
//std::cout<<"Galileo TLM output on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
|
||||
d_TOW_at_Preamble = 0;
|
||||
d_TOW_at_current_symbol = 0;
|
||||
flag_TOW_set = false;
|
||||
d_average_count=0;
|
||||
d_average_count = 0;
|
||||
//set_history(d_samples_per_bit*8); // At least a history of 8 bits are needed to correlate with the preamble
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
LOG(INFO) << "Lost of frame sync SAT " << this->d_satellite << " preamble_diff= " << preamble_diff;
|
||||
d_stat = 0; //lost of frame sync
|
||||
d_flag_frame_sync = false;
|
||||
flag_TOW_set=false;
|
||||
flag_TOW_set = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -302,11 +302,11 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
current_synchro_data = in[0][0];
|
||||
//2. Add the telemetry decoder information
|
||||
if (this->d_flag_preamble == true and d_GPS_FSM.d_nav.d_TOW > 0)
|
||||
//update TOW at the preamble instant (todo: check for valid d_TOW)
|
||||
// JAVI: 30/06/2014
|
||||
// TOW, in GPS, is referred to the START of the SUBFRAME, that is, THE FIRST SYMBOL OF THAT SUBFRAME, NOT THE PREAMBLE.
|
||||
// thus, no correction should be done. d_TOW_at_Preamble should be renamed to d_TOW_at_subframe_start.
|
||||
// Sice we detected the preable, then, we are in the last symbol of that preamble, or just at the start of the first subframe symbol.
|
||||
//update TOW at the preamble instant (todo: check for valid d_TOW)
|
||||
// JAVI: 30/06/2014
|
||||
// TOW, in GPS, is referred to the START of the SUBFRAME, that is, THE FIRST SYMBOL OF THAT SUBFRAME, NOT THE PREAMBLE.
|
||||
// thus, no correction should be done. d_TOW_at_Preamble should be renamed to d_TOW_at_subframe_start.
|
||||
// Sice we detected the preable, then, we are in the last symbol of that preamble, or just at the start of the first subframe symbol.
|
||||
{
|
||||
d_TOW_at_Preamble = d_GPS_FSM.d_nav.d_TOW + GPS_SUBFRAME_SECONDS; //we decoded the current TOW when the last word of the subframe arrive, so, we have a lag of ONE SUBFRAME
|
||||
d_TOW_at_current_symbol = d_TOW_at_Preamble;//GPS_L1_CA_CODE_PERIOD;// + (double)GPS_CA_PREAMBLE_LENGTH_BITS/(double)GPS_CA_TELEMETRY_RATE_BITS_SECOND;
|
||||
@ -324,8 +324,8 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
current_synchro_data.d_TOW = d_TOW_at_Preamble;
|
||||
current_synchro_data.d_TOW_at_current_symbol = d_TOW_at_current_symbol;
|
||||
|
||||
current_synchro_data.d_TOW_hybrid_at_current_symbol= current_synchro_data.d_TOW_at_current_symbol; // to be used in the hybrid configuration
|
||||
current_synchro_data.Flag_valid_word = (d_flag_frame_sync == true and d_flag_parity == true and flag_TOW_set==true);
|
||||
current_synchro_data.d_TOW_hybrid_at_current_symbol = current_synchro_data.d_TOW_at_current_symbol; // to be used in the hybrid configuration
|
||||
current_synchro_data.Flag_valid_word = (d_flag_frame_sync == true and d_flag_parity == true and flag_TOW_set == true);
|
||||
current_synchro_data.Flag_preamble = d_flag_preamble;
|
||||
current_synchro_data.Prn_timestamp_ms = in[0][0].Tracking_timestamp_secs * 1000.0;
|
||||
current_synchro_data.Prn_timestamp_at_preamble_ms = Prn_timestamp_at_preamble_ms;
|
||||
@ -352,23 +352,24 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items, gr_vector_i
|
||||
//todo: implement averaging
|
||||
|
||||
d_average_count++;
|
||||
if (d_average_count==d_decimation_output_factor)
|
||||
{
|
||||
d_average_count=0;
|
||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||
*out[0] = current_synchro_data;
|
||||
//std::cout<<"GPS TLM output on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter/d_decimation_output_factor<<std::endl;
|
||||
return 1;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (d_average_count == d_decimation_output_factor)
|
||||
{
|
||||
d_average_count = 0;
|
||||
//3. Make the output (copy the object contents to the GNURadio reserved memory)
|
||||
*out[0] = current_synchro_data;
|
||||
//std::cout<<"GPS TLM output on CH="<<this->d_channel << " SAMPLE STAMP="<<d_sample_counter/d_decimation_output_factor<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gps_l1_ca_telemetry_decoder_cc::set_decimation(int decimation)
|
||||
{
|
||||
d_decimation_output_factor=decimation;
|
||||
d_decimation_output_factor = decimation;
|
||||
}
|
||||
|
||||
void gps_l1_ca_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
|
||||
|
@ -451,6 +451,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -500,6 +501,7 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output stream pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
}
|
||||
|
||||
|
@ -454,6 +454,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
|
||||
current_synchro_data.Carrier_phase_rads = (double)d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = (double)d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -506,6 +507,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_ve
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
|
||||
//! When tracking is disabled an array of 1's is sent to maintain the TCP connection
|
||||
|
@ -423,6 +423,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
|
||||
d_Prompt = gr_complex(0,0);
|
||||
d_Late = gr_complex(0,0);
|
||||
d_Prompt_data = gr_complex(0,0);
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
|
||||
@ -448,6 +449,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
|
||||
current_synchro_data.Code_phase_secs = 0.0;
|
||||
current_synchro_data.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] = current_synchro_data;
|
||||
consume_each(samples_offset); //shift input to perform alignment with local replica
|
||||
@ -675,6 +677,7 @@ int Galileo_E5a_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -501,6 +501,7 @@ int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -549,7 +550,8 @@ int galileo_volk_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr
|
||||
*d_Prompt = gr_complex(0,0);
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output stream pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
// GNSS_SYNCHRO OBJECTto interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
}
|
||||
|
||||
|
@ -367,6 +367,7 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
|
||||
current_synchro_data.Code_phase_secs = 0.0;
|
||||
current_synchro_data.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
@ -402,6 +403,7 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
|
||||
current_synchro_data.Code_phase_secs = 0.0;
|
||||
current_synchro_data.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
@ -534,6 +536,7 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_tracking = true;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
}
|
||||
else
|
||||
@ -558,7 +561,9 @@ int Gps_L1_Ca_Dll_Fll_Pll_Tracking_cc::general_work (int noutput_items, gr_vecto
|
||||
*d_Early = gr_complex(0,0);
|
||||
*d_Prompt = gr_complex(0,0);
|
||||
*d_Late = gr_complex(0,0);
|
||||
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
}
|
||||
|
||||
|
@ -473,6 +473,7 @@ int Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -522,6 +523,7 @@ int Gps_L1_Ca_Dll_Pll_Optim_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
}
|
||||
|
||||
|
@ -384,6 +384,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||
current_synchro_data.Code_phase_secs = 0.0;
|
||||
current_synchro_data.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
@ -485,6 +486,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||
current_synchro_data.Carrier_phase_rads = static_cast<double>(d_acc_carrier_phase_rad);
|
||||
current_synchro_data.Carrier_Doppler_hz = static_cast<double>(d_carrier_doppler_hz);
|
||||
current_synchro_data.CN0_dB_hz = static_cast<double>(d_CN0_SNV_dB_Hz);
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -538,6 +540,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
}
|
||||
|
||||
|
@ -418,8 +418,9 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
current_synchro_data.Code_phase_secs = 0.0;
|
||||
current_synchro_data.CN0_dB_hz = 0.0;
|
||||
current_synchro_data.Flag_valid_tracking = false;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
|
||||
*out[0] =current_synchro_data;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -530,6 +531,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
current_synchro_data.Carrier_Doppler_hz = (double)d_carrier_doppler_hz;
|
||||
current_synchro_data.Code_phase_secs = (double)d_code_phase_samples * (1/(float)d_fs_in);
|
||||
current_synchro_data.CN0_dB_hz = (double)d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_pseudorange = false;
|
||||
*out[0] = current_synchro_data;
|
||||
|
||||
// ########## DEBUG OUTPUT
|
||||
@ -581,6 +583,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work (int noutput_items, gr_vec
|
||||
*d_Late = gr_complex(0,0);
|
||||
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //block output streams pointer
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
d_acquisition_gnss_synchro->Flag_valid_pseudorange = false;
|
||||
*out[0] = *d_acquisition_gnss_synchro;
|
||||
|
||||
//! When tracking is disabled an array of 1's is sent to maintain the TCP connection
|
||||
|
@ -77,6 +77,10 @@ if(ENABLE_ARRAY)
|
||||
add_definitions(-DRAW_ARRAY_DRIVER=1)
|
||||
endif(ENABLE_ARRAY)
|
||||
|
||||
if(ENABLE_FLEXIBAND)
|
||||
add_definitions(-DFLEXIBAND_DRIVER=1)
|
||||
endif(ENABLE_FLEXIBAND)
|
||||
|
||||
if(ENABLE_OSMOSDR)
|
||||
add_definitions(-DOSMOSDR_DRIVER=1)
|
||||
endif(ENABLE_OSMOSDR)
|
||||
|
@ -645,10 +645,9 @@ void ControlThread::gps_ephemeris_data_collector()
|
||||
global_gps_ephemeris_queue.wait_and_pop(gps_eph);
|
||||
|
||||
// DEBUG MESSAGE
|
||||
std::cout << "Ephemeris record has arrived from SAT ID "
|
||||
LOG(INFO) << "Ephemeris record has arrived from SAT ID "
|
||||
<< gps_eph.i_satellite_PRN << " (Block "
|
||||
<< gps_eph.satelliteBlock[gps_eph.i_satellite_PRN]
|
||||
<< ")" << std::endl;
|
||||
<< gps_eph.satelliteBlock[gps_eph.i_satellite_PRN] << ")";
|
||||
// insert new ephemeris record to the global ephemeris map
|
||||
if (global_gps_ephemeris_map.read(gps_eph.i_satellite_PRN, gps_eph_old))
|
||||
{
|
||||
|
@ -112,6 +112,10 @@
|
||||
#include "uhd_signal_source.h"
|
||||
#endif
|
||||
|
||||
#if FLEXIBAND_DRIVER
|
||||
#include "flexiband_signal_source.h"
|
||||
#endif
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
@ -465,6 +469,15 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FLEXIBAND_DRIVER
|
||||
else if (implementation.compare("Flexiband_Signal_Source") == 0)
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new FlexibandSignalSource(configuration.get(), role, in_streams,
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
#endif
|
||||
|
||||
// DATA TYPE ADAPTER -----------------------------------------------------------
|
||||
else if (implementation.compare("Byte_To_Short") == 0)
|
||||
{
|
||||
|
@ -54,16 +54,13 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr<ConfigurationInterface> configurati
|
||||
connected_ = false;
|
||||
running_ = false;
|
||||
configuration_ = configuration;
|
||||
//std::shared_ptr<std::vector<std::shared_ptr<GNSSBlockInterface>>> blocks_ = std::make_shared<std::vector<std::shared_ptr<GNSSBlockInterface>>>();
|
||||
queue_ = queue;
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
GNSSFlowgraph::~GNSSFlowgraph()
|
||||
{
|
||||
//blocks_->clear();
|
||||
}
|
||||
{}
|
||||
|
||||
void GNSSFlowgraph::start()
|
||||
{
|
||||
@ -87,6 +84,7 @@ void GNSSFlowgraph::start()
|
||||
running_ = true;
|
||||
}
|
||||
|
||||
|
||||
void GNSSFlowgraph::stop()
|
||||
{
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
@ -113,45 +111,41 @@ void GNSSFlowgraph::connect()
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
sig_source_.at(i)->connect(top_block_);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Can't connect signal source block " << i << " internally";
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
sig_source_.at(i)->connect(top_block_);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Can't connect signal source block " << i << " internally";
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Signal Source > Signal conditioner >
|
||||
|
||||
for (unsigned int i = 0; i < sig_conditioner_.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
sig_conditioner_.at(i)->connect(top_block_);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Can't connect signal conditioner block " << i << " internally";
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (unsigned int i = 0; i < sig_conditioner_.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
sig_conditioner_.at(i)->connect(top_block_);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(INFO) << "Can't connect signal conditioner block " << i << " internally";
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
//auto chan_ = std::move(blocks_->at(i));
|
||||
//std::shared_ptr<ChannelInterface> chan = std::dynamic_pointer_cast<ChannelInterface>(chan_);
|
||||
//channels_.push_back(chan);
|
||||
channels_.at(i)->connect(top_block_);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -204,76 +198,91 @@ void GNSSFlowgraph::connect()
|
||||
DLOG(INFO) << "blocks connected internally";
|
||||
|
||||
// Signal Source (i) > Signal conditioner (i) >
|
||||
int RF_Channels = 0;
|
||||
int signal_conditioner_ID = 0;
|
||||
|
||||
int RF_Channels=0;
|
||||
int signal_conditioner_ID=0;
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO: Remove this array implementation and create generic multistream connector
|
||||
//(if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
|
||||
if(sig_source_.at(i)->implementation().compare("Raw_Array_Signal_Source") == 0)
|
||||
{
|
||||
//Multichannel Array
|
||||
std::cout << "ARRAY MODE" << std::endl;
|
||||
for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++)
|
||||
{
|
||||
std::cout << "connecting ch " << j << std::endl;
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(i)->get_left_block(), j);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels = configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
|
||||
|
||||
try
|
||||
{
|
||||
//TODO: Remove this array implementation and create generic multistream connector
|
||||
//(if a signal source has more than 1 stream, then connect it to the multistream signal conditioner)
|
||||
if(sig_source_.at(i)->implementation().compare("Raw_Array_Signal_Source") == 0)
|
||||
{
|
||||
//Multichannel Array
|
||||
std::cout << "ARRAY MODE" << std::endl;
|
||||
for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++)
|
||||
{
|
||||
std::cout << "connecting ch "<< j << std::endl;
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(i)->get_left_block(), j);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels=configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
{
|
||||
//Connect the multichannel signal source to multiple signal conditioners
|
||||
// check number of signal source output ports todo!
|
||||
if (sig_source_.at(i)->get_right_block()->input_signature()->max_streams() > 1)
|
||||
{
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
|
||||
//std::cout<<"connect sig_source_ "<<i<<" stream "<<j<<" to conditioner "<<j<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (j == 0)
|
||||
{
|
||||
// RF_channel 0 backward compatibility with single channel sources
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(), 0, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
|
||||
//std::cout<<"connect sig_source_ "<<i<<" stream "<<0<<" to conditioner "<<j<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Multiple channel sources using multiple output blocks of single channel (requires RF_channel selector in call)
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(j), 0, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
|
||||
//std::cout<<"connect sig_source_ "<<i<<" stream "<<j<<" to conditioner "<<j<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j=0; j<RF_Channels; j++)
|
||||
{
|
||||
//Connect the multichannel signal source to multiple signal conditioners
|
||||
top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(signal_conditioner_ID)->get_left_block(), 0);
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << "Can't connect signal source " << i << " to signal conditioner " << i;
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << "Can't connect signal source " << i << " to signal conditioner " << i;
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
}
|
||||
DLOG(INFO) << "Signal source connected to signal conditioner";
|
||||
|
||||
// Signal conditioner (selected_signal_source) >> channels (i) (dependent of their associated SignalSource_ID)
|
||||
int selected_signal_conditioner_ID;
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
|
||||
selected_signal_conditioner_ID = configuration_->property("Channel" + boost::lexical_cast<std::string>(i) +".RF_channel_ID", 0);
|
||||
|
||||
selected_signal_conditioner_ID = configuration_->property("Channel" + boost::lexical_cast<std::string>(i) + ".RF_channel_ID", 0);
|
||||
try
|
||||
{
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block(), 0);
|
||||
|
||||
{
|
||||
top_block_->connect(sig_conditioner_.at(selected_signal_conditioner_ID)->get_right_block(), 0,
|
||||
channels_.at(i)->get_left_block(), 0);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << "Can't connect signal conditioner "<<selected_signal_conditioner_ID<<" to channel " << i;
|
||||
LOG(WARNING) << "Can't connect signal conditioner " << selected_signal_conditioner_ID << " to channel " << i;
|
||||
LOG(ERROR) << e.what();
|
||||
top_block_->disconnect_all();
|
||||
return;
|
||||
}
|
||||
|
||||
DLOG(INFO) << "signal conditioner "<<selected_signal_conditioner_ID<<" connected to channel " << i;
|
||||
DLOG(INFO) << "signal conditioner " << selected_signal_conditioner_ID << " connected to channel " << i;
|
||||
|
||||
// Signal Source > Signal conditioner >> Channels >> Observables
|
||||
try
|
||||
@ -291,7 +300,7 @@ void GNSSFlowgraph::connect()
|
||||
|
||||
//discriminate between systems
|
||||
//TODO: add a specific string member to the channel template, and not re-use the implementation field!
|
||||
while (channels_.at(i)->implementation()!= available_GNSS_signals_.front().get_satellite().get_system())
|
||||
while (channels_.at(i)->implementation() != available_GNSS_signals_.front().get_satellite().get_system())
|
||||
{
|
||||
available_GNSS_signals_.push_back(available_GNSS_signals_.front());
|
||||
available_GNSS_signals_.pop_front();
|
||||
@ -305,15 +314,15 @@ void GNSSFlowgraph::connect()
|
||||
{
|
||||
channels_.at(i)->start_acquisition();
|
||||
LOG(INFO) << "Channel " << i
|
||||
<< " connected to observables and ready for acquisition";
|
||||
<< " connected to observables and ready for acquisition";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(INFO) << "Channel " << i
|
||||
<< " connected to observables in standby mode";
|
||||
<< " connected to observables in standby mode";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Connect the observables output of each channel to the PVT block
|
||||
*/
|
||||
@ -473,51 +482,49 @@ void GNSSFlowgraph::init()
|
||||
// 1. read the number of RF front-ends available (one file_source per RF front-end)
|
||||
sources_count_ = configuration_->property("Receiver.sources_count", 1);
|
||||
|
||||
int RF_Channels=0;
|
||||
int signal_conditioner_ID=0;
|
||||
|
||||
if (sources_count_>1)
|
||||
{
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
std::cout<<"Creating source "<<i<<std::endl;
|
||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_,i));
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels=configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
|
||||
std::cout<<"RF Channels "<<RF_Channels<<std::endl;
|
||||
for (int j=0; j<RF_Channels; j++)
|
||||
{
|
||||
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, signal_conditioner_ID));
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
//backwards compatibility for old config files
|
||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_,-1));
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels=configuration_->property(sig_source_.at(0)->role() + ".RF_channels", 0);
|
||||
if (RF_Channels!=0)
|
||||
{
|
||||
for (int j=0; j<RF_Channels; j++)
|
||||
{
|
||||
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, signal_conditioner_ID));
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
}else{
|
||||
//old config file, single signal source and single channel, not specified
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int RF_Channels = 0;
|
||||
int signal_conditioner_ID = 0;
|
||||
|
||||
if (sources_count_ > 1)
|
||||
{
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
std::cout << "Creating source " << i << std::endl;
|
||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, i));
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels = configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
|
||||
std::cout << "RF Channels " << RF_Channels << std::endl;
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
{
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, signal_conditioner_ID));
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//backwards compatibility for old config files
|
||||
sig_source_.push_back(block_factory_->GetSignalSource(configuration_, queue_, -1));
|
||||
//TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
|
||||
//Include GetRFChannels in the interface to avoid read config parameters here
|
||||
//read the number of RF channels for each front-end
|
||||
RF_Channels = configuration_->property(sig_source_.at(0)->role() + ".RF_channels", 0);
|
||||
if (RF_Channels != 0)
|
||||
{
|
||||
for (int j = 0; j < RF_Channels; j++)
|
||||
{
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, signal_conditioner_ID));
|
||||
signal_conditioner_ID++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//old config file, single signal source and single channel, not specified
|
||||
sig_conditioner_.push_back(block_factory_->GetSignalConditioner(configuration_, queue_, -1));
|
||||
}
|
||||
}
|
||||
|
||||
observables_ = block_factory_->GetObservables(configuration_, queue_);
|
||||
pvt_ = block_factory_->GetPVT(configuration_, queue_);
|
||||
@ -528,7 +535,7 @@ void GNSSFlowgraph::init()
|
||||
channels_count_ = channels->size();
|
||||
for (unsigned int i = 0; i < channels_count_; i++)
|
||||
{
|
||||
std::shared_ptr<GNSSBlockInterface> chan_ = std::move(channels->at(i));
|
||||
std::shared_ptr<GNSSBlockInterface> chan_ = std::move(channels->at(i));
|
||||
channels_.push_back(std::dynamic_pointer_cast<ChannelInterface>(chan_));
|
||||
}
|
||||
|
||||
@ -542,6 +549,7 @@ void GNSSFlowgraph::init()
|
||||
DLOG(INFO) << "Blocks instantiated. " << channels_count_ << " channels.";
|
||||
}
|
||||
|
||||
|
||||
void GNSSFlowgraph::set_signals_list()
|
||||
{
|
||||
/*
|
||||
@ -613,8 +621,8 @@ void GNSSFlowgraph::set_signals_list()
|
||||
available_gnss_prn_iter != available_galileo_prn.end();
|
||||
available_gnss_prn_iter++)
|
||||
{
|
||||
// available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Galileo"),
|
||||
// *available_gnss_prn_iter), std::string("1B")));
|
||||
// available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Galileo"),
|
||||
// *available_gnss_prn_iter), std::string("1B")));
|
||||
available_GNSS_signals_.push_back(Gnss_Signal(Gnss_Satellite(std::string("Galileo"),
|
||||
*available_gnss_prn_iter), default_signal));
|
||||
}
|
||||
@ -655,17 +663,16 @@ void GNSSFlowgraph::set_signals_list()
|
||||
}
|
||||
|
||||
|
||||
// **** FOR DEBUGGING THE LIST OF GNSS SIGNALS ****
|
||||
|
||||
// std::cout<<"default_system="<<default_system<<std::endl;
|
||||
// std::cout<<"default_signal="<<default_signal<<std::endl;
|
||||
// std::list<Gnss_Signal>::iterator available_gnss_list_iter;
|
||||
// for (available_gnss_list_iter = available_GNSS_signals_.begin(); available_gnss_list_iter
|
||||
// != available_GNSS_signals_.end(); available_gnss_list_iter++)
|
||||
// {
|
||||
// std::cout << *available_gnss_list_iter << std::endl;
|
||||
// }
|
||||
// **** FOR DEBUGGING THE LIST OF GNSS SIGNALS ****
|
||||
|
||||
// std::cout<<"default_system="<<default_system<<std::endl;
|
||||
// std::cout<<"default_signal="<<default_signal<<std::endl;
|
||||
// std::list<Gnss_Signal>::iterator available_gnss_list_iter;
|
||||
// for (available_gnss_list_iter = available_GNSS_signals_.begin(); available_gnss_list_iter
|
||||
// != available_GNSS_signals_.end(); available_gnss_list_iter++)
|
||||
// {
|
||||
// std::cout << *available_gnss_list_iter << std::endl;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,7 +78,8 @@ const int GALILEO_PAGE_TYPE_BITS = 6;
|
||||
const int GALILEO_DATA_JK_BITS = 128;
|
||||
const int GALILEO_DATA_FRAME_BITS = 196;
|
||||
const int GALILEO_DATA_FRAME_BYTES = 25;
|
||||
const double GALIELO_E1_CODE_PERIOD = 0.004;
|
||||
//const double GALIELO_E1_CODE_PERIOD = 0.004;
|
||||
const double GALILEO_E1_CODE_PERIOD = 0.004;
|
||||
|
||||
const std::vector<std::pair<int,int>> type({{1,6}});
|
||||
const std::vector<std::pair<int,int>> PAGE_TYPE_bit({{1,6}});;
|
||||
|
@ -49,7 +49,7 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN)
|
||||
{
|
||||
double t_Utc;
|
||||
double t_Utc_daytime;
|
||||
double Delta_t_Utc=0;
|
||||
double Delta_t_Utc = 0;
|
||||
// Determine if the effectivity time of the leap second event is in the past
|
||||
int weeksToLeapSecondEvent = WN_LSF_6 - (WN % 256);
|
||||
|
||||
@ -59,25 +59,23 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN)
|
||||
int secondOfLeapSecondEvent = DN_6 * 24 * 60 * 60;
|
||||
if (abs(t_e - secondOfLeapSecondEvent) > 21600)
|
||||
{
|
||||
/* 5.1.7a
|
||||
/* 5.1.7a GST->UTC case a
|
||||
* Whenever the leap second adjusted time indicated by the WN_LSF and the DN values
|
||||
* is not in the past (relative to the user's present time), and the user's
|
||||
* present time does not fall in the time span which starts at six hours prior
|
||||
* to the effective time and ends at six hours after the effective time,
|
||||
* the GST/Utc relationship is given by
|
||||
*/
|
||||
//std::cout<<"GST->UTC case a"<<std::endl;
|
||||
Delta_t_Utc = Delta_tLS_6 + A0_6 + A1_6 * (t_e - t0t_6 + 604800 * static_cast<double>((WN % 256) - WNot_6));
|
||||
t_Utc_daytime = fmod(t_e - Delta_t_Utc, 86400);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 5.1.7b
|
||||
/* 5.1.7b GST->UTC case b
|
||||
* Whenever the user's current time falls within the time span of six hours
|
||||
* prior to the leap second adjustment to six hours after the adjustment time, ,
|
||||
* the effective time is computed according to the following equations:
|
||||
*/
|
||||
//std::cout<<"GST->UTC case b"<<std::endl;
|
||||
Delta_t_Utc = Delta_tLS_6 + A0_6 + A1_6 * (t_e - t0t_6 + 604800 * static_cast<double>((WN % 256) - WNot_6));
|
||||
double W = fmod(t_e - Delta_t_Utc - 43200, 86400) + 43200;
|
||||
t_Utc_daytime = fmod(W, 86400 + Delta_tLSF_6 - Delta_tLS_6);
|
||||
@ -86,19 +84,18 @@ double Galileo_Utc_Model::GST_to_UTC_time(double t_e, int WN)
|
||||
}
|
||||
else // the effectivity time is in the past
|
||||
{
|
||||
/* 5.1.7c
|
||||
/* 5.1.7c GST->UTC case c
|
||||
* Whenever the leap second adjustment time, as indicated by the WN_LSF and DN values,
|
||||
* is in the past (relative to the user’s current time) and the user’s present time does not
|
||||
* is in the past (relative to the user's current time) and the user's present time does not
|
||||
* fall in the time span which starts six hours prior to the leap second adjustment time and
|
||||
* ends six hours after the adjustment time, the effective time is computed according to
|
||||
* the following equation:
|
||||
*/
|
||||
//std::cout<<"GST->UTC case c"<<std::endl;
|
||||
Delta_t_Utc = Delta_tLSF_6 + A0_6 + A1_6 * (t_e - t0t_6 + 604800 * static_cast<double>((WN % 256) - WNot_6));
|
||||
t_Utc_daytime = fmod(t_e - Delta_t_Utc, 86400);
|
||||
}
|
||||
|
||||
double secondsOfWeekBeforeToday = 43200 * floor(t_e / 43200);
|
||||
double secondsOfWeekBeforeToday = 86400 * floor(t_e / 86400);
|
||||
t_Utc = secondsOfWeekBeforeToday + t_Utc_daytime;
|
||||
return t_Utc;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ void Gps_Navigation_Message::reset()
|
||||
|
||||
// Ionosphere and UTC
|
||||
flag_iono_valid = false;
|
||||
flag_utc_model_valid = true;
|
||||
flag_utc_model_valid = false;
|
||||
d_alpha0 = 0;
|
||||
d_alpha1 = 0;
|
||||
d_alpha2 = 0;
|
||||
@ -214,9 +214,9 @@ unsigned long int Gps_Navigation_Message::read_navigation_unsigned(std::bitset<G
|
||||
{
|
||||
unsigned long int value = 0;
|
||||
int num_of_slices = parameter.size();
|
||||
for (int i=0; i<num_of_slices; i++)
|
||||
for (int i = 0; i < num_of_slices; i++)
|
||||
{
|
||||
for (int j=0; j<parameter[i].second; j++)
|
||||
for (int j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; //shift left
|
||||
if (bits[GPS_SUBFRAME_BITS - parameter[i].first - j] == 1)
|
||||
@ -250,9 +250,9 @@ signed long int Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_S
|
||||
value &= 0;
|
||||
}
|
||||
|
||||
for (int i=0; i<num_of_slices; i++)
|
||||
for (int i = 0; i < num_of_slices; i++)
|
||||
{
|
||||
for (int j=0; j<parameter[i].second; j++)
|
||||
for (int j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; //shift left
|
||||
value &= 0xFFFFFFFFFFFFFFFE; //reset the corresponding bit (for the 64 bits variable)
|
||||
@ -275,9 +275,9 @@ signed long int Gps_Navigation_Message::read_navigation_signed(std::bitset<GPS_S
|
||||
value &= 0;
|
||||
}
|
||||
|
||||
for (int i=0; i<num_of_slices; i++)
|
||||
for (int i = 0; i < num_of_slices; i++)
|
||||
{
|
||||
for (int j=0; j<parameter[i].second; j++)
|
||||
for (int j = 0; j < parameter[i].second; j++)
|
||||
{
|
||||
value <<= 1; //shift left
|
||||
value &= 0xFFFFFFFE; //reset the corresponding bit
|
||||
@ -369,7 +369,7 @@ void Gps_Navigation_Message::satellitePosition(double transmitTime)
|
||||
E = M;
|
||||
|
||||
// --- Iteratively compute eccentric anomaly ----------------------------
|
||||
for (int ii = 1; ii<20; ii++)
|
||||
for (int ii = 1; ii < 20; ii++)
|
||||
{
|
||||
E_old = E;
|
||||
E = M + d_e_eccentricity * sin(E);
|
||||
@ -429,8 +429,7 @@ void Gps_Navigation_Message::satellitePosition(double transmitTime)
|
||||
int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
{
|
||||
int subframe_ID = 0;
|
||||
int SV_data_ID = 0;
|
||||
int SV_page = 0;
|
||||
|
||||
//double tmp_TOW;
|
||||
|
||||
unsigned int gps_word;
|
||||
@ -438,7 +437,7 @@ int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
// UNPACK BYTES TO BITS AND REMOVE THE CRC REDUNDANCE
|
||||
std::bitset<GPS_SUBFRAME_BITS> subframe_bits;
|
||||
std::bitset<GPS_WORD_BITS + 2> word_bits;
|
||||
for (int i=0; i<10; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
memcpy(&gps_word, &subframe[i * 4], sizeof(char) * 4);
|
||||
word_bits = std::bitset<(GPS_WORD_BITS + 2) > (gps_word);
|
||||
@ -546,6 +545,8 @@ int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
break;
|
||||
|
||||
case 4: // --- It is subframe 4 ---------- Almanac, ionospheric model, UTC parameters, SV health (PRN: 25-32)
|
||||
int SV_data_ID;
|
||||
int SV_page;
|
||||
d_TOW_SF4 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
|
||||
d_TOW_SF4 = d_TOW_SF4 * 6;
|
||||
d_TOW = d_TOW_SF4 - 6; // Set transmission time
|
||||
@ -554,13 +555,18 @@ int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
b_antispoofing_flag = read_navigation_bool(subframe_bits, ANTI_SPOOFING_FLAG);
|
||||
SV_data_ID = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_DATA_ID));
|
||||
SV_page = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_PAGE));
|
||||
if (SV_page > 24 && SV_page < 33) // Page 4 (from Table 20-V. Data IDs and SV IDs in Subframes 4 and 5, IS-GPS-200H, page 110)
|
||||
{
|
||||
//! \TODO read almanac
|
||||
if(SV_data_ID){}
|
||||
}
|
||||
|
||||
if (SV_page == 13)
|
||||
if (SV_page == 52) // Page 13 (from Table 20-V. Data IDs and SV IDs in Subframes 4 and 5, IS-GPS-200H, page 110)
|
||||
{
|
||||
//! \TODO read Estimated Range Deviation (ERD) values
|
||||
}
|
||||
|
||||
if (SV_page == 18)
|
||||
if (SV_page == 56) // Page 18 (from Table 20-V. Data IDs and SV IDs in Subframes 4 and 5, IS-GPS-200H, page 110)
|
||||
{
|
||||
// Page 18 - Ionospheric and UTC data
|
||||
d_alpha0 = static_cast<double>(read_navigation_signed(subframe_bits, ALPHA_0));
|
||||
@ -593,8 +599,12 @@ int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
flag_iono_valid = true;
|
||||
flag_utc_model_valid = true;
|
||||
}
|
||||
if (SV_page == 57)
|
||||
{
|
||||
// Reserved
|
||||
}
|
||||
|
||||
if (SV_page == 25)
|
||||
if (SV_page == 63) // Page 25 (from Table 20-V. Data IDs and SV IDs in Subframes 4 and 5, IS-GPS-200H, page 110)
|
||||
{
|
||||
// Page 25 Anti-Spoofing, SV config and almanac health (PRN: 25-32)
|
||||
//! \TODO Read Anti-Spoofing, SV config
|
||||
@ -611,19 +621,22 @@ int Gps_Navigation_Message::subframe_decoder(char *subframe)
|
||||
break;
|
||||
|
||||
case 5://--- It is subframe 5 -----------------almanac health (PRN: 1-24) and Almanac reference week number and time.
|
||||
int SV_data_ID_5;
|
||||
int SV_page_5;
|
||||
d_TOW_SF5 = static_cast<double>(read_navigation_unsigned(subframe_bits, TOW));
|
||||
d_TOW_SF5 = d_TOW_SF5 * 6;
|
||||
d_TOW = d_TOW_SF5 - 6; // Set transmission time
|
||||
b_integrity_status_flag = read_navigation_bool(subframe_bits, INTEGRITY_STATUS_FLAG);
|
||||
b_alert_flag = read_navigation_bool(subframe_bits, ALERT_FLAG);
|
||||
b_antispoofing_flag = read_navigation_bool(subframe_bits, ANTI_SPOOFING_FLAG);
|
||||
SV_data_ID = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_DATA_ID));
|
||||
SV_page = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_PAGE));
|
||||
if (SV_page < 25)
|
||||
SV_data_ID_5 = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_DATA_ID));
|
||||
SV_page_5 = static_cast<int>(read_navigation_unsigned(subframe_bits, SV_PAGE));
|
||||
if (SV_page_5 < 25)
|
||||
{
|
||||
//! \TODO read almanac
|
||||
if(SV_data_ID_5){}
|
||||
}
|
||||
if (SV_page == 25)
|
||||
if (SV_page_5 == 51) // Page 25 (from Table 20-V. Data IDs and SV IDs in Subframes 4 and 5, IS-GPS-200H, page 110)
|
||||
{
|
||||
d_Toa = static_cast<double>(read_navigation_unsigned(subframe_bits, T_OA));
|
||||
d_Toa = d_Toa * T_OA_LSB;
|
||||
@ -777,6 +790,7 @@ Gps_Ephemeris Gps_Navigation_Message::get_ephemeris()
|
||||
return ephemeris;
|
||||
}
|
||||
|
||||
|
||||
Gps_Iono Gps_Navigation_Message::get_iono()
|
||||
{
|
||||
Gps_Iono iono;
|
||||
@ -794,10 +808,10 @@ Gps_Iono Gps_Navigation_Message::get_iono()
|
||||
return iono;
|
||||
}
|
||||
|
||||
|
||||
Gps_Utc_Model Gps_Navigation_Message::get_utc_model()
|
||||
{
|
||||
Gps_Utc_Model utc_model;
|
||||
|
||||
utc_model.valid = flag_utc_model_valid;
|
||||
// UTC parameters
|
||||
utc_model.d_A1 = d_A1;
|
||||
@ -809,10 +823,11 @@ Gps_Utc_Model Gps_Navigation_Message::get_utc_model()
|
||||
utc_model.i_DN = i_DN;
|
||||
utc_model.d_DeltaT_LSF = d_DeltaT_LSF;
|
||||
// warning: We clear flag_utc_model_valid in order to not re-send the same information to the ionospheric parameters queue
|
||||
d_DeltaT_LSF = false;
|
||||
flag_utc_model_valid = false;
|
||||
return utc_model;
|
||||
}
|
||||
|
||||
|
||||
bool Gps_Navigation_Message::satellite_validation()
|
||||
{
|
||||
bool flag_data_valid = false;
|
||||
|
@ -103,7 +103,7 @@ double Gps_Utc_Model::utc_time(double gpstime_corrected, int i_GPS_week)
|
||||
t_utc_daytime = fmod(gpstime_corrected - Delta_t_UTC, 86400);
|
||||
}
|
||||
|
||||
double secondsOfWeekBeforeToday = 43200 * floor(gpstime_corrected / 43200);
|
||||
double secondsOfWeekBeforeToday = 86400 * floor(gpstime_corrected / 86400);
|
||||
t_utc = secondsOfWeekBeforeToday + t_utc_daytime;
|
||||
return t_utc;
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ int Sbas_Telemetry_Data::decode_sbstype7(const sbsmsg_t *msg, sbssat_t *sbssat)
|
||||
/* decode type 9: geo navigation message -------------------------------------*/
|
||||
int Sbas_Telemetry_Data::decode_sbstype9(const sbsmsg_t *msg, nav_t *nav)
|
||||
{
|
||||
seph_t seph = {0};
|
||||
seph_t seph;
|
||||
int i;
|
||||
int sat;
|
||||
|
||||
|
@ -326,17 +326,18 @@ private:
|
||||
*/
|
||||
|
||||
typedef struct { /* SBAS ephemeris type */
|
||||
int sat; /* satellite number */
|
||||
int sat = 0; /* satellite number */
|
||||
//gtime_t t0; /* reference epoch time (GPST) */
|
||||
int t0;
|
||||
int t0 = 0;
|
||||
//gtime_t tof; /* time of message frame (GPST) */
|
||||
double tof;
|
||||
int sva; /* SV accuracy (URA index) */
|
||||
int svh; /* SV health (0:ok) */
|
||||
double pos[3]; /* satellite position (m) (ecef) */
|
||||
double vel[3]; /* satellite velocity (m/s) (ecef) */
|
||||
double acc[3]; /* satellite acceleration (m/s^2) (ecef) */
|
||||
double af0,af1; /* satellite clock-offset/drift (s,s/s) */
|
||||
double tof = 0;
|
||||
int sva = 0; /* SV accuracy (URA index) */
|
||||
int svh = 0; /* SV health (0:ok) */
|
||||
double pos[3] = {0, 0, 0}; /* satellite position (m) (ecef) */
|
||||
double vel[3] = {0, 0, 0}; /* satellite velocity (m/s) (ecef) */
|
||||
double acc[3] = {0, 0, 0}; /* satellite acceleration (m/s^2) (ecef) */
|
||||
double af0 = 0;
|
||||
double af1 = 0; /* satellite clock-offset/drift (s,s/s) */
|
||||
} seph_t;
|
||||
|
||||
typedef struct { /* navigation data type */
|
||||
|
Loading…
Reference in New Issue
Block a user