mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-09 19:40:04 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
c77adbca73
@ -408,8 +408,8 @@ set(GNSSSDR_MATIO_MIN_VERSION "1.5.3")
|
|||||||
# Versions to download and build (but not installed) if not found
|
# Versions to download and build (but not installed) if not found
|
||||||
################################################################################
|
################################################################################
|
||||||
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
|
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
|
||||||
set(GNSSSDR_GLOG_LOCAL_VERSION "0.3.5")
|
set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
|
||||||
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.200.x")
|
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.300.x")
|
||||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
|
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
|
||||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
|
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10.6")
|
||||||
@ -510,6 +510,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Check if the compiler defines the architecture as ARM
|
# Check if the compiler defines the architecture as ARM
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -1331,15 +1332,34 @@ endif()
|
|||||||
# Check that BLAS (Basic Linear Algebra Subprograms) is found in the system
|
# Check that BLAS (Basic Linear Algebra Subprograms) is found in the system
|
||||||
# See http://www.netlib.org/blas/
|
# See http://www.netlib.org/blas/
|
||||||
################################################################################
|
################################################################################
|
||||||
find_library(BLAS blas)
|
if(OS_IS_MACOSX)
|
||||||
if(NOT BLAS)
|
# Avoid using the implementation that comes with the Accelerate framework
|
||||||
|
include(AvoidAccelerate)
|
||||||
|
else()
|
||||||
|
if(NOT BLA_VENDOR)
|
||||||
|
set(BLA_VENDOR "Generic")
|
||||||
|
endif()
|
||||||
|
find_package(BLAS)
|
||||||
|
set_package_properties(BLAS PROPERTIES
|
||||||
|
URL "http://www.netlib.org/blas/"
|
||||||
|
DESCRIPTION "Basic Linear Algebra Subprograms"
|
||||||
|
PURPOSE "Used for matrix algebra computations."
|
||||||
|
TYPE REQUIRED
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT BLAS_FOUND)
|
||||||
message(" The BLAS library has not been found.")
|
message(" The BLAS library has not been found.")
|
||||||
message(" You can try to install it by typing:")
|
message(" You can try to install it by typing:")
|
||||||
|
if(OS_IS_MACOSX)
|
||||||
|
message(" 'sudo port install lapack' if you are using Macports, or")
|
||||||
|
message(" 'brew install lapack' if you are using Homebrew.")
|
||||||
|
else()
|
||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
message(" sudo yum install blas-devel")
|
message(" sudo yum install blas-devel")
|
||||||
else()
|
else()
|
||||||
message(" sudo apt-get install libblas-dev")
|
message(" sudo apt-get install libblas-dev")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
message(FATAL_ERROR "BLAS is required to build gnss-sdr")
|
message(FATAL_ERROR "BLAS is required to build gnss-sdr")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -1349,8 +1369,16 @@ endif()
|
|||||||
# Check that LAPACK (Linear Algebra PACKage) is found in the system
|
# Check that LAPACK (Linear Algebra PACKage) is found in the system
|
||||||
# See http://www.netlib.org/lapack/
|
# See http://www.netlib.org/lapack/
|
||||||
################################################################################
|
################################################################################
|
||||||
find_library(LAPACK lapack)
|
if(NOT OS_IS_MACOSX)
|
||||||
if(NOT LAPACK)
|
find_package(LAPACK)
|
||||||
|
set_package_properties(LAPACK PROPERTIES
|
||||||
|
URL "http://www.netlib.org/lapack/"
|
||||||
|
DESCRIPTION "Linear Algebra PACKage"
|
||||||
|
PURPOSE "Used for matrix algebra computations."
|
||||||
|
TYPE REQUIRED
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT LAPACK_FOUND)
|
||||||
message(" The LAPACK library has not been found.")
|
message(" The LAPACK library has not been found.")
|
||||||
message(" You can try to install it by typing:")
|
message(" You can try to install it by typing:")
|
||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
@ -1457,7 +1485,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
|||||||
if(NOT GFORTRAN)
|
if(NOT GFORTRAN)
|
||||||
set(GFORTRAN "")
|
set(GFORTRAN "")
|
||||||
endif()
|
endif()
|
||||||
set(ARMADILLO_LIBRARIES ${BLAS} ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
|
set(ARMADILLO_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||||
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
|
set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE)
|
||||||
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
|
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
|
||||||
@ -1518,7 +1546,13 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27
|
|||||||
/usr/lib/sh4-linux-gnu
|
/usr/lib/sh4-linux-gnu
|
||||||
)
|
)
|
||||||
if(NOT GNUTLS_OPENSSL_LIBRARY)
|
if(NOT GNUTLS_OPENSSL_LIBRARY)
|
||||||
|
if(GnuTLS_FOUND)
|
||||||
|
message(STATUS " But it was not built with openssl compatibility.")
|
||||||
|
endif()
|
||||||
message(STATUS " Looking for OpenSSL instead...")
|
message(STATUS " Looking for OpenSSL instead...")
|
||||||
|
if(OS_IS_MACOSX)
|
||||||
|
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl) # Trick for Homebrew
|
||||||
|
endif()
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
set_package_properties(OpenSSL PROPERTIES
|
set_package_properties(OpenSSL PROPERTIES
|
||||||
URL "https://www.openssl.org"
|
URL "https://www.openssl.org"
|
||||||
@ -1540,11 +1574,12 @@ if(NOT GNUTLS_OPENSSL_LIBRARY)
|
|||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
message(" sudo yum install openssl-devel")
|
message(" sudo yum install openssl-devel")
|
||||||
else()
|
else()
|
||||||
message(" sudo apt-get install libgnutls-openssl-dev")
|
message(" sudo apt-get install libgnutls28-dev")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
message(" sudo port install gnutls")
|
message(" 'sudo port install gnutls', if you are using Macports, or")
|
||||||
|
message(" 'brew install openssl', if you are using Homebrew.")
|
||||||
endif()
|
endif()
|
||||||
message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr")
|
message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr")
|
||||||
endif()
|
endif()
|
||||||
@ -2199,10 +2234,12 @@ endif()
|
|||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
||||||
@ONLY)
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
add_custom_target(uninstall
|
add_custom_target(uninstall
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
116
README.md
116
README.md
@ -35,7 +35,7 @@ This section describes how to set up the compilation environment in GNU/Linux or
|
|||||||
GNU/Linux
|
GNU/Linux
|
||||||
----------
|
----------
|
||||||
|
|
||||||
* Tested distributions: Ubuntu 14.04 LTS and above; Debian 8.0 "jessie" and above; Fedora 26 and above; CentOS 7; Arch Linux.
|
* Tested distributions: Ubuntu 14.04 LTS and above; Debian 8.0 "jessie" and above; Arch Linux; CentOS 7; Fedora 26 and above; OpenSUSE 42.3 and above.
|
||||||
* Supported microprocessor architectures:
|
* Supported microprocessor architectures:
|
||||||
* i386: Intel x86 instruction set (32-bit microprocessors).
|
* i386: Intel x86 instruction set (32-bit microprocessors).
|
||||||
* amd64: also known as x86-64, the 64-bit version of the x86 instruction set, originally created by AMD and implemented by AMD, Intel, VIA and others.
|
* amd64: also known as x86-64, the 64-bit version of the x86 instruction set, originally created by AMD and implemented by AMD, Intel, VIA and others.
|
||||||
@ -79,21 +79,19 @@ Please note that the required files from `libgtest-dev` were moved to `googletes
|
|||||||
|
|
||||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
|
|
||||||
|
#### Arch Linux
|
||||||
|
|
||||||
#### Fedora
|
If you are using Arch Linux:
|
||||||
|
|
||||||
If you are using Fedora 26 or above, the required software dependencies can be installed by doing:
|
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \
|
$ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \
|
||||||
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
|
gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \
|
||||||
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
|
python-mako python-six libmatio libpcap gtest
|
||||||
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
|
|
||||||
glog-devel openssl-devel libpcap-devel python-mako python-six pugixml-devel
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
|
|
||||||
|
|
||||||
#### CentOS
|
#### CentOS
|
||||||
|
|
||||||
If you are using CentOS 7, you can install the dependencies via Extra Packages for Enterprise Linux ([EPEL](https://fedoraproject.org/wiki/EPEL)):
|
If you are using CentOS 7, you can install the dependencies via Extra Packages for Enterprise Linux ([EPEL](https://fedoraproject.org/wiki/EPEL)):
|
||||||
@ -111,18 +109,39 @@ $ sudo yum install make automake gcc gcc-c++ kernel-devel libtool \
|
|||||||
|
|
||||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
|
|
||||||
#### Arch Linux
|
|
||||||
|
|
||||||
If you are using Arch Linux:
|
#### Fedora
|
||||||
|
|
||||||
|
If you are using Fedora 26 or above, the required software dependencies can be installed by doing:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ pacman -S gcc make cmake git boost boost-libs log4cpp libvolk gnuradio \
|
$ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel \
|
||||||
gnuradio-osmosdr blas lapack gflags google-glog openssl pugixml \
|
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
|
||||||
python-mako python-six libmatio libpcap gtest
|
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
|
||||||
|
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
|
||||||
|
glog-devel openssl-devel libpcap-devel python-mako python-six pugixml-devel
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
|
|
||||||
|
|
||||||
|
#### openSUSE
|
||||||
|
|
||||||
|
If you are using openSUSE Leap:
|
||||||
|
|
||||||
|
~~~~~~
|
||||||
|
zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
|
||||||
|
libboost_system-devel libboost_filesystem-devel libboost_date_time-devel \
|
||||||
|
libboost_thread-devel libboost_chrono-devel libboost_serialization-devel \
|
||||||
|
log4cpp-devel gtest gnuradio-devel pugixml-devel libpcap-devel \
|
||||||
|
armadillo-devel libtool automake hdf5-devel libopenssl-devel python-Mako \
|
||||||
|
python-six
|
||||||
|
~~~~~~
|
||||||
|
|
||||||
|
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Alternative 2: Install dependencies using PyBOMBS
|
### Alternative 2: Install dependencies using PyBOMBS
|
||||||
|
|
||||||
This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend to use [PyBOMBS](https://github.com/gnuradio/pybombs "Python Build Overlay Managed Bundle System") (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial.
|
This option is adequate if you are interested in development, in working with the most recent versions of software dependencies, want more fine tuning on the installed versions, or simply in building everything from the scratch just for the fun of it. In such cases, we recommend to use [PyBOMBS](https://github.com/gnuradio/pybombs "Python Build Overlay Managed Bundle System") (Python Build Overlay Managed Bundle System), GNU Radio's meta-package manager tool that installs software from source, or whatever the local package manager is, that automatically does all the work for you. Please take a look at the configuration options and general PyBOMBS usage at https://github.com/gnuradio/pybombs. Here we provide a quick step-by-step tutorial.
|
||||||
@ -190,9 +209,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
|
|||||||
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
|
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
|
||||||
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
|
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
|
||||||
$ sudo pacman -S blas lapack # For Arch Linux
|
$ sudo pacman -S blas lapack # For Arch Linux
|
||||||
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.200.7.tar.xz
|
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.300.2.tar.xz
|
||||||
$ tar xvfz armadillo-9.200.7.tar.xz
|
$ tar xvfz armadillo-9.300.2.tar.xz
|
||||||
$ cd armadillo-9.200.7
|
$ cd armadillo-9.300.2
|
||||||
$ cmake .
|
$ cmake .
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
@ -219,9 +238,10 @@ $ sudo ldconfig
|
|||||||
#### Install [Glog](https://github.com/google/glog "Glog's Homepage"), a library that implements application-level logging:
|
#### Install [Glog](https://github.com/google/glog "Glog's Homepage"), a library that implements application-level logging:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ wget https://github.com/google/glog/archive/v0.3.5.tar.gz
|
$ wget https://github.com/google/glog/archive/v0.4.0.tar.gz
|
||||||
$ tar xvfz v0.3.5.tar.gz
|
$ tar xvfz v0.4.0.tar.gz
|
||||||
$ cd glog-0.3.5
|
$ cd glog-0.4.0
|
||||||
|
$ ./autogen.sh
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
@ -307,14 +327,14 @@ $ cd gnss-sdr/build
|
|||||||
Configure and build the application:
|
Configure and build the application:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake ../
|
$ cmake ..
|
||||||
$ make
|
$ make
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
By default, CMake will build the Release version, meaning that the compiler will generate a fast, optimized executable. This is the recommended build type when using an RF front-end and you need to attain real time. If working with a file (and thus without real-time constraints), you may want to obtain more information about the internals of the receiver, as well as more fine-grained logging. This can be done by building the Debug version, by doing:
|
By default, CMake will build the Release version, meaning that the compiler will generate a fast, optimized executable. This is the recommended build type when using an RF front-end and you need to attain real time. If working with a file (and thus without real-time constraints), you may want to obtain more information about the internals of the receiver, as well as more fine-grained logging. This can be done by building the Debug version, by doing:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DCMAKE_BUILD_TYPE=Debug ../
|
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
$ make
|
$ make
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
@ -372,7 +392,7 @@ Install the GNU Radio module:
|
|||||||
~~~~~~
|
~~~~~~
|
||||||
$ git clone https://github.com/gnss-sdr/gr-gn3s
|
$ git clone https://github.com/gnss-sdr/gr-gn3s
|
||||||
$ cd gr-gn3s/build
|
$ cd gr-gn3s/build
|
||||||
$ cmake ../
|
$ cmake ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
$ sudo ldconfig
|
$ sudo ldconfig
|
||||||
@ -382,7 +402,7 @@ Then configure GNSS-SDR to build the `GN3S_Signal_Source` by:
|
|||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cd gnss-sdr/build
|
$ cd gnss-sdr/build
|
||||||
$ cmake -DENABLE_GN3S=ON ../
|
$ cmake -DENABLE_GN3S=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -405,16 +425,16 @@ $ git clone git://git.osmocom.org/osmo-sdr.git
|
|||||||
$ cd osmo-sdr/software/libosmosdr
|
$ cd osmo-sdr/software/libosmosdr
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build/
|
$ cd build/
|
||||||
$ cmake ../
|
$ cmake ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
$ sudo ldconfig
|
$ sudo ldconfig
|
||||||
$ cd ../../
|
$ cd ../..
|
||||||
$ git clone git://git.osmocom.org/gr-osmosdr
|
$ git clone git://git.osmocom.org/gr-osmosdr
|
||||||
$ cd gr-osmosdr
|
$ cd gr-osmosdr
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake ../ -Wno-dev
|
$ cmake .. -Wno-dev
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
$ sudo ldconfig
|
$ sudo ldconfig
|
||||||
@ -424,7 +444,7 @@ $ sudo ldconfig
|
|||||||
Then, configure GNSS-SDR to build the `Osmosdr_Signal_Source` by:
|
Then, configure GNSS-SDR to build the `Osmosdr_Signal_Source` by:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DENABLE_OSMOSDR=ON ../
|
$ cmake -DENABLE_OSMOSDR=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -464,14 +484,14 @@ Then configure GNSS-SDR to build the `Fmcomms2_Signal_Source` implementation:
|
|||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cd gnss-sdr/build
|
$ cd gnss-sdr/build
|
||||||
$ cmake -DENABLE_FMCOMMS2=ON ../
|
$ cmake -DENABLE_FMCOMMS2=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
or configure it to build `Plutosdr_Signal_Source`:
|
or configure it to build `Plutosdr_Signal_Source`:
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DENABLE_PLUTOSDR=ON ../
|
$ cmake -DENABLE_PLUTOSDR=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -483,7 +503,7 @@ With `Fmcomms2_Signal_Source` you can use any SDR hardware based on [FMCOMMS2](h
|
|||||||
In order to enable the building of blocks that use OpenCL, type:
|
In order to enable the building of blocks that use OpenCL, type:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DENABLE_OPENCL=ON ../
|
$ cmake -DENABLE_OPENCL=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -494,7 +514,7 @@ $ sudo make install
|
|||||||
In order to enable the building of blocks that use CUDA, NVIDIA's parallel programming model that enables graphics processing unit (GPU) acceleration for data-parallel computations, first you need to install the CUDA Toolkit from [NVIDIA Developers Download page](https://developer.nvidia.com/cuda-downloads "CUDA Downloads"). Make sure that the SDK samples build well. Then, build GNSS-SDR by doing:
|
In order to enable the building of blocks that use CUDA, NVIDIA's parallel programming model that enables graphics processing unit (GPU) acceleration for data-parallel computations, first you need to install the CUDA Toolkit from [NVIDIA Developers Download page](https://developer.nvidia.com/cuda-downloads "CUDA Downloads"). Make sure that the SDK samples build well. Then, build GNSS-SDR by doing:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DENABLE_CUDA=ON ../
|
$ cmake -DENABLE_CUDA=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -507,7 +527,7 @@ Of course, you will also need a GPU that [supports CUDA](https://developer.nvidi
|
|||||||
In order to build an executable that not depends on the specific SIMD instruction set that is present in the processor of the compiling machine, so other users can execute it in other machines without those particular sets, use:
|
In order to build an executable that not depends on the specific SIMD instruction set that is present in the processor of the compiling machine, so other users can execute it in other machines without those particular sets, use:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DENABLE_GENERIC_ARCH=ON ../
|
$ cmake -DENABLE_GENERIC_ARCH=ON ..
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
~~~~~~
|
~~~~~~
|
||||||
@ -543,15 +563,16 @@ In a terminal, type:
|
|||||||
~~~~~~
|
~~~~~~
|
||||||
$ sudo port selfupdate
|
$ sudo port selfupdate
|
||||||
$ sudo port upgrade outdated
|
$ sudo port upgrade outdated
|
||||||
$ sudo port install doxygen +docs
|
|
||||||
$ sudo port install gnuradio
|
$ sudo port install gnuradio
|
||||||
|
$ sudo port install lapack
|
||||||
$ sudo port install armadillo
|
$ sudo port install armadillo
|
||||||
$ sudo port install gnutls
|
$ sudo port install gnutls
|
||||||
$ sudo port install google-glog +gflags
|
$ sudo port install google-glog +gflags
|
||||||
$ sudo port install py27-mako
|
|
||||||
$ sudo port install py27-six
|
|
||||||
$ sudo port install matio
|
$ sudo port install matio
|
||||||
$ sudo port install pugixml
|
$ sudo port install pugixml
|
||||||
|
$ sudo port install py27-mako
|
||||||
|
$ sudo port install py27-six
|
||||||
|
$ sudo port install doxygen +docs
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
You also might need to activate a Python installation. The list of installed versions can be retrieved with:
|
You also might need to activate a Python installation. The list of installed versions can be retrieved with:
|
||||||
@ -586,23 +607,20 @@ Install the required dependencies:
|
|||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ brew install cmake
|
$ brew install cmake
|
||||||
$ brew install hdf5 arpack superlu armadillo
|
$ brew install hdf5
|
||||||
$ brew install glog gflags
|
$ brew install lapack
|
||||||
|
$ brew install armadillo
|
||||||
|
$ brew install gflags
|
||||||
|
$ brew install glog
|
||||||
$ brew install gnuradio
|
$ brew install gnuradio
|
||||||
$ brew install libmatio
|
$ brew install libmatio
|
||||||
$ brew install log4cpp
|
$ brew install log4cpp
|
||||||
|
$ brew install openssl
|
||||||
$ brew install pugixml
|
$ brew install pugixml
|
||||||
$ pip install mako
|
$ pip install mako
|
||||||
$ pip install six
|
$ pip install six
|
||||||
$ brew install openssl
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
In the last step, Homebrew installs OpenSSL but it does not link it to `/usr/local`. Thus, you must manually link it instead:
|
|
||||||
|
|
||||||
~~~~~~
|
|
||||||
$ ln -s /usr/local/opt/openssl/include/openssl /usr/local/include
|
|
||||||
$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
|
|
||||||
~~~~~~
|
|
||||||
|
|
||||||
|
|
||||||
#### Build GNSS-SDR
|
#### Build GNSS-SDR
|
||||||
@ -612,7 +630,7 @@ Finally, you are ready to clone the GNSS-SDR repository, configure and build the
|
|||||||
~~~~~~
|
~~~~~~
|
||||||
$ git clone https://github.com/gnss-sdr/gnss-sdr
|
$ git clone https://github.com/gnss-sdr/gnss-sdr
|
||||||
$ cd gnss-sdr/build
|
$ cd gnss-sdr/build
|
||||||
$ cmake ../
|
$ cmake ..
|
||||||
$ make
|
$ make
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
@ -643,18 +661,18 @@ GNSS-SDR comes with a library which is a module of the Vector-Optimized Library
|
|||||||
GNU Radio and other dependencies can also be installed using other package managers than Macports, such as [Fink](http://www.finkproject.org/ "Fink") or [Homebrew](https://brew.sh/ "Homebrew"). Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the `PYTHON_EXECUTABLE` variable as:
|
GNU Radio and other dependencies can also be installed using other package managers than Macports, such as [Fink](http://www.finkproject.org/ "Fink") or [Homebrew](https://brew.sh/ "Homebrew"). Since the version of Python that ships with OS X is great for learning but it is not good for development, you could have another Python executable in a non-standard location. If that is the case, you need to inform GNSS-SDR's configuration system by defining the `PYTHON_EXECUTABLE` variable as:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
cmake -DPYTHON_EXECUTABLE=/path/to/bin/python ../
|
cmake -DPYTHON_EXECUTABLE=/path/to/bin/python ..
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
In case you have installed Macports in a non-standard location, you can use:
|
In case you have installed Macports in a non-standard location, you can use:
|
||||||
|
|
||||||
~~~~~~
|
~~~~~~
|
||||||
$ cmake -DCMAKE_PREFIX_PATH=/opt/local -DUSE_MACPORTS_PYTHON=/opt/local/bin/python ../
|
$ cmake -DCMAKE_PREFIX_PATH=/opt/local -DUSE_MACPORTS_PYTHON=/opt/local/bin/python ..
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
changing ```/opt/local``` by the base directory in which your software is installed.
|
changing ```/opt/local``` by the base directory in which your software is installed.
|
||||||
|
|
||||||
The CMake script will create Makefiles that download, build and link Armadillo, Gflags, Glog and Google Test on the fly at compile time if they are not detected in your machine.
|
The CMake script will create Makefiles that download, build and link Armadillo, Gflags, Glog, Matio, PugiXML and Google Test on the fly at compile time if they are not detected in your machine.
|
||||||
|
|
||||||
|
|
||||||
Other builds
|
Other builds
|
||||||
|
58
cmake/Modules/AvoidAccelerate.cmake
Normal file
58
cmake/Modules/AvoidAccelerate.cmake
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||||
|
#
|
||||||
|
# This file is part of GNSS-SDR.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Avoid using the BLAS and LAPACK implementations that comes with the Accelerate
|
||||||
|
# framework, which causes a bug when the BeiDou constellation is enabled
|
||||||
|
|
||||||
|
find_library(BLAS_LIBRARIES
|
||||||
|
libblas.dylib
|
||||||
|
PATHS
|
||||||
|
/opt/local/lib/lapack
|
||||||
|
/usr/local/opt/lapack/lib
|
||||||
|
/usr/local/lib
|
||||||
|
${BLAS_ROOT}/lib
|
||||||
|
$ENV{BLAS_ROOT}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
NO_CMAKE_ENVIRONMENT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BLAS_LIBRARIES)
|
||||||
|
set(BLAS_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
find_library(LAPACK_LIBRARIES
|
||||||
|
liblapack.dylib
|
||||||
|
PATHS
|
||||||
|
/opt/local/lib/lapack
|
||||||
|
/usr/local/opt/lapack/lib
|
||||||
|
/usr/local/lib
|
||||||
|
${BLAS_ROOT}/lib
|
||||||
|
$ENV{BLAS_ROOT}/lib
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
NO_CMAKE_ENVIRONMENT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
NO_CMAKE_SYSTEM_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if(LAPACK_LIBRARIES)
|
||||||
|
set(LAPACK_FOUND TRUE)
|
||||||
|
endif()
|
@ -47,6 +47,8 @@ InputFilter.filter_type=bandpass
|
|||||||
InputFilter.grid_density=16
|
InputFilter.grid_density=16
|
||||||
InputFilter.sampling_frequency=25000000
|
InputFilter.sampling_frequency=25000000
|
||||||
InputFilter.IF=6250000
|
InputFilter.IF=6250000
|
||||||
|
InputFilter.dump = false
|
||||||
|
InputFilter.dump_filename=/home/dmiralles/Documents/gnss-sdr/src/tests/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
|
||||||
Resampler.implementation=Pass_Through
|
Resampler.implementation=Pass_Through
|
||||||
Resampler.sample_freq_in=25000000
|
Resampler.sample_freq_in=25000000
|
||||||
Resampler.sample_freq_out=25000000
|
Resampler.sample_freq_out=25000000
|
||||||
@ -77,7 +79,7 @@ Acquisition_B1.threshold=0.0038
|
|||||||
;Acquisition_B1.pfa=0.0000001;
|
;Acquisition_B1.pfa=0.0000001;
|
||||||
Acquisition_B1.doppler_max=10000
|
Acquisition_B1.doppler_max=10000
|
||||||
Acquisition_B1.doppler_step=100
|
Acquisition_B1.doppler_step=100
|
||||||
Acquisition_B1.dump=false
|
Acquisition_B1.dump=true
|
||||||
Acquisition_B1.dump_filename=./bds_acq
|
Acquisition_B1.dump_filename=./bds_acq
|
||||||
Acquisition_B1.blocking=false;
|
Acquisition_B1.blocking=false;
|
||||||
Acquisition_B1.use_CFAR_algorithm=true;
|
Acquisition_B1.use_CFAR_algorithm=true;
|
||||||
@ -89,7 +91,7 @@ Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
|||||||
Tracking_B1.item_type=gr_complex
|
Tracking_B1.item_type=gr_complex
|
||||||
Tracking_B1.pll_bw_hz=25.0;
|
Tracking_B1.pll_bw_hz=25.0;
|
||||||
Tracking_B1.dll_bw_hz=2.50;
|
Tracking_B1.dll_bw_hz=2.50;
|
||||||
Tracking_B1.dump=false;
|
Tracking_B1.dump=true;
|
||||||
Tracking_B1.dump_filename=./epl_tracking_ch_
|
Tracking_B1.dump_filename=./epl_tracking_ch_
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ SignalSource.samples=0
|
|||||||
SignalSource.repeat=false
|
SignalSource.repeat=false
|
||||||
SignalSource.dump=false
|
SignalSource.dump=false
|
||||||
SignalSource.enable_throttle_control=false
|
SignalSource.enable_throttle_control=false
|
||||||
|
;SignalSource.samples=200000
|
||||||
|
|
||||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||||
SignalConditioner.implementation=Signal_Conditioner
|
SignalConditioner.implementation=Signal_Conditioner
|
||||||
@ -47,6 +48,8 @@ InputFilter.filter_type=bandpass
|
|||||||
InputFilter.grid_density=16
|
InputFilter.grid_density=16
|
||||||
InputFilter.sampling_frequency=50000000
|
InputFilter.sampling_frequency=50000000
|
||||||
InputFilter.IF=12500000
|
InputFilter.IF=12500000
|
||||||
|
InputFilter.dump = false
|
||||||
|
InputFilter.dump_filename=/home/dmiralles/Documents/gnss-sdr/src/tests/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
|
||||||
Resampler.implementation=Pass_Through
|
Resampler.implementation=Pass_Through
|
||||||
Resampler.sample_freq_in=50000000
|
Resampler.sample_freq_in=50000000
|
||||||
Resampler.sample_freq_out=50000000
|
Resampler.sample_freq_out=50000000
|
||||||
@ -55,7 +58,7 @@ Resampler.item_type=gr_complex
|
|||||||
|
|
||||||
;######### CHANNELS GLOBAL CONFIG ############
|
;######### CHANNELS GLOBAL CONFIG ############
|
||||||
Channels_B3.count=10
|
Channels_B3.count=10
|
||||||
Channels.in_acquisition=10
|
Channels.in_acquisition=1
|
||||||
Channel.signal=B3
|
Channel.signal=B3
|
||||||
|
|
||||||
Channel0.satellite = 6;
|
Channel0.satellite = 6;
|
||||||
@ -74,7 +77,7 @@ Acquisition_B3.implementation=BEIDOU_B3I_PCPS_Acquisition
|
|||||||
Acquisition_B3.item_type=gr_complex
|
Acquisition_B3.item_type=gr_complex
|
||||||
Acquisition_B3.coherent_integration_time_ms=3
|
Acquisition_B3.coherent_integration_time_ms=3
|
||||||
Acquisition_B3.max_dwells = 2
|
Acquisition_B3.max_dwells = 2
|
||||||
Acquisition_B3.threshold=0.0004
|
Acquisition_B3.threshold=0.0005
|
||||||
Acquisition_B3.doppler_max=10000
|
Acquisition_B3.doppler_max=10000
|
||||||
Acquisition_B3.doppler_step=100
|
Acquisition_B3.doppler_step=100
|
||||||
Acquisition_B3.dump=false
|
Acquisition_B3.dump=false
|
||||||
|
@ -8,10 +8,18 @@
|
|||||||
|
|
||||||
### Improvements in Efficiency
|
### Improvements in Efficiency
|
||||||
|
|
||||||
- Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average).
|
- Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average per channel).
|
||||||
|
- Shortened Acquisition to Tracking transition time.
|
||||||
- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-string-compare.
|
- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-string-compare.
|
||||||
|
|
||||||
|
|
||||||
|
### Improvements in Flexibility:
|
||||||
|
|
||||||
|
- New Tracking parameters allow the configuration of PLL and DLL filters order.
|
||||||
|
- Added parameter to enable FLL during pull-in time.
|
||||||
|
- Configurable pull-in time in the Tracking loops.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Interoperability:
|
### Improvements in Interoperability:
|
||||||
|
|
||||||
- Added the BeiDou B1I receiver chain.
|
- Added the BeiDou B1I receiver chain.
|
||||||
@ -30,7 +38,8 @@
|
|||||||
### Improvements in Portability:
|
### Improvements in Portability:
|
||||||
|
|
||||||
- Added interfaces for FPGA off-loading.
|
- Added interfaces for FPGA off-loading.
|
||||||
- CMake scripts now follow a modern approach (targets and properties) but still work in 2.8.12
|
- CMake scripts now follow a modern approach (targets and properties) but still work with 2.8.12.
|
||||||
|
- Improvements for macOS users using Homebrew.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Reliability
|
### Improvements in Reliability
|
||||||
|
@ -366,10 +366,10 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
|
|
||||||
// Display time in local time zone
|
// Display time in local time zone
|
||||||
d_show_local_time_zone = conf_.show_local_time_zone;
|
d_show_local_time_zone = conf_.show_local_time_zone;
|
||||||
time_t when = std::time(nullptr);
|
|
||||||
auto const tm = *std::localtime(&when);
|
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
#ifdef HAS_PUT_TIME
|
#ifdef HAS_PUT_TIME
|
||||||
|
time_t when = std::time(nullptr);
|
||||||
|
auto const tm = *std::localtime(&when);
|
||||||
os << std::put_time(&tm, "%z");
|
os << std::put_time(&tm, "%z");
|
||||||
#endif
|
#endif
|
||||||
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"
|
std::string utc_diff_str = os.str(); // in ISO 8601 format: "+HHMM" or "-HHMM"
|
||||||
|
@ -892,6 +892,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
if ((valid_obs + glo_valid_obs) > 3)
|
if ((valid_obs + glo_valid_obs) > 3)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
int sat = 0;
|
||||||
nav_t nav_data;
|
nav_t nav_data;
|
||||||
nav_data.eph = eph_data;
|
nav_data.eph = eph_data;
|
||||||
nav_data.geph = geph_data;
|
nav_data.geph = geph_data;
|
||||||
@ -903,6 +904,15 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
i[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
|
i[0] = SPEED_OF_LIGHT / FREQ1; // L1/E1
|
||||||
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
i[1] = SPEED_OF_LIGHT / FREQ2; // L2
|
||||||
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
||||||
|
|
||||||
|
// Keep update on sat number
|
||||||
|
sat++;
|
||||||
|
if (sat > NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS and sat < NSYSGPS + NSYSGLO + NSYSGAL + NSYSQZS + NSYSBDS)
|
||||||
|
{
|
||||||
|
i[0] = SPEED_OF_LIGHT / FREQ1_BDS; // B1I
|
||||||
|
i[1] = SPEED_OF_LIGHT / FREQ3_BDS; // B3I
|
||||||
|
i[2] = SPEED_OF_LIGHT / FREQ5; // L5/E5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = rtkpos(&rtk_, obs_data, valid_obs + glo_valid_obs, &nav_data);
|
result = rtkpos(&rtk_, obs_data, valid_obs + glo_valid_obs, &nav_data);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -57,7 +57,6 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
|||||||
DLOG(INFO) << "role " << role;
|
DLOG(INFO) << "role " << role;
|
||||||
|
|
||||||
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
item_type_ = configuration_->property(role + ".item_type", default_item_type);
|
||||||
|
|
||||||
int64_t 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);
|
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
acq_parameters.fs_in = fs_in_;
|
acq_parameters.fs_in = fs_in_;
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -100,7 +100,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -64,6 +64,9 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
|
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);
|
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
|
|
||||||
|
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||||
|
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||||
|
|
||||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
||||||
acq_parameters.downsampling_factor = downsampling_factor;
|
acq_parameters.downsampling_factor = downsampling_factor;
|
||||||
|
|
||||||
@ -163,7 +166,6 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||||
|
|
||||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
@ -274,5 +276,5 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block()
|
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisitionFpga::get_right_block()
|
||||||
{
|
{
|
||||||
return acquisition_fpga_;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,7 @@
|
|||||||
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GALILEO_E1_PCPS_AMBIGUOUS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
@ -93,7 +90,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_fpga_->set_channel(channel_);
|
acquisition_fpga_->set_channel(channel_);
|
||||||
@ -102,11 +99,12 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm
|
* \brief Set statistics threshold of PCPS algorithm
|
||||||
*/
|
*/
|
||||||
@ -157,9 +155,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
|
||||||
bool acquire_pilot_;
|
bool acquire_pilot_;
|
||||||
uint32_t channel_;
|
uint32_t channel_;
|
||||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -79,7 +79,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -61,6 +61,9 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
|||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
|
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);
|
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
|
|
||||||
|
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||||
|
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||||
|
|
||||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||||
acq_parameters.downsampling_factor = downsampling_factor;
|
acq_parameters.downsampling_factor = downsampling_factor;
|
||||||
fs_in = fs_in / downsampling_factor;
|
fs_in = fs_in / downsampling_factor;
|
||||||
@ -164,7 +167,6 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
|||||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||||
|
|
||||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
@ -274,5 +276,5 @@ gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_right_block()
|
gr::basic_block_sptr GalileoE5aPcpsAcquisitionFpga::get_right_block()
|
||||||
{
|
{
|
||||||
return acquisition_fpga_;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
@ -89,10 +88,11 @@ public:
|
|||||||
* tracking blocks
|
* tracking blocks
|
||||||
*/
|
*/
|
||||||
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_fpga_->set_channel(channel_);
|
acquisition_fpga_->set_channel(channel_);
|
||||||
@ -101,11 +101,12 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm
|
* \brief Set statistics threshold of PCPS algorithm
|
||||||
*/
|
*/
|
||||||
@ -166,7 +167,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -95,7 +95,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -104,7 +104,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -68,6 +68,9 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
|||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
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);
|
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
|
|
||||||
|
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||||
|
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||||
|
|
||||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 4.0);
|
||||||
acq_parameters.downsampling_factor = downsampling_factor;
|
acq_parameters.downsampling_factor = downsampling_factor;
|
||||||
|
|
||||||
@ -146,7 +149,6 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
|||||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||||
|
|
||||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
@ -257,5 +259,5 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block()
|
gr::basic_block_sptr GpsL1CaPcpsAcquisitionFpga::get_right_block()
|
||||||
{
|
{
|
||||||
return acquisition_fpga_;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_fpga_->set_channel(channel_);
|
acquisition_fpga_->set_channel(channel_);
|
||||||
@ -102,11 +102,12 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm
|
* \brief Set statistics threshold of PCPS algorithm
|
||||||
*/
|
*/
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_cc_->set_channel(channel_);
|
acquisition_cc_->set_channel(channel_);
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_cc_->set_channel_fsm(channel_fsm);
|
acquisition_cc_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -70,6 +70,9 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
acq_parameters.fs_in = fs_in_;
|
acq_parameters.fs_in = fs_in_;
|
||||||
|
|
||||||
|
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||||
|
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||||
|
|
||||||
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
doppler_max_ = configuration->property(role + ".doppler_max", 5000);
|
||||||
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
|
||||||
acq_parameters.doppler_max = doppler_max_;
|
acq_parameters.doppler_max = doppler_max_;
|
||||||
@ -139,13 +142,11 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
delete[] fft_codes_padded;
|
delete[] fft_codes_padded;
|
||||||
|
|
||||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
gnss_synchro_ = nullptr;
|
gnss_synchro_ = nullptr;
|
||||||
channel_fsm_ = nullptr;
|
channel_fsm_ = nullptr;
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
threshold_ = 0.0;
|
threshold_ = 0.0;
|
||||||
}
|
}
|
||||||
@ -253,5 +254,5 @@ gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_right_block()
|
gr::basic_block_sptr GpsL2MPcpsAcquisitionFpga::get_right_block()
|
||||||
{
|
{
|
||||||
return acquisition_fpga_;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,7 @@
|
|||||||
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GPS_L2_M_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
@ -94,7 +91,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_fpga_->set_channel(channel_);
|
acquisition_fpga_->set_channel(channel_);
|
||||||
@ -103,11 +100,12 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set statistics threshold of PCPS algorithm
|
* \brief Set statistics threshold of PCPS algorithm
|
||||||
*/
|
*/
|
||||||
@ -158,9 +156,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
unsigned int channel_;
|
unsigned int channel_;
|
||||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_->set_channel(channel_);
|
acquisition_->set_channel(channel_);
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_->set_channel_fsm(channel_fsm);
|
acquisition_->set_channel_fsm(channel_fsm);
|
||||||
|
@ -67,6 +67,9 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
|
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);
|
int64_t fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||||
|
|
||||||
|
acq_parameters.repeat_satellite = configuration_->property(role + ".repeat_satellite", false);
|
||||||
|
DLOG(INFO) << role << " satellite repeat = " << acq_parameters.repeat_satellite;
|
||||||
|
|
||||||
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
float downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0);
|
||||||
acq_parameters.downsampling_factor = downsampling_factor;
|
acq_parameters.downsampling_factor = downsampling_factor;
|
||||||
|
|
||||||
@ -146,7 +149,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14);
|
||||||
|
|
||||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||||
DLOG(INFO) << "acquisition(" << acquisition_fpga_->unique_id() << ")";
|
|
||||||
|
|
||||||
channel_ = 0;
|
channel_ = 0;
|
||||||
doppler_step_ = 0;
|
doppler_step_ = 0;
|
||||||
@ -258,5 +260,5 @@ gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_left_block()
|
|||||||
|
|
||||||
gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_right_block()
|
gr::basic_block_sptr GpsL5iPcpsAcquisitionFpga::get_right_block()
|
||||||
{
|
{
|
||||||
return acquisition_fpga_;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -36,10 +36,7 @@
|
|||||||
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_
|
||||||
|
|
||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "complex_byte_to_float_x2.h"
|
|
||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include <gnuradio/blocks/float_to_complex.h>
|
|
||||||
#include <gnuradio/blocks/stream_to_vector.h>
|
|
||||||
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
|
||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstddef> // for size_t
|
#include <cstddef> // for size_t
|
||||||
@ -95,7 +92,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set acquisition channel unique ID
|
* \brief Set acquisition channel unique ID
|
||||||
*/
|
*/
|
||||||
inline void set_channel(unsigned int channel)
|
inline void set_channel(unsigned int channel) override
|
||||||
{
|
{
|
||||||
channel_ = channel;
|
channel_ = channel;
|
||||||
acquisition_fpga_->set_channel(channel_);
|
acquisition_fpga_->set_channel(channel_);
|
||||||
@ -104,7 +101,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set channel fsm associated to this acquisition instance
|
* \brief Set channel fsm associated to this acquisition instance
|
||||||
*/
|
*/
|
||||||
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm)
|
inline void set_channel_fsm(std::shared_ptr<ChannelFsm> channel_fsm) override
|
||||||
{
|
{
|
||||||
channel_fsm_ = channel_fsm;
|
channel_fsm_ = channel_fsm;
|
||||||
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
acquisition_fpga_->set_channel_fsm(channel_fsm);
|
||||||
@ -159,9 +156,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
ConfigurationInterface* configuration_;
|
ConfigurationInterface* configuration_;
|
||||||
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
pcps_acquisition_fpga_sptr acquisition_fpga_;
|
||||||
gr::blocks::stream_to_vector::sptr stream_to_vector_;
|
|
||||||
gr::blocks::float_to_complex::sptr float_to_complex_;
|
|
||||||
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
|
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
uint32_t channel_;
|
uint32_t channel_;
|
||||||
std::shared_ptr<ChannelFsm> channel_fsm_;
|
std::shared_ptr<ChannelFsm> channel_fsm_;
|
||||||
|
@ -35,9 +35,6 @@
|
|||||||
#include "pcps_acquisition_fpga.h"
|
#include "pcps_acquisition_fpga.h"
|
||||||
#include "gnss_synchro.h"
|
#include "gnss_synchro.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/io_signature.h>
|
|
||||||
#include <pmt/pmt.h> // for from_long
|
|
||||||
#include <pmt/pmt_sugar.h> // for mp
|
|
||||||
#include <cmath> // for ceil
|
#include <cmath> // for ceil
|
||||||
#include <iostream> // for operator<<
|
#include <iostream> // for operator<<
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
@ -52,12 +49,8 @@ pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block("pcps_acquisition_fpga",
|
pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||||
gr::io_signature::make(0, 0, 0),
|
|
||||||
gr::io_signature::make(0, 0, 0))
|
|
||||||
{
|
{
|
||||||
this->message_port_register_out(pmt::mp("events"));
|
|
||||||
|
|
||||||
acq_parameters = std::move(conf_);
|
acq_parameters = std::move(conf_);
|
||||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||||
d_active = false;
|
d_active = false;
|
||||||
@ -150,16 +143,9 @@ void pcps_acquisition_fpga::send_positive_acquisition()
|
|||||||
<< ", magnitude " << d_mag
|
<< ", magnitude " << d_mag
|
||||||
<< ", input signal power " << d_input_power;
|
<< ", input signal power " << d_input_power;
|
||||||
|
|
||||||
if (d_channel_fsm)
|
|
||||||
{
|
|
||||||
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
//the channel FSM is set, so, notify it directly the positive acquisition to minimize delays
|
||||||
d_channel_fsm->Event_valid_acquisition();
|
d_channel_fsm->Event_valid_acquisition();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void pcps_acquisition_fpga::send_negative_acquisition()
|
void pcps_acquisition_fpga::send_negative_acquisition()
|
||||||
@ -175,7 +161,14 @@ void pcps_acquisition_fpga::send_negative_acquisition()
|
|||||||
<< ", magnitude " << d_mag
|
<< ", magnitude " << d_mag
|
||||||
<< ", input signal power " << d_input_power;
|
<< ", input signal power " << d_input_power;
|
||||||
|
|
||||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(2));
|
if (acq_parameters.repeat_satellite == true)
|
||||||
|
{
|
||||||
|
d_channel_fsm->Event_failed_acquisition_repeat();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_channel_fsm->Event_failed_acquisition_no_repeat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -266,16 +259,6 @@ void pcps_acquisition_fpga::set_active(bool active)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pcps_acquisition_fpga::general_work(int noutput_items __attribute__((unused)),
|
|
||||||
gr_vector_int& ninput_items __attribute__((unused)),
|
|
||||||
gr_vector_const_void_star& input_items __attribute__((unused)),
|
|
||||||
gr_vector_void_star& output_items __attribute__((unused)))
|
|
||||||
{
|
|
||||||
// the general work is not used with the acquisition that uses the FPGA
|
|
||||||
return noutput_items;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void pcps_acquisition_fpga::reset_acquisition(void)
|
void pcps_acquisition_fpga::reset_acquisition(void)
|
||||||
{
|
{
|
||||||
// this function triggers a HW reset of the FPGA PL.
|
// this function triggers a HW reset of the FPGA PL.
|
||||||
|
@ -44,8 +44,6 @@
|
|||||||
#include "channel_fsm.h"
|
#include "channel_fsm.h"
|
||||||
#include "fpga_acquisition.h"
|
#include "fpga_acquisition.h"
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <gnuradio/block.h> // for block
|
|
||||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
|
||||||
#include <volk/volk_complex.h> // for lv_16sc_t
|
#include <volk/volk_complex.h> // for lv_16sc_t
|
||||||
#include <cstdint> // for uint32_t
|
#include <cstdint> // for uint32_t
|
||||||
#include <memory> // for shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
@ -68,6 +66,7 @@ typedef struct
|
|||||||
float downsampling_factor;
|
float downsampling_factor;
|
||||||
uint32_t total_block_exp;
|
uint32_t total_block_exp;
|
||||||
uint32_t excludelimit;
|
uint32_t excludelimit;
|
||||||
|
bool repeat_satellite;
|
||||||
} pcpsconf_fpga_t;
|
} pcpsconf_fpga_t;
|
||||||
|
|
||||||
class pcps_acquisition_fpga;
|
class pcps_acquisition_fpga;
|
||||||
@ -83,7 +82,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
|||||||
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
|
* Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver",
|
||||||
* Algorithm 1, for a pseudocode description of this implementation.
|
* Algorithm 1, for a pseudocode description of this implementation.
|
||||||
*/
|
*/
|
||||||
class pcps_acquisition_fpga : public gr::block
|
class pcps_acquisition_fpga
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
friend pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_);
|
||||||
@ -221,13 +220,6 @@ public:
|
|||||||
* \brief This funciton is only used for the unit tests
|
* \brief This funciton is only used for the unit tests
|
||||||
*/
|
*/
|
||||||
void read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor);
|
void read_fpga_total_scale_factor(uint32_t* total_scale_factor, uint32_t* fw_scale_factor);
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief Parallel Code Phase Search Acquisition signal processing.
|
|
||||||
*/
|
|
||||||
int general_work(int noutput_items, gr_vector_int& ninput_items,
|
|
||||||
gr_vector_const_void_star& input_items,
|
|
||||||
gr_vector_void_star& output_items);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
#endif /* GNSS_SDR_PCPS_ACQUISITION_FPGA_H_*/
|
||||||
|
@ -55,7 +55,8 @@ Channel::Channel(ConfigurationInterface* configuration, uint32_t channel, std::s
|
|||||||
queue_ = std::move(queue);
|
queue_ = std::move(queue);
|
||||||
channel_fsm_ = std::make_shared<ChannelFsm>();
|
channel_fsm_ = std::make_shared<ChannelFsm>();
|
||||||
|
|
||||||
flag_enable_fpga = configuration->property("Channel.enable_FPGA", false);
|
flag_enable_fpga = configuration->property("GNSS-SDR.enable_FPGA", false);
|
||||||
|
|
||||||
acq_->set_channel(channel_);
|
acq_->set_channel(channel_);
|
||||||
acq_->set_channel_fsm(channel_fsm_);
|
acq_->set_channel_fsm(channel_fsm_);
|
||||||
trk_->set_channel(channel_);
|
trk_->set_channel(channel_);
|
||||||
@ -124,8 +125,11 @@ Channel::~Channel() = default;
|
|||||||
|
|
||||||
|
|
||||||
void Channel::connect(gr::top_block_sptr top_block)
|
void Channel::connect(gr::top_block_sptr top_block)
|
||||||
|
{
|
||||||
|
if (!flag_enable_fpga)
|
||||||
{
|
{
|
||||||
acq_->connect(top_block);
|
acq_->connect(top_block);
|
||||||
|
}
|
||||||
trk_->connect(top_block);
|
trk_->connect(top_block);
|
||||||
nav_->connect(top_block);
|
nav_->connect(top_block);
|
||||||
|
|
||||||
@ -136,7 +140,10 @@ void Channel::connect(gr::top_block_sptr top_block)
|
|||||||
DLOG(INFO) << "tracking -> telemetry_decoder";
|
DLOG(INFO) << "tracking -> telemetry_decoder";
|
||||||
|
|
||||||
// Message ports
|
// Message ports
|
||||||
|
if (!flag_enable_fpga)
|
||||||
|
{
|
||||||
top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
top_block->msg_connect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||||
|
}
|
||||||
top_block->msg_connect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
top_block->msg_connect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||||
|
|
||||||
connected_ = true;
|
connected_ = true;
|
||||||
@ -152,12 +159,18 @@ void Channel::disconnect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
top_block->disconnect(trk_->get_right_block(), 0, nav_->get_left_block(), 0);
|
top_block->disconnect(trk_->get_right_block(), 0, nav_->get_left_block(), 0);
|
||||||
|
if (!flag_enable_fpga)
|
||||||
|
{
|
||||||
acq_->disconnect(top_block);
|
acq_->disconnect(top_block);
|
||||||
|
}
|
||||||
trk_->disconnect(top_block);
|
trk_->disconnect(top_block);
|
||||||
nav_->disconnect(top_block);
|
nav_->disconnect(top_block);
|
||||||
|
|
||||||
top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
top_block->msg_disconnect(nav_->get_left_block(), pmt::mp("telemetry_to_trk"), trk_->get_right_block(), pmt::mp("telemetry_to_trk"));
|
||||||
|
if (!flag_enable_fpga)
|
||||||
|
{
|
||||||
top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
top_block->msg_disconnect(acq_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||||
|
}
|
||||||
top_block->msg_disconnect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
top_block->msg_disconnect(trk_->get_right_block(), pmt::mp("events"), channel_msg_rx, pmt::mp("events"));
|
||||||
connected_ = false;
|
connected_ = false;
|
||||||
}
|
}
|
||||||
@ -178,6 +191,10 @@ gr::basic_block_sptr Channel::get_left_block_trk()
|
|||||||
|
|
||||||
gr::basic_block_sptr Channel::get_left_block_acq()
|
gr::basic_block_sptr Channel::get_left_block_acq()
|
||||||
{
|
{
|
||||||
|
if (flag_enable_fpga)
|
||||||
|
{
|
||||||
|
LOG(ERROR) << "Enabled FPGA and called get_left_block() in channel interface";
|
||||||
|
}
|
||||||
return acq_->get_left_block();
|
return acq_->get_left_block();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +216,11 @@ void Channel::set_signal(const Gnss_Signal& gnss_signal)
|
|||||||
gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN();
|
gnss_synchro_.PRN = gnss_signal_.get_satellite().get_PRN();
|
||||||
gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0];
|
gnss_synchro_.System = gnss_signal_.get_satellite().get_system_short().c_str()[0];
|
||||||
acq_->set_local_code();
|
acq_->set_local_code();
|
||||||
|
if (flag_enable_fpga)
|
||||||
|
{
|
||||||
|
//set again the gnss_synchro pointer to trigger the preloading of the current PRN code to the FPGA fabric
|
||||||
|
trk_->set_gnss_synchro(&gnss_synchro_);
|
||||||
|
}
|
||||||
nav_->set_satellite(gnss_signal_.get_satellite());
|
nav_->set_satellite(gnss_signal_.get_satellite());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +242,15 @@ void Channel::start_acquisition()
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
if (!flag_enable_fpga)
|
||||||
|
{
|
||||||
result = channel_fsm_->Event_start_acquisition();
|
result = channel_fsm_->Event_start_acquisition();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = channel_fsm_->Event_start_acquisition_fpga();
|
||||||
|
channel_fsm_->start_acquisition();
|
||||||
|
}
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
LOG(WARNING) << "Invalid channel event";
|
LOG(WARNING) << "Invalid channel event";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file channel_fsm.cc
|
* \file channel_fsm.cc
|
||||||
* \brief Implementation of a State Machine for channel
|
* \brief Implementation of a State Machine for channel
|
||||||
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
* \authors Javier Arribas, 2019. javiarribas@gmail.com
|
||||||
|
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||||
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -74,6 +75,18 @@ bool ChannelFsm::Event_stop_channel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ChannelFsm::Event_start_acquisition_fpga()
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
if ((d_state == 1) || (d_state == 2))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
d_state = 1;
|
||||||
|
DLOG(INFO) << "CH = " << channel_ << ". Ev start acquisition FPGA";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ChannelFsm::Event_start_acquisition()
|
bool ChannelFsm::Event_start_acquisition()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(mx);
|
std::lock_guard<std::mutex> lk(mx);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file channel_fsm.h
|
* \file channel_fsm.h
|
||||||
* \brief Interface of the State Machine for channel
|
* \brief Interface of the State Machine for channel
|
||||||
* \authors Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
* \authors Javier Arribas, 2019. javiarribas@gmail.com
|
||||||
|
* Antonio Ramos, 2017. antonio.ramos(at)cttc.es
|
||||||
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
* Luis Esteve, 2011. luis(at)epsilon-formacion.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
@ -55,9 +56,10 @@ public:
|
|||||||
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
|
void set_telemetry(std::shared_ptr<TelemetryDecoderInterface> telemetry);
|
||||||
void set_queue(gr::msg_queue::sptr queue);
|
void set_queue(gr::msg_queue::sptr queue);
|
||||||
void set_channel(uint32_t channel);
|
void set_channel(uint32_t channel);
|
||||||
|
void start_acquisition();
|
||||||
// FSM EVENTS
|
// FSM EVENTS
|
||||||
bool Event_start_acquisition();
|
bool Event_start_acquisition();
|
||||||
|
bool Event_start_acquisition_fpga();
|
||||||
bool Event_valid_acquisition();
|
bool Event_valid_acquisition();
|
||||||
bool Event_stop_channel();
|
bool Event_stop_channel();
|
||||||
bool Event_failed_acquisition_repeat();
|
bool Event_failed_acquisition_repeat();
|
||||||
@ -65,7 +67,6 @@ public:
|
|||||||
bool Event_failed_tracking_standby();
|
bool Event_failed_tracking_standby();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void start_acquisition();
|
|
||||||
void start_tracking();
|
void start_tracking();
|
||||||
void stop_acquisition();
|
void stop_acquisition();
|
||||||
void stop_tracking();
|
void stop_tracking();
|
||||||
|
@ -70,14 +70,10 @@ target_link_libraries(algorithms_libs_rtklib
|
|||||||
core_system_parameters
|
core_system_parameters
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
|
${LAPACK_LIBRARIES}
|
||||||
|
${BLAS_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OS_IS_MACOSX)
|
|
||||||
target_link_libraries(algorithms_libs_rtklib PRIVATE "-framework Accelerate")
|
|
||||||
else()
|
|
||||||
target_link_libraries(algorithms_libs_rtklib PRIVATE ${LAPACK} ${BLAS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_property(TARGET algorithms_libs_rtklib
|
set_property(TARGET algorithms_libs_rtklib
|
||||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
@ -215,9 +215,7 @@ const int NSATQZS = 0;
|
|||||||
const int NSYSQZS = 0;
|
const int NSYSQZS = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __APPLE__
|
|
||||||
#define ENABDS
|
#define ENABDS
|
||||||
#endif
|
|
||||||
#ifdef ENABDS
|
#ifdef ENABDS
|
||||||
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
||||||
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou
|
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou
|
||||||
|
@ -43,12 +43,17 @@
|
|||||||
#include "rtklib_rtkcmn.h"
|
#include "rtklib_rtkcmn.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
|
obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band)
|
||||||
{
|
{
|
||||||
|
// Get signal type info to adjust code type based on constellation
|
||||||
|
std::string sig_ = gnss_synchro.Signal;
|
||||||
|
|
||||||
rtklib_obs.D[band] = gnss_synchro.Carrier_Doppler_hz;
|
rtklib_obs.D[band] = gnss_synchro.Carrier_Doppler_hz;
|
||||||
rtklib_obs.P[band] = gnss_synchro.Pseudorange_m;
|
rtklib_obs.P[band] = gnss_synchro.Pseudorange_m;
|
||||||
rtklib_obs.L[band] = gnss_synchro.Carrier_phase_rads / PI_2;
|
rtklib_obs.L[band] = gnss_synchro.Carrier_phase_rads / PI_2;
|
||||||
|
|
||||||
switch (band)
|
switch (band)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -86,6 +91,16 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
|||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS;
|
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS;
|
||||||
|
// Update signal code
|
||||||
|
if (sig_ == "B1")
|
||||||
|
{
|
||||||
|
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L2I);
|
||||||
|
}
|
||||||
|
else if (sig_ == "B3")
|
||||||
|
{
|
||||||
|
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L6I);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -210,7 +210,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fL1^2 / fL2(orL5)^2 . See IS-GPS-200, p. 103 and Galileo ICD p. 48 */
|
/* fL1^2 / fL2(orL5)^2 . See IS-GPS-200, p. 103 and Galileo ICD p. 48 */
|
||||||
if (sys == SYS_GPS or sys == SYS_GAL or sys == SYS_GLO)
|
if (sys == SYS_GPS or sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS)
|
||||||
{
|
{
|
||||||
gamma_ = std::pow(lam[j], 2.0) / std::pow(lam[i], 2.0);
|
gamma_ = std::pow(lam[j], 2.0) / std::pow(lam[i], 2.0);
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
|||||||
PC = P2 + P1_P2 - ISCl5i;
|
PC = P2 + P1_P2 - ISCl5i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sys == SYS_GAL or sys == SYS_GLO) // Gal. E5a single freq.
|
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) // Gal. E5a single freq.
|
||||||
{
|
{
|
||||||
P2 += P2_C2; /* C2->P2 */
|
P2 += P2_C2; /* C2->P2 */
|
||||||
PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_);
|
PC = P2 - gamma_ * P1_P2 / (1.0 - gamma_);
|
||||||
@ -306,7 +306,7 @@ double prange(const obsd_t *obs, const nav_t *nav, const double *azel,
|
|||||||
PC = P1 + P1_P2;
|
PC = P1 + P1_P2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sys == SYS_GAL or sys == SYS_GLO) /* E1 + E5a */
|
else if (sys == SYS_GAL or sys == SYS_GLO or sys == SYS_BDS) /* E1 + E5a */
|
||||||
{
|
{
|
||||||
P1 += P1_C1;
|
P1 += P1_C1;
|
||||||
P2 += P2_C2;
|
P2 += P2_C2;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h
|
* \file volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h
|
||||||
* \brief VOLK_GNSSSDR kernel: multiplies N complex (32-bit float per component) vectors
|
* \brief VOLK_GNSSSDR kernel: multiplies N complex (32-bit float per component) vectors
|
||||||
* by a common vector, phase rotated and accumulates the results in N float complex outputs.
|
* by a common vector, phase rotated with Doppler rate and accumulates the results in N float complex outputs.
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Antonio Ramos 2018. antonio.ramosdet(at)gmail.com
|
* <li> Carles Fernandez, 2019 cfernandez@cttc.es
|
||||||
|
* <li> Javier Arribas, 2019 javiarribas@cttc.es
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* VOLK_GNSSSDR kernel that multiplies N 32 bits complex vectors by a common vector, which is
|
* VOLK_GNSSSDR kernel that multiplies N 32 bits complex vectors by a common vector, which is
|
||||||
@ -43,8 +44,8 @@
|
|||||||
*
|
*
|
||||||
* Rotates and multiplies the reference complex vector with an arbitrary number of other real vectors,
|
* Rotates and multiplies the reference complex vector with an arbitrary number of other real vectors,
|
||||||
* accumulates the results and stores them in the output vector.
|
* accumulates the results and stores them in the output vector.
|
||||||
* The rotation is done at a fixed rate per sample, from an initial \p phase offset.
|
* The rotation is done at a variable rate per sample, from an initial \p phase offset.
|
||||||
* This function can be used for Doppler wipe-off and multiple correlator.
|
* This function can be used for Doppler wipe-off and multiple correlator in the presence of Doppler rate.
|
||||||
*
|
*
|
||||||
* <b>Dispatcher Prototype</b>
|
* <b>Dispatcher Prototype</b>
|
||||||
* \code
|
* \code
|
||||||
@ -70,24 +71,19 @@
|
|||||||
#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H
|
#define INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H
|
||||||
|
|
||||||
|
|
||||||
#include <volk_gnsssdr/saturation_arithmetic.h>
|
|
||||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
|
||||||
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
#include <volk_gnsssdr/volk_gnsssdr_malloc.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef LV_HAVE_GENERIC
|
#ifdef LV_HAVE_GENERIC
|
||||||
|
|
||||||
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||||
{
|
{
|
||||||
lv_32fc_t tmp32_1;
|
lv_32fc_t tmp32_1;
|
||||||
#ifdef __cplusplus
|
lv_32fc_t phase_doppler_rate = lv_cmake(1.0f, 0.0f);
|
||||||
lv_32fc_t half_phase_inc_rate = std::sqrt(phase_inc_rate);
|
lv_32fc_t phase_doppler = (*phase);
|
||||||
#else
|
|
||||||
lv_32fc_t half_phase_inc_rate = csqrtf(phase_inc_rate);
|
|
||||||
#endif
|
|
||||||
lv_32fc_t constant_rotation = phase_inc * half_phase_inc_rate;
|
|
||||||
lv_32fc_t delta_phase_rate = lv_cmake(1.0f, 0.0f);
|
|
||||||
int n_vec;
|
int n_vec;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||||
@ -96,27 +92,66 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
|
|||||||
}
|
}
|
||||||
for (n = 0; n < num_points; n++)
|
for (n = 0; n < num_points; n++)
|
||||||
{
|
{
|
||||||
tmp32_1 = *in_common++ * (*phase);
|
|
||||||
// Regenerate phase
|
// Regenerate phase
|
||||||
if (n % 256 == 0)
|
if (n % 256 == 0)
|
||||||
{
|
{
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
(*phase) /= std::abs((*phase));
|
(*phase) /= std::abs((*phase));
|
||||||
delta_phase_rate /= std::abs(delta_phase_rate);
|
|
||||||
#else
|
#else
|
||||||
(*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
|
(*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
|
||||||
delta_phase_rate /= hypotf(lv_creal(delta_phase_rate), lv_cimag(delta_phase_rate));
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
(*phase) *= (constant_rotation * delta_phase_rate);
|
tmp32_1 = *in_common++ * (*phase);
|
||||||
delta_phase_rate *= phase_inc_rate;
|
phase_doppler *= phase_inc;
|
||||||
|
phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake(n * n, 0.0f));
|
||||||
|
phase_doppler_rate /= hypotf(lv_creal(phase_doppler_rate), lv_cimag(phase_doppler_rate));
|
||||||
|
(*phase) = phase_doppler * phase_doppler_rate;
|
||||||
|
|
||||||
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||||
{
|
{
|
||||||
result[n_vec] += (tmp32_1 * in_a[n_vec][n]);
|
result[n_vec] += (tmp32_1 * in_a[n_vec][n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /*LV_HAVE_GENERIC*/
|
|
||||||
|
#ifdef LV_HAVE_GENERIC
|
||||||
|
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_arg(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||||
|
{
|
||||||
|
lv_32fc_t tmp32_1;
|
||||||
|
lv_32fc_t phase_doppler_rate = lv_cmake(1.0f, 0.0f);
|
||||||
|
lv_32fc_t phase_doppler = (*phase);
|
||||||
|
int n_vec;
|
||||||
|
const float arga = cargf(phase_inc_rate);
|
||||||
|
unsigned int n;
|
||||||
|
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||||
|
{
|
||||||
|
result[n_vec] = lv_cmake(0.0f, 0.0f);
|
||||||
|
}
|
||||||
|
for (n = 0; n < num_points; n++)
|
||||||
|
{
|
||||||
|
// Regenerate phase
|
||||||
|
if (n % 256 == 0)
|
||||||
|
{
|
||||||
|
#ifdef __cplusplus
|
||||||
|
(*phase) /= std::abs((*phase));
|
||||||
|
#else
|
||||||
|
(*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
tmp32_1 = *in_common++ * (*phase);
|
||||||
|
phase_doppler *= phase_inc;
|
||||||
|
const float theta = (float)(n * n) * arga;
|
||||||
|
phase_doppler_rate = lv_cmake(cosf(theta), sinf(theta));
|
||||||
|
(*phase) = phase_doppler * phase_doppler_rate;
|
||||||
|
|
||||||
|
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||||
|
{
|
||||||
|
result[n_vec] += (tmp32_1 * in_a[n_vec][n]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H */
|
#endif /* INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_H */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc.h
|
* \file volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc.h
|
||||||
* \brief Volk puppet for the multiple 16-bit complex dot product kernel.
|
* \brief VOLK_GNSSSDR kernel: multiplies N complex (32-bit float per component) vectors
|
||||||
|
* by a common vector, phase rotated with Doppler rate and accumulates the results in N float complex outputs.
|
||||||
* \authors <ul>
|
* \authors <ul>
|
||||||
* <li> Carles Fernandez Prades 2016 cfernandez at cttc dot cat
|
* <li> Carles Fernandez Prades 2016 cfernandez at cttc dot cat
|
||||||
* </ul>
|
* </ul>
|
||||||
@ -48,11 +49,11 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
|||||||
float rem_carrier_phase_in_rad = 0.25;
|
float rem_carrier_phase_in_rad = 0.25;
|
||||||
float phase_step_rad = 0.1;
|
float phase_step_rad = 0.1;
|
||||||
lv_32fc_t phase[1];
|
lv_32fc_t phase[1];
|
||||||
phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
phase[0] = lv_cmake(cosf(rem_carrier_phase_in_rad), sinf(rem_carrier_phase_in_rad));
|
||||||
lv_32fc_t phase_inc[1];
|
lv_32fc_t phase_inc[1];
|
||||||
phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
phase_inc[0] = lv_cmake(cosf(phase_step_rad), sinf(phase_step_rad));
|
||||||
lv_32fc_t phase_inc_rate[1];
|
lv_32fc_t phase_inc_rate[1];
|
||||||
phase_inc_rate[0] = lv_cmake(cos(phase_step_rad * 0.001), sin(phase_step_rad * 0.001));
|
phase_inc_rate[0] = lv_cmake(cosf(phase_step_rad * 0.001), sinf(phase_step_rad * 0.001));
|
||||||
int n;
|
int n;
|
||||||
int num_a_vectors = 3;
|
int num_a_vectors = 3;
|
||||||
float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
||||||
@ -61,6 +62,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
|||||||
in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
||||||
memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
||||||
}
|
}
|
||||||
|
|
||||||
volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
||||||
|
|
||||||
for (n = 0; n < num_a_vectors; n++)
|
for (n = 0; n < num_a_vectors; n++)
|
||||||
@ -71,93 +73,35 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
|||||||
}
|
}
|
||||||
#endif // Generic
|
#endif // Generic
|
||||||
|
|
||||||
//
|
#ifdef LV_HAVE_GENERIC
|
||||||
//#ifdef LV_HAVE_GENERIC
|
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_generic_arg(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
||||||
//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_generic_reload(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
{
|
||||||
//{
|
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||||
// // phases must be normalized. Phase rotator expects a complex exponential input!
|
float rem_carrier_phase_in_rad = 0.25;
|
||||||
// float rem_carrier_phase_in_rad = 0.25;
|
float phase_step_rad = 0.1;
|
||||||
// float phase_step_rad = 0.1;
|
lv_32fc_t phase[1];
|
||||||
// lv_32fc_t phase[1];
|
phase[0] = lv_cmake(cosf(rem_carrier_phase_in_rad), sinf(rem_carrier_phase_in_rad));
|
||||||
// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
lv_32fc_t phase_inc[1];
|
||||||
// lv_32fc_t phase_inc[1];
|
phase_inc[0] = lv_cmake(cosf(phase_step_rad), sinf(phase_step_rad));
|
||||||
// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
lv_32fc_t phase_inc_rate[1];
|
||||||
// int n;
|
phase_inc_rate[0] = lv_cmake(cosf(phase_step_rad * 0.001), sinf(phase_step_rad * 0.001));
|
||||||
// int num_a_vectors = 3;
|
int n;
|
||||||
// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
int num_a_vectors = 3;
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
||||||
// {
|
for (n = 0; n < num_a_vectors; n++)
|
||||||
// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
{
|
||||||
// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
||||||
// }
|
memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
||||||
// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_generic_reload(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
}
|
||||||
//
|
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_arg(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
||||||
// {
|
|
||||||
// volk_gnsssdr_free(in_a[n]);
|
for (n = 0; n < num_a_vectors; n++)
|
||||||
// }
|
{
|
||||||
// volk_gnsssdr_free(in_a);
|
volk_gnsssdr_free(in_a[n]);
|
||||||
//}
|
}
|
||||||
//
|
volk_gnsssdr_free(in_a);
|
||||||
//#endif // Generic
|
}
|
||||||
//
|
#endif // Generic
|
||||||
//#ifdef LV_HAVE_AVX
|
|
||||||
//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_u_avx(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
|
||||||
//{
|
|
||||||
// // phases must be normalized. Phase rotator expects a complex exponential input!
|
|
||||||
// float rem_carrier_phase_in_rad = 0.25;
|
|
||||||
// float phase_step_rad = 0.1;
|
|
||||||
// lv_32fc_t phase[1];
|
|
||||||
// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
|
||||||
// lv_32fc_t phase_inc[1];
|
|
||||||
// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
|
||||||
// int n;
|
|
||||||
// int num_a_vectors = 3;
|
|
||||||
// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
|
||||||
// {
|
|
||||||
// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
|
||||||
// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
|
||||||
// }
|
|
||||||
// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_u_avx(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
|
||||||
//
|
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
|
||||||
// {
|
|
||||||
// volk_gnsssdr_free(in_a[n]);
|
|
||||||
// }
|
|
||||||
// volk_gnsssdr_free(in_a);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//#endif // AVX
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//#ifdef LV_HAVE_AVX
|
|
||||||
//static inline void volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc_a_avx(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
|
||||||
//{
|
|
||||||
// // phases must be normalized. Phase rotator expects a complex exponential input!
|
|
||||||
// float rem_carrier_phase_in_rad = 0.25;
|
|
||||||
// float phase_step_rad = 0.1;
|
|
||||||
// lv_32fc_t phase[1];
|
|
||||||
// phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
|
||||||
// lv_32fc_t phase_inc[1];
|
|
||||||
// phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
|
||||||
// int n;
|
|
||||||
// int num_a_vectors = 3;
|
|
||||||
// float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
|
||||||
// {
|
|
||||||
// in_a[n] = (float*)volk_gnsssdr_malloc(sizeof(float) * num_points, volk_gnsssdr_get_alignment());
|
|
||||||
// memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
|
||||||
// }
|
|
||||||
// volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_a_avx(result, local_code, phase_inc[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
|
||||||
//
|
|
||||||
// for (n = 0; n < num_a_vectors; n++)
|
|
||||||
// {
|
|
||||||
// volk_gnsssdr_free(in_a[n]);
|
|
||||||
// }
|
|
||||||
// volk_gnsssdr_free(in_a);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//#endif // AVX
|
|
||||||
|
|
||||||
#endif // INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
|
#endif // INCLUDED_volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_H
|
||||||
|
@ -313,7 +313,7 @@ static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_u_avx(lv_32fc_
|
|||||||
number = sixteenthPoints * 16;
|
number = sixteenthPoints * 16;
|
||||||
for (; number < num_points; number++)
|
for (; number < num_points; number++)
|
||||||
{
|
{
|
||||||
wo = (*aPtr++) * _phase;
|
wo = in_common[number] * _phase;
|
||||||
_phase *= phase_inc;
|
_phase *= phase_inc;
|
||||||
|
|
||||||
for (vec_ind = 0; vec_ind < num_a_vectors; ++vec_ind)
|
for (vec_ind = 0; vec_ind < num_a_vectors; ++vec_ind)
|
||||||
@ -477,7 +477,7 @@ static inline void volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn_a_avx(lv_32fc_
|
|||||||
number = sixteenthPoints * 16;
|
number = sixteenthPoints * 16;
|
||||||
for (; number < num_points; number++)
|
for (; number < num_points; number++)
|
||||||
{
|
{
|
||||||
wo = (*aPtr++) * _phase;
|
wo = in_common[number] * _phase;
|
||||||
_phase *= phase_inc;
|
_phase *= phase_inc;
|
||||||
|
|
||||||
for (vec_ind = 0; vec_ind < num_a_vectors; ++vec_ind)
|
for (vec_ind = 0; vec_ind < num_a_vectors; ++vec_ind)
|
||||||
|
@ -97,9 +97,9 @@ std::vector<volk_gnsssdr_test_case_t> init_test_list(volk_gnsssdr_test_params_t
|
|||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_x2_dot_prod_16ic_xn, test_params))
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_x2_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_x2_dot_prod_16ic_xn, test_params))
|
||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn, test_params_int16))
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_x2_rotator_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_x2_rotator_dot_prod_16ic_xn, test_params_int16))
|
||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn, test_params_int16))
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_16ic_16i_rotator_dotprodxnpuppet_16ic, volk_gnsssdr_16ic_16i_rotator_dot_prod_16ic_xn, test_params_int16))
|
||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn, test_params_int1))
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_x2_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_x2_rotator_dot_prod_32fc_xn, test_params_inacc))
|
||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn, test_params_int1));
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_rotator_dot_prod_32fc_xn, test_params_inacc));
|
||||||
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn, test_params_int1));
|
QA(VOLK_INIT_PUPP(volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc, volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn, test_params_inacc));
|
||||||
|
|
||||||
return test_cases;
|
return test_cases;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
|||||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with this option enabled.")
|
message(FATAL_ERROR "gnuradio-iio is required for building gnss-sdr with -DENABLE_PLUTOSDR=ON or -DENABLE_FMCOMMS2=ON.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ if(ENABLE_AD9361)
|
|||||||
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
message(STATUS " * libiio from https://github.com/analogdevicesinc/libiio")
|
||||||
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
message(STATUS " * libad9361-iio from https://github.com/analogdevicesinc/libad9361-iio")
|
||||||
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
message(STATUS " * gnuradio-iio from https://github.com/analogdevicesinc/gr-iio")
|
||||||
message(FATAL_ERROR "libiio is required for building gnss-sdr with this option enabled.")
|
message(FATAL_ERROR "libiio is required for building gnss-sdr with -DENABLE_AD9361=ON.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -53,33 +53,27 @@ if(ENABLE_PLUTOSDR)
|
|||||||
##############################################
|
##############################################
|
||||||
# ADALM-PLUTO (Analog Devices Inc.)
|
# ADALM-PLUTO (Analog Devices Inc.)
|
||||||
##############################################
|
##############################################
|
||||||
if(GRIIO_FOUND)
|
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} plutosdr_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} plutosdr_signal_source.h)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_FMCOMMS2)
|
if(ENABLE_FMCOMMS2)
|
||||||
###############################################
|
###############################################
|
||||||
# FMCOMMS2 based SDR Hardware
|
# FMCOMMS2 based SDR Hardware
|
||||||
###############################################
|
###############################################
|
||||||
if(GRIIO_FOUND)
|
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} fmcomms2_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} fmcomms2_signal_source.h)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_AD9361)
|
if(ENABLE_AD9361)
|
||||||
###############################################
|
###############################################
|
||||||
# AD9361 DIRECT TO FPGA Hardware
|
# AD9361 DIRECT TO FPGA Hardware
|
||||||
###############################################
|
###############################################
|
||||||
if(LIBIIO_FOUND)
|
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} ad9361_fpga_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} ad9361_fpga_signal_source.h)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_GN3S)
|
if(ENABLE_GN3S)
|
||||||
@ -120,18 +114,14 @@ if(ENABLE_OSMOSDR)
|
|||||||
################################################################################
|
################################################################################
|
||||||
# OsmoSDR - http://sdr.osmocom.org/trac/
|
# OsmoSDR - http://sdr.osmocom.org/trac/
|
||||||
################################################################################
|
################################################################################
|
||||||
if(NOT GROSMOSDR_FOUND)
|
if(GROSMOSDR_FOUND)
|
||||||
if(ENABLE_PACKAGING)
|
|
||||||
list(REMOVE_ITEM SIGNAL_SOURCE_ADAPTER_HEADERS ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters/osmosdr_signal_source.h)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} osmosdr_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} osmosdr_signal_source.h)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
if(ENABLE_UHD)
|
||||||
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
|
set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} uhd_signal_source.cc)
|
||||||
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
|
set(OPT_DRIVER_HEADERS ${OPT_DRIVER_HEADERS} uhd_signal_source.h)
|
||||||
endif()
|
endif()
|
||||||
@ -162,10 +152,12 @@ set(SIGNAL_SOURCE_ADAPTER_HEADERS
|
|||||||
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
if(PC_GNURADIO_RUNTIME_VERSION VERSION_GREATER 3.7.3)
|
||||||
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
|
set(SIGNAL_SOURCE_ADAPTER_SOURCES ${SIGNAL_SOURCE_ADAPTER_SOURCES}
|
||||||
two_bit_cpx_file_signal_source.cc
|
two_bit_cpx_file_signal_source.cc
|
||||||
two_bit_packed_file_signal_source.cc)
|
two_bit_packed_file_signal_source.cc
|
||||||
|
)
|
||||||
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
set(SIGNAL_SOURCE_ADAPTER_HEADERS ${SIGNAL_SOURCE_ADAPTER_HEADERS}
|
||||||
two_bit_cpx_file_signal_source.h
|
two_bit_cpx_file_signal_source.h
|
||||||
two_bit_packed_file_signal_source.h)
|
two_bit_packed_file_signal_source.h
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
|
list(SORT SIGNAL_SOURCE_ADAPTER_HEADERS)
|
||||||
@ -205,7 +197,7 @@ if(ENABLE_RAW_UDP AND PCAP_FOUND)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UHD AND GNURADIO_UHD_LIBRARIES_gnuradio-uhd)
|
if(ENABLE_UHD)
|
||||||
target_link_libraries(signal_source_adapters
|
target_link_libraries(signal_source_adapters
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Gnuradio::uhd
|
Gnuradio::uhd
|
||||||
|
@ -72,7 +72,11 @@ public:
|
|||||||
telemetry_decoder_->set_channel(channel);
|
telemetry_decoder_->set_channel(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void reset() override { return; }
|
inline void reset() override
|
||||||
|
{
|
||||||
|
telemetry_decoder_->reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
inline size_t item_size() override { return 0; }
|
inline size_t item_size() override { return 0; }
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ beidou_b3i_make_telemetry_decoder_gs(const Gnss_Satellite &satellite,
|
|||||||
new beidou_b3i_telemetry_decoder_gs(satellite, dump));
|
new beidou_b3i_telemetry_decoder_gs(satellite, dump));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
|
beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
|
||||||
const Gnss_Satellite &satellite, bool dump)
|
const Gnss_Satellite &satellite, bool dump)
|
||||||
: gr::block("beidou_b3i_telemetry_decoder_gs",
|
: gr::block("beidou_b3i_telemetry_decoder_gs",
|
||||||
@ -64,6 +65,9 @@ beidou_b3i_telemetry_decoder_gs::beidou_b3i_telemetry_decoder_gs(
|
|||||||
{
|
{
|
||||||
// Ephemeris data port out
|
// Ephemeris data port out
|
||||||
this->message_port_register_out(pmt::mp("telemetry"));
|
this->message_port_register_out(pmt::mp("telemetry"));
|
||||||
|
// Control messages to tracking block
|
||||||
|
this->message_port_register_out(pmt::mp("telemetry_to_trk"));
|
||||||
|
|
||||||
// initialize internal vars
|
// initialize internal vars
|
||||||
d_dump = dump;
|
d_dump = dump;
|
||||||
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
|
||||||
@ -396,6 +400,7 @@ void beidou_b3i_telemetry_decoder_gs::set_satellite(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
|
void beidou_b3i_telemetry_decoder_gs::set_channel(int32_t channel)
|
||||||
{
|
{
|
||||||
d_channel = channel;
|
d_channel = channel;
|
||||||
|
@ -60,7 +60,10 @@ public:
|
|||||||
~beidou_b3i_telemetry_decoder_gs(); //!< Class destructor
|
~beidou_b3i_telemetry_decoder_gs(); //!< Class destructor
|
||||||
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
void set_satellite(const Gnss_Satellite &satellite); //!< Set satellite PRN
|
||||||
void set_channel(int channel); //!< Set receiver's channel
|
void set_channel(int channel); //!< Set receiver's channel
|
||||||
|
inline void reset()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
/*!
|
/*!
|
||||||
* \brief This is where all signal processing takes place
|
* \brief This is where all signal processing takes place
|
||||||
*/
|
*/
|
||||||
|
@ -73,6 +73,49 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
|||||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||||
}
|
}
|
||||||
trk_param.dll_bw_hz = dll_bw_hz;
|
trk_param.dll_bw_hz = dll_bw_hz;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||||
|
@ -68,6 +68,49 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
|||||||
float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
|
float dll_bw_hz = configuration->property(role + ".dll_bw_hz", 2.0);
|
||||||
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
if (FLAGS_dll_bw_hz != 0.0) dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||||
trk_param.dll_bw_hz = dll_bw_hz;
|
trk_param.dll_bw_hz = dll_bw_hz;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||||
@ -141,8 +184,7 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BeidouB3iDllPllTracking::~BeidouB3iDllPllTracking()
|
BeidouB3iDllPllTracking::~BeidouB3iDllPllTracking() = default;
|
||||||
= default;
|
|
||||||
|
|
||||||
|
|
||||||
void BeidouB3iDllPllTracking::start_tracking()
|
void BeidouB3iDllPllTracking::start_tracking()
|
||||||
|
@ -88,6 +88,49 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
|
|||||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||||
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25);
|
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 0.25);
|
||||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.15);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
|
@ -83,6 +83,49 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
|
|||||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||||
}
|
}
|
||||||
trk_param.dll_bw_hz = dll_bw_hz;
|
trk_param.dll_bw_hz = dll_bw_hz;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 5.0);
|
float pll_bw_narrow_hz = configuration->property(role + ".pll_bw_narrow_hz", 5.0);
|
||||||
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
trk_param.pll_bw_narrow_hz = pll_bw_narrow_hz;
|
||||||
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
float dll_bw_narrow_hz = configuration->property(role + ".dll_bw_narrow_hz", 2.0);
|
||||||
|
@ -89,6 +89,49 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
|||||||
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
dll_bw_hz = static_cast<float>(FLAGS_dll_bw_hz);
|
||||||
}
|
}
|
||||||
trk_param.dll_bw_hz = dll_bw_hz;
|
trk_param.dll_bw_hz = dll_bw_hz;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.5);
|
||||||
|
@ -77,6 +77,49 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
|
|||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
trk_param.early_late_space_narrow_chips = 0.0;
|
trk_param.early_late_space_narrow_chips = 0.0;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L2_M_CODE_RATE_HZ) / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||||
trk_param.vector_length = vector_length;
|
trk_param.vector_length = vector_length;
|
||||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||||
|
@ -90,6 +90,49 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
|
|||||||
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
|
||||||
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
|
||||||
trk_param.early_late_space_chips = early_late_space_chips;
|
trk_param.early_late_space_chips = early_late_space_chips;
|
||||||
|
|
||||||
|
int dll_filter_order = configuration->property(role + ".dll_filter_order", 2);
|
||||||
|
if (dll_filter_order < 1)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 1.";
|
||||||
|
dll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (dll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "dll_filter_order parameter must be 1, 2 or 3. Set to 3.";
|
||||||
|
dll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.dll_filter_order = dll_filter_order;
|
||||||
|
|
||||||
|
int pll_filter_order = configuration->property(role + ".pll_filter_order", 3);
|
||||||
|
if (pll_filter_order < 2)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 2.";
|
||||||
|
pll_filter_order = 2;
|
||||||
|
}
|
||||||
|
if (pll_filter_order > 3)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "pll_filter_order parameter must be 2 or 3. Set to 3.";
|
||||||
|
pll_filter_order = 3;
|
||||||
|
}
|
||||||
|
trk_param.pll_filter_order = pll_filter_order;
|
||||||
|
|
||||||
|
if (pll_filter_order == 2)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 1;
|
||||||
|
}
|
||||||
|
if (pll_filter_order == 3)
|
||||||
|
{
|
||||||
|
trk_param.fll_filter_order = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable_fll_pull_in = configuration->property(role + ".enable_fll_pull_in", false);
|
||||||
|
trk_param.enable_fll_pull_in = enable_fll_pull_in;
|
||||||
|
float fll_bw_hz = configuration->property(role + ".fll_bw_hz", 35.0);
|
||||||
|
trk_param.fll_bw_hz = fll_bw_hz;
|
||||||
|
float pull_in_time_s = configuration->property(role + ".pull_in_time_s", 2.0);
|
||||||
|
trk_param.pull_in_time_s = pull_in_time_s;
|
||||||
|
|
||||||
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||||
trk_param.vector_length = vector_length;
|
trk_param.vector_length = vector_length;
|
||||||
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||||
|
@ -39,6 +39,12 @@
|
|||||||
#include "acquisition_interface.h" // for AcquisitionInterface
|
#include "acquisition_interface.h" // for AcquisitionInterface
|
||||||
#include "array_signal_conditioner.h"
|
#include "array_signal_conditioner.h"
|
||||||
#include "beamformer_filter.h"
|
#include "beamformer_filter.h"
|
||||||
|
#include "beidou_b1i_dll_pll_tracking.h"
|
||||||
|
#include "beidou_b1i_pcps_acquisition.h"
|
||||||
|
#include "beidou_b1i_telemetry_decoder.h"
|
||||||
|
#include "beidou_b3i_dll_pll_tracking.h"
|
||||||
|
#include "beidou_b3i_pcps_acquisition.h"
|
||||||
|
#include "beidou_b3i_telemetry_decoder.h"
|
||||||
#include "byte_to_short.h"
|
#include "byte_to_short.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
@ -66,12 +72,6 @@
|
|||||||
#include "glonass_l2_ca_dll_pll_tracking.h"
|
#include "glonass_l2_ca_dll_pll_tracking.h"
|
||||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||||
#include "glonass_l2_ca_telemetry_decoder.h"
|
#include "glonass_l2_ca_telemetry_decoder.h"
|
||||||
#include "beidou_b1i_pcps_acquisition.h"
|
|
||||||
#include "beidou_b1i_dll_pll_tracking.h"
|
|
||||||
#include "beidou_b1i_telemetry_decoder.h"
|
|
||||||
#include "beidou_b3i_pcps_acquisition.h"
|
|
||||||
#include "beidou_b3i_dll_pll_tracking.h"
|
|
||||||
#include "beidou_b3i_telemetry_decoder.h"
|
|
||||||
#include "gnss_block_interface.h"
|
#include "gnss_block_interface.h"
|
||||||
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
||||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||||
@ -1218,7 +1218,6 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
|||||||
queue);
|
queue);
|
||||||
channel_absolute_id++;
|
channel_absolute_id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
@ -309,21 +309,41 @@ endif()
|
|||||||
|
|
||||||
if(ENABLE_UNIT_TESTING_EXTRA)
|
if(ENABLE_UNIT_TESTING_EXTRA)
|
||||||
add_definitions(-DEXTRA_TESTS)
|
add_definitions(-DEXTRA_TESTS)
|
||||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
|
||||||
message(STATUS "Downloading some data files for testing...")
|
message(STATUS "Downloading some data files for testing...")
|
||||||
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
||||||
|
message(STATUS "Downloading file: gps_l2c_m_prn7_5msps.dat")
|
||||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
||||||
SHOW_PROGRESS
|
SHOW_PROGRESS
|
||||||
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9)
|
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
|
||||||
message(STATUS "Downloading some data files for testing...")
|
message(STATUS "Downloading file: Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat")
|
||||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
|
||||||
SHOW_PROGRESS
|
SHOW_PROGRESS
|
||||||
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a)
|
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat)
|
||||||
|
message(STATUS "Downloading file: BdsB1IStr01_fs25e6_if0_4ms.dat")
|
||||||
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB1IStr01_fs25e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
|
||||||
|
SHOW_PROGRESS
|
||||||
|
EXPECTED_HASH MD5=5a4336dad9d80f3313a16dec4fff9233
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat)
|
||||||
|
message(STATUS "Downloading file: BdsB3IStr01_fs50e6_if0_4ms.dat")
|
||||||
|
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB3IStr01_fs50e6_if0_4ms.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
|
||||||
|
SHOW_PROGRESS
|
||||||
|
EXPECTED_HASH MD5=066d0d8434a8bc81e161778b7c34cc07
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
message(STATUS "Done.")
|
||||||
if(ENABLE_INSTALL_TESTS)
|
if(ENABLE_INSTALL_TESTS)
|
||||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@ DECLARE_string(log_dir);
|
|||||||
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
|
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
|
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
|
||||||
// #include "unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc"
|
// #include "unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc"
|
||||||
// #include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
|
|
||||||
|
|
||||||
#if OPENCL_BLOCKS_TEST
|
#if OPENCL_BLOCKS_TEST
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
|
||||||
@ -127,6 +126,8 @@ DECLARE_string(log_dir);
|
|||||||
|
|
||||||
#if EXTRA_TESTS
|
#if EXTRA_TESTS
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc"
|
||||||
|
//#include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
|
||||||
|
//#include "unit-tests/signal-processing-blocks/acquisition/beidou_b3i_pcps_acquisition_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc"
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc"
|
||||||
#include "unit-tests/signal-processing-blocks/pvt/rtklib_solver_test.cc"
|
#include "unit-tests/signal-processing-blocks/pvt/rtklib_solver_test.cc"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* \brief This class implements an acquisition test for
|
* \brief This class implements an acquisition test for
|
||||||
* BeidouB1iPcpsAcquisition class based on some input parameters.
|
* BeidouB1iPcpsAcquisition class based on some input parameters.
|
||||||
* \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.com
|
* \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.com
|
||||||
*
|
* \author Damian Miralles, 2019. dmiralles2009(at)gmail.com
|
||||||
*
|
*
|
||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
@ -44,7 +44,6 @@
|
|||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/analog/sig_source_c.h>
|
|
||||||
#include <gnuradio/analog/sig_source_waveform.h>
|
#include <gnuradio/analog/sig_source_waveform.h>
|
||||||
#include <gnuradio/blocks/file_source.h>
|
#include <gnuradio/blocks/file_source.h>
|
||||||
#include <gnuradio/blocks/null_sink.h>
|
#include <gnuradio/blocks/null_sink.h>
|
||||||
@ -52,12 +51,18 @@
|
|||||||
#include <gnuradio/top_block.h>
|
#include <gnuradio/top_block.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <utility>
|
||||||
|
#ifdef GR_GREATER_38
|
||||||
|
#include <gnuradio/analog/sig_source.h>
|
||||||
|
#else
|
||||||
|
#include <gnuradio/analog/sig_source_c.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||||
class BeidouB1iPcpsAcquisitionTest_msg_rx;
|
class BeidouB1iPcpsAcquisitionTest_msg_rx;
|
||||||
|
|
||||||
typedef boost::shared_ptr<BeidouB1iPcpsAcquisitionTest_msg_rx> BeidouB1iPcpsAcquisitionTest_msg_rx_sptr;
|
using BeidouB1iPcpsAcquisitionTest_msg_rx_sptr = boost::shared_ptr<BeidouB1iPcpsAcquisitionTest_msg_rx>;
|
||||||
|
|
||||||
BeidouB1iPcpsAcquisitionTest_msg_rx_sptr BeidouB1iPcpsAcquisitionTest_msg_rx_make();
|
BeidouB1iPcpsAcquisitionTest_msg_rx_sptr BeidouB1iPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
@ -84,7 +89,7 @@ void BeidouB1iPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
long int message = pmt::to_long(msg);
|
int64_t message = pmt::to_long(std::move(msg));
|
||||||
rx_message = message;
|
rx_message = message;
|
||||||
}
|
}
|
||||||
catch (boost::bad_any_cast &e)
|
catch (boost::bad_any_cast &e)
|
||||||
@ -103,9 +108,7 @@ BeidouB1iPcpsAcquisitionTest_msg_rx::BeidouB1iPcpsAcquisitionTest_msg_rx() : gr:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BeidouB1iPcpsAcquisitionTest_msg_rx::~BeidouB1iPcpsAcquisitionTest_msg_rx()
|
BeidouB1iPcpsAcquisitionTest_msg_rx::~BeidouB1iPcpsAcquisitionTest_msg_rx() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ###########################################################
|
// ###########################################################
|
||||||
@ -123,9 +126,7 @@ protected:
|
|||||||
doppler_step = 100;
|
doppler_step = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
~BeidouB1iPcpsAcquisitionTest()
|
~BeidouB1iPcpsAcquisitionTest() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void plot_grid();
|
void plot_grid();
|
||||||
@ -133,7 +134,7 @@ protected:
|
|||||||
gr::top_block_sptr top_block;
|
gr::top_block_sptr top_block;
|
||||||
std::shared_ptr<GNSSBlockFactory> factory;
|
std::shared_ptr<GNSSBlockFactory> factory;
|
||||||
std::shared_ptr<InMemoryConfiguration> config;
|
std::shared_ptr<InMemoryConfiguration> config;
|
||||||
Gnss_Synchro gnss_synchro;
|
Gnss_Synchro gnss_synchro{};
|
||||||
size_t item_size;
|
size_t item_size;
|
||||||
unsigned int doppler_max;
|
unsigned int doppler_max;
|
||||||
unsigned int doppler_step;
|
unsigned int doppler_step;
|
||||||
@ -159,8 +160,9 @@ void BeidouB1iPcpsAcquisitionTest::init()
|
|||||||
{
|
{
|
||||||
config->set_property("Acquisition_B1.dump", "false");
|
config->set_property("Acquisition_B1.dump", "false");
|
||||||
}
|
}
|
||||||
config->set_property("Acquisition_B1.dump_filename", "./tmp-acq-beidou1/acquisition");
|
config->set_property("Acquisition_B1.dump_filename", "./tmp-acq-bds-b1i/acquisition");
|
||||||
config->set_property("Acquisition_B1.threshold", "0.00001");
|
config->set_property("Acquisition_B1.dump_channel", "1");
|
||||||
|
config->set_property("Acquisition_B1.threshold", "0.0038");
|
||||||
config->set_property("Acquisition_B1.doppler_max", std::to_string(doppler_max));
|
config->set_property("Acquisition_B1.doppler_max", std::to_string(doppler_max));
|
||||||
config->set_property("Acquisition_B1.doppler_step", std::to_string(doppler_step));
|
config->set_property("Acquisition_B1.doppler_step", std::to_string(doppler_step));
|
||||||
config->set_property("Acquisition_B1.repeat_satellite", "false");
|
config->set_property("Acquisition_B1.repeat_satellite", "false");
|
||||||
@ -171,13 +173,16 @@ void BeidouB1iPcpsAcquisitionTest::init()
|
|||||||
void BeidouB1iPcpsAcquisitionTest::plot_grid()
|
void BeidouB1iPcpsAcquisitionTest::plot_grid()
|
||||||
{
|
{
|
||||||
//load the measured values
|
//load the measured values
|
||||||
std::string basename = "./tmp-acq-beidou1/acquisition_C_B1";
|
std::string basename = "./tmp-acq-bds-b1i/acquisition_C_B1";
|
||||||
unsigned int sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||||
|
|
||||||
unsigned int samples_per_code = static_cast<unsigned int>(round(4000000 / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS))); // !!
|
auto samples_per_code = static_cast<unsigned int>(round(25000000 / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS))); // !!
|
||||||
acquisition_dump_reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code);
|
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||||
|
|
||||||
if (!acq_dump.read_binary_acq()) std::cout << "Error reading files" << std::endl;
|
if (!acq_dump.read_binary_acq())
|
||||||
|
{
|
||||||
|
std::cout << "Error reading files" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<int> *doppler = &acq_dump.doppler;
|
std::vector<int> *doppler = &acq_dump.doppler;
|
||||||
std::vector<unsigned int> *samples = &acq_dump.samples;
|
std::vector<unsigned int> *samples = &acq_dump.samples;
|
||||||
@ -197,26 +202,33 @@ void BeidouB1iPcpsAcquisitionTest::plot_grid()
|
|||||||
{
|
{
|
||||||
boost::filesystem::path p(gnuplot_executable);
|
boost::filesystem::path p(gnuplot_executable);
|
||||||
boost::filesystem::path dir = p.parent_path();
|
boost::filesystem::path dir = p.parent_path();
|
||||||
std::string gnuplot_path = dir.native();
|
const std::string &gnuplot_path = dir.native();
|
||||||
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
||||||
|
|
||||||
Gnuplot g1("lines");
|
Gnuplot g1("lines");
|
||||||
g1.set_title("BeiDou signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN));
|
if (FLAGS_show_plots)
|
||||||
|
{
|
||||||
|
g1.showonscreen(); // window output
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g1.disablescreen();
|
||||||
|
}
|
||||||
|
g1.set_title("BeiDou B1I signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN));
|
||||||
g1.set_xlabel("Doppler [Hz]");
|
g1.set_xlabel("Doppler [Hz]");
|
||||||
g1.set_ylabel("Sample");
|
g1.set_ylabel("Sample");
|
||||||
//g1.cmd("set view 60, 105, 1, 1");
|
//g1.cmd("set view 60, 105, 1, 1");
|
||||||
g1.plot_grid3d(*doppler, *samples, *mag);
|
g1.plot_grid3d(*doppler, *samples, *mag);
|
||||||
|
|
||||||
g1.savetops("BEIDOU_B1I_acq_grid");
|
g1.savetops("BeiDou_B1I_acq_grid");
|
||||||
g1.savetopdf("BEIDOU_BI1_acq_grid");
|
g1.savetopdf("BeiDou_B1I_acq_grid");
|
||||||
g1.showonscreen();
|
|
||||||
}
|
}
|
||||||
catch (const GnuplotException &ge)
|
catch (const GnuplotException &ge)
|
||||||
{
|
{
|
||||||
std::cout << ge.what() << std::endl;
|
std::cout << ge.what() << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string data_str = "./tmp-acq-beidou1";
|
std::string data_str = "./tmp-acq-bds-b1i";
|
||||||
if (boost::filesystem::exists(data_str))
|
if (boost::filesystem::exists(data_str))
|
||||||
{
|
{
|
||||||
boost::filesystem::remove_all(data_str);
|
boost::filesystem::remove_all(data_str);
|
||||||
@ -234,7 +246,7 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, Instantiate)
|
|||||||
TEST_F(BeidouB1iPcpsAcquisitionTest, ConnectAndRun)
|
TEST_F(BeidouB1iPcpsAcquisitionTest, ConnectAndRun)
|
||||||
{
|
{
|
||||||
int fs_in = 25000000;
|
int fs_in = 25000000;
|
||||||
int nsamples = 4000;
|
int nsamples = 25000;
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
std::chrono::duration<double> elapsed_seconds(0);
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
||||||
@ -270,14 +282,14 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
std::chrono::duration<double> elapsed_seconds(0.0);
|
std::chrono::duration<double> elapsed_seconds(0.0);
|
||||||
top_block = gr::make_top_block("Acquisition test");
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
double expected_delay_samples = 524;
|
double expected_delay_samples = 22216;
|
||||||
double expected_doppler_hz = 1680;
|
double expected_doppler_hz = 125;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
if (FLAGS_plot_acq_grid == true)
|
if (FLAGS_plot_acq_grid == true)
|
||||||
{
|
{
|
||||||
std::string data_str = "./tmp-acq-beidou1";
|
std::string data_str = "./tmp-acq-bds-b1i";
|
||||||
if (boost::filesystem::exists(data_str))
|
if (boost::filesystem::exists(data_str))
|
||||||
{
|
{
|
||||||
boost::filesystem::remove_all(data_str);
|
boost::filesystem::remove_all(data_str);
|
||||||
@ -297,7 +309,7 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
}) << "Failure setting gnss_synchro.";
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
ASSERT_NO_THROW({
|
ASSERT_NO_THROW({
|
||||||
acquisition->set_threshold(0.001);
|
acquisition->set_threshold(0.0038);
|
||||||
}) << "Failure setting threshold.";
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
ASSERT_NO_THROW({
|
ASSERT_NO_THROW({
|
||||||
@ -314,7 +326,7 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
|
|
||||||
ASSERT_NO_THROW({
|
ASSERT_NO_THROW({
|
||||||
std::string path = std::string(TEST_PATH);
|
std::string path = std::string(TEST_PATH);
|
||||||
std::string file = path + "signal_samples/BEIDOU_B1I_ID_1_Fs_4Msps_2ms.dat";
|
std::string file = path + "signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat";
|
||||||
const char *file_name = file.c_str();
|
const char *file_name = file.c_str();
|
||||||
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
||||||
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
||||||
@ -332,12 +344,12 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ValidationOfResults)
|
|||||||
elapsed_seconds = end - start;
|
elapsed_seconds = end - start;
|
||||||
}) << "Failure running the top_block.";
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
|
uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples;
|
||||||
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
|
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
|
||||||
|
|
||||||
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
|
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
|
||||||
float delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
|
auto delay_error_chips = static_cast<float>(delay_error_samples * BEIDOU_B1I_CODE_LENGTH_CHIPS / 25000);
|
||||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";
|
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";
|
||||||
|
@ -0,0 +1,361 @@
|
|||||||
|
/*!
|
||||||
|
* \file beidou_b3i_pcps_acquisition_test.cc
|
||||||
|
* \brief This class implements an acquisition test for
|
||||||
|
* BeidouB3iPcpsAcquisition class based on some input parameters.
|
||||||
|
* \author Damian Miralles, 2019. dmiralles2009(at)gmail.com
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||||
|
*
|
||||||
|
* GNSS-SDR is a software defined Global Navigation
|
||||||
|
* Satellite Systems receiver
|
||||||
|
*
|
||||||
|
* This file is part of GNSS-SDR.
|
||||||
|
*
|
||||||
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "Beidou_B3I.h"
|
||||||
|
#include "acquisition_dump_reader.h"
|
||||||
|
#include "gnss_block_factory.h"
|
||||||
|
#include "gnss_block_interface.h"
|
||||||
|
#include "gnss_sdr_valve.h"
|
||||||
|
#include "gnss_synchro.h"
|
||||||
|
#include "gnuplot_i.h"
|
||||||
|
#include "beidou_b3i_pcps_acquisition.h"
|
||||||
|
#include "in_memory_configuration.h"
|
||||||
|
#include "test_flags.h"
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/make_shared.hpp>
|
||||||
|
#include <glog/logging.h>
|
||||||
|
#include <gnuradio/analog/sig_source_waveform.h>
|
||||||
|
#include <gnuradio/blocks/file_source.h>
|
||||||
|
#include <gnuradio/blocks/null_sink.h>
|
||||||
|
#include <gnuradio/msg_queue.h>
|
||||||
|
#include <gnuradio/top_block.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
#include <chrono>
|
||||||
|
#include <utility>
|
||||||
|
#ifdef GR_GREATER_38
|
||||||
|
#include <gnuradio/analog/sig_source.h>
|
||||||
|
#else
|
||||||
|
#include <gnuradio/analog/sig_source_c.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||||
|
class BeidouB3iPcpsAcquisitionTest_msg_rx;
|
||||||
|
|
||||||
|
using BeidouB3iPcpsAcquisitionTest_msg_rx_sptr = boost::shared_ptr<BeidouB3iPcpsAcquisitionTest_msg_rx>;
|
||||||
|
|
||||||
|
BeidouB3iPcpsAcquisitionTest_msg_rx_sptr BeidouB3iPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
|
class BeidouB3iPcpsAcquisitionTest_msg_rx : public gr::block
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
friend BeidouB3iPcpsAcquisitionTest_msg_rx_sptr BeidouB3iPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
void msg_handler_events(pmt::pmt_t msg);
|
||||||
|
BeidouB3iPcpsAcquisitionTest_msg_rx();
|
||||||
|
|
||||||
|
public:
|
||||||
|
int rx_message;
|
||||||
|
~BeidouB3iPcpsAcquisitionTest_msg_rx(); //!< Default destructor
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
BeidouB3iPcpsAcquisitionTest_msg_rx_sptr BeidouB3iPcpsAcquisitionTest_msg_rx_make()
|
||||||
|
{
|
||||||
|
return BeidouB3iPcpsAcquisitionTest_msg_rx_sptr(new BeidouB3iPcpsAcquisitionTest_msg_rx());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BeidouB3iPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int64_t message = pmt::to_long(std::move(msg));
|
||||||
|
rx_message = message;
|
||||||
|
}
|
||||||
|
catch (boost::bad_any_cast &e)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "msg_handler_telemetry Bad any cast!";
|
||||||
|
rx_message = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BeidouB3iPcpsAcquisitionTest_msg_rx::BeidouB3iPcpsAcquisitionTest_msg_rx() : gr::block("BeidouB3iPcpsAcquisitionTest_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
|
||||||
|
{
|
||||||
|
this->message_port_register_in(pmt::mp("events"));
|
||||||
|
this->set_msg_handler(pmt::mp("events"), boost::bind(&BeidouB3iPcpsAcquisitionTest_msg_rx::msg_handler_events, this, _1));
|
||||||
|
rx_message = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BeidouB3iPcpsAcquisitionTest_msg_rx::~BeidouB3iPcpsAcquisitionTest_msg_rx() = default;
|
||||||
|
|
||||||
|
|
||||||
|
// ###########################################################
|
||||||
|
|
||||||
|
class BeidouB3iPcpsAcquisitionTest : public ::testing::Test
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
BeidouB3iPcpsAcquisitionTest()
|
||||||
|
{
|
||||||
|
factory = std::make_shared<GNSSBlockFactory>();
|
||||||
|
config = std::make_shared<InMemoryConfiguration>();
|
||||||
|
item_size = sizeof(gr_complex);
|
||||||
|
gnss_synchro = Gnss_Synchro();
|
||||||
|
doppler_max = 5000;
|
||||||
|
doppler_step = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
~BeidouB3iPcpsAcquisitionTest() = default;
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void plot_grid();
|
||||||
|
|
||||||
|
gr::top_block_sptr top_block;
|
||||||
|
std::shared_ptr<GNSSBlockFactory> factory;
|
||||||
|
std::shared_ptr<InMemoryConfiguration> config;
|
||||||
|
Gnss_Synchro gnss_synchro{};
|
||||||
|
size_t item_size;
|
||||||
|
unsigned int doppler_max;
|
||||||
|
unsigned int doppler_step;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void BeidouB3iPcpsAcquisitionTest::init()
|
||||||
|
{
|
||||||
|
gnss_synchro.Channel_ID = 0;
|
||||||
|
gnss_synchro.System = 'C';
|
||||||
|
std::string signal = "B3";
|
||||||
|
signal.copy(gnss_synchro.Signal, 2, 0);
|
||||||
|
gnss_synchro.PRN = 1;
|
||||||
|
config->set_property("GNSS-SDR.internal_fs_sps", "50000000");
|
||||||
|
config->set_property("Acquisition_B3.implementation", "BEIDOU_B3I_PCPS_Acquisition");
|
||||||
|
config->set_property("Acquisition_B3.item_type", "gr_complex");
|
||||||
|
config->set_property("Acquisition_B3.coherent_integration_time_ms", "1");
|
||||||
|
if (FLAGS_plot_acq_grid == true)
|
||||||
|
{
|
||||||
|
config->set_property("Acquisition_B3.dump", "true");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
config->set_property("Acquisition_B3.dump", "false");
|
||||||
|
}
|
||||||
|
config->set_property("Acquisition_B3.dump_filename", "./tmp-acq-bds-b3i/acquisition");
|
||||||
|
config->set_property("Acquisition_B3.dump_channel", "1");
|
||||||
|
config->set_property("Acquisition_B3.threshold", "0.00001");
|
||||||
|
config->set_property("Acquisition_B3.doppler_max", std::to_string(doppler_max));
|
||||||
|
config->set_property("Acquisition_B3.doppler_step", std::to_string(doppler_step));
|
||||||
|
config->set_property("Acquisition_B3.repeat_satellite", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BeidouB3iPcpsAcquisitionTest::plot_grid()
|
||||||
|
{
|
||||||
|
//load the measured values
|
||||||
|
std::string basename = "./tmp-acq-bds-b3i/acquisition_C_B3";
|
||||||
|
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||||
|
|
||||||
|
auto samples_per_code = static_cast<unsigned int>(round(50000000 / (BEIDOU_B3I_CODE_RATE_HZ / BEIDOU_B3I_CODE_LENGTH_CHIPS))); // !!
|
||||||
|
Acquisition_Dump_Reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||||
|
|
||||||
|
if (!acq_dump.read_binary_acq())
|
||||||
|
{
|
||||||
|
std::cout << "Error reading files" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<int> *doppler = &acq_dump.doppler;
|
||||||
|
std::vector<unsigned int> *samples = &acq_dump.samples;
|
||||||
|
std::vector<std::vector<float> > *mag = &acq_dump.mag;
|
||||||
|
|
||||||
|
const std::string gnuplot_executable(FLAGS_gnuplot_executable);
|
||||||
|
if (gnuplot_executable.empty())
|
||||||
|
{
|
||||||
|
std::cout << "WARNING: Although the flag plot_acq_grid has been set to TRUE," << std::endl;
|
||||||
|
std::cout << "gnuplot has not been found in your system." << std::endl;
|
||||||
|
std::cout << "Test results will not be plotted." << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Plotting the acquisition grid. This can take a while..." << std::endl;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
boost::filesystem::path p(gnuplot_executable);
|
||||||
|
boost::filesystem::path dir = p.parent_path();
|
||||||
|
const std::string &gnuplot_path = dir.native();
|
||||||
|
Gnuplot::set_GNUPlotPath(gnuplot_path);
|
||||||
|
|
||||||
|
Gnuplot g1("lines");
|
||||||
|
if (FLAGS_show_plots)
|
||||||
|
{
|
||||||
|
g1.showonscreen(); // window output
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g1.disablescreen();
|
||||||
|
}
|
||||||
|
g1.set_title("BeiDou B3I signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN));
|
||||||
|
g1.set_xlabel("Doppler [Hz]");
|
||||||
|
g1.set_ylabel("Sample");
|
||||||
|
//g1.cmd("set view 60, 105, 1, 1");
|
||||||
|
g1.plot_grid3d(*doppler, *samples, *mag);
|
||||||
|
|
||||||
|
g1.savetops("BDS_B3I_acq_grid");
|
||||||
|
g1.savetopdf("BDS_B3I_acq_grid");
|
||||||
|
}
|
||||||
|
catch (const GnuplotException &ge)
|
||||||
|
{
|
||||||
|
std::cout << ge.what() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::string data_str = "./tmp-acq-bds-b3i";
|
||||||
|
if (boost::filesystem::exists(data_str))
|
||||||
|
{
|
||||||
|
boost::filesystem::remove_all(data_str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_F(BeidouB3iPcpsAcquisitionTest, Instantiate)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
boost::shared_ptr<BeidouB3iPcpsAcquisition> acquisition = boost::make_shared<BeidouB3iPcpsAcquisition>(config.get(), "Acquisition_B3", 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_F(BeidouB3iPcpsAcquisitionTest, ConnectAndRun)
|
||||||
|
{
|
||||||
|
int fs_in = 50000000;
|
||||||
|
int nsamples = 50000;
|
||||||
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
|
std::chrono::duration<double> elapsed_seconds(0);
|
||||||
|
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
|
||||||
|
|
||||||
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
init();
|
||||||
|
boost::shared_ptr<BeidouB3iPcpsAcquisition> acquisition = boost::make_shared<BeidouB3iPcpsAcquisition>(config.get(), "Acquisition_B3", 1, 0);
|
||||||
|
boost::shared_ptr<BeidouB3iPcpsAcquisitionTest_msg_rx> msg_rx = BeidouB3iPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->connect(top_block);
|
||||||
|
boost::shared_ptr<gr::analog::sig_source_c> source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000, 1, gr_complex(0));
|
||||||
|
boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
|
||||||
|
top_block->connect(source, 0, valve, 0);
|
||||||
|
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
|
||||||
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
|
EXPECT_NO_THROW({
|
||||||
|
start = std::chrono::system_clock::now();
|
||||||
|
top_block->run(); // Start threads and wait
|
||||||
|
end = std::chrono::system_clock::now();
|
||||||
|
elapsed_seconds = end - start;
|
||||||
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
|
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_F(BeidouB3iPcpsAcquisitionTest, ValidationOfResults)
|
||||||
|
{
|
||||||
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
|
std::chrono::duration<double> elapsed_seconds(0.0);
|
||||||
|
top_block = gr::make_top_block("Acquisition test");
|
||||||
|
|
||||||
|
double expected_delay_samples = 3380;
|
||||||
|
double expected_doppler_hz = 700;
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
|
if (FLAGS_plot_acq_grid == true)
|
||||||
|
{
|
||||||
|
std::string data_str = "./tmp-acq-bds-b3i";
|
||||||
|
if (boost::filesystem::exists(data_str))
|
||||||
|
{
|
||||||
|
boost::filesystem::remove_all(data_str);
|
||||||
|
}
|
||||||
|
boost::filesystem::create_directory(data_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<BeidouB3iPcpsAcquisition> acquisition = std::make_shared<BeidouB3iPcpsAcquisition>(config.get(), "Acquisition_B3", 1, 0);
|
||||||
|
boost::shared_ptr<BeidouB3iPcpsAcquisitionTest_msg_rx> msg_rx = BeidouB3iPcpsAcquisitionTest_msg_rx_make();
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->set_channel(1);
|
||||||
|
}) << "Failure setting channel.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->set_gnss_synchro(&gnss_synchro);
|
||||||
|
}) << "Failure setting gnss_synchro.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->set_threshold(0.0002);
|
||||||
|
}) << "Failure setting threshold.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->set_doppler_max(doppler_max);
|
||||||
|
}) << "Failure setting doppler_max.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->set_doppler_step(doppler_step);
|
||||||
|
}) << "Failure setting doppler_step.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
acquisition->connect(top_block);
|
||||||
|
}) << "Failure connecting acquisition to the top_block.";
|
||||||
|
|
||||||
|
ASSERT_NO_THROW({
|
||||||
|
std::string path = std::string(TEST_PATH);
|
||||||
|
std::string file = path + "signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat";
|
||||||
|
const char *file_name = file.c_str();
|
||||||
|
gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(gr_complex), file_name, false);
|
||||||
|
top_block->connect(file_source, 0, acquisition->get_left_block(), 0);
|
||||||
|
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
|
||||||
|
}) << "Failure connecting the blocks of acquisition test.";
|
||||||
|
|
||||||
|
acquisition->set_local_code();
|
||||||
|
acquisition->set_state(1); // Ensure that acquisition starts at the first sample
|
||||||
|
acquisition->init();
|
||||||
|
|
||||||
|
EXPECT_NO_THROW({
|
||||||
|
start = std::chrono::system_clock::now();
|
||||||
|
top_block->run(); // Start threads and wait
|
||||||
|
end = std::chrono::system_clock::now();
|
||||||
|
elapsed_seconds = end - start;
|
||||||
|
}) << "Failure running the top_block.";
|
||||||
|
|
||||||
|
uint64_t nsamples = gnss_synchro.Acq_samplestamp_samples;
|
||||||
|
std::cout << "Acquired " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
|
||||||
|
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
|
||||||
|
|
||||||
|
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
|
||||||
|
auto delay_error_chips = static_cast<float>(delay_error_samples * BEIDOU_B3I_CODE_LENGTH_CHIPS / 50000);
|
||||||
|
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||||
|
|
||||||
|
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";
|
||||||
|
EXPECT_LT(delay_error_chips, 0.5) << "Delay error exceeds the expected value: 0.5 chips";
|
||||||
|
|
||||||
|
if (FLAGS_plot_acq_grid == true)
|
||||||
|
{
|
||||||
|
plot_grid();
|
||||||
|
}
|
||||||
|
}
|
@ -36,7 +36,7 @@ end
|
|||||||
|
|
||||||
samplingFreq = 25000000; %[Hz]
|
samplingFreq = 25000000; %[Hz]
|
||||||
coherent_integration_time_ms = 1; %[ms]
|
coherent_integration_time_ms = 1; %[ms]
|
||||||
channels = 10; % Number of channels
|
channels = 1; % Number of channels
|
||||||
first_channel = 0; % Number of the first channel
|
first_channel = 0; % Number of the first channel
|
||||||
|
|
||||||
path = '/home/dmiralles/Documents/gnss-sdr/'; %% CHANGE THIS PATH
|
path = '/home/dmiralles/Documents/gnss-sdr/'; %% CHANGE THIS PATH
|
||||||
|
@ -26,15 +26,12 @@
|
|||||||
% -------------------------------------------------------------------------
|
% -------------------------------------------------------------------------
|
||||||
%
|
%
|
||||||
|
|
||||||
%%%%%%%%% ?????? CONFIGURE !!! %%%%%%%%%%%%%
|
%% Configuration
|
||||||
|
path = '/home/dmiralles/Documents/gnss-sdr/';
|
||||||
path = '/home/dmiralles/Documents/Research/Publications/INSIDE_GNSS/bds_leg_pvt/Data/'; %% CHANGE THIS PATH
|
file = 'bds_acq';
|
||||||
file = 'bds_b3i_acq';
|
sat = 6;
|
||||||
|
|
||||||
sat = 27;
|
|
||||||
|
|
||||||
channel = 0;
|
channel = 0;
|
||||||
execution = 6;
|
execution = 4;
|
||||||
% Signal:
|
% Signal:
|
||||||
% 1 GPS L1
|
% 1 GPS L1
|
||||||
% 2 GPS L2M
|
% 2 GPS L2M
|
||||||
@ -42,17 +39,21 @@ execution = 6;
|
|||||||
% 4 Gal. E1B
|
% 4 Gal. E1B
|
||||||
% 5 Gal. E5
|
% 5 Gal. E5
|
||||||
% 6 Glo. 1G
|
% 6 Glo. 1G
|
||||||
% 7 BDS B1
|
% 7 Glo. 2G
|
||||||
|
% 8 BDS. B1
|
||||||
|
% 9 BDS. B3
|
||||||
|
% 10 BDS. B2a
|
||||||
|
|
||||||
signal_type = 8;
|
signal_type = 8;
|
||||||
|
|
||||||
%%% True for light acq_grid representation
|
%%% True for light grid representation
|
||||||
lite_view = true;
|
lite_view = true;
|
||||||
|
|
||||||
%%% If lite_view, it sets the number of samples per chip in the graphical representation
|
%%% If lite_view, it sets the number of samples per chip in the graphical representation
|
||||||
n_samples_per_chip = 3;
|
n_samples_per_chip = 3;
|
||||||
|
d_samples_per_code = 25000;
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%% Load data
|
||||||
|
|
||||||
switch(signal_type)
|
switch(signal_type)
|
||||||
case 1
|
case 1
|
||||||
@ -80,45 +81,59 @@ switch(signal_type)
|
|||||||
system = 'R';
|
system = 'R';
|
||||||
signal = '1G';
|
signal = '1G';
|
||||||
case 7
|
case 7
|
||||||
n_chips = 2046;
|
n_chips = 511;
|
||||||
|
system = 'R';
|
||||||
|
signal = '2G';
|
||||||
|
case 8
|
||||||
|
n_chips = 2048;
|
||||||
system = 'C';
|
system = 'C';
|
||||||
signal = 'B1';
|
signal = 'B1';
|
||||||
case 8
|
case 9
|
||||||
n_chips = 10230;
|
n_chips = 10230;
|
||||||
system = 'C';
|
system = 'C';
|
||||||
signal = 'B3';
|
signal = 'B3';
|
||||||
|
case 10
|
||||||
|
n_chips = 10230;
|
||||||
|
system = 'C';
|
||||||
|
signal = '5C';
|
||||||
end
|
end
|
||||||
filename = [path file '_' system '_' signal '_ch_' num2str(channel) '_' num2str(execution) '_sat_' num2str(sat) '.mat'];
|
filename = [path file '_' system '_' signal '_ch_' num2str(channel) '_' num2str(execution) '_sat_' num2str(sat) '.mat'];
|
||||||
load(filename);
|
load(filename);
|
||||||
[n_fft n_dop_bins] = size(acq_grid);
|
[n_fft, n_dop_bins] = size(acq_grid);
|
||||||
[d_max f_max] = find(acq_grid == max(max(acq_grid)));
|
[d_max, f_max] = find(acq_grid == max(max(acq_grid)));
|
||||||
freq = (0 : n_dop_bins - 1) * doppler_step - doppler_max;
|
freq = (0 : n_dop_bins - 1) * double(doppler_step) - double(doppler_max);
|
||||||
delay = (0 : n_fft - 1) / n_fft * n_chips;
|
delay = (0 : n_fft - 1) / n_fft * n_chips;
|
||||||
|
|
||||||
|
|
||||||
|
%% Plot data
|
||||||
|
%--- Acquisition grid (3D)
|
||||||
figure(1)
|
figure(1)
|
||||||
if(lite_view == false)
|
if(lite_view == false)
|
||||||
surf(freq, delay, acq_grid, 'FaceColor', 'interp', 'LineStyle', 'none')
|
surf(freq, delay, acq_grid, 'FaceColor', 'interp', 'LineStyle', 'none')
|
||||||
ylim([min(delay) max(delay)])
|
ylim([min(delay) max(delay)])
|
||||||
else
|
else
|
||||||
delay_interp = (0 : n_samples_per_chip * n_chips - 1) / n_samples_per_chip;
|
delay_interp = (0 : n_samples_per_chip * n_chips - 1) / n_samples_per_chip;
|
||||||
acq_grid_interp = spline(delay, acq_grid', delay_interp)';
|
grid_interp = spline(delay, acq_grid', delay_interp)';
|
||||||
surf(freq, delay_interp, acq_grid_interp, 'FaceColor', 'interp', 'LineStyle', 'none')
|
surf(freq, delay_interp, grid_interp, 'FaceColor', 'interp', 'LineStyle', 'none')
|
||||||
ylim([min(delay_interp) max(delay_interp)])
|
ylim([min(delay_interp) max(delay_interp)])
|
||||||
end
|
end
|
||||||
xlabel('Doppler shift / Hz')
|
xlabel('Doppler shift (Hz)')
|
||||||
xlim([min(freq) max(freq)])
|
xlim([min(freq) max(freq)])
|
||||||
ylabel('Code delay / chips')
|
ylabel('Code delay (chips)')
|
||||||
zlabel('Test statistics')
|
zlabel('Test Statistics')
|
||||||
|
|
||||||
|
%--- Acquisition grid (2D)
|
||||||
figure(2)
|
figure(2)
|
||||||
subplot(2,1,1)
|
subplot(2,1,1)
|
||||||
plot(freq, acq_grid(d_max, :))
|
plot(freq, acq_grid(d_max, :))
|
||||||
xlim([min(freq) max(freq)])
|
xlim([min(freq) max(freq)])
|
||||||
xlabel('Doppler shift / Hz')
|
xlabel('Doppler shift (Hz)')
|
||||||
ylabel('Test statistics')
|
ylabel('Test statistics')
|
||||||
title(['Fixed code delay to ' num2str((d_max - 1) / n_fft * n_chips) ' chips'])
|
title(['Fixed code delay to ' num2str((d_max - 1) / n_fft * n_chips) ' chips'])
|
||||||
subplot(2,1,2)
|
subplot(2,1,2)
|
||||||
normalization = (d_samples_per_code^4) * input_power;
|
normalization = (d_samples_per_code^4) * input_power;
|
||||||
plot(delay, acq_acq_grid(:, f_max)./normalization)
|
plot(delay, acq_grid(:, f_max)./normalization)
|
||||||
xlim([min(delay) max(delay)])
|
xlim([min(delay) max(delay)])
|
||||||
xlabel('Code delay / chips')
|
xlabel('Code delay (chips)')
|
||||||
ylabel('Test statistics')
|
ylabel('Test statistics')
|
||||||
title(['Doppler wipe-off = ' num2str((f_max - 1) * doppler_step - doppler_max) ' Hz'])
|
title(['Doppler wipe-off = ' num2str((f_max - 1) * doppler_step - doppler_max) ' Hz'])
|
||||||
|
Loading…
Reference in New Issue
Block a user