mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
		| @@ -17,8 +17,9 @@ | ||||
|  | ||||
| # - Try to find GFlags | ||||
| # | ||||
| # The following variables are optionally searched for defaults | ||||
| # GFlags_ROOT_DIR: Base directory where all GFlags components are found | ||||
| # The following CMake and environment variables are optionally searched | ||||
| # for defaults: | ||||
| # GFLAGS_ROOT: Base directory where all GFlags components are found | ||||
| # | ||||
| # The following are set after configuration is done: | ||||
| # GFlags_FOUND | ||||
| @@ -32,6 +33,8 @@ if(APPLE) | ||||
|       PATHS | ||||
|         /opt/local/lib | ||||
|         /usr/local/lib | ||||
|         ${GFLAGS_ROOT}/lib | ||||
|         $ENV{GFLAGS_ROOT}/lib | ||||
|     ) | ||||
| else() | ||||
|     find_path(GFlags_ROOT_DIR | ||||
| @@ -63,6 +66,10 @@ else() | ||||
|         /usr/lib/alpha-linux-gnu | ||||
|         /usr/lib64 | ||||
|         /usr/lib | ||||
|         ${GFLAGS_ROOT}/lib | ||||
|         $ENV{GFLAGS_ROOT}/lib | ||||
|         ${GFLAGS_ROOT}/lib64 | ||||
|         $ENV{GFLAGS_ROOT}/lib64 | ||||
|     ) | ||||
| endif() | ||||
|  | ||||
| @@ -75,6 +82,8 @@ if(GFlags_ROOT_DIR) | ||||
|         /usr/local/include | ||||
|         /usr/include | ||||
|         ${GFlags_ROOT_DIR}/src | ||||
|         ${GFLAGS_ROOT}/include | ||||
|         $ENV{GFLAGS_ROOT}/include | ||||
|     ) | ||||
|  | ||||
|     # Find the libraries | ||||
|   | ||||
| @@ -142,6 +142,8 @@ find_library(GFORTRAN NAMES gfortran | ||||
|         /usr/lib/gcc/powerpc64le-linux-gnu/8 | ||||
|         /usr/lib/gcc/s390x-linux-gnu/8 | ||||
|         /usr/lib/gcc/alpha-linux-gnu/8 | ||||
|         ${GFORTRAN_ROOT}/lib | ||||
|         $ENV{GFORTRAN_ROOT}/lib | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -68,6 +68,10 @@ macro(_FIND_GLOG_LIBRARIES _var) | ||||
|                 /usr/lib/alpha-linux-gnu | ||||
|                 /usr/lib64 | ||||
|                 /usr/lib | ||||
|                 ${GLOG_ROOT}/lib | ||||
|                 $ENV{GLOG_ROOT}/lib | ||||
|                 ${GLOG_ROOT}/lib64 | ||||
|                 $ENV{GLOG_ROOT}/lib64 | ||||
|           PATH_SUFFIXES lib | ||||
|       ) | ||||
|     mark_as_advanced(${_var}) | ||||
|   | ||||
| @@ -20,7 +20,10 @@ find_program(SW_GENERATOR_BIN gnss_sim | ||||
|           /usr/local/bin | ||||
|           /opt/local/bin | ||||
|           ${CMAKE_INSTALL_PREFIX}/bin | ||||
|     PATH_SUFFIXES bin) | ||||
|           ${GNSSSIMULATOR_ROOT}/bin | ||||
|           $ENV{GNSSSIMULATOR_ROOT}/bin | ||||
|     PATH_SUFFIXES bin | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
| find_package_handle_standard_args(GNSSSIMULATOR DEFAULT_MSG SW_GENERATOR_BIN) | ||||
|   | ||||
| @@ -65,8 +65,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) | ||||
|     set(PC_LIBDIR ${PC_GNURADIO_${EXTVAR}_LIBDIR}) | ||||
|  | ||||
|     # look for include files | ||||
|     find_path( | ||||
|         ${INCVAR_NAME} | ||||
|     find_path(${INCVAR_NAME} | ||||
|         NAMES ${INCFILE} | ||||
|         HINTS $ENV{GNURADIO_RUNTIME_DIR}/include | ||||
|               ${PC_INCDIR} | ||||
| @@ -75,18 +74,19 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) | ||||
|         PATHS /usr/local/include | ||||
|               /usr/include | ||||
|               ${GNURADIO_INSTALL_PREFIX}/include | ||||
|               ${GNURADIO_ROOT}/include | ||||
|               $ENV{GNURADIO_ROOT}/include | ||||
|     ) | ||||
|  | ||||
|     # look for libs | ||||
|     foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES}) | ||||
|         find_library( | ||||
|             ${LIBVAR_NAME}_${libname} | ||||
|         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/ | ||||
|                   ${CMAKE_INSTALL_PREFIX}/lib | ||||
|                   ${CMAKE_INSTALL_PREFIX}/lib64 | ||||
|                   ${GNURADIO_INSTALL_PREFIX}/lib | ||||
|                   ${GNURADIO_INSTALL_PREFIX}/lib64 | ||||
|             PATHS /usr/local/lib | ||||
|                   /usr/lib/x86_64-linux-gnu | ||||
| @@ -115,6 +115,10 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) | ||||
|                   /usr/lib64 | ||||
|                   /usr/lib | ||||
|                   ${GNURADIO_INSTALL_PREFIX}/lib | ||||
|                   ${GNURADIO_ROOT}/lib | ||||
|                   $ENV{GNURADIO_ROOT}/lib | ||||
|                   ${GNURADIO_ROOT}/lib64 | ||||
|                   $ENV{GNURADIO_ROOT}/lib64 | ||||
|         ) | ||||
|         list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}}) | ||||
|     endforeach() | ||||
| @@ -174,6 +178,8 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION) | ||||
|               PATHS /usr/local/include | ||||
|                     /usr/include | ||||
|                     ${GNURADIO_INSTALL_PREFIX}/include | ||||
|                     ${GNURADIO_ROOT}/include | ||||
|                     $ENV{GNURADIO_ROOT}/include | ||||
|               ) | ||||
|     if(GNURADIO_VERSION_GREATER_THAN_373) | ||||
|         set(PC_GNURADIO_RUNTIME_VERSION "3.7.4+") | ||||
| @@ -187,6 +193,8 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION) | ||||
|               PATHS /usr/local/include | ||||
|                     /usr/include | ||||
|                     ${GNURADIO_INSTALL_PREFIX}/include | ||||
|                     ${GNURADIO_ROOT}/include | ||||
|                     $ENV{GNURADIO_ROOT}/include | ||||
|               ) | ||||
|     if(GNURADIO_VERSION_GREATER_THAN_38) | ||||
|         set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+") | ||||
|   | ||||
| @@ -24,7 +24,7 @@ | ||||
| # Variables used by this module, they can change the default behaviour and need | ||||
| # to be set before calling find_package: | ||||
| # | ||||
| # Gperftools_ROOT_DIR Set this variable to the root installation of | ||||
| # GPERFTOOLS_ROOT Set this variable to the root installation of | ||||
| # Gperftools if the module has problems finding | ||||
| # the proper installation path. | ||||
| # | ||||
| @@ -36,19 +36,37 @@ | ||||
|  | ||||
| find_library(GPERFTOOLS_TCMALLOC | ||||
|   NAMES tcmalloc | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib) | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib64 | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| find_library(GPERFTOOLS_PROFILER | ||||
|   NAMES profiler | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib) | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib64 | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER | ||||
|   NAMES tcmalloc_and_profiler | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib) | ||||
|   HINTS ${Gperftools_ROOT_DIR}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib | ||||
|         ${GPERFTOOLS_ROOT}/lib64 | ||||
|         $ENV{GPERFTOOLS_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| find_path(GPERFTOOLS_INCLUDE_DIR | ||||
|   NAMES gperftools/heap-profiler.h | ||||
|   HINTS ${Gperftools_ROOT_DIR}/include) | ||||
|   HINTS ${Gperftools_ROOT_DIR}/include | ||||
|         ${GPERFTOOLS_ROOT}/include | ||||
|         $ENV{GPERFTOOLS_ROOT}/include | ||||
| ) | ||||
|  | ||||
| set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER}) | ||||
|  | ||||
|   | ||||
| @@ -25,13 +25,22 @@ | ||||
| find_path(GPSTK_INCLUDE_DIR gpstk/Rinex3ObsBase.hpp | ||||
|     HINTS /usr/include | ||||
|           /usr/local/include | ||||
|         /opt/local/include) | ||||
|           /opt/local/include | ||||
|           ${GPSTK_ROOT}/include | ||||
|           $ENV{GPSTK_ROOT}/include | ||||
| ) | ||||
|  | ||||
| set(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk) | ||||
|  | ||||
| find_library(GPSTK_LIBRARY NAMES ${GPSTK_NAMES} | ||||
|     HINTS /usr/lib | ||||
|           /usr/local/lib | ||||
|         /opt/local/lib) | ||||
|           /opt/local/lib | ||||
|           ${GPSTK_ROOT}/lib | ||||
|           $ENV{GPSTK_ROOT}/lib | ||||
|           ${GPSTK_ROOT}/lib64 | ||||
|           $ENV{GPSTK_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| # handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if | ||||
| # all listed variables are TRUE | ||||
|   | ||||
| @@ -30,6 +30,8 @@ find_path( | ||||
|     PATHS ${CMAKE_INSTALL_PREFIX}/include | ||||
|           /usr/include | ||||
|           /usr/local/include | ||||
|           ${GRDBFCTTC_ROOT}/include | ||||
|           $ENV{GRDBFCTTC_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
| @@ -43,6 +45,10 @@ find_library( | ||||
|           /usr/lib64 | ||||
|           /usr/local/lib | ||||
|           /usr/local/lib64 | ||||
|           ${GRDBFCTTC_ROOT}/lib | ||||
|           $ENV{GRDBFCTTC_ROOT}/lib | ||||
|           ${GRDBFCTTC_ROOT}/lib64 | ||||
|           $ENV{GRDBFCTTC_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -30,6 +30,8 @@ find_path( | ||||
|     PATHS ${CMAKE_INSTALL_PREFIX}/include | ||||
|           /usr/local/include | ||||
|           /usr/include | ||||
|           ${GRGN3S_ROOT}/include | ||||
|           $ENV{GRGN3S_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
| @@ -43,6 +45,10 @@ find_library( | ||||
|           /usr/local/lib64 | ||||
|           /usr/lib | ||||
|           /usr/lib64 | ||||
|           ${GRGN3S_ROOT}/lib | ||||
|           $ENV{GRGN3S_ROOT}/lib | ||||
|           ${GRGN3S_ROOT}/lib64 | ||||
|           $ENV{GRGN3S_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -18,18 +18,18 @@ | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(PC_IIO gnuradio-iio) | ||||
|  | ||||
| find_path( | ||||
|     IIO_INCLUDE_DIRS | ||||
| find_path(IIO_INCLUDE_DIRS | ||||
|     NAMES gnuradio/iio/api.h | ||||
|     HINTS $ENV{IIO_DIR}/include | ||||
|           ${PC_IIO_INCLUDEDIR} | ||||
|     PATHS ${CMAKE_INSTALL_PREFIX}/include | ||||
|           /usr/local/include | ||||
|           /usr/include | ||||
|           ${GRIIO_ROOT}/include | ||||
|           $ENV{GRIIO_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
|     IIO_LIBRARIES | ||||
| find_library(IIO_LIBRARIES | ||||
|     NAMES gnuradio-iio | ||||
|     HINTS $ENV{IIO_DIR}/lib | ||||
|           ${PC_IIO_LIBDIR} | ||||
| @@ -61,6 +61,10 @@ find_library( | ||||
|           /usr/lib/sparc64-linux-gnu | ||||
|           /usr/lib/x86_64-linux-gnux32 | ||||
|           /usr/lib/sh4-linux-gnu | ||||
|           ${GRIIO_ROOT}/lib | ||||
|           $ENV{GRIIO_ROOT}/lib | ||||
|           ${GRIIO_ROOT}/lib64 | ||||
|           $ENV{GRIIO_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -34,14 +34,20 @@ | ||||
| # GROSMOSDR_LIBRARIES The gr-osmosdr libraries (gnuradio-osmosdr) | ||||
| # GROSMOSDR_INCLUDE_DIR The location of gr-osmosdr headers | ||||
|  | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(GROSMOSDR_PKG gnuradio-osmosdr) | ||||
|  | ||||
| find_path(GROSMOSDR_INCLUDE_DIR | ||||
|   NAMES osmosdr/source.h | ||||
|   NAMES | ||||
|     osmosdr/source.h | ||||
|     osmosdr/api.h | ||||
|   PATHS | ||||
|     ${GROSMOSDR_PKG_INCLUDE_DIRS} | ||||
|     /usr/include | ||||
|     /usr/local/include | ||||
|     /opt/local/include | ||||
|     ${GROSMOSDR_ROOT}/include | ||||
|     $ENV{GROSMOSDR_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library(GROSMOSDR_LIBRARIES | ||||
| @@ -50,6 +56,7 @@ find_library(GROSMOSDR_LIBRARIES | ||||
|     ${GROSMOSDR_PKG_LIBRARY_DIRS} | ||||
|     /usr/lib | ||||
|     /usr/local/lib | ||||
|     /opt/local/lib | ||||
|     /usr/lib/x86_64-linux-gnu | ||||
|     /usr/lib/i386-linux-gnu | ||||
|     /usr/lib/arm-linux-gnueabihf | ||||
| @@ -74,6 +81,10 @@ find_library(GROSMOSDR_LIBRARIES | ||||
|     /usr/lib/x86_64-linux-gnux32 | ||||
|     /usr/lib/alpha-linux-gnu | ||||
|     /usr/lib64 | ||||
|     ${GROSMOSDR_ROOT}/lib | ||||
|     $ENV{GROSMOSDR_ROOT}/lib | ||||
|     ${GROSMOSDR_ROOT}/lib64 | ||||
|     $ENV{GROSMOSDR_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -27,6 +27,8 @@ find_path( | ||||
|           /usr/local/include | ||||
|           /usr/include | ||||
|           /opt/local/include | ||||
|           ${LIBIIO_ROOT}/include | ||||
|           $ENV{LIBIIO_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
| @@ -63,6 +65,10 @@ find_library( | ||||
|           /usr/lib/x86_64-linux-gnux32 | ||||
|           /usr/lib/sh4-linux-gnu | ||||
|           /Library/Frameworks/iio.framework/ | ||||
|           ${LIBIIO_ROOT}/lib | ||||
|           $ENV{LIBIIO_ROOT}/lib | ||||
|           ${LIBIIO_ROOT}/lib64 | ||||
|           $ENV{LIBIIO_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -28,12 +28,16 @@ | ||||
| # LIBOSMOSDR_LIBRARIES The libosmosdr libraries | ||||
| # LIBOSMOSDR_INCLUDE_DIR The location of libosmosdr headers | ||||
|  | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(LIBOSMOSDR_PKG libosmosdr) | ||||
|  | ||||
| find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h | ||||
|   PATHS | ||||
|     ${LIBOSMOSDR_PKG_INCLUDE_DIRS} | ||||
|     /usr/include | ||||
|     /usr/local/include | ||||
|     ${LIBOSMOSDR_ROOT}/include | ||||
|     $ENV{LIBOSMOSDR_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr | ||||
| @@ -65,7 +69,11 @@ find_library(LIBOSMOSDR_LIBRARIES NAMES osmosdr | ||||
|     /usr/lib/x86_64-linux-gnux32 | ||||
|     /usr/lib/alpha-linux-gnu | ||||
|     /usr/lib64 | ||||
|   ) | ||||
|     ${LIBOSMOSDR_ROOT}/lib | ||||
|     $ENV{LIBOSMOSDR_ROOT}/lib | ||||
|     ${LIBOSMOSDR_ROOT}/lib64 | ||||
|     $ENV{LIBOSMOSDR_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
| find_package_handle_standard_args(LIBOSMOSDR DEFAULT_MSG LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES) | ||||
|   | ||||
| @@ -32,6 +32,8 @@ find_path(LOG4CPP_INCLUDE_DIR log4cpp/Category.hh | ||||
|   /opt/local/include | ||||
|   /usr/local/include | ||||
|   /usr/include | ||||
|   ${LOG4CPP_ROOT}/include | ||||
|   $ENV{LOG4CPP_ROOT}/include | ||||
| ) | ||||
|  | ||||
| set(LOG4CPP_NAMES log4cpp) | ||||
| @@ -68,6 +70,10 @@ find_library(LOG4CPP_LIBRARY | ||||
|         /usr/lib | ||||
|         /usr/local/lib | ||||
|         /opt/local/lib | ||||
|         ${LOG4CPP_ROOT}/lib | ||||
|         $ENV{LOG4CPP_ROOT}/lib | ||||
|         ${LOG4CPP_ROOT}/lib64 | ||||
|         $ENV{LOG4CPP_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY) | ||||
|   | ||||
| @@ -60,10 +60,24 @@ | ||||
| # | ||||
|  | ||||
| # Look for the header file. | ||||
| find_path(MATIO_INCLUDE_DIR NAMES matio.h DOC "The MATIO include directory") | ||||
| find_path(MATIO_INCLUDE_DIR | ||||
|     NAMES matio.h | ||||
|     HINTS | ||||
|       ${MATIO_ROOT}/include | ||||
|       $ENV{MATIO_ROOT}/include | ||||
|     DOC "The MATIO include directory" | ||||
| ) | ||||
|  | ||||
| # Look for the library. | ||||
| find_library(MATIO_LIBRARY NAMES matio DOC "The MATIO library") | ||||
| find_library(MATIO_LIBRARY | ||||
|     NAMES matio | ||||
|     HINTS | ||||
|       ${MATIO_ROOT}/lib | ||||
|       $ENV{MATIO_ROOT}/lib | ||||
|       ${MATIO_ROOT}/lib64 | ||||
|       $ENV{MATIO_ROOT}/lib64 | ||||
|     DOC "The MATIO library" | ||||
| ) | ||||
|  | ||||
| if(MATIO_INCLUDE_DIR) | ||||
|     # --------------------------------------------------- | ||||
|   | ||||
| @@ -20,7 +20,8 @@ | ||||
| # The following environment variable is optionally searched | ||||
| # OPENBLAS_HOME: Base directory where all OpenBlas components are found | ||||
|  | ||||
| set(OPEN_BLAS_SEARCH_PATHS  /lib/ | ||||
| set(OPEN_BLAS_SEARCH_PATHS | ||||
|     /lib | ||||
|     /lib64/ | ||||
|     /usr/lib | ||||
|     /usr/lib64 | ||||
| @@ -30,7 +31,11 @@ set(OPEN_BLAS_SEARCH_PATHS  /lib/ | ||||
|     /opt/local/lib | ||||
|     /usr/lib/openblas-base | ||||
|     $ENV{OPENBLAS_HOME}/lib | ||||
|                             ) | ||||
|     ${OPENBLAS_ROOT}/lib | ||||
|     $ENV{OPENBLAS_ROOT}/lib | ||||
|     ${OPENBLAS_ROOT}/lib64 | ||||
|     $ENV{OPENBLAS_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| find_library(OPENBLAS NAMES openblas PATHS ${OPEN_BLAS_SEARCH_PATHS}) | ||||
|  | ||||
|   | ||||
| @@ -20,14 +20,19 @@ pkg_check_modules(PC_ORC "orc-0.4 > 0.4.22") | ||||
|  | ||||
| find_program(ORCC_EXECUTABLE orcc | ||||
|     HINTS ${PC_ORC_TOOLSDIR} | ||||
|     PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin) | ||||
|     PATHS ${ORC_ROOT}/bin | ||||
|           ${CMAKE_INSTALL_PREFIX}/bin | ||||
| ) | ||||
|  | ||||
| find_path(ORC_INCLUDE_DIR NAMES orc/orc.h | ||||
| find_path(ORC_INCLUDE_DIR | ||||
|     NAMES orc/orc.h | ||||
|     HINTS ${PC_ORC_INCLUDEDIR} | ||||
|     PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4) | ||||
|     PATHS ${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} | ||||
| find_path(ORC_LIBRARY_DIR | ||||
|     NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX} | ||||
|     HINTS ${PC_ORC_LIBDIR} | ||||
|           /usr/local/lib | ||||
|           /usr/lib/x86_64-linux-gnu | ||||
| @@ -45,16 +50,20 @@ find_path(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHA | ||||
|           /usr/lib/s390x-linux-gnu | ||||
|           /usr/lib64 | ||||
|           /usr/lib | ||||
|     PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) | ||||
|           ${ORC_ROOT}/lib | ||||
|           $ENV{ORC_ROOT}/lib | ||||
|     PATHS | ||||
|           ${ORC_ROOT}/lib${LIB_SUFFIX} | ||||
|           ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} | ||||
| ) | ||||
|  | ||||
| find_library(ORC_LIB orc-0.4 | ||||
|     HINTS ${PC_ORC_LIBRARY_DIRS} | ||||
|     PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) | ||||
|  | ||||
| list(APPEND ORC_LIBRARY | ||||
|     ${ORC_LIB} | ||||
|     PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} | ||||
|           ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} | ||||
| ) | ||||
|  | ||||
| list(APPEND ORC_LIBRARY ${ORC_LIB}) | ||||
|  | ||||
| set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR}) | ||||
| set(ORC_LIBRARIES ${ORC_LIBRARY}) | ||||
|   | ||||
| @@ -52,6 +52,8 @@ if(EXISTS $ENV{PCAPDIR}) | ||||
|       pcap.h | ||||
|     PATHS | ||||
|       $ENV{PCAPDIR} | ||||
|       ${PCAP_ROOT}/include | ||||
|       $ENV{PCAP_ROOT}/include | ||||
|     NO_DEFAULT_PATH | ||||
|   ) | ||||
|   find_library(PCAP_LIBRARY | ||||
| @@ -59,6 +61,8 @@ if(EXISTS $ENV{PCAPDIR}) | ||||
|       pcap | ||||
|     PATHS | ||||
|       $ENV{PCAPDIR} | ||||
|       ${PCAP_ROOT}/lib | ||||
|       $ENV{PCAP_ROOT}/lib | ||||
|     NO_DEFAULT_PATH | ||||
|   ) | ||||
| else() | ||||
| @@ -66,11 +70,16 @@ else() | ||||
|     NAMES | ||||
|       pcap/pcap.h | ||||
|       pcap.h | ||||
|     HINTS | ||||
|       ${PCAP_ROOT}/include | ||||
|       $ENV{PCAP_ROOT}/include | ||||
|   ) | ||||
|  | ||||
|   find_library(PCAP_LIBRARY | ||||
|     NAMES | ||||
|       pcap | ||||
|     HINTS | ||||
|       ${PCAP_ROOT}/lib | ||||
|       $ENV{PCAP_ROOT}/lib | ||||
|   ) | ||||
| endif() | ||||
|  | ||||
|   | ||||
| @@ -28,7 +28,10 @@ find_path(PUGIXML_INCLUDE_DIR | ||||
|     PATHS ${PUGIXML_HOME}/include | ||||
|           /usr/include | ||||
|           /usr/local/include | ||||
|         /opt/local/include) | ||||
|           /opt/local/include | ||||
|           ${PUGIXML_ROOT}/include | ||||
|           $ENV{PUGIXML_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library(PUGIXML_LIBRARY | ||||
|     NAMES pugixml | ||||
| @@ -47,7 +50,12 @@ find_library(PUGIXML_LIBRARY | ||||
|           /opt/local/lib | ||||
|           /usr/lib | ||||
|           /usr/lib64 | ||||
|         /usr/local/lib64) | ||||
|           /usr/local/lib64 | ||||
|           ${PUGIXML_ROOT}/lib | ||||
|           $ENV{PUGIXML_ROOT}/lib | ||||
|           ${PUGIXML_ROOT}/lib64 | ||||
|           $ENV{PUGIXML_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| # Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found. | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -18,18 +18,18 @@ | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(PC_TELEORBIT teleorbit) | ||||
|  | ||||
| find_path( | ||||
|     TELEORBIT_INCLUDE_DIRS | ||||
| 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 | ||||
|           ${TELEORBIT_ROOT}/include | ||||
|           $ENV{TELEORBIT_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
|     TELEORBIT_LIBRARIES | ||||
| find_library(TELEORBIT_LIBRARIES | ||||
|     NAMES gnuradio-teleorbit | ||||
|     HINTS $ENV{TELEORBIT_DIR}/lib | ||||
|           ${PC_TELEORBIT_LIBDIR} | ||||
| @@ -39,6 +39,10 @@ find_library( | ||||
|           /usr/local/lib64 | ||||
|           /usr/lib | ||||
|           /usr/lib64 | ||||
|           ${TELEORBIT_ROOT}/lib | ||||
|           $ENV{TELEORBIT_ROOT}/lib | ||||
|           ${TELEORBIT_ROOT}/lib64 | ||||
|           $ENV{TELEORBIT_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -22,18 +22,18 @@ | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(PC_UHD uhd) | ||||
|  | ||||
| find_path( | ||||
|     UHD_INCLUDE_DIRS | ||||
| find_path(UHD_INCLUDE_DIRS | ||||
|     NAMES uhd/config.hpp | ||||
|     HINTS $ENV{UHD_DIR}/include | ||||
|           ${PC_UHD_INCLUDEDIR} | ||||
|     PATHS /usr/local/include | ||||
|           /usr/include | ||||
|           ${GNURADIO_INSTALL_PREFIX}/include | ||||
|           ${UHD_ROOT}/include | ||||
|           $ENV{UHD_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
|     UHD_LIBRARIES | ||||
| find_library(UHD_LIBRARIES | ||||
|     NAMES uhd | ||||
|     HINTS $ENV{UHD_DIR}/lib | ||||
|           ${PC_UHD_LIBDIR} | ||||
| @@ -64,6 +64,10 @@ find_library( | ||||
|           /usr/lib64 | ||||
|           /usr/lib | ||||
|           ${GNURADIO_INSTALL_PREFIX}/lib | ||||
|           ${UHD_ROOT}/lib | ||||
|           $ENV{UHD_ROOT}/lib | ||||
|           ${UHD_ROOT}/lib64 | ||||
|           $ENV{UHD_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -22,18 +22,18 @@ | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(PC_VOLK volk) | ||||
|  | ||||
| find_path( | ||||
|     VOLK_INCLUDE_DIRS | ||||
| find_path(VOLK_INCLUDE_DIRS | ||||
|     NAMES volk/volk.h | ||||
|     HINTS $ENV{VOLK_DIR}/include | ||||
|           ${PC_VOLK_INCLUDEDIR} | ||||
|     PATHS /usr/local/include | ||||
|           /usr/include | ||||
|           ${CMAKE_INSTALL_PREFIX}/include | ||||
|           ${VOLK_ROOT}/include | ||||
|           $ENV{VOLK_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
|     VOLK_LIBRARIES | ||||
| find_library(VOLK_LIBRARIES | ||||
|     NAMES volk | ||||
|     HINTS $ENV{VOLK_DIR}/lib | ||||
|           ${PC_VOLK_LIBDIR} | ||||
| @@ -65,6 +65,10 @@ find_library( | ||||
|           /usr/lib/alpha-linux-gnu | ||||
|           /usr/lib64 | ||||
|           ${CMAKE_INSTALL_PREFIX}/lib | ||||
|           ${VOLK_ROOT}/lib | ||||
|           $ENV{VOLK_ROOT}/lib | ||||
|           ${VOLK_ROOT}/lib64 | ||||
|           $ENV{VOLK_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -22,18 +22,18 @@ | ||||
| include(FindPkgConfig) | ||||
| pkg_check_modules(PC_VOLK_GNSSSDR volk_gnsssdr) | ||||
|  | ||||
| find_path( | ||||
|     VOLK_GNSSSDR_INCLUDE_DIRS | ||||
| 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 | ||||
|           ${GNURADIO_INSTALL_PREFIX}/include | ||||
|           ${VOLKGNSSSDR_ROOT}/include | ||||
|           $ENV{VOLKGNSSSDR_ROOT}/include | ||||
| ) | ||||
|  | ||||
| find_library( | ||||
|     VOLK_GNSSSDR_LIBRARIES | ||||
| find_library(VOLK_GNSSSDR_LIBRARIES | ||||
|     NAMES volk_gnsssdr | ||||
|     HINTS $ENV{VOLK_GNSSSDR_DIR}/lib | ||||
|           ${PC_VOLK_GNSSSDR_LIBDIR} | ||||
| @@ -42,6 +42,10 @@ find_library( | ||||
|           /usr/lib | ||||
|           /usr/lib64 | ||||
|           ${GNURADIO_INSTALL_PREFIX}/lib | ||||
|           ${VOLKGNSSSDR_ROOT}/lib | ||||
|           $ENV{VOLKGNSSSDR_ROOT}/lib | ||||
|           ${VOLKGNSSSDR_ROOT}/lib64 | ||||
|           $ENV{VOLKGNSSSDR_ROOT}/lib64 | ||||
| ) | ||||
|  | ||||
| include(FindPackageHandleStandardArgs) | ||||
|   | ||||
| @@ -18,20 +18,20 @@ | ||||
| ########################################################## | ||||
| # Toolchain file for Open Embedded | ||||
| ########################################################## | ||||
| set( CMAKE_SYSTEM_NAME Linux ) | ||||
| set(CMAKE_SYSTEM_NAME Linux) | ||||
|  | ||||
| string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT}) | ||||
| string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) | ||||
|  | ||||
| set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE ) | ||||
| set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) #same flags for C sources | ||||
| set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) #same flags for C sources | ||||
| set( CMAKE_LIBRARY_PATH $ENV{OECORE_TARGET_SYSROOT}/usr/lib ) | ||||
| set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE) | ||||
| set(CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE) # same flags for C sources | ||||
| set(CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE) # same flags for C sources | ||||
| set(CMAKE_LIBRARY_PATH $ENV{OECORE_TARGET_SYSROOT}/usr/lib) | ||||
|  | ||||
| set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) | ||||
| set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) | ||||
| set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) | ||||
| set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) | ||||
| set(CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT}) | ||||
| set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||||
| set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||||
| set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||||
|  | ||||
| set ( ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4 ) | ||||
| set ( ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib ) | ||||
| set(ORC_INCLUDE_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/include/orc-0.4) | ||||
| set(ORC_LIBRARY_DIRS $ENV{OECORE_TARGET_SYSROOT}/usr/lib) | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
|  | ||||
| if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||||
|   message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||||
| endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||||
| endif() | ||||
|  | ||||
| file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) | ||||
| string(REGEX REPLACE "\n" ";" files "${files}") | ||||
| @@ -31,8 +31,8 @@ foreach(file ${files}) | ||||
|     ) | ||||
|     if(NOT "${rm_retval}" STREQUAL 0) | ||||
|       message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") | ||||
|     endif(NOT "${rm_retval}" STREQUAL 0) | ||||
|   else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") | ||||
|     endif() | ||||
|   else() | ||||
|     message(STATUS "File $ENV{DESTDIR}${file} does not exist.") | ||||
|   endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") | ||||
| endforeach(file) | ||||
|   endif() | ||||
| endforeach() | ||||
|   | ||||
| @@ -49,30 +49,10 @@ namespace bc = boost::integer; | ||||
| using google::LogMessage; | ||||
|  | ||||
|  | ||||
| bool RtklibPvt::get_latest_PVT(double* longitude_deg, | ||||
|     double* latitude_deg, | ||||
|     double* height_m, | ||||
|     double* ground_speed_kmh, | ||||
|     double* course_over_ground_deg, | ||||
|     time_t* UTC_time) | ||||
| { | ||||
|     return pvt_->get_latest_PVT(longitude_deg, | ||||
|         latitude_deg, | ||||
|         height_m, | ||||
|         ground_speed_kmh, | ||||
|         course_over_ground_deg, | ||||
|         UTC_time); | ||||
| } | ||||
|  | ||||
| void RtklibPvt::clear_ephemeris() | ||||
| { | ||||
|     pvt_->clear_ephemeris(); | ||||
| } | ||||
|  | ||||
| RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     std::string role, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|     unsigned int out_streams) : role_(std::move(role)), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
| @@ -100,27 +80,27 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|  | ||||
|     // RINEX version | ||||
|     pvt_output_parameters.rinex_version = configuration->property(role + ".rinex_version", 3); | ||||
|     if (FLAGS_RINEX_version.compare("3.01") == 0) | ||||
|     if (FLAGS_RINEX_version == "3.01") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 3; | ||||
|         } | ||||
|     else if (FLAGS_RINEX_version.compare("3.02") == 0) | ||||
|     else if (FLAGS_RINEX_version == "3.02") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 3; | ||||
|         } | ||||
|     else if (FLAGS_RINEX_version.compare("3") == 0) | ||||
|     else if (FLAGS_RINEX_version == "3") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 3; | ||||
|         } | ||||
|     else if (FLAGS_RINEX_version.compare("2.11") == 0) | ||||
|     else if (FLAGS_RINEX_version == "2.11") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 2; | ||||
|         } | ||||
|     else if (FLAGS_RINEX_version.compare("2.10") == 0) | ||||
|     else if (FLAGS_RINEX_version == "2.10") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 2; | ||||
|         } | ||||
|     else if (FLAGS_RINEX_version.compare("2") == 0) | ||||
|     else if (FLAGS_RINEX_version == "2") | ||||
|         { | ||||
|             pvt_output_parameters.rinex_version = 2; | ||||
|         } | ||||
| @@ -240,11 +220,11 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     int positioning_mode = -1; | ||||
|     std::string default_pos_mode("Single"); | ||||
|     std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode);  //  (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h | ||||
|     if (positioning_mode_str.compare("Single") == 0) positioning_mode = PMODE_SINGLE; | ||||
|     if (positioning_mode_str.compare("Static") == 0) positioning_mode = PMODE_STATIC; | ||||
|     if (positioning_mode_str.compare("Kinematic") == 0) positioning_mode = PMODE_KINEMA; | ||||
|     if (positioning_mode_str.compare("PPP_Static") == 0) positioning_mode = PMODE_PPP_STATIC; | ||||
|     if (positioning_mode_str.compare("PPP_Kinematic") == 0) positioning_mode = PMODE_PPP_KINEMA; | ||||
|     if (positioning_mode_str == "Single") positioning_mode = PMODE_SINGLE; | ||||
|     if (positioning_mode_str == "Static") positioning_mode = PMODE_STATIC; | ||||
|     if (positioning_mode_str == "Kinematic") positioning_mode = PMODE_KINEMA; | ||||
|     if (positioning_mode_str == "PPP_Static") positioning_mode = PMODE_PPP_STATIC; | ||||
|     if (positioning_mode_str == "PPP_Kinematic") positioning_mode = PMODE_PPP_KINEMA; | ||||
|  | ||||
|     if (positioning_mode == -1) | ||||
|         { | ||||
| @@ -289,12 +269,12 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     std::string default_iono_model("OFF"); | ||||
|     std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /*  (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     int iono_model = -1; | ||||
|     if (iono_model_str.compare("OFF") == 0) iono_model = IONOOPT_OFF; | ||||
|     if (iono_model_str.compare("Broadcast") == 0) iono_model = IONOOPT_BRDC; | ||||
|     if (iono_model_str.compare("SBAS") == 0) iono_model = IONOOPT_SBAS; | ||||
|     if (iono_model_str.compare("Iono-Free-LC") == 0) iono_model = IONOOPT_IFLC; | ||||
|     if (iono_model_str.compare("Estimate_STEC") == 0) iono_model = IONOOPT_EST; | ||||
|     if (iono_model_str.compare("IONEX") == 0) iono_model = IONOOPT_TEC; | ||||
|     if (iono_model_str == "OFF") iono_model = IONOOPT_OFF; | ||||
|     if (iono_model_str == "Broadcast") iono_model = IONOOPT_BRDC; | ||||
|     if (iono_model_str == "SBAS") iono_model = IONOOPT_SBAS; | ||||
|     if (iono_model_str == "Iono-Free-LC") iono_model = IONOOPT_IFLC; | ||||
|     if (iono_model_str == "Estimate_STEC") iono_model = IONOOPT_EST; | ||||
|     if (iono_model_str == "IONEX") iono_model = IONOOPT_TEC; | ||||
|     if (iono_model == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
| @@ -308,11 +288,11 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     std::string default_trop_model("OFF"); | ||||
|     int trop_model = -1; | ||||
|     std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /*  (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */ | ||||
|     if (trop_model_str.compare("OFF") == 0) trop_model = TROPOPT_OFF; | ||||
|     if (trop_model_str.compare("Saastamoinen") == 0) trop_model = TROPOPT_SAAS; | ||||
|     if (trop_model_str.compare("SBAS") == 0) trop_model = TROPOPT_SBAS; | ||||
|     if (trop_model_str.compare("Estimate_ZTD") == 0) trop_model = TROPOPT_EST; | ||||
|     if (trop_model_str.compare("Estimate_ZTD_Grad") == 0) trop_model = TROPOPT_ESTG; | ||||
|     if (trop_model_str == "OFF") trop_model = TROPOPT_OFF; | ||||
|     if (trop_model_str == "Saastamoinen") trop_model = TROPOPT_SAAS; | ||||
|     if (trop_model_str == "SBAS") trop_model = TROPOPT_SBAS; | ||||
|     if (trop_model_str == "Estimate_ZTD") trop_model = TROPOPT_EST; | ||||
|     if (trop_model_str == "Estimate_ZTD_Grad") trop_model = TROPOPT_ESTG; | ||||
|     if (trop_model == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
| @@ -357,11 +337,11 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     std::string default_gps_ar("Continuous"); | ||||
|     std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */ | ||||
|     int integer_ambiguity_resolution_gps = -1; | ||||
|     if (integer_ambiguity_resolution_gps_str.compare("OFF") == 0) integer_ambiguity_resolution_gps = ARMODE_OFF; | ||||
|     if (integer_ambiguity_resolution_gps_str.compare("Continuous") == 0) integer_ambiguity_resolution_gps = ARMODE_CONT; | ||||
|     if (integer_ambiguity_resolution_gps_str.compare("Instantaneous") == 0) integer_ambiguity_resolution_gps = ARMODE_INST; | ||||
|     if (integer_ambiguity_resolution_gps_str.compare("Fix-and-Hold") == 0) integer_ambiguity_resolution_gps = ARMODE_FIXHOLD; | ||||
|     if (integer_ambiguity_resolution_gps_str.compare("PPP-AR") == 0) integer_ambiguity_resolution_gps = ARMODE_PPPAR; | ||||
|     if (integer_ambiguity_resolution_gps_str == "OFF") integer_ambiguity_resolution_gps = ARMODE_OFF; | ||||
|     if (integer_ambiguity_resolution_gps_str == "Continuous") integer_ambiguity_resolution_gps = ARMODE_CONT; | ||||
|     if (integer_ambiguity_resolution_gps_str == "Instantaneous") integer_ambiguity_resolution_gps = ARMODE_INST; | ||||
|     if (integer_ambiguity_resolution_gps_str == "Fix-and-Hold") integer_ambiguity_resolution_gps = ARMODE_FIXHOLD; | ||||
|     if (integer_ambiguity_resolution_gps_str == "PPP-AR") integer_ambiguity_resolution_gps = ARMODE_PPPAR; | ||||
|     if (integer_ambiguity_resolution_gps == -1) | ||||
|         { | ||||
|             //warn user and set the default | ||||
| @@ -391,7 +371,7 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, | ||||
|     double min_ratio_to_fix_ambiguity = configuration->property(role + ".min_ratio_to_fix_ambiguity", 3.0); /* Set the integer ambiguity validation threshold for ratio‐test, | ||||
|                                                                                                                which uses the ratio of squared residuals of the best integer vector to the second‐best vector. */ | ||||
|  | ||||
|     int min_lock_to_fix_ambiguity = configuration->property(role + ".min_lock_to_fix_ambiguity", 0); /* Set the minimum lock count to fix integer ambiguity. | ||||
|     int min_lock_to_fix_ambiguity = configuration->property(role + ".min_lock_to_fix_ambiguity", 0); /* Set the minimum lock count to fix integer ambiguity.FLAGS_RINEX_version. | ||||
|                                                                                                          If the lock count is less than the value, the ambiguity is excluded from the fixed integer vector. */ | ||||
|  | ||||
|     double min_elevation_to_fix_ambiguity = configuration->property(role + ".min_elevation_to_fix_ambiguity", 0.0); /* Set the minimum elevation (deg) to fix integer ambiguity. | ||||
| @@ -537,6 +517,28 @@ RtklibPvt::~RtklibPvt() | ||||
| } | ||||
|  | ||||
|  | ||||
| bool RtklibPvt::get_latest_PVT(double* longitude_deg, | ||||
|     double* latitude_deg, | ||||
|     double* height_m, | ||||
|     double* ground_speed_kmh, | ||||
|     double* course_over_ground_deg, | ||||
|     time_t* UTC_time) | ||||
| { | ||||
|     return pvt_->get_latest_PVT(longitude_deg, | ||||
|         latitude_deg, | ||||
|         height_m, | ||||
|         ground_speed_kmh, | ||||
|         course_over_ground_deg, | ||||
|         UTC_time); | ||||
| } | ||||
|  | ||||
|  | ||||
| void RtklibPvt::clear_ephemeris() | ||||
| { | ||||
|     pvt_->clear_ephemeris(); | ||||
| } | ||||
|  | ||||
|  | ||||
| std::map<int, Gps_Ephemeris> RtklibPvt::get_gps_ephemeris() const | ||||
| { | ||||
|     return pvt_->get_gps_ephemeris_map(); | ||||
|   | ||||
| @@ -46,7 +46,7 @@ class RtklibPvt : public PvtInterface | ||||
| { | ||||
| public: | ||||
|     RtklibPvt(ConfigurationInterface* configuration, | ||||
|         std::string role, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|   | ||||
| @@ -29,11 +29,11 @@ | ||||
|  */ | ||||
|  | ||||
| #include "rtklib_pvt_cc.h" | ||||
| #include "display.h" | ||||
| #include "galileo_almanac.h" | ||||
| #include "galileo_almanac_helper.h" | ||||
| #include "pvt_conf.h" | ||||
| #include "display.h" | ||||
| #include "gnss_sdr_create_directory.h" | ||||
| #include "pvt_conf.h" | ||||
| #include <boost/archive/xml_oarchive.hpp> | ||||
| #include <boost/archive/xml_iarchive.hpp> | ||||
| #include <boost/exception/all.hpp> | ||||
| @@ -59,7 +59,7 @@ using google::LogMessage; | ||||
|  | ||||
| rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, | ||||
|     const Pvt_Conf& conf_, | ||||
|     rtk_t& rtk) | ||||
|     const rtk_t& rtk) | ||||
| { | ||||
|     return rtklib_pvt_cc_sptr(new rtklib_pvt_cc(nchannels, | ||||
|         conf_, | ||||
| @@ -268,7 +268,7 @@ void rtklib_pvt_cc::clear_ephemeris() | ||||
|  | ||||
| rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, | ||||
|     const Pvt_Conf& conf_, | ||||
|     rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", | ||||
|     const rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc", | ||||
|                             gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), | ||||
|                             gr::io_signature::make(0, 0, 0)) | ||||
| { | ||||
| @@ -492,7 +492,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels, | ||||
|                 { | ||||
|                     xml_base_path = p.string(); | ||||
|                 } | ||||
|             if (xml_base_path.compare(".") != 0) | ||||
|             if (xml_base_path != ".") | ||||
|                 { | ||||
|                     std::cout << "XML files will be stored at " << xml_base_path << std::endl; | ||||
|                 } | ||||
| @@ -858,7 +858,7 @@ bool rtklib_pvt_cc::send_sys_v_ttff_msg(ttff_msgbuf ttff) | ||||
| } | ||||
|  | ||||
|  | ||||
| bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string file_name) | ||||
| bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string& file_name) | ||||
| { | ||||
|     if (gnss_observables_map.empty() == false) | ||||
|         { | ||||
| @@ -885,7 +885,7 @@ bool rtklib_pvt_cc::save_gnss_synchro_map_xml(const std::string file_name) | ||||
| } | ||||
|  | ||||
|  | ||||
| bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string file_name) | ||||
| bool rtklib_pvt_cc::load_gnss_synchro_map_xml(const std::string& file_name) | ||||
| { | ||||
|     // load from xml (boost serialize) | ||||
|     std::ifstream ifs; | ||||
| @@ -959,7 +959,13 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                             std::map<int, Galileo_Ephemeris>::const_iterator tmp_eph_iter_gal = d_pvt_solver->galileo_ephemeris_map.find(in[i][epoch].PRN); | ||||
|                             std::map<int, Gps_CNAV_Ephemeris>::const_iterator tmp_eph_iter_cnav = d_pvt_solver->gps_cnav_ephemeris_map.find(in[i][epoch].PRN); | ||||
|                             std::map<int, Glonass_Gnav_Ephemeris>::const_iterator tmp_eph_iter_glo_gnav = d_pvt_solver->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN); | ||||
|                             if (((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("1C") == 0)) or ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("2S") == 0)) or ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("1B") == 0)) or ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("5X") == 0)) or ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("1G") == 0)) or ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("2G") == 0)) or ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal).compare("L5") == 0))) | ||||
|                             if (((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1C")) or | ||||
|                                 ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "2S")) or | ||||
|                                 ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1B")) or | ||||
|                                 ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "5X")) or | ||||
|                                 ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "1G")) or | ||||
|                                 ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "2G")) or | ||||
|                                 ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) and (std::string(in[i][epoch].Signal) == "L5"))) | ||||
|                                 { | ||||
|                                     // store valid observables in a map. | ||||
|                                     gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch])); | ||||
| @@ -1893,7 +1899,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -1905,7 +1911,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) | ||||
| @@ -2013,7 +2019,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2025,7 +2031,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2073,7 +2079,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2085,7 +2091,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2132,7 +2138,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2144,7 +2150,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2191,7 +2197,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2203,7 +2209,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2250,7 +2256,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2262,7 +2268,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (gps_eph_iter != d_pvt_solver->gps_ephemeris_map.cend()) | ||||
| @@ -2395,7 +2401,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2407,7 +2413,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) | ||||
| @@ -2513,7 +2519,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2525,7 +2531,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2573,7 +2579,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2585,7 +2591,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2633,7 +2639,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2645,7 +2651,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2694,7 +2700,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2706,7 +2712,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (glo_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("R") == 0) | ||||
|                                                                                     if (system == "R") | ||||
|                                                                                         { | ||||
|                                                                                             glonass_gnav_eph_iter = d_pvt_solver->glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (glonass_gnav_eph_iter != d_pvt_solver->glonass_gnav_ephemeris_map.cend()) | ||||
| @@ -2754,7 +2760,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                             std::string system(&gnss_observables_iter->second.System, 1); | ||||
|                                                                             if (gps_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("G") == 0) | ||||
|                                                                                     if (system == "G") | ||||
|                                                                                         { | ||||
|                                                                                             // This is a channel with valid GPS signal | ||||
|                                                                                             gps_eph_iter = d_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -2766,7 +2772,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item | ||||
|                                                                                 } | ||||
|                                                                             if (gal_channel == 0) | ||||
|                                                                                 { | ||||
|                                                                                     if (system.compare("E") == 0) | ||||
|                                                                                     if (system == "E") | ||||
|                                                                                         { | ||||
|                                                                                             gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                                                                             if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) | ||||
|   | ||||
| @@ -59,7 +59,7 @@ typedef boost::shared_ptr<rtklib_pvt_cc> rtklib_pvt_cc_sptr; | ||||
|  | ||||
| rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t n_channels, | ||||
|     const Pvt_Conf& conf_, | ||||
|     rtk_t& rtk); | ||||
|     const rtk_t& rtk); | ||||
|  | ||||
| /*! | ||||
|  * \brief This class implements a block that computes the PVT solution using the RTKLIB integrated library | ||||
| @@ -69,7 +69,7 @@ class rtklib_pvt_cc : public gr::sync_block | ||||
| private: | ||||
|     friend rtklib_pvt_cc_sptr rtklib_make_pvt_cc(uint32_t nchannels, | ||||
|         const Pvt_Conf& conf_, | ||||
|         rtk_t& rtk); | ||||
|         const rtk_t& rtk); | ||||
|  | ||||
|     void msg_handler_telemetry(pmt::pmt_t msg); | ||||
|  | ||||
| @@ -131,9 +131,9 @@ private: | ||||
|     bool send_sys_v_ttff_msg(ttff_msgbuf ttff); | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|  | ||||
|     bool save_gnss_synchro_map_xml(const std::string file_name);  //debug helper function | ||||
|     bool save_gnss_synchro_map_xml(const std::string& file_name);  //debug helper function | ||||
|  | ||||
|     bool load_gnss_synchro_map_xml(const std::string file_name);  //debug helper function | ||||
|     bool load_gnss_synchro_map_xml(const std::string& file_name);  //debug helper function | ||||
|  | ||||
|     bool d_xml_storage; | ||||
|     std::string xml_base_path; | ||||
| @@ -147,7 +147,7 @@ private: | ||||
| public: | ||||
|     rtklib_pvt_cc(uint32_t nchannels, | ||||
|         const Pvt_Conf& conf_, | ||||
|         rtk_t& rtk); | ||||
|         const rtk_t& rtk); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Get latest set of ephemeris from PVT block | ||||
|   | ||||
| @@ -68,7 +68,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path) | ||||
|         { | ||||
|             geojson_base_path = p.string(); | ||||
|         } | ||||
|     if (geojson_base_path.compare(".") != 0) | ||||
|     if (geojson_base_path != ".") | ||||
|         { | ||||
|             std::cout << "GeoJSON files will be stored at " << geojson_base_path << std::endl; | ||||
|         } | ||||
| @@ -83,7 +83,7 @@ GeoJSON_Printer::~GeoJSON_Printer() | ||||
| } | ||||
|  | ||||
|  | ||||
| bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
| bool GeoJSON_Printer::set_headers(const std::string& filename, bool time_tag_name) | ||||
| { | ||||
|     boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); | ||||
|     tm timeinfo = boost::posix_time::to_tm(pt); | ||||
| @@ -140,7 +140,7 @@ bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
|             DLOG(INFO) << "GeoJSON printer writing on " << filename.c_str(); | ||||
|  | ||||
|             // Set iostream numeric format and precision | ||||
|             geojson_file.setf(geojson_file.fixed, geojson_file.floatfield); | ||||
|             geojson_file.setf(geojson_file.std::ofstream::fixed, geojson_file.std::ofstream::floatfield); | ||||
|             geojson_file << std::setprecision(14); | ||||
|  | ||||
|             // Writing the header | ||||
| @@ -171,7 +171,7 @@ bool GeoJSON_Printer::print_position(const std::shared_ptr<Pvt_Solution>& positi | ||||
|     double longitude; | ||||
|     double height; | ||||
|  | ||||
|     std::shared_ptr<Pvt_Solution> position_ = position; | ||||
|     const std::shared_ptr<Pvt_Solution>& position_ = position; | ||||
|  | ||||
|     if (print_average_values == false) | ||||
|         { | ||||
|   | ||||
| @@ -55,7 +55,7 @@ private: | ||||
| public: | ||||
|     GeoJSON_Printer(const std::string& base_path = "."); | ||||
|     ~GeoJSON_Printer(); | ||||
|     bool set_headers(std::string filename, bool time_tag_name = true); | ||||
|     bool set_headers(const std::string& filename, bool time_tag_name = true); | ||||
|     bool print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values); | ||||
|     bool close_file(); | ||||
| }; | ||||
|   | ||||
| @@ -70,7 +70,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path) | ||||
|         { | ||||
|             gpx_base_path = p.string(); | ||||
|         } | ||||
|     if (gpx_base_path.compare(".") != 0) | ||||
|     if (gpx_base_path != ".") | ||||
|         { | ||||
|             std::cout << "GPX files will be stored at " << gpx_base_path << std::endl; | ||||
|         } | ||||
| @@ -79,7 +79,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path) | ||||
| } | ||||
|  | ||||
|  | ||||
| bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
| bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name) | ||||
| { | ||||
|     boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); | ||||
|     tm timeinfo = boost::posix_time::to_tm(pt); | ||||
| @@ -134,7 +134,7 @@ bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
|         { | ||||
|             DLOG(INFO) << "GPX printer writing on " << filename.c_str(); | ||||
|             // Set iostream numeric format and precision | ||||
|             gpx_file.setf(gpx_file.fixed, gpx_file.floatfield); | ||||
|             gpx_file.setf(gpx_file.std::ofstream::fixed, gpx_file.std::ofstream::floatfield); | ||||
|             gpx_file << std::setprecision(14); | ||||
|             gpx_file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl | ||||
|                      << "<gpx version=\"1.1\" creator=\"GNSS-SDR\"" << std::endl | ||||
| @@ -164,7 +164,7 @@ bool Gpx_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, | ||||
|     double height; | ||||
|  | ||||
|     positions_printed = true; | ||||
|     std::shared_ptr<rtklib_solver> position_ = position; | ||||
|     const std::shared_ptr<rtklib_solver>& position_ = position; | ||||
|  | ||||
|     double speed_over_ground = position_->get_speed_over_ground();    // expressed in m/s | ||||
|     double course_over_ground = position_->get_course_over_ground();  // expressed in deg | ||||
|   | ||||
| @@ -57,7 +57,7 @@ private: | ||||
| public: | ||||
|     Gpx_Printer(const std::string& base_path = "."); | ||||
|     ~Gpx_Printer(); | ||||
|     bool set_headers(std::string filename, bool time_tag_name = true); | ||||
|     bool set_headers(const std::string& filename, bool time_tag_name = true); | ||||
|     bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); | ||||
|     bool close_file(); | ||||
| }; | ||||
|   | ||||
| @@ -173,7 +173,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do | ||||
|                     { | ||||
|                         // 1 GPS - find the ephemeris for the current GPS SV observation. The SV PRN ID is the map key | ||||
|                         std::string sig_(gnss_observables_iter->second.Signal); | ||||
|                         if (sig_.compare("1C") == 0) | ||||
|                         if (sig_ == "1C") | ||||
|                             { | ||||
|                                 gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                 if (gps_ephemeris_iter != gps_ephemeris_map.end()) | ||||
| @@ -228,7 +228,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do | ||||
|                                         DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->first; | ||||
|                                     } | ||||
|                             } | ||||
|                         if (sig_.compare("2S") == 0) | ||||
|                         if (sig_ == "2S") | ||||
|                             { | ||||
|                                 gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                 if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.end()) | ||||
|   | ||||
| @@ -70,7 +70,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path) | ||||
|         { | ||||
|             kml_base_path = p.string(); | ||||
|         } | ||||
|     if (kml_base_path.compare(".") != 0) | ||||
|     if (kml_base_path != ".") | ||||
|         { | ||||
|             std::cout << "KML files will be stored at " << kml_base_path << std::endl; | ||||
|         } | ||||
| @@ -87,7 +87,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path) | ||||
| } | ||||
|  | ||||
|  | ||||
| bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
| bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name) | ||||
| { | ||||
|     boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); | ||||
|     tm timeinfo = boost::posix_time::to_tm(pt); | ||||
| @@ -143,10 +143,10 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name) | ||||
|         { | ||||
|             DLOG(INFO) << "KML printer writing on " << filename.c_str(); | ||||
|             // Set iostream numeric format and precision | ||||
|             kml_file.setf(kml_file.fixed, kml_file.floatfield); | ||||
|             kml_file.setf(kml_file.std::ofstream::fixed, kml_file.std::ofstream::floatfield); | ||||
|             kml_file << std::setprecision(14); | ||||
|  | ||||
|             tmp_file.setf(tmp_file.fixed, tmp_file.floatfield); | ||||
|             tmp_file.setf(tmp_file.std::ofstream::fixed, tmp_file.std::ofstream::floatfield); | ||||
|             tmp_file << std::setprecision(14); | ||||
|  | ||||
|             kml_file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl | ||||
| @@ -222,7 +222,7 @@ bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, | ||||
|  | ||||
|     positions_printed = true; | ||||
|  | ||||
|     std::shared_ptr<rtklib_solver> position_ = position; | ||||
|     const std::shared_ptr<rtklib_solver>& position_ = position; | ||||
|  | ||||
|     double speed_over_ground = position_->get_speed_over_ground();    // expressed in m/s | ||||
|     double course_over_ground = position_->get_course_over_ground();  // expressed in deg | ||||
|   | ||||
| @@ -60,7 +60,7 @@ private: | ||||
| public: | ||||
|     Kml_Printer(const std::string& base_path = std::string(".")); | ||||
|     ~Kml_Printer(); | ||||
|     bool set_headers(std::string filename, bool time_tag_name = true); | ||||
|     bool set_headers(const std::string& filename, bool time_tag_name = true); | ||||
|     bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); | ||||
|     bool close_file(); | ||||
| }; | ||||
|   | ||||
| @@ -44,6 +44,7 @@ Ls_Pvt::Ls_Pvt() : Pvt_Solution() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| arma::vec Ls_Pvt::bancroftPos(const arma::mat& satpos, const arma::vec& obs) | ||||
| { | ||||
|     // BANCROFT Calculation of preliminary coordinates for a GPS receiver based on pseudoranges | ||||
| @@ -233,9 +234,9 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs, | ||||
|                             Rot_X = Ls_Pvt::rotateSatellite(traveltime, X.col(i));  //armadillo | ||||
|  | ||||
|                             //--- Find DOA and range of satellites | ||||
|                             double* azim = 0; | ||||
|                             double* elev = 0; | ||||
|                             double* dist = 0; | ||||
|                             double* azim = nullptr; | ||||
|                             double* elev = nullptr; | ||||
|                             double* dist = nullptr; | ||||
|                             topocent(azim, elev, dist, pos.subvec(0, 2), Rot_X - pos.subvec(0, 2)); | ||||
|  | ||||
|                             if (traveltime < 0.1 && nmbOfSatellites > 3) | ||||
|   | ||||
| @@ -48,7 +48,7 @@ | ||||
| using google::LogMessage; | ||||
|  | ||||
|  | ||||
| Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path) | ||||
| Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path) | ||||
| { | ||||
|     nmea_base_path = base_path; | ||||
|     d_flag_nmea_output_file = flag_nmea_output_file; | ||||
| @@ -79,7 +79,7 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_output_file, boo | ||||
|                     nmea_base_path = p.string(); | ||||
|                 } | ||||
|  | ||||
|             if ((nmea_base_path.compare(".") != 0) and (d_flag_nmea_output_file == true)) | ||||
|             if ((nmea_base_path != ".") and (d_flag_nmea_output_file == true)) | ||||
|                 { | ||||
|                     std::cout << "NMEA files will be stored at " << nmea_base_path << std::endl; | ||||
|                 } | ||||
| @@ -99,7 +99,7 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_output_file, boo | ||||
|                 } | ||||
|         } | ||||
|  | ||||
|     nmea_devname = nmea_dump_devname; | ||||
|     nmea_devname = std::move(nmea_dump_devname); | ||||
|     if (flag_nmea_tty_port == true) | ||||
|         { | ||||
|             nmea_dev_descriptor = init_serial(nmea_devname.c_str()); | ||||
| @@ -126,20 +126,20 @@ Nmea_Printer::~Nmea_Printer() | ||||
| } | ||||
|  | ||||
|  | ||||
| int Nmea_Printer::init_serial(std::string serial_device) | ||||
| int Nmea_Printer::init_serial(const std::string& serial_device) | ||||
| { | ||||
|     /*! | ||||
|      * Opens the serial device and sets the default baud rate for a NMEA transmission (9600,8,N,1) | ||||
|      */ | ||||
|     int fd = 0; | ||||
|     struct termios options; | ||||
|     struct termios options = {}; | ||||
|     int64_t BAUD; | ||||
|     int64_t DATABITS; | ||||
|     int64_t STOPBITS; | ||||
|     int64_t PARITYON; | ||||
|     int64_t PARITY; | ||||
|  | ||||
|     fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY); | ||||
|     fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY | O_CLOEXEC); | ||||
|     if (fd == -1) return fd;  // failed to open TTY port | ||||
|  | ||||
|     if (fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O";  // clear all flags on descriptor, enable direct I/O | ||||
|   | ||||
| @@ -53,12 +53,12 @@ public: | ||||
|     /*! | ||||
|      * \brief Default constructor. | ||||
|      */ | ||||
|     Nmea_Printer(std::string filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_filename, const std::string& base_path = "."); | ||||
|     Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path = "."); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Print NMEA PVT and satellite info to the initialized device | ||||
|      */ | ||||
|     bool Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); | ||||
|     bool Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_data, bool print_average_values); | ||||
|  | ||||
|     /*! | ||||
|      * \brief Default destructor. | ||||
| @@ -72,7 +72,7 @@ private: | ||||
|     std::string nmea_devname; | ||||
|     int nmea_dev_descriptor;  // NMEA serial device descriptor (i.e. COM port) | ||||
|     std::shared_ptr<rtklib_solver> d_PVT_data; | ||||
|     int init_serial(std::string serial_device);  //serial port control | ||||
|     int init_serial(const std::string& serial_device);  //serial port control | ||||
|     void close_serial(); | ||||
|     std::string get_GPGGA();  // fix data | ||||
|     std::string get_GPGSV();  // satellite data | ||||
|   | ||||
| @@ -188,7 +188,7 @@ int Pvt_Solution::tropo(double *ddr_m, double sinel, double hsta_km, double p_mb | ||||
|     double b; | ||||
|     double rtop; | ||||
|  | ||||
|     while (1) | ||||
|     while (true) | ||||
|         { | ||||
|             rtop = pow((a_e + htop), 2) - pow((a_e + hsta_km), 2) * (1 - pow(sinel, 2)); | ||||
|  | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -77,7 +77,7 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool | ||||
|                 { | ||||
|                     rtcm_base_path = p.string(); | ||||
|                 } | ||||
|             if (rtcm_base_path.compare(".") != 0) | ||||
|             if (rtcm_base_path != ".") | ||||
|                 { | ||||
|                     std::cout << "RTCM binary file will be stored at " << rtcm_base_path << std::endl; | ||||
|                 } | ||||
|   | ||||
| @@ -63,7 +63,7 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, rtk_t &rtk) | ||||
| rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk) | ||||
| { | ||||
|     // init empty ephemeris for all the available GNSS channels | ||||
|     d_nchannels = nchannels; | ||||
| @@ -473,11 +473,11 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                 case 'G': | ||||
|                     { | ||||
|                         std::string sig_(gnss_observables_iter->second.Signal); | ||||
|                         if (sig_.compare("1C") == 0) | ||||
|                         if (sig_ == "1C") | ||||
|                             { | ||||
|                                 band1 = true; | ||||
|                             } | ||||
|                         if (sig_.compare("2S") == 0) | ||||
|                         if (sig_ == "2S") | ||||
|                             { | ||||
|                                 band2 = true; | ||||
|                             } | ||||
| @@ -500,7 +500,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                     { | ||||
|                         std::string sig_(gnss_observables_iter->second.Signal); | ||||
|                         // Galileo E1 | ||||
|                         if (sig_.compare("1B") == 0) | ||||
|                         if (sig_ == "1B") | ||||
|                             { | ||||
|                                 // 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key | ||||
|                                 galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -523,7 +523,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                             } | ||||
|  | ||||
|                         // Galileo E5 | ||||
|                         if (sig_.compare("5X") == 0) | ||||
|                         if (sig_ == "5X") | ||||
|                             { | ||||
|                                 // 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key | ||||
|                                 galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -571,7 +571,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                         // GPS L1 | ||||
|                         // 1 GPS - find the ephemeris for the current GPS SV observation. The SV PRN ID is the map key | ||||
|                         std::string sig_(gnss_observables_iter->second.Signal); | ||||
|                         if (sig_.compare("1C") == 0) | ||||
|                         if (sig_ == "1C") | ||||
|                             { | ||||
|                                 gps_ephemeris_iter = gps_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                 if (gps_ephemeris_iter != gps_ephemeris_map.cend()) | ||||
| @@ -592,7 +592,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                     } | ||||
|                             } | ||||
|                         // GPS L2 (todo: solve NAV/CNAV clash) | ||||
|                         if ((sig_.compare("2S") == 0) and (gps_dual_band == false)) | ||||
|                         if ((sig_ == "2S") and (gps_dual_band == false)) | ||||
|                             { | ||||
|                                 gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                 if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend()) | ||||
| @@ -641,7 +641,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                     } | ||||
|                             } | ||||
|                         // GPS L5 | ||||
|                         if (sig_.compare("L5") == 0) | ||||
|                         if (sig_ == "L5") | ||||
|                             { | ||||
|                                 gps_cnav_ephemeris_iter = gps_cnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|                                 if (gps_cnav_ephemeris_iter != gps_cnav_ephemeris_map.cend()) | ||||
| @@ -693,7 +693,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                     { | ||||
|                         std::string sig_(gnss_observables_iter->second.Signal); | ||||
|                         // GLONASS GNAV L1 | ||||
|                         if (sig_.compare("1G") == 0) | ||||
|                         if (sig_ == "1G") | ||||
|                             { | ||||
|                                 // 1 Glo - find the ephemeris for the current GLONASS SV observation. The SV Slot Number (PRN ID) is the map key | ||||
|                                 glonass_gnav_ephemeris_iter = glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
| @@ -715,7 +715,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_ | ||||
|                                     } | ||||
|                             } | ||||
|                         // GLONASS GNAV L2 | ||||
|                         if (sig_.compare("2G") == 0) | ||||
|                         if (sig_ == "2G") | ||||
|                             { | ||||
|                                 // 1 GLONASS - find the ephemeris for the current GLONASS SV observation. The SV PRN ID is the map key | ||||
|                                 glonass_gnav_ephemeris_iter = glonass_gnav_ephemeris_map.find(gnss_observables_iter->second.PRN); | ||||
|   | ||||
| @@ -87,7 +87,7 @@ private: | ||||
| public: | ||||
|     sol_t pvt_sol; | ||||
|     ssat_t pvt_ssat[MAXSAT]; | ||||
|     rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, rtk_t& rtk); | ||||
|     rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk); | ||||
|     ~rtklib_solver(); | ||||
|  | ||||
|     bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging); | ||||
|   | ||||
| @@ -30,7 +30,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e1_pcps_8ms_ambiguous_acquisition.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include "galileo_e1_signal_processing.h" | ||||
| @@ -40,12 +39,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -56,7 +57,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||
|     item_type_ = configuration_->property(role + ".item_type", | ||||
|         default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||
| @@ -86,7 +87,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = galileo_pcps_8ms_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||
| @@ -107,7 +108,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -125,10 +126,15 @@ GalileoE1Pcps8msAmbiguousAcquisition::~GalileoE1Pcps8msAmbiguousAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -137,7 +143,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||
|  | ||||
| @@ -152,7 +158,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -163,7 +169,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_max(unsigned int doppler_ | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -173,7 +179,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_max(unsigned int doppler_ | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -184,7 +190,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_gnss_synchro( | ||||
|     Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -193,7 +199,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_gnss_synchro( | ||||
|  | ||||
| signed int GalileoE1Pcps8msAmbiguousAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -213,10 +219,10 @@ void GalileoE1Pcps8msAmbiguousAcquisition::init() | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             bool cboc = configuration_->property( | ||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); | ||||
|                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||
|  | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -238,7 +244,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code() | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -267,7 +273,7 @@ float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -276,7 +282,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GalileoE1Pcps8msAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -48,7 +48,8 @@ class GalileoE1Pcps8msAmbiguousAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1Pcps8msAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1Pcps8msAmbiguousAcquisition(); | ||||
| @@ -144,7 +145,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -35,20 +35,20 @@ | ||||
| #include "Galileo_E1.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "acq_conf.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
|  | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters; | ||||
|     configuration_ = configuration; | ||||
| @@ -59,7 +59,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -128,7 +128,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -146,6 +146,11 @@ GalileoE1PcpsAmbiguousAcquisition::~GalileoE1PcpsAmbiguousAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -155,7 +160,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||
|  | ||||
| @@ -214,7 +219,7 @@ void GalileoE1PcpsAmbiguousAcquisition::init() | ||||
| void GalileoE1PcpsAmbiguousAcquisition::set_local_code() | ||||
| { | ||||
|     bool cboc = configuration_->property( | ||||
|         "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); | ||||
|         "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||
|  | ||||
|     std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -277,15 +282,15 @@ float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -302,15 +307,15 @@ void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -325,15 +330,15 @@ void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -51,7 +51,8 @@ class GalileoE1PcpsAmbiguousAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1PcpsAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1PcpsAmbiguousAcquisition(); | ||||
| @@ -154,7 +155,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -41,13 +41,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     //printf("top acq constructor start\n"); | ||||
|     pcpsconf_fpga_t acq_parameters; | ||||
| @@ -59,8 +60,8 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | ||||
|  | ||||
|     //    item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in; | ||||
|     //if_ = configuration_->property(role + ".if", 0); | ||||
|     //acq_parameters.freq = if_; | ||||
| @@ -296,7 +297,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     //threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     //printf("top acq constructor end\n"); | ||||
| } | ||||
|  | ||||
| @@ -310,6 +311,11 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::~GalileoE1PcpsAmbiguousAcquisitionFpga() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsAmbiguousAcquisitionFpga::set_channel(unsigned int channel) | ||||
| { | ||||
|     //printf("top acq set channel start\n"); | ||||
|   | ||||
| @@ -52,7 +52,8 @@ class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1PcpsAmbiguousAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1PcpsAmbiguousAcquisitionFpga(); | ||||
|   | ||||
| @@ -30,7 +30,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include "galileo_e1_signal_processing.h" | ||||
| @@ -40,13 +39,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -56,7 +56,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||
| @@ -88,7 +88,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | ||||
|     code_data_ = new gr_complex[vector_length_]; | ||||
|     code_pilot_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_cccwsr_make_acquisition_cc(sampled_ms_, max_dwells_, | ||||
| @@ -109,7 +109,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -128,10 +128,15 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::~GalileoE1PcpsCccwsrAmbiguousAcquisitio | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -140,7 +145,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     //    float pfa = configuration_->property(role_+ boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     //    float pfa = configuration_->property(role_+ std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     //    if(pfa==0.0) pfa = configuration_->property(role_+".pfa", 0.0); | ||||
|  | ||||
| @@ -157,7 +162,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -168,7 +173,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_max(unsigned int doppl | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -178,7 +183,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_max(unsigned int doppl | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -188,7 +193,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_gnss_synchro( | ||||
|     Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -197,7 +202,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_gnss_synchro( | ||||
|  | ||||
| signed int GalileoE1PcpsCccwsrAmbiguousAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -217,10 +222,10 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::init() | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             bool cboc = configuration_->property( | ||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); | ||||
|                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||
|  | ||||
|             char signal[3]; | ||||
|  | ||||
| @@ -241,7 +246,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code() | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -264,7 +269,7 @@ float GalileoE1PcpsCccwsrAmbiguousAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -273,7 +278,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_blo | ||||
|  | ||||
| void GalileoE1PcpsCccwsrAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -48,7 +48,8 @@ class GalileoE1PcpsCccwsrAmbiguousAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1PcpsCccwsrAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1PcpsCccwsrAmbiguousAcquisition(); | ||||
| @@ -145,7 +146,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_data_; | ||||
|   | ||||
| @@ -30,7 +30,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include "galileo_e1_signal_processing.h" | ||||
| @@ -40,13 +39,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -57,7 +57,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | ||||
|     item_type_ = configuration_->property(role + ".item_type", | ||||
|         default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||
| @@ -119,7 +119,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | ||||
|               << ", Folding factor: " << folding_factor_ | ||||
|               << ", Sampled  ms: " << sampled_ms_ | ||||
|               << ", Code Length: " << code_length_; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||
| @@ -142,7 +142,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -160,10 +160,15 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::~GalileoE1PcpsQuickSyncAmbiguousAcqu | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -172,7 +177,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channe | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||
|  | ||||
| @@ -187,7 +192,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -198,7 +203,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int do | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -208,7 +213,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int do | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -218,7 +223,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro( | ||||
|     Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -228,7 +233,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro( | ||||
| signed int | ||||
| GalileoE1PcpsQuickSyncAmbiguousAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -248,10 +253,10 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::init() | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             bool cboc = configuration_->property( | ||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); | ||||
|                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||
|  | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -269,14 +274,14 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code() | ||||
|             acquisition_cc_->set_local_code(code_); | ||||
|  | ||||
|             delete[] code; | ||||
|             code = NULL; | ||||
|             code = nullptr; | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -284,7 +289,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset() | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_state(state); | ||||
|         } | ||||
| @@ -314,7 +319,7 @@ float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -323,7 +328,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_ | ||||
|  | ||||
| void GalileoE1PcpsQuickSyncAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -49,7 +49,8 @@ class GalileoE1PcpsQuickSyncAmbiguousAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1PcpsQuickSyncAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1PcpsQuickSyncAmbiguousAcquisition(); | ||||
| @@ -150,7 +151,7 @@ private: | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     unsigned int folding_factor_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -30,7 +30,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include "galileo_e1_signal_processing.h" | ||||
| @@ -40,13 +39,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -57,7 +57,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||
|     item_type_ = configuration_->property(role + ".item_type", | ||||
|         default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||
| @@ -90,7 +90,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, | ||||
| @@ -112,7 +112,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -130,10 +130,15 @@ GalileoE1PcpsTongAmbiguousAcquisition::~GalileoE1PcpsTongAmbiguousAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -142,7 +147,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||
|  | ||||
| @@ -157,7 +162,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -168,7 +173,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_max(unsigned int doppler | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -178,7 +183,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_max(unsigned int doppler | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -189,7 +194,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_gnss_synchro( | ||||
|     Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -198,7 +203,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_gnss_synchro( | ||||
|  | ||||
| signed int GalileoE1PcpsTongAmbiguousAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -218,10 +223,10 @@ void GalileoE1PcpsTongAmbiguousAcquisition::init() | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             bool cboc = configuration_->property( | ||||
|                 "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false); | ||||
|                 "Acquisition" + std::to_string(channel_) + ".cboc", false); | ||||
|  | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -243,7 +248,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code() | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -278,7 +283,7 @@ float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -287,7 +292,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::connect(gr::top_block_sptr top_block | ||||
|  | ||||
| void GalileoE1PcpsTongAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -48,7 +48,8 @@ class GalileoE1PcpsTongAmbiguousAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE1PcpsTongAmbiguousAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE1PcpsTongAmbiguousAcquisition(); | ||||
| @@ -149,7 +150,7 @@ private: | ||||
|     unsigned int tong_init_val_; | ||||
|     unsigned int tong_max_val_; | ||||
|     unsigned int tong_max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e5a_noncoherent_iq_acquisition_caf.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include "galileo_e5_signal_processing.h" | ||||
| @@ -46,13 +45,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -62,7 +62,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration_->property(role + ".doppler_max", 5000); | ||||
| @@ -101,7 +101,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||
|         { | ||||
|             both_signal_components = true; | ||||
|         } | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(sampled_ms_, max_dwells_, | ||||
| @@ -117,7 +117,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -136,10 +136,15 @@ GalileoE5aNoncoherentIQAcquisitionCaf::~GalileoE5aNoncoherentIQAcquisitionCaf() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -148,7 +153,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); | ||||
|  | ||||
| @@ -163,7 +168,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -174,7 +179,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_max(unsigned int doppler | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -184,7 +189,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_max(unsigned int doppler | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -195,7 +200,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_gnss_synchro( | ||||
|     Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -204,7 +209,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_gnss_synchro( | ||||
|  | ||||
| signed int GalileoE5aNoncoherentIQAcquisitionCaf::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -224,7 +229,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::init() | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             std::complex<float>* codeI = new std::complex<float>[code_length_]; | ||||
|             std::complex<float>* codeQ = new std::complex<float>[code_length_]; | ||||
| @@ -281,7 +286,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code() | ||||
|  | ||||
| void GalileoE5aNoncoherentIQAcquisitionCaf::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
|   | ||||
| @@ -49,7 +49,8 @@ class GalileoE5aNoncoherentIQAcquisitionCaf : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE5aNoncoherentIQAcquisitionCaf(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE5aNoncoherentIQAcquisitionCaf(); | ||||
| @@ -150,7 +151,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     int Zero_padding; | ||||
|   | ||||
| @@ -34,7 +34,6 @@ | ||||
| #include "Galileo_E5a.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include "acq_conf.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| @@ -42,12 +41,13 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|     std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -58,7 +58,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -91,11 +91,11 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -118,7 +118,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -136,6 +136,11 @@ GalileoE5aPcpsAcquisition::~GalileoE5aPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -145,7 +150,7 @@ void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -264,11 +269,11 @@ void GalileoE5aPcpsAcquisition::set_state(int state) | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute__((unused))) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
| @@ -281,11 +286,11 @@ void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute | ||||
|  | ||||
| void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block __attribute__((unused))) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|   | ||||
| @@ -43,7 +43,8 @@ class GalileoE5aPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE5aPcpsAcquisition(); | ||||
| @@ -157,7 +158,7 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|  | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|  | ||||
|     float threshold_; | ||||
|  | ||||
|   | ||||
| @@ -33,7 +33,6 @@ | ||||
| #include "galileo_e5_signal_processing.h" | ||||
| #include "Galileo_E5a.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <boost/math/distributions/exponential.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| @@ -41,12 +40,13 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GalileoE5aPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|     std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     //printf("creating the E5A acquisition"); | ||||
|     pcpsconf_fpga_t acq_parameters; | ||||
| @@ -58,8 +58,8 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | ||||
|  | ||||
|     //item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); | ||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in; | ||||
|     //acq_parameters.freq = 0; | ||||
|  | ||||
| @@ -209,7 +209,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf | ||||
|     channel_ = 0; | ||||
|     //threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     //printf("creating the E5A acquisition end"); | ||||
| } | ||||
|  | ||||
| @@ -221,6 +221,11 @@ GalileoE5aPcpsAcquisitionFpga::~GalileoE5aPcpsAcquisitionFpga() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -231,7 +236,7 @@ void GalileoE5aPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
|  | ||||
| void GalileoE5aPcpsAcquisitionFpga::set_threshold(float threshold) | ||||
| { | ||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|     // | ||||
|     //    if (pfa == 0.0) | ||||
|     //        { | ||||
|   | ||||
| @@ -45,7 +45,8 @@ class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GalileoE5aPcpsAcquisitionFpga(); | ||||
| @@ -160,7 +161,7 @@ private: | ||||
|     unsigned int in_streams_; | ||||
|     unsigned int out_streams_; | ||||
|  | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|  | ||||
|  | ||||
|     float threshold_; | ||||
|   | ||||
| @@ -43,13 +43,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GlonassL1CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -60,7 +61,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -94,7 +95,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -114,7 +115,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||
|  | ||||
|     if (item_type_.compare("cbyte") == 0) | ||||
|     if (item_type_ == "cbyte") | ||||
|         { | ||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||
| @@ -123,7 +124,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -141,6 +142,11 @@ GlonassL1CaPcpsAcquisition::~GlonassL1CaPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GlonassL1CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GlonassL1CaPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -261,15 +267,15 @@ float GlonassL1CaPcpsAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -284,15 +290,15 @@ void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -309,15 +315,15 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -51,7 +51,8 @@ class GlonassL1CaPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GlonassL1CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GlonassL1CaPcpsAcquisition(); | ||||
| @@ -153,7 +154,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -42,13 +42,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GlonassL2CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -59,7 +60,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GLONASS_L2_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -93,7 +94,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -113,7 +114,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||
|  | ||||
|     if (item_type_.compare("cbyte") == 0) | ||||
|     if (item_type_ == "cbyte") | ||||
|         { | ||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||
| @@ -122,7 +123,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -140,6 +141,11 @@ GlonassL2CaPcpsAcquisition::~GlonassL2CaPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GlonassL2CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GlonassL2CaPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -260,15 +266,15 @@ float GlonassL2CaPcpsAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -285,15 +291,15 @@ void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -308,15 +314,15 @@ void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -50,7 +50,8 @@ class GlonassL2CaPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GlonassL2CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GlonassL2CaPcpsAcquisition(); | ||||
| @@ -152,7 +153,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -45,13 +45,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -61,7 +62,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -95,7 +96,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -109,7 +110,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||
|  | ||||
|     if (item_type_.compare("cbyte") == 0) | ||||
|     if (item_type_ == "cbyte") | ||||
|         { | ||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||
| @@ -118,7 +119,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -136,6 +137,11 @@ GpsL1CaPcpsAcquisition::~GpsL1CaPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -249,15 +255,15 @@ float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -274,15 +280,15 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -297,15 +303,15 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -55,7 +55,8 @@ class GpsL1CaPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsAcquisition(); | ||||
| @@ -157,7 +158,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -42,13 +42,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string default_dump_filename = "./acquisition.mat"; | ||||
| @@ -57,7 +58,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -80,7 +81,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||
|     acq_parameters.samples_per_ms = vector_length_; | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(acq_parameters); | ||||
| @@ -94,7 +95,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -112,6 +113,11 @@ GpsL1CaPcpsAcquisitionFineDoppler::~GpsL1CaPcpsAcquisitionFineDoppler() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFineDoppler::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFineDoppler::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|   | ||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsAcquisitionFineDoppler : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsAcquisitionFineDoppler(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsAcquisitionFineDoppler(); | ||||
| @@ -142,7 +143,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -48,13 +48,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     pcpsconf_fpga_t acq_parameters; | ||||
|     configuration_ = configuration; | ||||
| @@ -62,8 +63,8 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | ||||
|  | ||||
|     DLOG(INFO) << "role " << role; | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     //fs_in = fs_in/2.0; // downampling filter | ||||
|     //printf("####### DEBUG Acq: fs_in = %d\n", fs_in); | ||||
|     acq_parameters.fs_in = fs_in; | ||||
| @@ -173,7 +174,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( | ||||
|  | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -183,6 +184,11 @@ GpsL1CaPcpsAcquisitionFpga::~GpsL1CaPcpsAcquisitionFpga() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|   | ||||
| @@ -53,7 +53,8 @@ class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsAcquisitionFpga(); | ||||
|   | ||||
| @@ -42,13 +42,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsAssistedAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     std::string default_item_type = "gr_complex"; | ||||
|     std::string default_dump_filename = "./data/acquisition.dat"; | ||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||
| @@ -71,7 +72,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_make_assisted_acquisition_cc(max_dwells_, sampled_ms_, | ||||
| @@ -87,7 +88,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -105,6 +106,11 @@ GpsL1CaPcpsAssistedAcquisition::~GpsL1CaPcpsAssistedAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAssistedAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsAssistedAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|   | ||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsAssistedAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsAssistedAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsAssistedAcquisition(); | ||||
| @@ -140,7 +141,7 @@ private: | ||||
|     int doppler_min_; | ||||
|     unsigned int sampled_ms_; | ||||
|     int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -40,13 +40,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -57,7 +58,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||
|     item_type_ = configuration_->property(role + ".item_type", | ||||
|         default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||
| @@ -85,7 +86,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_make_opencl_acquisition_cc(sampled_ms_, max_dwells_, | ||||
| @@ -106,7 +107,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -124,10 +125,15 @@ GpsL1CaPcpsOpenClAcquisition::~GpsL1CaPcpsOpenClAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -136,7 +142,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -153,7 +159,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -163,7 +169,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold) | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -173,7 +179,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -183,7 +189,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -192,7 +198,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
|  | ||||
| signed int GpsL1CaPcpsOpenClAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -212,7 +218,7 @@ void GpsL1CaPcpsOpenClAcquisition::init() | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -233,7 +239,7 @@ void GpsL1CaPcpsOpenClAcquisition::set_local_code() | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -265,7 +271,7 @@ float GpsL1CaPcpsOpenClAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -274,7 +280,7 @@ void GpsL1CaPcpsOpenClAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL1CaPcpsOpenClAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -48,7 +48,8 @@ class GpsL1CaPcpsOpenClAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsOpenClAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsOpenClAcquisition(); | ||||
| @@ -144,7 +145,7 @@ private: | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -41,13 +41,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||
|     DLOG(INFO) << "role " << role; | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||
| @@ -112,7 +113,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||
|               << ", Sampled  ms: " << sampled_ms_ | ||||
|               << ", Code Length: " << code_length_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_quicksync_make_acquisition_cc(folding_factor_, | ||||
| @@ -135,7 +136,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -153,10 +154,15 @@ GpsL1CaPcpsQuickSyncAcquisition::~GpsL1CaPcpsQuickSyncAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -165,9 +171,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + | ||||
|                                              boost::lexical_cast<std::string>(channel_) + ".pfa", | ||||
|         0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -184,7 +188,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -194,7 +198,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -204,7 +208,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -214,7 +218,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_doppler_step(unsigned int doppler_step | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -223,7 +227,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchr | ||||
|  | ||||
| signed int GpsL1CaPcpsQuickSyncAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -243,13 +247,12 @@ void GpsL1CaPcpsQuickSyncAcquisition::init() | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_](); | ||||
|  | ||||
|             gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0); | ||||
|  | ||||
|  | ||||
|             for (unsigned int i = 0; i < (sampled_ms_ / folding_factor_); i++) | ||||
|                 { | ||||
|                     memcpy(&(code_[i * code_length_]), code, | ||||
| @@ -266,7 +269,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code() | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -275,7 +278,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::reset() | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::set_state(int state) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_state(state); | ||||
|         } | ||||
| @@ -304,7 +307,7 @@ float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -313,7 +316,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL1CaPcpsQuickSyncAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -50,7 +50,8 @@ class GpsL1CaPcpsQuickSyncAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsQuickSyncAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsQuickSyncAcquisition(); | ||||
| @@ -151,7 +152,7 @@ private: | ||||
|     unsigned int sampled_ms_; | ||||
|     unsigned int max_dwells_; | ||||
|     unsigned int folding_factor_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -40,13 +40,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     configuration_ = configuration; | ||||
|     std::string default_item_type = "gr_complex"; | ||||
| @@ -56,7 +57,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     dump_ = configuration_->property(role + ".dump", false); | ||||
|     doppler_max_ = configuration->property(role + ".doppler_max", 5000); | ||||
| @@ -76,7 +77,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             acquisition_cc_ = pcps_tong_make_acquisition_cc(sampled_ms_, doppler_max_, fs_in_, | ||||
| @@ -97,7 +98,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -115,10 +116,15 @@ GpsL1CaPcpsTongAcquisition::~GpsL1CaPcpsTongAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_channel(channel_); | ||||
|         } | ||||
| @@ -127,7 +133,7 @@ void GpsL1CaPcpsTongAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -144,7 +150,7 @@ void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | ||||
|  | ||||
|     DLOG(INFO) << "Channel " << channel_ << "  Threshold = " << threshold_; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_threshold(threshold_); | ||||
|         } | ||||
| @@ -154,7 +160,7 @@ void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold) | ||||
| void GpsL1CaPcpsTongAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| { | ||||
|     doppler_max_ = doppler_max; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_max(doppler_max_); | ||||
|         } | ||||
| @@ -164,7 +170,7 @@ void GpsL1CaPcpsTongAcquisition::set_doppler_max(unsigned int doppler_max) | ||||
| void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| { | ||||
|     doppler_step_ = doppler_step; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_doppler_step(doppler_step_); | ||||
|         } | ||||
| @@ -174,7 +180,7 @@ void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step) | ||||
| void GpsL1CaPcpsTongAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
| { | ||||
|     gnss_synchro_ = gnss_synchro; | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_gnss_synchro(gnss_synchro_); | ||||
|         } | ||||
| @@ -183,7 +189,7 @@ void GpsL1CaPcpsTongAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro) | ||||
|  | ||||
| signed int GpsL1CaPcpsTongAcquisition::mag() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_cc_->mag(); | ||||
|         } | ||||
| @@ -202,7 +208,7 @@ void GpsL1CaPcpsTongAcquisition::init() | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::set_local_code() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             std::complex<float>* code = new std::complex<float>[code_length_]; | ||||
|  | ||||
| @@ -223,7 +229,7 @@ void GpsL1CaPcpsTongAcquisition::set_local_code() | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::reset() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_active(true); | ||||
|         } | ||||
| @@ -232,7 +238,7 @@ void GpsL1CaPcpsTongAcquisition::reset() | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::set_state(int state) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             acquisition_cc_->set_state(state); | ||||
|         } | ||||
| @@ -263,7 +269,7 @@ float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
| @@ -272,7 +278,7 @@ void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL1CaPcpsTongAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             top_block->disconnect(stream_to_vector_, 0, acquisition_cc_, 0); | ||||
|         } | ||||
|   | ||||
| @@ -49,7 +49,8 @@ class GpsL1CaPcpsTongAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL1CaPcpsTongAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL1CaPcpsTongAcquisition(); | ||||
| @@ -150,7 +151,7 @@ private: | ||||
|     unsigned int tong_init_val_; | ||||
|     unsigned int tong_max_val_; | ||||
|     unsigned int tong_max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     std::string dump_filename_; | ||||
|     std::complex<float>* code_; | ||||
|   | ||||
| @@ -43,13 +43,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -61,7 +62,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|     //float pfa =  configuration_->property(role + ".pfa", 0.0); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -97,7 +98,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|  | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -116,7 +117,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||
|  | ||||
|     if (item_type_.compare("cbyte") == 0) | ||||
|     if (item_type_ == "cbyte") | ||||
|         { | ||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||
| @@ -125,7 +126,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     num_codes_ = acq_parameters.sampled_ms / acq_parameters.ms_per_code; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
| @@ -144,6 +145,11 @@ GpsL2MPcpsAcquisition::~GpsL2MPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -153,7 +159,7 @@ void GpsL2MPcpsAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -263,15 +269,15 @@ float GpsL2MPcpsAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -288,15 +294,15 @@ void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -311,15 +317,15 @@ void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -53,7 +53,8 @@ class GpsL2MPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL2MPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL2MPcpsAcquisition(); | ||||
| @@ -154,7 +155,7 @@ private: | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -43,13 +43,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL2MPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     //pcpsconf_t acq_parameters; | ||||
|     pcpsconf_fpga_t acq_parameters; | ||||
| @@ -62,7 +63,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|     //float pfa =  configuration_->property(role + ".pfa", 0.0); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     //if_ = configuration_->property(role + ".if", 0); | ||||
| @@ -153,7 +154,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( | ||||
|  | ||||
|     channel_ = 0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|  | ||||
|  | ||||
|     //    vector_length_ = code_length_; | ||||
| @@ -206,6 +207,11 @@ GpsL2MPcpsAcquisitionFpga::~GpsL2MPcpsAcquisitionFpga() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -215,7 +221,7 @@ void GpsL2MPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL2MPcpsAcquisitionFpga::set_threshold(float threshold) | ||||
| { | ||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|     // | ||||
|     //    if (pfa == 0.0) | ||||
|     //        { | ||||
|   | ||||
| @@ -54,7 +54,8 @@ class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL2MPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL2MPcpsAcquisitionFpga(); | ||||
| @@ -157,7 +158,7 @@ private: | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     //long if_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|   | ||||
| @@ -43,13 +43,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     Acq_Conf acq_parameters = Acq_Conf(); | ||||
|     configuration_ = configuration; | ||||
| @@ -60,7 +61,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|  | ||||
|     item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in_; | ||||
|     acq_parameters.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters.fs_in))); | ||||
| @@ -89,7 +90,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|     vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); | ||||
|     code_ = new gr_complex[vector_length_]; | ||||
|  | ||||
|     if (item_type_.compare("cshort") == 0) | ||||
|     if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|         } | ||||
| @@ -108,7 +109,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|     acquisition_ = pcps_make_acquisition(acq_parameters); | ||||
|     DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; | ||||
|  | ||||
|     if (item_type_.compare("cbyte") == 0) | ||||
|     if (item_type_ == "cbyte") | ||||
|         { | ||||
|             cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); | ||||
|             float_to_complex_ = gr::blocks::float_to_complex::make(); | ||||
| @@ -116,7 +117,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( | ||||
|     channel_ = 0; | ||||
|     threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     if (in_streams_ > 1) | ||||
|         { | ||||
|             LOG(ERROR) << "This implementation only supports one input stream"; | ||||
| @@ -134,6 +135,11 @@ GpsL5iPcpsAcquisition::~GpsL5iPcpsAcquisition() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -143,7 +149,7 @@ void GpsL5iPcpsAcquisition::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::set_threshold(float threshold) | ||||
| { | ||||
|     float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|  | ||||
|     if (pfa == 0.0) | ||||
|         { | ||||
| @@ -251,15 +257,15 @@ float GpsL5iPcpsAcquisition::calculate_threshold(float pfa) | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to connect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             // Since a byte-based acq implementation is not available, | ||||
|             // we just convert cshorts to gr_complex | ||||
| @@ -276,15 +282,15 @@ void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block) | ||||
|  | ||||
| void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             // nothing to disconnect | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0); | ||||
|             top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1); | ||||
| @@ -299,15 +305,15 @@ void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return acquisition_; | ||||
|         } | ||||
|     else if (item_type_.compare("cbyte") == 0) | ||||
|     else if (item_type_ == "cbyte") | ||||
|         { | ||||
|             return cbyte_to_float_x2_; | ||||
|         } | ||||
|   | ||||
| @@ -53,7 +53,8 @@ class GpsL5iPcpsAcquisition : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL5iPcpsAcquisition(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL5iPcpsAcquisition(); | ||||
| @@ -154,7 +155,7 @@ private: | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|     std::string dump_filename_; | ||||
|   | ||||
| @@ -43,13 +43,14 @@ | ||||
|  | ||||
| using google::LogMessage; | ||||
|  | ||||
| void GpsL5iPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
| GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | ||||
|     ConfigurationInterface* configuration, std::string role, | ||||
|     unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) | ||||
|     ConfigurationInterface* configuration, | ||||
|     const std::string& role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams) : role_(role), | ||||
|                                 in_streams_(in_streams), | ||||
|                                 out_streams_(out_streams) | ||||
| { | ||||
|     //printf("L5 ACQ CLASS CREATED\n"); | ||||
|     pcpsconf_fpga_t acq_parameters; | ||||
| @@ -61,8 +62,8 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | ||||
|  | ||||
|     //item_type_ = configuration_->property(role + ".item_type", default_item_type); | ||||
|  | ||||
|     long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); | ||||
|     int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); | ||||
|     acq_parameters.fs_in = fs_in; | ||||
|     //if_ = configuration_->property(role + ".if", 0); | ||||
|     //acq_parameters.freq = if_; | ||||
| @@ -207,7 +208,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( | ||||
|     channel_ = 0; | ||||
|     //    threshold_ = 0.0; | ||||
|     doppler_step_ = 0; | ||||
|     gnss_synchro_ = 0; | ||||
|     gnss_synchro_ = nullptr; | ||||
|     //printf("L5 ACQ CLASS FINISHED\n"); | ||||
| } | ||||
|  | ||||
| @@ -219,6 +220,11 @@ GpsL5iPcpsAcquisitionFpga::~GpsL5iPcpsAcquisitionFpga() | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL5iPcpsAcquisitionFpga::stop_acquisition() | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
| void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
| @@ -228,7 +234,7 @@ void GpsL5iPcpsAcquisitionFpga::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL5iPcpsAcquisitionFpga::set_threshold(float threshold) | ||||
| { | ||||
|     //    float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); | ||||
|     //    float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0); | ||||
|     // | ||||
|     //    if (pfa == 0.0) | ||||
|     //        { | ||||
|   | ||||
| @@ -54,7 +54,8 @@ class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface | ||||
| { | ||||
| public: | ||||
|     GpsL5iPcpsAcquisitionFpga(ConfigurationInterface* configuration, | ||||
|         std::string role, unsigned int in_streams, | ||||
|         const std::string& role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams); | ||||
|  | ||||
|     virtual ~GpsL5iPcpsAcquisitionFpga(); | ||||
| @@ -157,7 +158,7 @@ private: | ||||
|     unsigned int doppler_max_; | ||||
|     unsigned int doppler_step_; | ||||
|     unsigned int max_dwells_; | ||||
|     long fs_in_; | ||||
|     int64_t fs_in_; | ||||
|     //long if_; | ||||
|     bool dump_; | ||||
|     bool blocking_; | ||||
|   | ||||
| @@ -32,7 +32,6 @@ | ||||
| #include "channel.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "gnss_sdr_flags.h" | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <glog/logging.h> | ||||
| #include <cstdint> | ||||
|  | ||||
| @@ -44,14 +43,14 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | ||||
|     std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav, | ||||
|     std::string role, std::string implementation, gr::msg_queue::sptr queue) | ||||
| { | ||||
|     pass_through_ = pass_through; | ||||
|     acq_ = acq; | ||||
|     trk_ = trk; | ||||
|     nav_ = nav; | ||||
|     role_ = role; | ||||
|     implementation_ = implementation; | ||||
|     pass_through_ = std::move(pass_through); | ||||
|     acq_ = std::move(acq); | ||||
|     trk_ = std::move(trk); | ||||
|     nav_ = std::move(nav); | ||||
|     role_ = std::move(role); | ||||
|     implementation_ = std::move(implementation); | ||||
|     channel_ = channel; | ||||
|     queue_ = queue; | ||||
|     queue_ = std::move(queue); | ||||
|     channel_fsm_ = std::make_shared<ChannelFsm>(); | ||||
|  | ||||
|     flag_enable_fpga = configuration->property("Channel.enable_FPGA", false); | ||||
| @@ -59,6 +58,7 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | ||||
|     trk_->set_channel(channel_); | ||||
|     nav_->set_channel(channel_); | ||||
|  | ||||
|     gnss_synchro_ = Gnss_Synchro(); | ||||
|     gnss_synchro_.Channel_ID = channel_; | ||||
|     acq_->set_gnss_synchro(&gnss_synchro_); | ||||
|     trk_->set_gnss_synchro(&gnss_synchro_); | ||||
| @@ -76,21 +76,21 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | ||||
|  | ||||
|     // IMPORTANT: Do not change the order between set_doppler_step and set_threshold | ||||
|  | ||||
|     uint32_t doppler_step = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".doppler_step", 0); | ||||
|     uint32_t doppler_step = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".doppler_step", 0); | ||||
|     if (doppler_step == 0) doppler_step = configuration->property("Acquisition_" + implementation_ + ".doppler_step", 500); | ||||
|     if (FLAGS_doppler_step != 0) doppler_step = static_cast<uint32_t>(FLAGS_doppler_step); | ||||
|     DLOG(INFO) << "Channel " << channel_ << " Doppler_step = " << doppler_step; | ||||
|  | ||||
|     acq_->set_doppler_step(doppler_step); | ||||
|  | ||||
|     float threshold = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".threshold", 0.0); | ||||
|     float threshold = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".threshold", 0.0); | ||||
|     if (threshold == 0.0) threshold = configuration->property("Acquisition_" + implementation_ + ".threshold", 0.0); | ||||
|  | ||||
|     acq_->set_threshold(threshold); | ||||
|  | ||||
|     acq_->init(); | ||||
|  | ||||
|     repeat_ = configuration->property("Acquisition_" + implementation_ + boost::lexical_cast<std::string>(channel_) + ".repeat_satellite", false); | ||||
|     repeat_ = configuration->property("Acquisition_" + implementation_ + std::to_string(channel_) + ".repeat_satellite", false); | ||||
|     DLOG(INFO) << "Channel " << channel_ << " satellite repeat = " << repeat_; | ||||
|  | ||||
|     channel_fsm_->set_acquisition(acq_); | ||||
| @@ -107,7 +107,9 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, | ||||
|  | ||||
|  | ||||
| // Destructor | ||||
| Channel::~Channel() {} | ||||
| Channel::~Channel() = default; | ||||
|  | ||||
|  | ||||
| void Channel::connect(gr::top_block_sptr top_block) | ||||
| { | ||||
|     if (connected_) | ||||
|   | ||||
| @@ -44,7 +44,7 @@ ChannelFsm::ChannelFsm() | ||||
| } | ||||
|  | ||||
|  | ||||
| ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition) : acq_(acquisition) | ||||
| ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition) : acq_(std::move(acquisition)) | ||||
| { | ||||
|     trk_ = nullptr; | ||||
|     channel_ = 0U; | ||||
| @@ -162,21 +162,21 @@ bool ChannelFsm::Event_failed_tracking_standby() | ||||
| void ChannelFsm::set_acquisition(std::shared_ptr<AcquisitionInterface> acquisition) | ||||
| { | ||||
|     std::lock_guard<std::mutex> lk(mx); | ||||
|     acq_ = acquisition; | ||||
|     acq_ = std::move(acquisition); | ||||
| } | ||||
|  | ||||
|  | ||||
| void ChannelFsm::set_tracking(std::shared_ptr<TrackingInterface> tracking) | ||||
| { | ||||
|     std::lock_guard<std::mutex> lk(mx); | ||||
|     trk_ = tracking; | ||||
|     trk_ = std::move(tracking); | ||||
| } | ||||
|  | ||||
|  | ||||
| void ChannelFsm::set_queue(gr::msg_queue::sptr queue) | ||||
| { | ||||
|     std::lock_guard<std::mutex> lk(mx); | ||||
|     queue_ = queue; | ||||
|     queue_ = std::move(queue); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -40,7 +40,7 @@ using google::LogMessage; | ||||
|  | ||||
| channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) | ||||
| { | ||||
|     return channel_msg_receiver_cc_sptr(new channel_msg_receiver_cc(channel_fsm, repeat)); | ||||
|     return channel_msg_receiver_cc_sptr(new channel_msg_receiver_cc(std::move(channel_fsm), repeat)); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -49,7 +49,7 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg) | ||||
|     bool result = false; | ||||
|     try | ||||
|         { | ||||
|             int64_t message = pmt::to_long(msg); | ||||
|             int64_t message = pmt::to_long(std::move(msg)); | ||||
|             switch (message) | ||||
|                 { | ||||
|                 case 1:  // positive acquisition | ||||
| @@ -89,9 +89,9 @@ channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> cha | ||||
|     this->message_port_register_in(pmt::mp("events")); | ||||
|     this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1)); | ||||
|  | ||||
|     d_channel_fsm = channel_fsm; | ||||
|     d_channel_fsm = std::move(channel_fsm); | ||||
|     d_repeat = repeat; | ||||
| } | ||||
|  | ||||
|  | ||||
| channel_msg_receiver_cc::~channel_msg_receiver_cc() {} | ||||
| channel_msg_receiver_cc::~channel_msg_receiver_cc() = default; | ||||
|   | ||||
| @@ -44,8 +44,13 @@ using google::LogMessage; | ||||
|  | ||||
|  | ||||
| TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, | ||||
|     std::string role, unsigned int in_streams, unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) | ||||
|     std::string role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), | ||||
|                                               in_streams_(in_streams), | ||||
|                                               out_streams_(out_streams), | ||||
|                                               queue_(queue) | ||||
| { | ||||
|     std::string default_filename = "../data/my_capture.dat"; | ||||
|     std::string default_item_type = "byte"; | ||||
| @@ -56,8 +61,8 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
|     filename_ = configuration->property(role + ".filename", default_filename); | ||||
|  | ||||
|     // override value with commandline flag, if present | ||||
|     if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s; | ||||
|     if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s != "-") filename_ = FLAGS_s; | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     repeat_ = configuration->property(role + ".repeat", false); | ||||
| @@ -65,7 +70,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false); | ||||
|  | ||||
|     if (item_type_.compare("byte") == 0) | ||||
|     if (item_type_ == "byte") | ||||
|         { | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
| @@ -177,9 +182,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
| } | ||||
|  | ||||
|  | ||||
| TwoBitCpxFileSignalSource::~TwoBitCpxFileSignalSource() | ||||
| { | ||||
| } | ||||
| TwoBitCpxFileSignalSource::~TwoBitCpxFileSignalSource() = default; | ||||
|  | ||||
|  | ||||
| void TwoBitCpxFileSignalSource::connect(gr::top_block_sptr top_block) | ||||
|   | ||||
| @@ -42,6 +42,7 @@ | ||||
| #include <gnuradio/hier_block2.h> | ||||
| #include <gnuradio/msg_queue.h> | ||||
| #include <gnuradio/blocks/interleaved_short_to_complex.h> | ||||
| #include <cstdint> | ||||
| #include <string> | ||||
|  | ||||
|  | ||||
| @@ -54,8 +55,10 @@ class ConfigurationInterface; | ||||
| class TwoBitCpxFileSignalSource : public GNSSBlockInterface | ||||
| { | ||||
| public: | ||||
|     TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, std::string role, | ||||
|         unsigned int in_streams, unsigned int out_streams, | ||||
|     TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, | ||||
|         std::string role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams, | ||||
|         boost::shared_ptr<gr::msg_queue> queue); | ||||
|  | ||||
|     virtual ~TwoBitCpxFileSignalSource(); | ||||
| @@ -97,19 +100,19 @@ public: | ||||
|         return repeat_; | ||||
|     } | ||||
|  | ||||
|     inline long sampling_frequency() const | ||||
|     inline int64_t sampling_frequency() const | ||||
|     { | ||||
|         return sampling_frequency_; | ||||
|     } | ||||
|  | ||||
|     inline long samples() const | ||||
|     inline uint64_t samples() const | ||||
|     { | ||||
|         return samples_; | ||||
|     } | ||||
|  | ||||
| private: | ||||
|     unsigned long long samples_; | ||||
|     long sampling_frequency_; | ||||
|     uint64_t samples_; | ||||
|     int64_t sampling_frequency_; | ||||
|     std::string filename_; | ||||
|     std::string item_type_; | ||||
|     bool repeat_; | ||||
|   | ||||
| @@ -46,8 +46,13 @@ using google::LogMessage; | ||||
|  | ||||
|  | ||||
| TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterface* configuration, | ||||
|     std::string role, unsigned int in_streams, unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) | ||||
|     std::string role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), | ||||
|                                               in_streams_(in_streams), | ||||
|                                               out_streams_(out_streams), | ||||
|                                               queue_(queue) | ||||
| { | ||||
|     std::string default_filename = "../data/my_capture.dat"; | ||||
|     std::string default_item_type = "byte"; | ||||
| @@ -55,13 +60,13 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|     std::string default_sample_type = "real"; | ||||
|     double default_seconds_to_skip = 0.0; | ||||
|  | ||||
|     samples_ = configuration->property(role + ".samples", 0L); | ||||
|     samples_ = configuration->property(role + ".samples", 0); | ||||
|     sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0); | ||||
|     filename_ = configuration->property(role + ".filename", default_filename); | ||||
|  | ||||
|     // override value with commandline flag, if present | ||||
|     if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s; | ||||
|     if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s != "-") filename_ = FLAGS_s; | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     big_endian_items_ = configuration->property(role + ".big_endian_items", true); | ||||
| @@ -72,13 +77,13 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false); | ||||
|     double seconds_to_skip = configuration->property(role + ".seconds_to_skip", default_seconds_to_skip); | ||||
|     long bytes_to_skip = 0; | ||||
|     int64_t bytes_to_skip = 0; | ||||
|  | ||||
|     if (item_type_.compare("byte") == 0) | ||||
|     if (item_type_ == "byte") | ||||
|         { | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
|     else if (item_type_.compare("short") == 0) | ||||
|     else if (item_type_ == "short") | ||||
|         { | ||||
|             // If we have shorts stored in little endian format, might as | ||||
|             // well read them in as bytes. | ||||
| @@ -97,16 +102,16 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
|  | ||||
|     if (sample_type_.compare("real") == 0) | ||||
|     if (sample_type_ == "real") | ||||
|         { | ||||
|             is_complex_ = false; | ||||
|         } | ||||
|     else if (sample_type_.compare("iq") == 0) | ||||
|     else if (sample_type_ == "iq") | ||||
|         { | ||||
|             is_complex_ = true; | ||||
|             reverse_interleaving_ = false; | ||||
|         } | ||||
|     else if (sample_type_.compare("qi") == 0) | ||||
|     else if (sample_type_ == "qi") | ||||
|         { | ||||
|             is_complex_ = true; | ||||
|             reverse_interleaving_ = true; | ||||
| @@ -122,7 +127,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|  | ||||
|             if (seconds_to_skip > 0) | ||||
|                 { | ||||
|                     bytes_to_skip = static_cast<long>( | ||||
|                     bytes_to_skip = static_cast<int64_t>( | ||||
|                         seconds_to_skip * sampling_frequency_ / 4); | ||||
|                     if (is_complex_) | ||||
|                         { | ||||
|   | ||||
| @@ -43,6 +43,7 @@ | ||||
| #include <gnuradio/hier_block2.h> | ||||
| #include <gnuradio/msg_queue.h> | ||||
| #include <gnuradio/blocks/interleaved_char_to_complex.h> | ||||
| #include <cstdint> | ||||
| #include <string> | ||||
|  | ||||
|  | ||||
| @@ -98,12 +99,12 @@ public: | ||||
|         return repeat_; | ||||
|     } | ||||
|  | ||||
|     inline long sampling_frequency() const | ||||
|     inline int64_t sampling_frequency() const | ||||
|     { | ||||
|         return sampling_frequency_; | ||||
|     } | ||||
|  | ||||
|     inline long samples() const | ||||
|     inline uint64_t samples() const | ||||
|     { | ||||
|         return samples_; | ||||
|     } | ||||
| @@ -129,8 +130,8 @@ public: | ||||
|     } | ||||
|  | ||||
| private: | ||||
|     unsigned long long samples_; | ||||
|     long sampling_frequency_; | ||||
|     uint64_t samples_; | ||||
|     int64_t sampling_frequency_; | ||||
|     std::string filename_; | ||||
|     std::string item_type_; | ||||
|     bool repeat_; | ||||
|   | ||||
| @@ -35,6 +35,7 @@ | ||||
| #ifndef GNSS_SDR_CONFIGURATION_INTERFACE_H_ | ||||
| #define GNSS_SDR_CONFIGURATION_INTERFACE_H_ | ||||
|  | ||||
| #include <cstdint> | ||||
| #include <string> | ||||
|  | ||||
| /*! | ||||
| @@ -54,10 +55,12 @@ public: | ||||
|     virtual ~ConfigurationInterface() {} | ||||
|     virtual std::string property(std::string property_name, std::string default_value) = 0; | ||||
|     virtual bool property(std::string property_name, bool default_value) = 0; | ||||
|     virtual long property(std::string property_name, long default_value) = 0; | ||||
|     virtual int property(std::string property_name, int default_value) = 0; | ||||
|     virtual unsigned int property(std::string property_name, unsigned int default_value) = 0; | ||||
|     virtual unsigned short property(std::string property_name, unsigned short default_value) = 0; | ||||
|     virtual int64_t property(std::string property_name, int64_t default_value) = 0; | ||||
|     virtual uint64_t property(std::string property_name, uint64_t default_value) = 0; | ||||
|     virtual int32_t property(std::string property_name, int32_t default_value) = 0; | ||||
|     virtual uint32_t property(std::string property_name, uint32_t default_value) = 0; | ||||
|     virtual int16_t property(std::string property_name, int16_t default_value) = 0; | ||||
|     virtual uint16_t property(std::string property_name, uint16_t default_value) = 0; | ||||
|     virtual float property(std::string property_name, float default_value) = 0; | ||||
|     virtual double property(std::string property_name, double default_value) = 0; | ||||
|     virtual void set_property(std::string property_name, std::string value) = 0; | ||||
|   | ||||
| @@ -70,13 +70,13 @@ std::string INIReader::Get(std::string section, std::string name, std::string de | ||||
| } | ||||
|  | ||||
|  | ||||
| long INIReader::GetInteger(std::string section, std::string name, long default_value) | ||||
| int64_t INIReader::GetInteger(std::string section, std::string name, int64_t default_value) | ||||
| { | ||||
|     std::string valstr = Get(section, name, ""); | ||||
|     const char* value = valstr.c_str(); | ||||
|     char* end; | ||||
|     // This parses "1234" (decimal) and also "0x4D2" (hex) | ||||
|     long n = strtol(value, &end, 0); | ||||
|     int64_t n = strtol(value, &end, 0); | ||||
|     return end > value ? n : default_value; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -48,6 +48,7 @@ | ||||
| #ifndef __INIREADER_H__ | ||||
| #define __INIREADER_H__ | ||||
|  | ||||
| #include <cstdint> | ||||
| #include <map> | ||||
| #include <string> | ||||
|  | ||||
| @@ -69,7 +70,7 @@ public: | ||||
|         std::string default_value); | ||||
|  | ||||
|     //! Get an integer (long) value from INI file, returning default_value if not found. | ||||
|     long GetInteger(std::string section, std::string name, long default_value); | ||||
|     int64_t GetInteger(std::string section, std::string name, int64_t default_value); | ||||
|  | ||||
| private: | ||||
|     int _error; | ||||
|   | ||||
| @@ -34,17 +34,19 @@ | ||||
| #include <sstream> | ||||
|  | ||||
|  | ||||
| StringConverter::StringConverter() {} | ||||
| StringConverter::StringConverter() = default; | ||||
|  | ||||
|  | ||||
| StringConverter::~StringConverter() = default; | ||||
|  | ||||
| StringConverter::~StringConverter() {} | ||||
|  | ||||
| bool StringConverter::convert(const std::string& value, bool default_value) | ||||
| { | ||||
|     if (value.compare("true") == 0) | ||||
|     if (value == "true") | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|     else if (value.compare("false") == 0) | ||||
|     else if (value == "false") | ||||
|         { | ||||
|             return false; | ||||
|         } | ||||
| @@ -55,11 +57,11 @@ bool StringConverter::convert(const std::string& value, bool default_value) | ||||
| } | ||||
|  | ||||
|  | ||||
| long StringConverter::convert(const std::string& value, long default_value) | ||||
| int64_t StringConverter::convert(const std::string& value, int64_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
|     long result; | ||||
|     int64_t result; | ||||
|     stream >> result; | ||||
|  | ||||
|     if (stream.fail()) | ||||
| @@ -73,7 +75,25 @@ long StringConverter::convert(const std::string& value, long default_value) | ||||
| } | ||||
|  | ||||
|  | ||||
| int StringConverter::convert(const std::string& value, int default_value) | ||||
| uint64_t StringConverter::convert(const std::string& value, uint64_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
|     uint64_t result; | ||||
|     stream >> result; | ||||
|  | ||||
|     if (stream.fail()) | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| int32_t StringConverter::convert(const std::string& value, int32_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
| @@ -91,11 +111,11 @@ int StringConverter::convert(const std::string& value, int default_value) | ||||
| } | ||||
|  | ||||
|  | ||||
| unsigned int StringConverter::convert(const std::string& value, unsigned int default_value) | ||||
| uint32_t StringConverter::convert(const std::string& value, uint32_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
|     unsigned int result; | ||||
|     uint32_t result; | ||||
|     stream >> result; | ||||
|  | ||||
|     if (stream.fail()) | ||||
| @@ -109,11 +129,29 @@ unsigned int StringConverter::convert(const std::string& value, unsigned int def | ||||
| } | ||||
|  | ||||
|  | ||||
| unsigned short StringConverter::convert(const std::string& value, unsigned short default_value) | ||||
| uint16_t StringConverter::convert(const std::string& value, uint16_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
|     unsigned short result; | ||||
|     uint16_t result; | ||||
|     stream >> result; | ||||
|  | ||||
|     if (stream.fail()) | ||||
|         { | ||||
|             return default_value; | ||||
|         } | ||||
|     else | ||||
|         { | ||||
|             return result; | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| int16_t StringConverter::convert(const std::string& value, int16_t default_value) | ||||
| { | ||||
|     std::stringstream stream(value); | ||||
|  | ||||
|     int16_t result; | ||||
|     stream >> result; | ||||
|  | ||||
|     if (stream.fail()) | ||||
|   | ||||
| @@ -33,6 +33,7 @@ | ||||
| #ifndef GNSS_SDR_STRING_CONVERTER_H_ | ||||
| #define GNSS_SDR_STRING_CONVERTER_H_ | ||||
|  | ||||
| #include <cstdint> | ||||
| #include <string> | ||||
|  | ||||
| /*! | ||||
| @@ -46,10 +47,12 @@ public: | ||||
|     virtual ~StringConverter(); | ||||
|  | ||||
|     bool convert(const std::string& value, bool default_value); | ||||
|     long convert(const std::string& value, long default_value); | ||||
|     int convert(const std::string& value, int default_value); | ||||
|     unsigned int convert(const std::string& value, unsigned int default_value); | ||||
|     unsigned short convert(const std::string& value, unsigned short default_value); | ||||
|     int64_t convert(const std::string& value, int64_t default_value); | ||||
|     uint64_t convert(const std::string& value, uint64_t default_value); | ||||
|     int32_t convert(const std::string& value, int32_t default_value); | ||||
|     uint32_t convert(const std::string& value, uint32_t default_value); | ||||
|     int16_t convert(const std::string& value, int16_t default_value); | ||||
|     uint16_t convert(const std::string& value, uint16_t default_value); | ||||
|     float convert(const std::string& value, float default_value); | ||||
|     double convert(const std::string& value, double default_value); | ||||
| }; | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez