1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-13 15:14:20 +00:00
This commit is contained in:
Carles Fernandez 2019-10-04 09:18:18 +02:00
commit 61bdd13e86
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
47 changed files with 682 additions and 285 deletions

View File

@ -407,7 +407,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.12")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.9.2")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.10.0")
if(CMAKE_VERSION VERSION_LESS "3.0.2") # Fix for CentOS 7
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1")
@ -1511,12 +1511,11 @@ else()
DESCRIPTION "Transport Layer Security Library"
)
endif()
find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27
HINTS /usr/lib
find_library(GNUTLS_OPENSSL_LIBRARY
NAMES gnutls-openssl libgnutls-openssl.so.27
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -1542,6 +1541,9 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/sh4-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
if(NOT GNUTLS_OPENSSL_LIBRARY)
if(GnuTLS_FOUND)

View File

@ -305,9 +305,9 @@ $ sudo apt-get install autoconf automake libtool curl make g++ unzip
and then:
~~~~~~
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.9.2/protobuf-cpp-3.9.2.tar.gz
$ tar xvfz protobuf-cpp-3.9.2.tar.gz
$ cd protobuf-3.9.2
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protobuf-cpp-3.10.0.tar.gz
$ tar xvfz protobuf-cpp-3.10.0.tar.gz
$ cd protobuf-3.10.0
$ ./autogen.sh
$ ./configure
$ make

View File

@ -40,8 +40,8 @@ if(APPLE)
find_path(GFlags_ROOT_DIR
libgflags.dylib
PATHS
/opt/local/lib
/usr/local/lib
/opt/local/lib
${GFLAGS_ROOT}/lib
$ENV{GFLAGS_ROOT}/lib
)
@ -49,7 +49,8 @@ else()
find_path(GFlags_ROOT_DIR
libgflags.so
HINTS
/usr/local/lib
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -74,8 +75,9 @@ else()
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GFLAGS_ROOT}/lib
$ENV{GFLAGS_ROOT}/lib
${GFLAGS_ROOT}/lib64
@ -88,9 +90,9 @@ if(GFlags_ROOT_DIR)
find_path(GFlags_INCLUDE_DIRS
gflags/gflags.h
HINTS
/opt/local/include
/usr/local/include
/usr/include
/usr/local/include
/opt/local/include
${GFlags_ROOT_DIR}/src
${GFLAGS_ROOT}/include
$ENV{GFLAGS_ROOT}/include

View File

@ -22,8 +22,6 @@ endif()
find_library(GFORTRAN NAMES gfortran
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib/i386
/usr/lib/gcc/x86_64-linux-gnu
/usr/lib/gcc/i686-linux-gnu
/usr/lib/gcc/i386-linux-gnu
@ -205,6 +203,9 @@ find_library(GFORTRAN NAMES gfortran
/usr/lib/gcc/x86_64-linux-gnux32/9
/usr/lib/gcc/x86_64-kfreebsd-gnu/9
/usr/lib/gcc/i686-kfreebsd-gnu/9
/usr/local/lib
/usr/local/lib64
/usr/local/lib/i386
${GFORTRAN_ROOT}/lib
$ENV{GFORTRAN_ROOT}/lib
)

View File

@ -52,8 +52,10 @@ pkg_check_modules(PC_GLOG libglog)
macro(_FIND_GLOG_LIBRARIES _var)
find_library(${_var}
NAMES ${ARGN}
HINTS ${PC_GLOG_LIBDIR}
PATHS ${LIB_PATHS}
/usr/local/lib
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -78,14 +80,13 @@ macro(_FIND_GLOG_LIBRARIES _var)
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GLOG_ROOT}/lib
$ENV{GLOG_ROOT}/lib
${GLOG_ROOT}/lib64
$ENV{GLOG_ROOT}/lib64
${PC_GLOG_LIBDIR}
/opt/local/lib
PATH_SUFFIXES lib
)
mark_as_advanced(${_var})
@ -102,19 +103,22 @@ endmacro()
if(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
HINTS
${PC_GLOG_INCLUDEDIR}
PATHS
${GLOG_ROOT}/src/windows
${GLOG_ROOT}/src/windows/glog
${PC_GLOG_INCLUDEDIR}
)
else()
# Linux/OS X builds
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/include/glog
/usr/include/glog
/opt/local/include/glog # default location in Macports
HINTS
${PC_GLOG_INCLUDEDIR}
PATHS
/usr/include/glog
/usr/local/include/glog
/opt/local/include/glog # default location in Macports
${GLOG_ROOT}/include/glog
)
endif()

View File

@ -72,28 +72,25 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
# look for include files
find_path(${INCVAR_NAME}
NAMES ${INCFILE}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${PC_INCDIR}
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
HINTS ${PC_INCDIR}
PATHS /usr/include
/usr/local/include
/opt/local/include
${GNURADIO_INSTALL_PREFIX}/include
${GNURADIO_ROOT}/include
$ENV{GNURADIO_ROOT}/include
$ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
)
# look for libs
foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES})
find_library(${LIBVAR_NAME}_${libname}
NAMES ${libname} ${libname}-${PC_GNURADIO_RUNTIME_VERSION}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
${PC_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNURADIO_INSTALL_PREFIX}/lib
${GNURADIO_INSTALL_PREFIX}/lib64
PATHS /usr/local/lib
HINTS ${PC_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -118,13 +115,19 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GNURADIO_INSTALL_PREFIX}/lib
${GNURADIO_ROOT}/lib
$ENV{GNURADIO_ROOT}/lib
${GNURADIO_ROOT}/lib64
$ENV{GNURADIO_ROOT}/lib64
$ENV{GNURADIO_RUNTIME_DIR}/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GNURADIO_INSTALL_PREFIX}/lib
${GNURADIO_INSTALL_PREFIX}/lib64
)
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
endforeach()
@ -208,14 +211,15 @@ endif()
if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_373
NAMES gnuradio/blocks/tsb_vector_sink_f.h
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
PATHS /usr/include
/usr/local/include
/opt/local/include
${GNURADIO_INSTALL_PREFIX}/include
${GNURADIO_ROOT}/include
$ENV{GNURADIO_ROOT}/include
$ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
)
if(GNURADIO_VERSION_GREATER_THAN_373)
set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+")
@ -223,14 +227,15 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
find_file(GNURADIO_VERSION_GREATER_THAN_38
NAMES gnuradio/filter/mmse_resampler_cc.h
HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
PATHS /usr/local/include
/usr/include
PATHS /usr/include
/usr/local/include
/opt/local/include
${GNURADIO_INSTALL_PREFIX}/include
${GNURADIO_ROOT}/include
$ENV{GNURADIO_ROOT}/include
$ENV{GNURADIO_RUNTIME_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
${GNURADIO_INSTALL_PREFIX}/include
)
if(GNURADIO_VERSION_GREATER_THAN_38)
set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+")

View File

@ -40,19 +40,20 @@ find_path(LIBGTEST_DEV_DIR
${GTEST_DIR}
${GTEST_DIR}/googletest
/usr/src/googletest/googletest
/usr/local/src/googletest/googletest
/usr/src/gtest
/usr/include/gtest
/usr/local/src/googletest/googletest
/opt/local/src/gtest-1.7.0
)
find_path(GTEST_INCLUDE_DIRS
NAMES gtest/gtest.h
HINTS ${PC_GTEST_INCLUDEDIR}
PATHS
${GTEST_DIR}/googletest/include
/usr/include
/usr/local/include
/opt/local/src/gtest-1.7.0/include
${PC_GTEST_INCLUDEDIR}
)
include(FindPackageHandleStandardArgs)

View File

@ -46,43 +46,55 @@ endif()
find_library(GPERFTOOLS_TCMALLOC
NAMES tcmalloc
HINTS ${Gperftools_ROOT_DIR}/lib
HINTS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${Gperftools_ROOT_DIR}/lib
${GPERFTOOLS_ROOT}/lib
$ENV{GPERFTOOLS_ROOT}/lib
${GPERFTOOLS_ROOT}/lib64
$ENV{GPERFTOOLS_ROOT}/lib64
/usr/lib
/usr/lib64
)
find_library(GPERFTOOLS_PROFILER
NAMES profiler
HINTS ${Gperftools_ROOT_DIR}/lib
HINTS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${Gperftools_ROOT_DIR}/lib
${GPERFTOOLS_ROOT}/lib
$ENV{GPERFTOOLS_ROOT}/lib
${GPERFTOOLS_ROOT}/lib64
$ENV{GPERFTOOLS_ROOT}/lib64
/usr/lib
/usr/lib64
)
find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
NAMES tcmalloc_and_profiler
HINTS ${Gperftools_ROOT_DIR}/lib
HINTS /usr/lib
/usr/lib64
${Gperftools_ROOT_DIR}/lib
${GPERFTOOLS_ROOT}/lib
$ENV{GPERFTOOLS_ROOT}/lib
${GPERFTOOLS_ROOT}/lib64
$ENV{GPERFTOOLS_ROOT}/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
)
find_path(GPERFTOOLS_INCLUDE_DIR
NAMES gperftools/heap-profiler.h
HINTS ${Gperftools_ROOT_DIR}/include
HINTS /usr/include
/usr/local/include
/opt/local/include
${Gperftools_ROOT_DIR}/include
${GPERFTOOLS_ROOT}/include
$ENV{GPERFTOOLS_ROOT}/include
/usr/include
)
set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})

View File

@ -26,30 +26,32 @@ pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc)
find_path(
GR_DBFCTTC_INCLUDE_DIRS
NAMES dbfcttc/api.h
HINTS $ENV{GR_DBFCTTC_DIR}/include
${PC_GR_DBFCTTC_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/include
HINTS ${PC_GR_DBFCTTC_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${GRDBFCTTC_ROOT}/include
$ENV{GRDBFCTTC_ROOT}/include
$ENV{GR_DBFCTTC_DIR}/include
)
find_library(
GR_DBFCTTC_LIBRARIES
NAMES gnuradio-dbfcttc
HINTS $ENV{GR_DBFCTTC_DIR}/lib
${PC_GR_DBFCTTC_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/lib
HINTS ${PC_GR_DBFCTTC_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GRDBFCTTC_ROOT}/lib
$ENV{GRDBFCTTC_ROOT}/lib
${GRDBFCTTC_ROOT}/lib64
$ENV{GRDBFCTTC_ROOT}/lib64
$ENV{GR_DBFCTTC_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -26,30 +26,32 @@ pkg_check_modules(PC_GR_GN3S gr-gn3s)
find_path(
GR_GN3S_INCLUDE_DIRS
NAMES gn3s/gn3s_api.h
HINTS $ENV{GR_GN3S_DIR}/include
${PC_GR_GN3S_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
HINTS ${PC_GR_GN3S_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${GRGN3S_ROOT}/include
$ENV{GRGN3S_ROOT}/include
$ENV{GR_GN3S_DIR}/include
)
find_library(
GR_GN3S_LIBRARIES
NAMES gr-gn3s
HINTS $ENV{GR_GN3S_DIR}/lib
${PC_GR_GN3S_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
HINTS ${PC_GR_GN3S_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
/opt/local/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GRGN3S_ROOT}/lib
$ENV{GRGN3S_ROOT}/lib
${GRGN3S_ROOT}/lib64
$ENV{GRGN3S_ROOT}/lib64
$ENV{GR_GN3S_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -30,13 +30,14 @@ pkg_check_modules(PC_IIO gnuradio-iio)
find_path(IIO_INCLUDE_DIRS
NAMES gnuradio/iio/api.h
HINTS $ENV{IIO_DIR}/include
${PC_IIO_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
HINTS ${PC_IIO_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${GRIIO_ROOT}/include
$ENV{GRIIO_ROOT}/include
$ENV{IIO_DIR}/include
)
if(IIO_INCLUDE_DIRS)
@ -44,26 +45,22 @@ if(IIO_INCLUDE_DIRS)
else()
find_path(IIO_INCLUDE_DIRS
NAMES iio/api.h
HINTS $ENV{IIO_DIR}/include
${PC_IIO_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
HINTS ${PC_IIO_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${GRIIO_ROOT}/include
$ENV{GRIIO_ROOT}/include
$ENV{IIO_DIR}/include
)
set(GR_IIO_INCLUDE_HAS_GNURADIO FALSE)
endif()
find_library(IIO_LIBRARIES
NAMES gnuradio-iio
HINTS $ENV{IIO_DIR}/lib
${PC_IIO_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
HINTS ${PC_IIO_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
@ -89,10 +86,16 @@ find_library(IIO_LIBRARIES
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/sh4-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${GRIIO_ROOT}/lib
$ENV{GRIIO_ROOT}/lib
${GRIIO_ROOT}/lib64
$ENV{GRIIO_ROOT}/lib64
$ENV{IIO_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -50,21 +50,23 @@ find_path(GROSMOSDR_INCLUDE_DIR
NAMES
osmosdr/source.h
osmosdr/api.h
HINTS
${GROSMOSDR_PKG_INCLUDEDIR}
PATHS
/usr/include
/usr/local/include
/opt/local/include
${GROSMOSDR_ROOT}/include
$ENV{GROSMOSDR_ROOT}/include
${GROSMOSDR_PKG_INCLUDEDIR}
)
find_library(GROSMOSDR_LIBRARIES
NAMES gnuradio-osmosdr
HINTS
${GROSMOSDR_PKG_LIBDIR}
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -89,12 +91,13 @@ find_library(GROSMOSDR_LIBRARIES
/usr/lib/x86_64-linux-gnux32
/usr/lib/riscv64-linux-gnu
/usr/lib/alpha-linux-gnu
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GROSMOSDR_ROOT}/lib
$ENV{GROSMOSDR_ROOT}/lib
${GROSMOSDR_ROOT}/lib64
$ENV{GROSMOSDR_ROOT}/lib64
${GROSMOSDR_PKG_LIBDIR}
)
include(FindPackageHandleStandardArgs)

View File

@ -31,26 +31,21 @@ pkg_check_modules(PC_LIBIIO libiio)
find_path(
LIBIIO_INCLUDE_DIRS
NAMES iio.h
HINTS $ENV{LIBIIO_DIR}/include
${PC_LIBIIO_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
HINTS ${PC_LIBIIO_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${LIBIIO_ROOT}/include
$ENV{LIBIIO_ROOT}/include
$ENV{LIBIIO_DIR}/include
)
find_library(
LIBIIO_LIBRARIES
NAMES iio libiio.so.0
HINTS $ENV{LIBIIO_DIR}/lib
${PC_LIBIIO_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
HINTS ${PC_LIBIIO_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
@ -76,11 +71,17 @@ find_library(
/usr/lib/x86_64-linux-gnux32
/usr/lib/sh4-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
/Library/Frameworks/iio.framework/
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${LIBIIO_ROOT}/lib
$ENV{LIBIIO_ROOT}/lib
${LIBIIO_ROOT}/lib64
$ENV{LIBIIO_ROOT}/lib64
$ENV{LIBIIO_DIR}/lib
)
if(LIBIIO_LIBRARIES AND APPLE)

View File

@ -40,9 +40,9 @@ if(LOG4CPP_INCLUDE_DIR)
endif()
find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh
/opt/local/include
/usr/local/include
/usr/include
/usr/local/include
/opt/local/include
${LOG4CPP_ROOT}/include
$ENV{LOG4CPP_ROOT}/include
${PC_LOG4CPP_INCLUDEDIR}
@ -65,11 +65,9 @@ endif()
set(LOG4CPP_NAMES log4cpp)
find_library(LOG4CPP_LIBRARY
NAMES ${LOG4CPP_NAMES}
HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
${PC_LOG4CPP_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib/
PATHS /usr/local/lib
/usr/local/lib64
HINTS ${PC_LOG4CPP_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -94,13 +92,15 @@ find_library(LOG4CPP_LIBRARY
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${LOG4CPP_ROOT}/lib
$ENV{LOG4CPP_ROOT}/lib
${LOG4CPP_ROOT}/lib64
$ENV{LOG4CPP_ROOT}/lib64
$ENV{GNURADIO_RUNTIME_DIR}/lib
${CMAKE_INSTALL_PREFIX}/lib
)
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)

View File

@ -70,6 +70,9 @@ endif()
find_path(MATIO_INCLUDE_DIR
NAMES matio.h
HINTS
/usr/include
/usr/local/include
/opt/local/include
${MATIO_ROOT}/include
$ENV{MATIO_ROOT}/include
DOC "The MATIO include directory"
@ -79,10 +82,8 @@ find_path(MATIO_INCLUDE_DIR
find_library(MATIO_LIBRARY
NAMES matio
HINTS
${MATIO_ROOT}/lib
$ENV{MATIO_ROOT}/lib
${MATIO_ROOT}/lib64
$ENV{MATIO_ROOT}/lib64
/usr/lib
/usr/lib64
/usr/lib/alpha-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
@ -104,6 +105,13 @@ find_library(MATIO_LIBRARY
/usr/lib/x86_64-linux-gnux32
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${MATIO_ROOT}/lib
$ENV{MATIO_ROOT}/lib
${MATIO_ROOT}/lib64
$ENV{MATIO_ROOT}/lib64
DOC "The MATIO library"
)

View File

@ -25,21 +25,28 @@ pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22")
find_program(ORCC_EXECUTABLE orcc
HINTS ${PC_ORC_TOOLSDIR}
PATHS ${ORC_ROOT}/bin
PATHS /usr/bin
/usr/local/bin
/opt/local/bin
${ORC_ROOT}/bin
${CMAKE_INSTALL_PREFIX}/bin
)
find_path(ORC_INCLUDE_DIR
NAMES orc/orc.h
HINTS ${PC_ORC_INCLUDEDIR}
PATHS ${ORC_ROOT}/include/orc-0.4
PATHS /usr/include
/usr/local/include
/opt/local/include
${ORC_ROOT}/include/orc-0.4
${CMAKE_INSTALL_PREFIX}/include/orc-0.4
)
find_path(ORC_LIBRARY_DIR
NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX}
HINTS ${PC_ORC_LIBDIR}
/usr/local/lib
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -53,11 +60,11 @@ find_path(ORC_LIBRARY_DIR
/usr/lib/powerpc64le-linux-gnu
/usr/lib/hppa-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${ORC_ROOT}/lib
$ENV{ORC_ROOT}/lib
PATHS
${ORC_ROOT}/lib${LIB_SUFFIX}
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
)

View File

@ -61,21 +61,23 @@ if(EXISTS $ENV{PCAPDIR})
NAMES
pcap/pcap.h
pcap.h
HINTS
${PC_PCAP_INCLUDEDIR}
PATHS
$ENV{PCAPDIR}
${PCAP_ROOT}/include
$ENV{PCAP_ROOT}/include
${PC_PCAP_INCLUDEDIR}
NO_DEFAULT_PATH
)
find_library(PCAP_LIBRARY
NAMES
pcap
HINTS
${PC_PCAP_LIBDIR}
PATHS
$ENV{PCAPDIR}
${PCAP_ROOT}/lib
$ENV{PCAP_ROOT}/lib
${PC_PCAP_LIBDIR}
NO_DEFAULT_PATH
)
else()
@ -84,18 +86,22 @@ else()
pcap/pcap.h
pcap.h
HINTS
${PC_PCAP_INCLUDEDIR}
PATHS
/usr/include
/usr/local/include
/opt/local/include
${PCAP_ROOT}/include
$ENV{PCAP_ROOT}/include
${PC_PCAP_INCLUDEDIR}
/usr/include
)
find_library(PCAP_LIBRARY
NAMES
pcap
HINTS
${PCAP_ROOT}/lib
$ENV{PCAP_ROOT}/lib
${PC_PCAP_LIBDIR}
PATHS
/usr/lib
/usr/lib64
/usr/lib/alpha-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
@ -117,6 +123,11 @@ else()
/usr/lib/x86_64-linux-gnux32
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${PCAP_ROOT}/lib
$ENV{PCAP_ROOT}/lib
)
endif()

View File

@ -37,24 +37,26 @@ pkg_check_modules(PC_PUGIXML pugixml QUIET)
find_path(PUGIXML_INCLUDE_DIR
NAMES pugixml.hpp
PATHS ${PUGIXML_HOME}/include
/usr/include
HINTS ${PC_PUGIXML_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/local/include/pugixml-${PC_PUGIXML_VERSION}
/usr/local/include/pugixml-1.9
/opt/local/include
${PUGIXML_HOME}/include
${PUGIXML_ROOT}/include
$ENV{PUGIXML_ROOT}/include
${PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
$ENV{PUGIXML_ROOT}/include/pugixml-${PC_PUGIXML_VERSION}
${PUGIXML_ROOT}/include/pugixml-1.9
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
${PC_PUGIXML_INCLUDEDIR}
)
find_library(PUGIXML_LIBRARY
NAMES pugixml
PATHS ${PUGIXML_HOME}/lib
HINTS ${PC_PUGIXML_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/aarch64-linux-gnu
/usr/lib/arm-linux-gnueabi
@ -78,12 +80,11 @@ find_library(PUGIXML_LIBRARY
/usr/lib/x86_64-kfreebsd-gnu
/usr/lib/i386-kfreebsd-gnu
/usr/local/lib
/usr/local/lib64
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
/usr/local/lib/pugixml-1.9
/opt/local/lib
/usr/lib
/usr/lib64
/usr/local/lib64
${PUGIXML_HOME}/lib
${PUGIXML_ROOT}/lib
$ENV{PUGIXML_ROOT}/lib
${PUGIXML_ROOT}/lib64
@ -96,7 +97,6 @@ find_library(PUGIXML_LIBRARY
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
${PUGIXML_ROOT}/lib64/pugixml-1.9
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
${PC_PUGIXML_LIBDIR}
)
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.

View File

@ -25,31 +25,31 @@ pkg_check_modules(PC_TELEORBIT teleorbit QUIET)
find_path(TELEORBIT_INCLUDE_DIRS
NAMES teleorbit/api.h
HINTS $ENV{TELEORBIT_DIR}/include
${PC_TELEORBIT_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
HINTS ${PC_TELEORBIT_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/usr/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${TELEORBIT_ROOT}/include
$ENV{TELEORBIT_ROOT}/include
$ENV{TELEORBIT_DIR}/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
HINTS ${PC_TELEORBIT_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
/opt/local/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${TELEORBIT_ROOT}/lib
$ENV{TELEORBIT_ROOT}/lib
${TELEORBIT_ROOT}/lib64
$ENV{TELEORBIT_ROOT}/lib64
$ENV{TELEORBIT_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -33,20 +33,21 @@ pkg_check_modules(PC_UHD uhd)
find_path(UHD_INCLUDE_DIRS
NAMES uhd/config.hpp
HINTS $ENV{UHD_DIR}/include
${PC_UHD_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
HINTS ${PC_UHD_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/opt/local/include
${GNURADIO_INSTALL_PREFIX}/include
${UHD_ROOT}/include
$ENV{UHD_ROOT}/include
$ENV{UHD_DIR}/include
)
find_library(UHD_LIBRARIES
NAMES uhd
HINTS $ENV{UHD_DIR}/lib
${PC_UHD_LIBDIR}
PATHS /usr/local/lib
HINTS ${PC_UHD_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -71,13 +72,15 @@ find_library(UHD_LIBRARIES
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GNURADIO_INSTALL_PREFIX}/lib
${UHD_ROOT}/lib
$ENV{UHD_ROOT}/lib
${UHD_ROOT}/lib64
$ENV{UHD_ROOT}/lib64
$ENV{UHD_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -33,22 +33,21 @@ pkg_check_modules(PC_VOLK volk QUIET)
find_path(VOLK_INCLUDE_DIRS
NAMES volk/volk.h
HINTS $ENV{VOLK_DIR}/include
${PC_VOLK_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
HINTS ${PC_VOLK_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${VOLK_ROOT}/include
$ENV{VOLK_ROOT}/include
$ENV{VOLK_DIR}/include
)
find_library(VOLK_LIBRARIES
NAMES volk
HINTS $ENV{VOLK_DIR}/lib
${PC_VOLK_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
HINTS ${PC_VOLK_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/arm-linux-gnueabihf
@ -72,12 +71,15 @@ find_library(VOLK_LIBRARIES
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${CMAKE_INSTALL_PREFIX}/lib
${VOLK_ROOT}/lib
$ENV{VOLK_ROOT}/lib
${VOLK_ROOT}/lib64
$ENV{VOLK_ROOT}/lib64
$ENV{VOLK_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -34,28 +34,30 @@ pkg_check_modules(PC_VOLK_GNSSSDR QUIET volk_gnsssdr)
find_path(VOLK_GNSSSDR_INCLUDE_DIRS
NAMES volk_gnsssdr/volk_gnsssdr.h
HINTS $ENV{VOLK_GNSSSDR_DIR}/include
${PC_VOLK_GNSSSDR_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
HINTS ${PC_VOLK_GNSSSDR_INCLUDEDIR}
PATHS /usr/include
/usr/local/include
/opt/local/include
${GNURADIO_INSTALL_PREFIX}/include
${VOLKGNSSSDR_ROOT}/include
$ENV{VOLKGNSSSDR_ROOT}/include
$ENV{VOLK_GNSSSDR_DIR}/include
)
find_library(VOLK_GNSSSDR_LIBRARIES
NAMES volk_gnsssdr
HINTS $ENV{VOLK_GNSSSDR_DIR}/lib
${PC_VOLK_GNSSSDR_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
HINTS ${PC_VOLK_GNSSSDR_LIBDIR}
PATHS /usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
${GNURADIO_INSTALL_PREFIX}/lib
${VOLKGNSSSDR_ROOT}/lib
$ENV{VOLKGNSSSDR_ROOT}/lib
${VOLKGNSSSDR_ROOT}/lib64
$ENV{VOLKGNSSSDR_ROOT}/lib64
$ENV{VOLK_GNSSSDR_DIR}/lib
)
include(FindPackageHandleStandardArgs)

View File

@ -74,8 +74,6 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_;
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 4);
acq_parameters.sampled_ms = sampled_ms;
acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); // could be true in future versions
@ -92,7 +90,6 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total;
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_CPS) * static_cast<float>(fs_in)));

View File

@ -72,9 +72,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_;
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
acq_parameters.sampled_ms = sampled_ms;
acq_pilot_ = configuration_->property(role + ".acquire_pilot", false);
acq_iq_ = configuration_->property(role + ".acquire_iq", false);
if (acq_iq_)
@ -93,7 +90,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total;
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_CPS) * static_cast<float>(fs_in)));

View File

@ -73,8 +73,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_;
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
acq_parameters.sampled_ms = sampled_ms;
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
acq_parameters.code_length = code_length;
// The FPGA can only use FFT lengths that are a power of two.
@ -85,7 +83,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total;
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast<float>(fs_in)));

View File

@ -71,7 +71,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_;
acq_parameters.sampled_ms = 20;
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
acq_parameters.code_length = code_length;
// The FPGA can only use FFT lengths that are a power of two.
@ -82,7 +81,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total / acq_parameters.sampled_ms;
acq_parameters.samples_per_code = nsamples_total;
acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);

View File

@ -75,8 +75,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
acq_parameters.doppler_max = doppler_max_;
uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1);
acq_parameters.sampled_ms = sampled_ms;
// -- Find number of samples per spreading code -------------------------
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_CPS / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
@ -89,7 +87,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
std::string default_device_name = "/dev/uio0";
std::string device_name = configuration_->property(role + ".devicename", default_device_name);
acq_parameters.device_name = device_name;
acq_parameters.samples_per_ms = nsamples_total / sampled_ms;
acq_parameters.samples_per_code = nsamples_total;
acq_parameters.excludelimit = static_cast<unsigned int>(1 + ceil((1.0 / GPS_L5I_CODE_RATE_CPS) * static_cast<float>(fs_in)));

View File

@ -79,7 +79,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_)
d_max_num_acqs = acq_parameters.max_num_acqs;
acquisition_fpga = std::make_shared<Fpga_Acquisition>(acq_parameters.device_name, acq_parameters.code_length, acq_parameters.doppler_max, d_fft_size,
acq_parameters.fs_in, acq_parameters.sampled_ms, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes, acq_parameters.excludelimit);
acq_parameters.fs_in, acq_parameters.select_queue_Fpga, acq_parameters.all_fft_codes, acq_parameters.excludelimit);
}

View File

@ -54,16 +54,13 @@ class Gnss_Synchro;
typedef struct
{
/* pcps acquisition configuration */
uint32_t sampled_ms;
uint32_t doppler_max;
int64_t fs_in;
int32_t samples_per_ms;
int32_t samples_per_code;
int32_t code_length;
uint32_t select_queue_Fpga;
std::string device_name;
uint32_t* all_fft_codes; // pointer to memory that contains all the code ffts
// float downsampling_factor;
uint32_t downsampling_factor;
uint32_t total_block_exp;
uint32_t excludelimit;

View File

@ -63,7 +63,6 @@ Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
uint32_t doppler_max,
uint32_t nsamples_total,
int64_t fs_in,
uint32_t sampled_ms __attribute__((unused)),
uint32_t select_queue,
uint32_t *all_fft_codes,
uint32_t excludelimit)

View File

@ -54,7 +54,6 @@ public:
uint32_t doppler_max,
uint32_t nsamples_total,
int64_t fs_in,
uint32_t sampled_ms,
uint32_t select_queue,
uint32_t *all_fft_codes,
uint32_t excludelimit);

View File

@ -38,15 +38,245 @@
#include <glog/logging.h>
#include <iio.h>
#include <exception>
#include <fcntl.h> // for open, O_WRONLY
#include <fstream> // for std::ifstream
#include <iostream> // for cout, endl
#include <string> // for string manipulation
#include <unistd.h> // for write
#include <utility>
#include <vector>
Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
const std::string& role, unsigned int in_stream, unsigned int out_stream,
void run_DMA_process(const std::string &FreqBand, const std::string &Filename1, const std::string &Filename2, const bool &enable_DMA)
{
const int MAX_INPUT_SAMPLES_TOTAL = 8192;
int max_value = 0;
int tx_fd; // DMA descriptor
std::ifstream infile1;
infile1.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try
{
infile1.open(Filename1, std::ios::binary);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception opening file " << Filename1 << std::endl;
return;
}
std::ifstream infile2;
infile2.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try
{
infile2.open(Filename2, std::ios::binary);
}
catch (const std::ifstream::failure &e)
{
// could not exist
}
// rx signal
std::vector<int8_t> input_samples(MAX_INPUT_SAMPLES_TOTAL * 2);
std::vector<int8_t> input_samples2(MAX_INPUT_SAMPLES_TOTAL * 2);
std::vector<int8_t> input_samples_dma(MAX_INPUT_SAMPLES_TOTAL * 2 * 2);
int nread_elements;
int nread_elements2;
int file_completed = 0;
int num_transferred_bytes;
//**************************************************************************
// Open DMA device
//**************************************************************************
tx_fd = open("/dev/loop_tx", O_WRONLY);
if (tx_fd < 0)
{
std::cout << "Cannot open loop device" << std::endl;
return;
}
//**************************************************************************
// Open input file
//**************************************************************************
int nsamples = 0;
while ((file_completed == 0) && (enable_DMA == true))
{
unsigned int dma_index = 0;
if (FreqBand == "L1")
{
try
{
infile1.read(reinterpret_cast<char *>(input_samples.data()), MAX_INPUT_SAMPLES_TOTAL * 2);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
}
if (infile1)
{
nread_elements = MAX_INPUT_SAMPLES_TOTAL * 2;
}
else
{
nread_elements = 0;
}
nsamples += (nread_elements / 2);
for (int index0 = 0; index0 < (nread_elements); index0 += 2)
{
// channel 1 (queue 1)
input_samples_dma[dma_index] = 0;
input_samples_dma[dma_index + 1] = 0;
// channel 0 (queue 0)
input_samples_dma[dma_index + 2] = input_samples[index0];
input_samples_dma[dma_index + 3] = input_samples[index0 + 1];
dma_index += 4;
}
}
else if (FreqBand == "L2")
{
try
{
infile1.read(reinterpret_cast<char *>(input_samples.data()), MAX_INPUT_SAMPLES_TOTAL * 2);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
}
if (infile1)
{
nread_elements = MAX_INPUT_SAMPLES_TOTAL * 2;
}
else
{
nread_elements = 0;
}
nsamples += (nread_elements / 2);
for (int index0 = 0; index0 < (nread_elements); index0 += 2)
{
// channel 1 (queue 1)
input_samples_dma[dma_index] = input_samples[index0];
input_samples_dma[dma_index + 1] = input_samples[index0 + 1];
// channel 0 (queue 0)
input_samples_dma[dma_index + 2] = 0;
input_samples_dma[dma_index + 3] = 0;
dma_index += 4;
}
}
else if (FreqBand == "L1L2")
{
try
{
infile1.read(reinterpret_cast<char *>(input_samples.data()), MAX_INPUT_SAMPLES_TOTAL * 2);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
}
if (infile1)
{
nread_elements = MAX_INPUT_SAMPLES_TOTAL * 2;
}
else
{
nread_elements = 0;
}
try
{
infile2.read(reinterpret_cast<char *>(input_samples2.data()), MAX_INPUT_SAMPLES_TOTAL * 2);
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
}
if (infile2)
{
nread_elements2 = MAX_INPUT_SAMPLES_TOTAL * 2;
}
else
{
nread_elements2 = 0;
}
if (nread_elements > nread_elements2)
{
nread_elements = nread_elements2; // take the smallest
}
nsamples += (nread_elements / 2);
for (int index0 = 0; index0 < (nread_elements); index0 += 2)
{
input_samples[index0] = input_samples[index0];
input_samples[index0 + 1] = input_samples[index0 + 1];
if (input_samples[index0] > max_value)
{
max_value = input_samples[index0];
}
else if (-input_samples[index0] > max_value)
{
max_value = -input_samples[index0];
}
if (input_samples[index0 + 1] > max_value)
{
max_value = input_samples[index0 + 1];
}
else if (-input_samples[index0 + 1] > max_value)
{
max_value = -input_samples[index0 + 1];
}
// channel 1 (queue 1)
input_samples_dma[dma_index] = input_samples2[index0];
input_samples_dma[dma_index + 1] = input_samples2[index0 + 1];
// channel 0 (queue 0)
input_samples_dma[dma_index + 2] = input_samples[index0];
input_samples_dma[dma_index + 3] = input_samples[index0 + 1];
dma_index += 4;
}
}
if (nread_elements > 0)
{
num_transferred_bytes = nread_elements * 2;
int num_bytes_sent = write(tx_fd, input_samples_dma.data(), nread_elements * 2);
if (num_bytes_sent != num_transferred_bytes)
{
std::cerr << "Error: DMA could not send all the required samples " << std::endl;
}
}
if (nread_elements != MAX_INPUT_SAMPLES_TOTAL * 2)
{
file_completed = 1;
}
}
try
{
infile1.close();
infile2.close();
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception closing files " << Filename1 << " and " << Filename2 << std::endl;
}
}
Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface *configuration,
const std::string &role, unsigned int in_stream, unsigned int out_stream,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
{
std::string default_dump_file = "./data/signal_source.dat";
freq_ = configuration->property(role + ".freq", GPS_L1_FREQ_HZ);
sample_rate_ = configuration->property(role + ".sampling_frequency", 12500000);
bandwidth_ = configuration->property(role + ".bandwidth", 12500000);
@ -64,9 +294,6 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configura
filter_file_ = configuration->property(role + ".filter_file", std::string(""));
filter_auto_ = configuration->property(role + ".filter_auto", true);
samples_ = configuration->property(role + ".samples", 0);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
enable_dds_lo_ = configuration->property(role + ".enable_dds_lo", false);
freq_rf_tx_hz_ = configuration->property(role + ".freq_rf_tx_hz", GPS_L1_FREQ_HZ - GPS_L2_FREQ_HZ - 1000);
freq_dds_tx_hz_ = configuration->property(role + ".freq_dds_tx_hz", 1000);
@ -74,38 +301,72 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configura
phase_dds_deg_ = configuration->property(role + ".phase_dds_deg", 0.0);
tx_attenuation_db_ = configuration->property(role + ".tx_attenuation_db", 0.0);
item_size_ = sizeof(gr_complex);
std::cout << "device address: " << uri_ << std::endl;
std::cout << "LO frequency : " << freq_ << " Hz" << std::endl;
std::cout << "sample rate: " << sample_rate_ << " Hz" << std::endl;
config_ad9361_rx_local(bandwidth_,
sample_rate_,
freq_,
rf_port_select_,
gain_mode_rx1_,
gain_mode_rx2_,
rf_gain_rx1_,
rf_gain_rx2_);
// LOCAL OSCILLATOR DDS GENERATOR FOR DUAL FREQUENCY OPERATION
if (enable_dds_lo_ == true)
{
config_ad9361_lo_local(bandwidth_,
sample_rate_,
freq_rf_tx_hz_,
tx_attenuation_db_,
freq_dds_tx_hz_,
scale_dds_dbfs_);
}
// turn switch to A/D position
std::string default_device_name = "/dev/uio1";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
int32_t switch_position = configuration->property(role + ".switch_position", 0);
switch_position = configuration->property(role + ".switch_position", 0);
switch_fpga = std::make_shared<Fpga_Switch>(device_name);
switch_fpga->set_switch_position(switch_position);
item_size_ = sizeof(gr_complex);
std::cout << "Sample rate: " << sample_rate_ << " Sps" << std::endl;
if (switch_position == 0) // Inject file(s) via DMA
{
enable_DMA_ = true;
std::string empty_string;
filename_rx1 = configuration->property(role + ".filename_rx1", empty_string);
filename_rx2 = configuration->property(role + ".filename_rx2", empty_string);
int l1_band = configuration->property("Channels_1C.count", 0) +
configuration->property("Channels_1B.count", 0);
int l2_band = configuration->property("Channels_L5.count", 0) +
configuration->property("Channels_5X.count", 0) +
configuration->property("Channels_2S.count", 0);
if (l1_band != 0)
{
freq_band = "L1";
}
if (l2_band != 0 && l1_band == 0)
{
freq_band = "L2";
}
if (l1_band != 0 && l2_band != 0)
{
freq_band = "L1L2";
}
thread_file_to_dma = std::thread([&] { run_DMA_process(freq_band, filename_rx1, filename_rx2, enable_DMA_); });
}
if (switch_position == 2) // Real-time via AD9361
{
std::cout << "LO frequency : " << freq_ << " Hz" << std::endl;
config_ad9361_rx_local(bandwidth_,
sample_rate_,
freq_,
rf_port_select_,
gain_mode_rx1_,
gain_mode_rx2_,
rf_gain_rx1_,
rf_gain_rx2_);
// LOCAL OSCILLATOR DDS GENERATOR FOR DUAL FREQUENCY OPERATION
if (enable_dds_lo_ == true)
{
config_ad9361_lo_local(bandwidth_,
sample_rate_,
freq_rf_tx_hz_,
tx_attenuation_db_,
freq_dds_tx_hz_,
scale_dds_dbfs_);
}
}
if (switch_position != 0 && switch_position != 2)
{
std::cout << "SignalSource.switch_position configuration parameter must be either 0: read from file(s) via DMA, or 2: read from AD9361" << std::endl;
}
if (in_stream_ > 0)
{
LOG(ERROR) << "A signal source does not have an input stream";
@ -120,22 +381,31 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configura
Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource()
{
/* cleanup and exit */
// std::cout<<"* AD9361 Disabling streaming channels\n";
// if (rx0_i) { iio_channel_disable(rx0_i); }
// if (rx0_q) { iio_channel_disable(rx0_q); }
enable_DMA_ = false; // disable the DMA
if (enable_dds_lo_)
{
try
{
ad9361_disable_lo_local();
}
catch (const std::exception& e)
catch (const std::exception &e)
{
LOG(WARNING) << "Problem closing the Ad9361FpgaSignalSource: " << e.what();
}
}
if (switch_position == 0) // read samples from a file via DMA
{
if (thread_file_to_dma.joinable())
{
thread_file_to_dma.join();
}
}
// std::cout<<"* AD9361 Destroying context\n";
// if (ctx) { iio_context_destroy(ctx); }
}
@ -168,6 +438,5 @@ gr::basic_block_sptr Ad9361FpgaSignalSource::get_left_block()
gr::basic_block_sptr Ad9361FpgaSignalSource::get_right_block()
{
LOG(WARNING) << "Trying to get AD9361 FPGA signal source right block.";
return gr::basic_block_sptr();
}

View File

@ -40,6 +40,7 @@
#include <cstdint>
#include <memory>
#include <string>
#include <thread>
class ConfigurationInterface;
@ -79,8 +80,7 @@ private:
std::string role_;
// Front-end settings
std::string uri_; // device direction
uint64_t freq_; // frequency of local oscillator
uint64_t freq_; // frequency of local oscillator
uint64_t sample_rate_;
uint64_t bandwidth_;
uint64_t buffer_size_; // reception buffer
@ -110,12 +110,18 @@ private:
size_t item_size_;
long samples_;
bool dump_;
std::string dump_filename_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
std::shared_ptr<Fpga_Switch> switch_fpga;
int32_t switch_position;
std::thread thread_file_to_dma;
std::string filename_rx1;
std::string filename_rx2;
std::string freq_band;
bool enable_DMA_;
};
#endif // GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H_

View File

@ -181,8 +181,14 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
std::string default_device_name = "/dev/uio";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
trk_param_fpga.device_name = device_name;
int32_t device_base = configuration->property(role + ".device_base", 15);
trk_param_fpga.device_base = device_base;
// obtain the number of the first uio device corresponding to a HW accelerator in the FPGA
// that can be assigned to the tracking of the E1 signal
trk_param_fpga.dev_file_num = configuration->property(role + ".dev_file_num", 15);
// compute the number of tracking channels that have already been instantiated. The order in which
// GNSS-SDR instantiates the tracking channels i L1, L2, L5, E1, E5a
trk_param_fpga.num_prev_assigned_ch = configuration->property("Channels_1C.count", 0) +
configuration->property("Channels_2S.count", 0) +
configuration->property("Channels_L5.count", 0);
//################# PRE-COMPUTE ALL THE CODES #################
uint32_t code_samples_per_chip = 2;

View File

@ -176,8 +176,15 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
std::string default_device_name = "/dev/uio";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
trk_param_fpga.device_name = device_name;
int32_t device_base = configuration->property(role + ".device_base", 27);
trk_param_fpga.device_base = device_base;
// obtain the number of the first uio device corresponding to a HW accelerator in the FPGA
// that can be assigned to the tracking of the E5a signal
trk_param_fpga.dev_file_num = configuration->property(role + ".dev_file_num", 27);
// compute the number of tracking channels that have already been instantiated. The order in which
// GNSS-SDR instantiates the tracking channels i L1, L2, L5, E1, E5a
trk_param_fpga.num_prev_assigned_ch = configuration->property("Channels_1C.count", 0) +
configuration->property("Channels_2S.count", 0) +
configuration->property("Channels_L5.count", 0) +
configuration->property("Channels_1B.count", 0);
// ################# PRE-COMPUTE ALL THE CODES #################
uint32_t code_samples_per_chip = 1;

View File

@ -182,8 +182,12 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
std::string default_device_name = "/dev/uio";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
trk_param_fpga.device_name = device_name;
int32_t device_base = configuration->property(role + ".device_base", 3);
trk_param_fpga.device_base = device_base;
// obtain the number of the first uio device corresponding to a HW accelerator in the FPGA
// that can be assigned to the tracking of the L1 signal
trk_param_fpga.dev_file_num = configuration->property(role + ".dev_file_num", 3);
// compute the number of tracking channels that have already been instantiated. The order in which
// GNSS-SDR instantiates the tracking channels i L1, l2, L5, E1, E5a
trk_param_fpga.num_prev_assigned_ch = 0;
// ################# PRE-COMPUTE ALL THE CODES #################
d_ca_codes = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<int32_t>(GPS_L1_CA_CODE_LENGTH_CHIPS * NUM_PRNs) * sizeof(int32_t), volk_gnsssdr_get_alignment()));

View File

@ -107,19 +107,16 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
trk_param_fpga.carrier_lock_test_smoother_samples = configuration->property(role + ".carrier_lock_test_smoother_samples", trk_param_fpga.carrier_lock_test_smoother_samples);
trk_param_fpga.carrier_lock_test_smoother_alpha = configuration->property(role + ".carrier_lock_test_smoother_alpha", trk_param_fpga.carrier_lock_test_smoother_alpha);
// int32_t max_lock_fail = configuration->property(role + ".max_lock_fail", 50);
// if (FLAGS_max_lock_fail != 50)
// {
// max_lock_fail = FLAGS_max_lock_fail;
// }
// trk_param_fpga.max_lock_fail = max_lock_fail;
// FPGA configuration parameters
std::string default_device_name = "/dev/uio";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
trk_param_fpga.device_name = device_name;
unsigned int device_base = configuration->property(role + ".device_base", 1);
trk_param_fpga.device_base = device_base;
// obtain the number of the first uio device file that is assigned to the FPGA L2 tracking multicorrelator HW accelerators
trk_param_fpga.dev_file_num = configuration->property(role + ".dev_file_num", 27);
// compute the number of tracking channels that have already been instantiated. The order in which
// GNSS-SDR instantiates the tracking channels i L1, L2, L5, E1, E5a
trk_param_fpga.num_prev_assigned_ch = configuration->property("Channels_1C.count", 0);
auto* ca_codes_f = static_cast<float*>(volk_gnsssdr_malloc(static_cast<unsigned int>(GPS_L2_M_CODE_LENGTH_CHIPS) * sizeof(float), volk_gnsssdr_get_alignment()));

View File

@ -175,8 +175,13 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
std::string default_device_name = "/dev/uio";
std::string device_name = configuration->property(role + ".devicename", default_device_name);
trk_param_fpga.device_name = device_name;
int32_t device_base = configuration->property(role + ".device_base", 27);
trk_param_fpga.device_base = device_base;
// obtain the number of the first uio device corresponding to a HW accelerator in the FPGA
// that can be assigned to the tracking of the L5 signal
trk_param_fpga.dev_file_num = configuration->property(role + ".dev_file_num", 27);
// compute the number of tracking channels that have already been instantiated. The order in which
// GNSS-SDR instantiates the tracking channels i L1, L2, L5, E1, E5a
trk_param_fpga.num_prev_assigned_ch = configuration->property("Channels_1C.count", 0) +
configuration->property("Channels_2S.count", 0);
// tracking lock tests smoother parameters
trk_param_fpga.cn0_smoother_samples = configuration->property(role + ".cn0_smoother_samples", trk_param_fpga.cn0_smoother_samples);

View File

@ -453,10 +453,11 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
}
// create multicorrelator class
std::string device_name = trk_parameters.device_name;
int32_t device_base = trk_parameters.device_base;
uint32_t dev_file_num = trk_parameters.dev_file_num;
uint32_t num_prev_assigned_ch = trk_parameters.num_prev_assigned_ch;
int32_t *ca_codes = trk_parameters.ca_codes;
int32_t *data_codes = trk_parameters.data_codes;
multicorrelator_fpga = std::make_shared<Fpga_Multicorrelator_8sc>(d_n_correlator_taps, device_name, device_base, ca_codes, data_codes, d_code_length_chips, trk_parameters.track_pilot, d_code_samples_per_chip);
multicorrelator_fpga = std::make_shared<Fpga_Multicorrelator_8sc>(d_n_correlator_taps, device_name, dev_file_num, num_prev_assigned_ch, ca_codes, data_codes, d_code_length_chips, trk_parameters.track_pilot, d_code_samples_per_chip);
multicorrelator_fpga->set_output_vectors(d_correlator_outs, d_Prompt_Data);
d_sample_counter_next = 0ULL;

View File

@ -81,7 +81,8 @@ Dll_Pll_Conf_Fpga::Dll_Pll_Conf_Fpga()
signal[1] = 'C';
signal[2] = '\0';
device_name = "/dev/uio";
device_base = 1;
dev_file_num = 3;
num_prev_assigned_ch = 0;
code_length_chips = 0U;
code_samples_per_chip = 0U;
ca_codes = nullptr;

View File

@ -87,7 +87,8 @@ public:
char system;
char signal[3];
std::string device_name;
int32_t device_base;
uint32_t dev_file_num;
uint32_t num_prev_assigned_ch;
uint32_t code_length_chips;
uint32_t code_samples_per_chip;
int32_t* ca_codes;

View File

@ -61,13 +61,15 @@ const float PHASE_CARR_MAX_DIV_PI = 683565275.5764316; // 2^(31)/pi
const float TWO_PI = 6.283185307179586;
Fpga_Multicorrelator_8sc::Fpga_Multicorrelator_8sc(int32_t n_correlators,
const std::string &device_name, int32_t device_base, int32_t *ca_codes, int32_t *data_codes, uint32_t code_length_chips, bool track_pilot,
const std::string &device_name, uint32_t dev_file_num, uint32_t num_prev_assigned_ch, int32_t *ca_codes, int32_t *data_codes, uint32_t code_length_chips, bool track_pilot,
uint32_t code_samples_per_chip)
{
d_n_correlators = n_correlators;
d_device_name = device_name;
d_device_base = device_base;
d_dev_file_num = dev_file_num;
d_num_prev_assigned_ch = num_prev_assigned_ch;
d_track_pilot = track_pilot;
d_device_descriptor = 0;
d_map_base = nullptr;
@ -243,7 +245,7 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
// open the device corresponding to the assigned channel
std::string mergedname;
std::stringstream devicebasetemp;
int32_t numdevice = d_device_base + d_channel;
uint32_t numdevice = d_dev_file_num + d_channel - d_num_prev_assigned_ch;
devicebasetemp << numdevice;
mergedname = d_device_name + devicebasetemp.str();

View File

@ -53,7 +53,8 @@ public:
*/
Fpga_Multicorrelator_8sc(int32_t n_correlators,
const std::string &device_name,
int32_t device_base,
uint32_t dev_file_num,
uint32_t num_prev_assigned_ch,
int32_t *ca_codes,
int32_t *data_codes,
uint32_t code_length_chips,
@ -236,7 +237,8 @@ private:
// driver
std::string d_device_name;
int32_t d_device_base;
uint32_t d_dev_file_num;
uint32_t d_num_prev_assigned_ch;
// PRN codes
int32_t *d_ca_codes;

View File

@ -1446,15 +1446,6 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
#endif
#if AD9361_DRIVER
else if (implementation == "Ad9361_Fpga_Signal_Source")
{
std::unique_ptr<GNSSBlockInterface> block_(new Ad9361FpgaSignalSource(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
#endif
#if FLEXIBAND_DRIVER
else if (implementation == "Flexiband_Signal_Source")
{
@ -1927,6 +1918,18 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
out_streams));
block = std::move(block_);
}
#if AD9361_DRIVER
// The AD9361_DRIVER Driver is instantiated last. In this way, when using the FPGA, and when using the GNSS receiver
// in post-processing mode, the receiver is configured and ready when the DMA starts sending samples to the receiver.
else if (implementation == "Ad9361_Fpga_Signal_Source")
{
std::unique_ptr<GNSSBlockInterface> block_(new Ad9361FpgaSignalSource(configuration.get(), role, in_streams,
out_streams, queue));
block = std::move(block_);
}
#endif
else
{
// Log fatal. This causes execution to stop.

View File

@ -80,6 +80,7 @@ GNSSFlowgraph::GNSSFlowgraph(std::shared_ptr<ConfigurationInterface> configurati
running_ = false;
configuration_ = std::move(configuration);
queue_ = queue;
multiband_ = GNSSFlowgraph::is_multiband();
init();
}
@ -1218,7 +1219,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
estimated_doppler,
RX_time);
channels_[current_channel]->set_signal(gnss_signal);
start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", false);
start_acquisition = is_primary_freq or assistance_available or !configuration_->property("GNSS-SDR.assist_dual_frequency_acq", multiband_);
}
else
{
@ -1233,7 +1234,7 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
DLOG(INFO) << "Channel " << current_channel
<< " Starting acquisition " << channels_[current_channel]->get_signal().get_satellite()
<< ", Signal " << channels_[current_channel]->get_signal().get_signal_str();
if (assistance_available == true and configuration_->property("GNSS-SDR.assist_dual_frequency_acq", false))
if (assistance_available == true and configuration_->property("GNSS-SDR.assist_dual_frequency_acq", multiband_))
{
channels_[current_channel]->assist_acquisition_doppler(project_doppler(channels_[current_channel]->get_signal().get_signal_str(), estimated_doppler));
}
@ -1891,6 +1892,45 @@ void GNSSFlowgraph::set_channels_state()
}
bool GNSSFlowgraph::is_multiband() const
{
bool multiband = false;
if (configuration_->property("Channels_1C.count", 0) > 0)
{
if (configuration_->property("Channels_2S.count", 0) > 0)
{
multiband = true;
}
if (configuration_->property("Channels_L5.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_1B.count", 0) > 0)
{
if (configuration_->property("Channels_5X.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_1G.count", 0) > 0)
{
if (configuration_->property("Channels_2G.count", 0) > 0)
{
multiband = true;
}
}
if (configuration_->property("Channels_B1.count", 0) > 0)
{
if (configuration_->property("Channels_B3.count", 0) > 0)
{
multiband = true;
}
}
return multiband;
}
Gnss_Signal GNSSFlowgraph::search_next_signal(const std::string& searched_signal,
const bool pop,
bool& is_primary_frequency,

View File

@ -182,8 +182,10 @@ private:
void remove_signal(const Gnss_Signal& gs);
double project_doppler(const std::string& searched_signal, double primary_freq_doppler_hz);
bool is_multiband() const;
bool connected_;
bool running_;
bool multiband_;
int sources_count_;
unsigned int channels_count_;

View File

@ -191,7 +191,7 @@ void GpsL1CADllPllTrackingTestFpga_msg_rx::msg_handler_events(const pmt::pmt_t &
{
try
{
int64_t message = pmt::to_long(std::move(msg));
int64_t message = pmt::to_long(msg);
rx_message = message;
}
catch (boost::bad_any_cast &e)