From 23ffab94ae8f294dcea7238b85c5c06d61a671fe Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 4 Mar 2019 08:20:38 +0100 Subject: [PATCH 01/32] Add gitlab file --- .gitlab-ci.yml | 695 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 695 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..c9bb2b25c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,695 @@ +# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab +# +# Useful links: +# Website: https://gnss-sdr.org +# Upstream repository: https://github.com/gnss-sdr/gnss-sdr.git +# Dockerfile at https://github.com/carlesfernandez/docker-gnsssdr +# Docker cloud image: carlesfernandez/docker-gnsssdr +# +# In order to use this system and be able to make changes, you will need: +# - A GitHub account https://github.com +# - A GitLab account https://gitlab.com +# - A Docker Hub account https://hub.docker.com +# - A repository at Docker Hub. +# +# In order to use this system, please fork at GitHub the upstream +# repository; import that forked repo at GitLab; then add, commit and push to +# your GitLab repo this .gitlab-ci.yml file; and finally go to your project page +# at GitLab and set up the following secret variables. In the left panel: +# Settings > CI / CD > Secret variables +# +# DOCKER_HUB_USER +# DOCKER_HUB_REPO +# DOCKER_HUB_PASSWORD +# +# You will need either to protect your branch, or to leave those variables +# unproctected. +# +# For instance, my settings are: +# DOCKER_HUB_USER = carlesfernandez +# DOCKER_HUB_REPO = docker-gnsssdr +# DOCKER_HUB_PASSWORD = ******************** +# +# If you want to make changes in the source code, branch-off from the 'next' +# branch of your forked repository and, if needed, add new jobs in this +# file at the 'deploy' and 'experiment' stages. Please do not use the next +# branch for your changes, always open a new branch from next and work there. +# +# Feel free to delete the docker-gnsssdr and docker-pybombs-gnsssdr jobs, +# they are for developers' team only. Actually, this is their CI/CD system. +# +# More info about how to contribute to GNSS-SDR at +# https://github.com/gnss-sdr/gnss-sdr/blob/master/CONTRIBUTING.md +# +# (C) Carles Fernandez-Prades, 2018 cfernandez@cttc.cat + + +# This is performed before the scripts in the stages step +before_script: + - source /etc/profile + + +# Defines stages which are to be executed +stages: + - build + - test + - deploy + - experiment + + +# Stage "build" +archlinux: + image: archlinux/base:latest + stage: build + before_script: + - pwd + script: + - pacman -Syu --noconfirm + - pacman -S --noconfirm gcc make cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libpcap blas lapack gflags google-glog openssl python-mako python-six pugixml libmatio gtest + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +centos7: + image: centos:centos7 + stage: build + before_script: + - pwd + script: + - yum install -y wget + - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + - rpm -Uvh epel-release-latest-7.noarch.rpm + - yum install -y make automake gcc gcc-c++ kernel-devel libtool hdf5-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +crosscompile: + image: ubuntu:xenial + stage: build + tags: + - kepler + script: + - apt-get update + - apt-get install -y build-essential xz-utils curl gawk wget git-core diffstat unzip texinfo gcc-multilib chrpath socat cpio python python3 python3-pip python3-pexpect debianutils iputils-ping + - curl -k https://sites.cttc.es/gnss_files/SDK/Sumo/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh + - echo "d25313709bc8c13eba01f7f9a589d8c6 oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh" > sdk.md5 + - md5sum -c sdk.md5 + - chmod +x ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh + - sh ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh -y + - . /usr/local/oecore-x86_64/environment-setup-armv7ahf-neon-oe-linux-gnueabi + - cd build + - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake -DENABLE_OSMOSDR=ON -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON -DENABLE_RAW_UDP=ON -DENABLE_INSTALL_TESTS=ON -DCMAKE_C_FLAGS_RELEASE="-s" -DCMAKE_CXX_FLAGS_RELEASE="-s" -DENABLE_PACKAGING=ON -DENABLE_FPGA=ON .. + - make -j + - mkdir local_install + - make install DESTDIR=./local_install + - rm ./local_install/usr/bin/front-end-cal + - rm ./local_install/usr/bin/ttff + - cd .. + - mkdir binaries + - mkdir binaries/bin + - mkdir binaries/share + - cp build/local_install/usr/bin/* binaries/bin/ + - cp build/local_install/usr/share/gnss-sim/* binaries/share/ + allow_failure: true + artifacts: + paths: + - binaries/* + + +debian8: + image: debian:jessie-slim + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential libtool automake libhdf5-dev cmake git ca-certificates libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libgfortran-4.9-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +debian9: + image: debian:stretch-slim + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + + +debian10: + image: debian:buster-slim + stage: build + script: + - apt-get update + - apt-get upgrade -y + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libiio-dev gr-iio libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +fedora26: + image: fedora:26 + stage: build + before_script: + - source ~/.bash_profile + script: + - yum install -y make automake gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +fedora28: + image: fedora:28 + stage: build + before_script: + - source ~/.bash_profile + script: + - yum install -y make automake gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + + +fedora29: + image: fedora:29 + stage: build + before_script: + - source ~/.bash_profile + script: + - yum install -y make gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python3-mako python3-six matio-devel + - cd build + - cmake -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +fedora-rawhide: + image: fedora:rawhide + stage: build + before_script: + - source ~/.bash_profile + script: + - dnf upgrade -y --nogpgcheck + - yum install -y automake gcc gcc-c++ kernel-devel make cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +opensuse42.3: + image: opensuse/leap:42.3 + stage: build + before_script: + - pwd + script: + - zypper -n up + - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - cd build + - cmake -DENABLE_PACKAGING=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +opensuse-leap15.0: + image: opensuse/leap:15.0 + stage: build + before_script: + - pwd + script: + - zypper -n up + - zypper -n install cmake git gcc-c++ boost-devel libboost_atomic-devel libboost_chrono-devel libboost_thread-devel libboost_system-devel libboost_filesystem-devel libboost_serialization-devel log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - cd build + - cmake -DENABLE_PACKAGING=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +opensuse-tumbleweed: + image: opensuse/tumbleweed + stage: build + before_script: + - pwd + script: + - zypper -n dup + - zypper -n 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 openssl-devel python-Mako python-six + - cd build + - cmake -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +ubuntu14.04: + image: ubuntu:trusty + stage: build + script: + - apt-get update + - apt-get install -y apt-file + - apt-file update + - apt-get install -y software-properties-common + - add-apt-repository -y ppa:myriadrf/gnuradio + - add-apt-repository -y ppa:myriadrf/drivers + - apt-get update + - apt-get install -y --no-install-recommends build-essential libtool automake libhdf5-dev cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libpcap-dev libblas-dev liblapack-dev libgfortran-4.7-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - cd build + - cmake -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +ubuntu16.04: + image: ubuntu:xenial + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +ubuntu18.04: + image: ubuntu:bionic + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + + +ubuntu18.10: + image: ubuntu:cosmic + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +ubuntu19.04: + image: ubuntu:disco + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + +coverity-scan: + image: ubuntu:xenial + stage: build + script: + - apt-get update + - apt-get install -y wget curl + - wget -O ./cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --post-data "project=$COVERITY_SCAN_USER%2Fgnss-sdr&token=$COVERITY_SCAN_TOKEN" + - tar xvzf cov-analysis-linux64.tgz + - export PATH=$PATH:$(pwd)/cov-analysis-linux64-2017.07/bin + - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - cd build + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON -DENABLE_FPGA=ON .. + - cov-build --dir cov-int make -j2 + - tar cvzf gnss-sdr.tgz cov-int + - curl --form token=$COVERITY_SCAN_TOKEN --form email=$COVERITY_SCAN_EMAIL --form file=@$(pwd)/gnss-sdr.tgz --form version="0.0.9-next" --form description=" " https://scan.coverity.com/builds?project=$COVERITY_SCAN_USER%2Fgnss-sdr --progress-bar | tee -a "log_upload.txt" ; test ${PIPESTATUS[0]} -eq 0 + when: manual + allow_failure: true + + +# Stage "test" +run-tests-x86_64: + image: debian:stretch-slim + stage: test + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - mkdir build-test + - mkdir build64 + - cd build-test + - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute Unit Tests + - ../install/run_tests --gtest_output=xml + - mv *.xml ../build64/ + # Execute System Tests + - ../install/position_test + - mv position_test*.txt ../build64/ + - cd .. + - rm -rf build-test + artifacts: + paths: + - build64/*.xml + - build64/*.txt + + +run-tests-i386: + image: i386/debian:stretch-slim + stage: test + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - mkdir build-test + - mkdir build32 + - cd build-test + - cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute Unit Tests + - ../install/run_tests --gtest_output=xml + - mv *.xml ../build32/ + # Execute System Tests + - ../install/position_test + - mv position_test*.txt ../build32/ + - cd .. + - rm -rf build-test + artifacts: + paths: + - build32/*.xml + - build32/*.txt + + +observables-test-180417100529: + image: ubuntu:bionic + stage: test + tags: + - kepler + when: manual + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot + - mkdir build-test + - mkdir build64 + - cd build-test + - cmake -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute Unit Tests + - export DISPLAY=unknown + - echo "Running HybridObservablesTest for GPS L1 CA..." + - ../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=25.0 --DLL_bw_hz_start=1.5 --PLL_narrow_bw_hz=10.0 --DLL_narrow_bw_hz=0.75 --disable_generator=1 --enable_external_signal_file=1 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=4.0 --extend_correlation_symbols=5 --external_signal_acquisition_doppler_step_hz=10 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --show_plots=0 --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=30 --gtest_output=xml:test_results.xml + - echo "Running HybridObservablesTest for Galileo E1..." + - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=5.0 --DLL_bw_hz_start=0.75 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=50000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=Galileo_E1_DLL_PLL_VEML_Tracking --external_signal_acquisition_doppler_step_hz=25 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=15 --gtest_output=xml:test_results.xml + - echo "Running HybridObservablesTest for GPS L5..." + - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=25.0 --DLL_bw_hz_start=2.5 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=250000000 --external_signal_acquisition_threshold=2.4 --trk_test_implementation=GPS_L5_DLL_PLL_Tracking --external_signal_acquisition_dwells=10 --external_signal_acquisition_doppler_step_hz=10 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L5E5_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=5 --gtest_output=xml:test_results.xml + - echo "Running HybridObservablesTest for Galileo E5a..." + - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=30.0 --DLL_bw_hz_start=1.0 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.2 --trk_test_implementation=Galileo_E5a_DLL_PLL_Tracking --external_signal_acquisition_doppler_step_hz=10 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L5E5_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=5 --gtest_output=xml:test_results.xml + - mv *.xml ../build64/ + - cd .. + - rm -rf build-test + artifacts: + paths: + - build64/*.xml + + +leo-observables-test-180417120737: + image: ubuntu:bionic + stage: test + tags: + - kepler + when: manual + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot + - mkdir build-test + - mkdir build64 + - cd build-test + - cmake -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute Unit Tests + - export DISPLAY=unknown + - echo "Running HybridObservablesTest for GPS L1 CA..." + - ../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=30.0 --DLL_bw_hz_start=1.0 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --external_signal_acquisition_dwells=5 --external_signal_acquisition_doppler_step_hz=50 --show_plots=0 --signal_file=/captures/gitlab_test_signals/dynamic/180417120737.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/rinex_obs/rinex-obs_V1_A1-spacecraft.txt skip_trk_transitory_s=20 --external_signal_acquisition_doppler_max_hz=50000 --gtest_output=xml:test_results.xml + - echo "Running HybridObservablesTest for Galileo E1..." + - ../../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=15 --DLL_bw_hz_start=0.5 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=Galileo_E1_DLL_PLL_VEML_Tracking --external_signal_acquisition_dwells=1 --external_signal_acquisition_doppler_step_hz=50 --show_plots=0 --signal_file=/captures/gitlab_test_signals/dynamic/180417120737.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/rinex_obs/rinex-obs_V1_A1-spacecraft.txt skip_trk_transitory_s=5 --external_signal_acquisition_doppler_max_hz=50000 --gtest_output=xml:test_results.xml + - mv *.xml ../build64/ + - cd .. + - rm -rf build-test + artifacts: + paths: + - build64/*.xml + + +position-test-180417100529: + image: ubuntu:bionic + stage: test + tags: + - kepler + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot + - mkdir build-test + - mkdir position-test + - cd build-test + - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute System Tests + - export DISPLAY=unknown + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir ../position-test/L1 && rm PVT_*.* && mv *.ps ../position-test/L1/ && mv GSDR* ../position-test/L1/ + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir ../position-test/E1 && rm PVT_*.* && mv *.ps ../position-test/E1 && mv GSDR* ../position-test/E1 + - ../install/position_test -config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir ../position-test/L1E1 && rm PVT_*.* && mv *.ps ../position-test/L1E1/ && mv GSDR* ../position-test/L1E1/ + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/L5 && rm PVT_*.* && mv *.ps ../position-test/L5/ && mv GSDR* ../position-test/L5/ + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/E5 && rm PVT_*.* && mv *.ps ../position-test/E5 && mv GSDR* ../position-test/E5 + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/L5E5 && rm PVT_*.* && mv *.ps ../position-test/L5E5 && [ -f GSDR* ] && mv GSDR* ../position-test/L5E5 + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/L1L5 && rm PVT_*.* && mv *.ps ../position-test/L1L5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1L5 + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/E1E5 && rm PVT_*.* && mv *.ps ../position-test/E1E5 && [ -f GSDR* ] && mv GSDR* ../position-test/E1E5 + - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir ../position-test/L1E1L5E5 && rm PVT_*.* && mv *.ps ../position-test/L1E1L5E5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1E1L5E5 + - mv *.xml ../position-test/ + - cd .. + - rm -rf build-test + artifacts: + paths: + - position-test/* + - position-test/L1/* + - position-test/E1/* + - position-test/L1E1/* + - position-test/L5/* + - position-test/L5E5/* + - position-test/L1L5/* + - position-test/E1E5/* + - position-test/L1E1L5E5/* + allow_failure: true + + +leo-position-test-180417120737: + image: ubuntu:bionic + stage: test + when: manual + tags: + - kepler + script: + - apt-get update + - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot + - mkdir build-test + - mkdir leo_position + - cd build-test + - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + # Execute System Tests + - export DISPLAY=unknown + - mkdir gpsL1 && cd gpsL1 + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 + - cd .. && cp -r gpsL1 /../leo_position + - mkdir galE1 && cd galE1 + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 + - cd .. && cp -r galE1 /../leo_position + - mkdir gpsL1galE1 && cd gpsL1galE1 + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L1E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 + - cd .. && cp -r gpsL1galE1 /../leo_position + - mkdir gpsL5 && cd gpsL5 + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 + - cd .. && cp -r gpsL5 /../leo_position + - mkdir galE5a && cd galE5a + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - cd .. && cp -r galE5a /../leo_position + - mkdir galE5a && cd galE5a + - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - cd .. && cp -r galE5a /../leo_position + artifacts: + paths: + - leo_position/* + allow_failure: true + + +run-tests-armhf: + image: carlesfernandez/gnsssdr-dev-arm32v7:sumo + stage: test + tags: + - arm + when: manual + dependencies: + - crosscompile + script: + - cp binaries/bin/* /usr/bin/ + - mkdir /usr/share/gnss-sim/ + - cp -f binaries/share/* /usr/share/gnss-sim/ + - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib + - ldconfig + - volk_profile -v 8111 + - volk_gnsssdr_profile + - position_test + - run_tests --gtest_filter=Matio* + - run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=25.0 --DLL_bw_hz_start=1.5 --PLL_narrow_bw_hz=10.0 --DLL_narrow_bw_hz=0.75 --disable_generator=1 --enable_external_signal_file=1 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=4.0 --extend_correlation_symbols=5 --external_signal_acquisition_doppler_step_hz=10 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --show_plots=0 --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=30 --gtest_output=xml:test_results.xml + allow_failure: true + + +# Stage "deploy" +docker-gnsssdr: + image: docker:latest + stage: deploy + services: + - docker:dind + script: + - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - mkdir docker-build + - cd docker-build + - cp ../Dockerfile . + - docker build -t carlesfernandez/docker-gnsssdr . + - docker push carlesfernandez/docker-gnsssdr + only: + - next + allow_failure: true + + +docker-pybombs-gnsssdr: + image: docker:latest + stage: deploy + services: + - docker:dind + script: + - wget https://raw.githubusercontent.com/carlesfernandez/docker-pybombs-gnsssdr/master/Dockerfile + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - mkdir docker-build + - cd docker-build + - cp ../Dockerfile . + - docker build -t carlesfernandez/docker-pybombs-gnsssdr . + - docker push carlesfernandez/docker-pybombs-gnsssdr + only: + - next + allow_failure: true + + +docker-access18: + image: docker:latest + stage: deploy + services: + - docker:dind + script: + - mkdir docker-build + - cd docker-build + - echo -e "FROM phusion/baseimage:0.11\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y --no-install-recommends build-essential cmake curl nano libarmadillo-dev libblas-dev libboost-chrono-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev libpugixml-dev libgflags-dev libgoogle-glog-dev googletest libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev git ca-certificates gnuradio-dev python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool fig2dev octave pstoedit gnuplot-x11 && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/gnss-sdr/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && NPROC=$(grep -c ^processor /proc/cpuinfo) && make -j$(($NPROC+1)) && make install && rm -rf /home/src\nWORKDIR /home\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN rm -rf /tmp/* /var/tmp/*\nCMD [\"bash\"]" > Dockerfile + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO . + - docker tag $DOCKER_HUB_USER/$DOCKER_HUB_REPO:latest $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 + + +# Stage "experiment" +run-access18: + image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 + stage: experiment + script: + - apt-get update + # Grab the data set + - mkdir -p exp-access18/data + - cd exp-access18/data + - curl https://zenodo.org/record/1184601/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz + - tar xvfJ L2_signal_samples.tar.xz + - echo "3a04c1eeb970776bb77f5e3b7eaff2df L2_signal_samples.tar.xz" > data.md5 + - md5sum -c data.md5 + - cd .. + # Execute the experiment + - cp ../src/utils/reproducibility/ieee-access18/L2-access18.conf . + - cp ../src/utils/reproducibility/ieee-access18/plot_dump.m . + - cp -r ../src/utils/matlab/libs/geoFunctions . + - gnss-sdr --c=L2-access18.conf + - octave --no-gui plot_dump.m + - epspdf Figure2.eps Figure2.pdf + - cd .. + - mkdir access18 + - cp exp-access18/*.pdf access18/ + artifacts: + paths: + - access18/*.pdf From 958ed45ba540d0e48106131b3a1390d1bf7302f8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 09:35:20 +0100 Subject: [PATCH 02/32] Remove unused includes --- .../gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc index 020fcb980..45a9f7667 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc @@ -33,11 +33,9 @@ #include "beidou_b1i_telemetry_decoder_gs.h" #include "Beidou_B1I.h" -#include "beidou_dnav_almanac.h" #include "beidou_dnav_ephemeris.h" +#include "beidou_dnav_iono.h" #include "beidou_dnav_utc_model.h" -#include "convolutional.h" -#include "display.h" #include "gnss_synchro.h" #include #include From 5b8ab9f5910e54e9fcc4d7345986fc74f6a32318 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 13:49:14 +0100 Subject: [PATCH 03/32] Improve includes (IWYU) --- .../acquisition/adapters/CMakeLists.txt | 4 +- ...ileo_e1_pcps_ambiguous_acquisition_fpga.cc | 8 ++ ...lileo_e1_pcps_ambiguous_acquisition_fpga.h | 7 +- .../galileo_e5a_pcps_acquisition_fpga.cc | 10 ++- .../galileo_e5a_pcps_acquisition_fpga.h | 7 +- .../gps_l1_ca_pcps_acquisition_fpga.cc | 8 +- .../gps_l1_ca_pcps_acquisition_fpga.h | 6 +- .../gps_l2_m_pcps_acquisition_fpga.cc | 9 +- .../adapters/gps_l2_m_pcps_acquisition_fpga.h | 7 +- .../adapters/gps_l5i_pcps_acquisition_fpga.cc | 9 +- .../adapters/gps_l5i_pcps_acquisition_fpga.h | 7 +- .../gnuradio_blocks/pcps_acquisition_fpga.cc | 10 ++- .../gnuradio_blocks/pcps_acquisition_fpga.h | 89 ++++++++++--------- .../acquisition/libs/CMakeLists.txt | 1 - .../acquisition/libs/fpga_acquisition.cc | 68 +++++++------- .../acquisition/libs/fpga_acquisition.h | 8 +- .../libs/beidou_b1i_signal_processing.h | 2 +- .../libs/gnss_sdr_fpga_sample_counter.cc | 13 +-- .../libs/gnss_sdr_fpga_sample_counter.h | 1 + .../libs/gnss_sdr_sample_counter.cc | 8 +- src/algorithms/libs/gnss_sdr_sample_counter.h | 2 + src/algorithms/libs/gnss_sdr_time_counter.cc | 1 - src/algorithms/libs/gnss_sdr_time_counter.h | 1 + src/utils/front-end-cal/front_end_cal.cc | 11 +-- src/utils/front-end-cal/front_end_cal.h | 4 +- src/utils/front-end-cal/main.cc | 32 ++++--- 26 files changed, 202 insertions(+), 131 deletions(-) diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt index bfe54fa8e..6ce7c7298 100644 --- a/src/algorithms/acquisition/adapters/CMakeLists.txt +++ b/src/algorithms/acquisition/adapters/CMakeLists.txt @@ -92,15 +92,17 @@ add_library(acquisition_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS}) target_link_libraries(acquisition_adapters PUBLIC - Gnuradio::blocks algorithms_libs gnss_sdr_flags acquisition_gr_blocks core_system_parameters + Gnuradio::blocks + Volk::volk PRIVATE Boost::boost Gflags::gflags Glog::glog + Gnuradio::fft Volkgnsssdr::volkgnsssdr acquisition_libs ) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc index 1c3d594bf..cc3cfc31c 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc @@ -34,7 +34,15 @@ #include "configuration_interface.h" #include "galileo_e1_signal_processing.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include +#include // for fft_complex +#include // for gr_complex +#include // for volk_32fc_conjugate_32fc +#include +#include // for abs, pow, floor +#include // for complex +#include // for memcpy GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h index 7f71790ac..38a096c58 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h @@ -34,14 +34,15 @@ #include "acquisition_interface.h" #include "complex_byte_to_float_x2.h" -#include "gnss_synchro.h" #include "pcps_acquisition_fpga.h" #include #include -#include +#include // for basic_block_sptr, top_... +#include // for lv_16sc_t +#include // for size_t #include - +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.cc index ef1dcc215..9c1535261 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.cc @@ -34,9 +34,15 @@ #include "configuration_interface.h" #include "galileo_e5_signal_processing.h" #include "gnss_sdr_flags.h" -#include +#include "gnss_synchro.h" #include -#include +#include // for fft_complex +#include // for gr_complex +#include // for volk_32fc_conjugate_32fc +#include +#include // for abs, pow, floor +#include // for complex +#include // for strcpy, memcpy GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterface* configuration, diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h index 462235a43..d312e9955 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h @@ -34,12 +34,15 @@ #include "acquisition_interface.h" -#include "gnss_synchro.h" #include "pcps_acquisition_fpga.h" #include -#include +#include // for basic_block_sptr, top_... +#include // for lv_16sc_t +#include // for size_t +#include #include +class Gnss_Synchro; class ConfigurationInterface; class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc index 3c50cb3b7..42f0fef79 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc @@ -36,10 +36,16 @@ #include "GPS_L1_CA.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_sdr_signal_processing.h" #include #include -#include +#include // for gr_complex +#include // for volk_32fc_conjugate_32fc +#include +#include // for abs, pow, floor +#include // for complex +#include // for memcpy #define NUM_PRNs 32 diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h index e5310414c..1977fd69b 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h @@ -36,11 +36,13 @@ #define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FPGA_H_ #include "acquisition_interface.h" -#include "gnss_synchro.h" #include "pcps_acquisition_fpga.h" -#include +#include // for basic_block_sptr, top_block_sptr +#include // for lv_16sc_t +#include #include +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc index 27115e024..9599fe91d 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc @@ -35,9 +35,16 @@ #include "GPS_L2C.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_l2c_signal.h" -#include #include +#include // for fft_complex +#include // for gr_complex +#include // for volk_32fc_conjugate_32fc +#include +#include // for abs, pow, floor +#include // for complex +#include // for memcpy #define NUM_PRNs 32 diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h index 743fb6062..cd0ced64c 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h @@ -36,14 +36,15 @@ #include "acquisition_interface.h" #include "complex_byte_to_float_x2.h" -#include "gnss_synchro.h" #include "pcps_acquisition_fpga.h" #include #include -#include +#include +#include // for lv_16sc_t +#include #include - +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc index 5a56ee241..943cdc422 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc @@ -36,9 +36,16 @@ #include "GPS_L5.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_l5_signal.h" -#include #include +#include // for fft_complex +#include // for gr_complex +#include // for volk_32fc_conjugate_32fc +#include +#include // for abs, pow, floor +#include // for complex +#include // for memcpy #define NUM_PRNs 32 diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h index 8a9a9e748..1f7106a87 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h @@ -37,14 +37,15 @@ #include "acquisition_interface.h" #include "complex_byte_to_float_x2.h" -#include "gnss_synchro.h" #include "pcps_acquisition_fpga.h" #include #include -#include +#include // for basic_block_sptr, top_... +#include // for lv_16sc_t +#include // for size_t #include - +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc index 52441f0ea..d54b572b9 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.cc @@ -33,9 +33,15 @@ #include "pcps_acquisition_fpga.h" +#include "gnss_synchro.h" #include #include -#include +#include // for from_long +#include // for mp +#include // for ceil +#include // for operator<< +#include // for move + #define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition @@ -133,7 +139,7 @@ void pcps_acquisition_fpga::set_state(int32_t state) void pcps_acquisition_fpga::send_positive_acquisition() { // Declare positive acquisition using a message port - //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL + // 0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL DLOG(INFO) << "positive acquisition" << ", satellite " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN << ", sample_stamp " << d_sample_counter diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h index 58f23928f..ce78f6a47 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fpga.h @@ -42,8 +42,15 @@ #include "fpga_acquisition.h" -#include "gnss_synchro.h" -#include +#include +#include // for block +#include // for gr_vector_const_void_star +#include // for lv_16sc_t +#include // for uint32_t +#include // for shared_ptr +#include // for string + +class Gnss_Synchro; typedef struct { @@ -78,9 +85,7 @@ pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_); class pcps_acquisition_fpga : public gr::block { 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_); pcps_acquisition_fpga(pcpsconf_fpga_t conf_); @@ -115,10 +120,10 @@ public: ~pcps_acquisition_fpga(); /*! - * \brief Set acquisition/tracking common Gnss_Synchro object pointer - * to exchange synchronization data between acquisition and tracking blocks. - * \param p_gnss_synchro Satellite information shared by the processing blocks. - */ + * \brief Set acquisition/tracking common Gnss_Synchro object pointer + * to exchange synchronization data between acquisition and tracking blocks. + * \param p_gnss_synchro Satellite information shared by the processing blocks. + */ inline void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) { d_gnss_synchro = p_gnss_synchro; @@ -133,53 +138,53 @@ public: } /*! - * \brief Initializes acquisition algorithm. - */ + * \brief Initializes acquisition algorithm. + */ void init(); /*! - * \brief Sets local code for PCPS acquisition algorithm. - * \param code - Pointer to the PRN code. - */ + * \brief Sets local code for PCPS acquisition algorithm. + * \param code - Pointer to the PRN code. + */ void set_local_code(); /*! - * \brief If set to 1, ensures that acquisition starts at the - * first available sample. - * \param state - int=1 forces start of acquisition - */ + * \brief If set to 1, ensures that acquisition starts at the + * first available sample. + * \param state - int=1 forces start of acquisition + */ void set_state(int32_t state); /*! - * \brief Starts acquisition algorithm, turning from standby mode to - * active mode - * \param active - bool that activates/deactivates the block. - */ + * \brief Starts acquisition algorithm, turning from standby mode to + * active mode + * \param active - bool that activates/deactivates the block. + */ void set_active(bool active); /*! - * \brief Set acquisition channel unique ID - * \param channel - receiver channel. - */ + * \brief Set acquisition channel unique ID + * \param channel - receiver channel. + */ inline void set_channel(uint32_t channel) { d_channel = channel; } /*! - * \brief Set statistics threshold of PCPS algorithm. - * \param threshold - Threshold for signal detection (check \ref Navitec2012, - * Algorithm 1, for a definition of this threshold). - */ + * \brief Set statistics threshold of PCPS algorithm. + * \param threshold - Threshold for signal detection (check \ref Navitec2012, + * Algorithm 1, for a definition of this threshold). + */ inline void set_threshold(float threshold) { d_threshold = threshold; } /*! - * \brief Set maximum Doppler grid search - * \param doppler_max - Maximum Doppler shift considered in the grid search [Hz]. - */ + * \brief Set maximum Doppler grid search + * \param doppler_max - Maximum Doppler shift considered in the grid search [Hz]. + */ inline void set_doppler_max(uint32_t doppler_max) { acq_parameters.doppler_max = doppler_max; @@ -187,22 +192,15 @@ public: } /*! - * \brief Set Doppler steps for the grid search - * \param doppler_step - Frequency bin of the search grid [Hz]. - */ + * \brief Set Doppler steps for the grid search + * \param doppler_step - Frequency bin of the search grid [Hz]. + */ inline void set_doppler_step(uint32_t doppler_step) { d_doppler_step = doppler_step; acquisition_fpga->set_doppler_step(doppler_step); } - /*! - * \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); - /*! * \brief This funciton triggers a HW reset of the FPGA PL. */ @@ -212,6 +210,13 @@ public: * \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); + + /*! + * \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_*/ diff --git a/src/algorithms/acquisition/libs/CMakeLists.txt b/src/algorithms/acquisition/libs/CMakeLists.txt index 4b8eefec8..43a60629a 100644 --- a/src/algorithms/acquisition/libs/CMakeLists.txt +++ b/src/algorithms/acquisition/libs/CMakeLists.txt @@ -37,7 +37,6 @@ add_library(acquisition_libs target_link_libraries(acquisition_libs PUBLIC Volk::volk - Gnuradio::fft PRIVATE Gflags::gflags Glog::glog diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.cc b/src/algorithms/acquisition/libs/fpga_acquisition.cc index e429e8c8e..d42c27833 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.cc +++ b/src/algorithms/acquisition/libs/fpga_acquisition.cc @@ -1,16 +1,16 @@ /*! * \file fpga_acquisition.cc - * \brief High optimized FPGA vector correlator class + * \brief Highly optimized FPGA vector correlator class * \authors
    *
  • Marc Majoral, 2019. mmajoral(at)cttc.cat *
* - * Class that controls and executes a high optimized acquisition HW + * Class that controls and executes a highly optimized acquisition HW * accelerator in the FPGA * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -34,13 +34,14 @@ */ #include "fpga_acquisition.h" -#include "GPS_L1_CA.h" -#include "gps_sdr_signal_processing.h" -#include -#include // libraries used by the GIPO -#include -#include // libraries used by the GIPO -#include +#include "GPS_L1_CA.h" // for GPS_TWO_PI +#include // for LOG +#include // for log2 +#include // libraries used by the GIPO +#include // for operator<< +#include // libraries used by the GIPO +#include // for write, close, read, ssize_t +#include // for move // FPGA register parameters @@ -75,26 +76,6 @@ }) #endif -bool Fpga_Acquisition::init() -{ - return true; -} - - -bool Fpga_Acquisition::set_local_code(uint32_t PRN) -{ - // select the code with the chosen PRN - d_PRN = PRN; - return true; -} - - -void Fpga_Acquisition::write_local_code() -{ - Fpga_Acquisition::fpga_configure_acquisition_local_code( - &d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]); -} - Fpga_Acquisition::Fpga_Acquisition(std::string device_name, uint32_t nsamples, @@ -132,6 +113,30 @@ Fpga_Acquisition::Fpga_Acquisition(std::string device_name, } +Fpga_Acquisition::~Fpga_Acquisition() = default; + + +bool Fpga_Acquisition::init() +{ + return true; +} + + +bool Fpga_Acquisition::set_local_code(uint32_t PRN) +{ + // select the code with the chosen PRN + d_PRN = PRN; + return true; +} + + +void Fpga_Acquisition::write_local_code() +{ + Fpga_Acquisition::fpga_configure_acquisition_local_code( + &d_all_fft_codes[d_nsamples_total * (d_PRN - 1)]); +} + + void Fpga_Acquisition::open_device() { // open communication with HW accelerator @@ -151,9 +156,6 @@ void Fpga_Acquisition::open_device() } -Fpga_Acquisition::~Fpga_Acquisition() = default; - - bool Fpga_Acquisition::free() { return true; diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.h b/src/algorithms/acquisition/libs/fpga_acquisition.h index 2be464c97..b64e25e4d 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.h +++ b/src/algorithms/acquisition/libs/fpga_acquisition.h @@ -1,11 +1,11 @@ /*! * \file fpga_acquisition.h - * \brief High optimized FPGA vector correlator class + * \brief Highly optimized FPGA vector correlator class * \authors
    *
  • Marc Majoral, 2019. mmajoral(at)cttc.cat *
* - * Class that controls and executes a high optimized acquisition HW + * Class that controls and executes a highly optimized acquisition HW * accelerator in the FPGA * * ------------------------------------------------------------------------- @@ -36,9 +36,9 @@ #ifndef GNSS_SDR_FPGA_ACQUISITION_H_ #define GNSS_SDR_FPGA_ACQUISITION_H_ -#include -#include +#include // for lv_16sc_t #include +#include /*! * \brief Class that implements carrier wipe-off and correlators. diff --git a/src/algorithms/libs/beidou_b1i_signal_processing.h b/src/algorithms/libs/beidou_b1i_signal_processing.h index 2e420eaae..e653dc3cf 100644 --- a/src/algorithms/libs/beidou_b1i_signal_processing.h +++ b/src/algorithms/libs/beidou_b1i_signal_processing.h @@ -35,7 +35,7 @@ #include #include -#include + //! Generates int32_t GPS L1 C/A code for the desired SV ID and code shift void beidou_b1i_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift); diff --git a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc b/src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc index 777382909..95baf7a24 100644 --- a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc +++ b/src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc @@ -33,12 +33,13 @@ #include "gnss_synchro.h" #include #include -#include -#include -#include // libraries used by the GIPO -#include -#include -#include // libraries used by the GIPO +#include // for from_double +#include // for mp +#include // for round +#include // for O_RDWR, libraries used by the GIPO +#include // for operator<<, endl +#include // libraries used by the GIPO +#include // for write, close, read, ssize_t #define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map diff --git a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.h b/src/algorithms/libs/gnss_sdr_fpga_sample_counter.h index dd508c33d..f30bb78c0 100644 --- a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.h +++ b/src/algorithms/libs/gnss_sdr_fpga_sample_counter.h @@ -35,6 +35,7 @@ #include #include +#include // for gr_vector_const_void_star #include #include diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.cc b/src/algorithms/libs/gnss_sdr_sample_counter.cc index e7d939582..954d5d674 100644 --- a/src/algorithms/libs/gnss_sdr_sample_counter.cc +++ b/src/algorithms/libs/gnss_sdr_sample_counter.cc @@ -32,9 +32,11 @@ #include "gnss_sdr_sample_counter.h" #include "gnss_synchro.h" #include -#include -#include -#include +#include // for from_double +#include // for mp +#include // for round +#include // for operator<< +#include // for string gnss_sdr_sample_counter::gnss_sdr_sample_counter( double _fs, diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.h b/src/algorithms/libs/gnss_sdr_sample_counter.h index ed065b193..d1b215916 100644 --- a/src/algorithms/libs/gnss_sdr_sample_counter.h +++ b/src/algorithms/libs/gnss_sdr_sample_counter.h @@ -33,6 +33,8 @@ #include #include +#include // for gr_vector_const_void_star +#include // for size_t #include diff --git a/src/algorithms/libs/gnss_sdr_time_counter.cc b/src/algorithms/libs/gnss_sdr_time_counter.cc index 0cd06517b..2bf29fa77 100644 --- a/src/algorithms/libs/gnss_sdr_time_counter.cc +++ b/src/algorithms/libs/gnss_sdr_time_counter.cc @@ -32,7 +32,6 @@ #include "gnss_sdr_time_counter.h" #include "gnss_synchro.h" #include -#include #include #include diff --git a/src/algorithms/libs/gnss_sdr_time_counter.h b/src/algorithms/libs/gnss_sdr_time_counter.h index dcf7ca018..e52795573 100644 --- a/src/algorithms/libs/gnss_sdr_time_counter.h +++ b/src/algorithms/libs/gnss_sdr_time_counter.h @@ -33,6 +33,7 @@ #include #include +#include // for gr_vector_const_void_star #include class gnss_sdr_time_counter; diff --git a/src/utils/front-end-cal/front_end_cal.cc b/src/utils/front-end-cal/front_end_cal.cc index 781576efd..4940f6082 100644 --- a/src/utils/front-end-cal/front_end_cal.cc +++ b/src/utils/front-end-cal/front_end_cal.cc @@ -30,20 +30,21 @@ */ #include "front_end_cal.h" +#include "GPS_L1_CA.h" // for GPS_L1_FREQ_HZ #include "concurrent_map.h" +#include "configuration_interface.h" #include "gnss_sdr_supl_client.h" +#include "gps_acq_assist.h" // for Gps_Acq_Assist #include "gps_almanac.h" -#include "gps_cnav_ephemeris.h" -#include "gps_cnav_iono.h" #include "gps_ephemeris.h" #include "gps_iono.h" -#include "gps_navigation_message.h" #include "gps_utc_model.h" #include #include +#include // for min #include -#include -#include +#include // for operator<< +#include #include extern Concurrent_Map global_gps_ephemeris_map; diff --git a/src/utils/front-end-cal/front_end_cal.h b/src/utils/front-end-cal/front_end_cal.h index 551377ebd..6bb495c4c 100644 --- a/src/utils/front-end-cal/front_end_cal.h +++ b/src/utils/front-end-cal/front_end_cal.h @@ -32,9 +32,11 @@ #ifndef GNSS_SDR_FRONT_END_CAL_H_ #define GNSS_SDR_FRONT_END_CAL_H_ -#include "file_configuration.h" #include +#include +#include +class ConfigurationInterface; class FrontEndCal { diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index b0dc512a5..989ba2348 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -32,51 +32,57 @@ #define FRONT_END_CAL_VERSION "0.0.1" #endif +#include "GPS_L1_CA.h" // for GPS_L1_CA_COD... #include "concurrent_map.h" #include "concurrent_queue.h" +#include "configuration_interface.h" // for Configuration... #include "file_configuration.h" #include "front_end_cal.h" -#include "galileo_almanac.h" -#include "galileo_ephemeris.h" -#include "galileo_iono.h" -#include "galileo_utc_model.h" #include "gnss_block_factory.h" +#include "gnss_block_interface.h" // for GNSSBlockInte... #include "gnss_sdr_flags.h" -#include "gnss_sdr_supl_client.h" -#include "gnss_signal.h" #include "gnss_synchro.h" +#include "gps_acq_assist.h" // for Gps_Acq_Assist #include "gps_almanac.h" -#include "gps_cnav_ephemeris.h" -#include "gps_cnav_iono.h" #include "gps_ephemeris.h" #include "gps_iono.h" #include "gps_l1_ca_pcps_acquisition_fine_doppler.h" -#include "gps_navigation_message.h" #include "gps_utc_model.h" -#include "sbas_ephemeris.h" -#include +#include // for bad_any_cast +#include +#include #include #include +#include #include +#include // for block #include #include #include #include #include +#include // for gr_complex +#include // for io_signature #include +#include // for block_sptr #include +#include // for pmt_t, to_long +#include // for mp #include +#include // for round #include #include #include // for ctime #include +#include +#include #include -#include +#include // for logic_error +#include #include #include #include - DECLARE_string(log_dir); Concurrent_Map global_gps_ephemeris_map; From 502bf32d8380fe7f04fd586ff82a8cd98e31259e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 14:36:51 +0100 Subject: [PATCH 04/32] Improve includes (IWYU) --- src/algorithms/PVT/libs/rinex_printer.cc | 24 +++++++++++- src/algorithms/PVT/libs/rinex_printer.h | 38 +++++++++++-------- .../tracking/adapters/CMakeLists.txt | 1 + .../galileo_e1_dll_pll_veml_tracking_fpga.cc | 5 +++ .../galileo_e1_dll_pll_veml_tracking_fpga.h | 5 ++- .../galileo_e5a_dll_pll_tracking_fpga.cc | 7 ++++ .../galileo_e5a_dll_pll_tracking_fpga.h | 5 ++- .../gps_l1_ca_dll_pll_tracking_fpga.cc | 5 +++ .../gps_l1_ca_dll_pll_tracking_fpga.h | 3 ++ .../gps_l2_m_dll_pll_tracking_fpga.cc | 6 +++ .../adapters/gps_l2_m_dll_pll_tracking_fpga.h | 6 ++- .../adapters/gps_l5_dll_pll_tracking_fpga.cc | 5 +++ .../adapters/gps_l5_dll_pll_tracking_fpga.h | 4 ++ .../dll_pll_veml_tracking_fpga.cc | 14 +++---- .../dll_pll_veml_tracking_fpga.h | 17 ++++++--- 15 files changed, 112 insertions(+), 33 deletions(-) diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index c6ff89fca..2e4b55a37 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -29,6 +29,27 @@ */ #include "rinex_printer.h" +#include "Beidou_B1I.h" +#include "GLONASS_L1_L2_CA.h" +#include "GPS_L1_CA.h" +#include "Galileo_E1.h" +#include "beidou_dnav_ephemeris.h" +#include "beidou_dnav_iono.h" +#include "beidou_dnav_utc_model.h" +#include "galileo_ephemeris.h" +#include "galileo_iono.h" +#include "galileo_utc_model.h" +#include "glonass_gnav_almanac.h" +#include "glonass_gnav_ephemeris.h" +#include "glonass_gnav_utc_model.h" +#include "gnss_synchro.h" +#include "gps_cnav_ephemeris.h" +#include "gps_cnav_iono.h" +#include "gps_cnav_utc_model.h" +#include "gps_ephemeris.h" +#include "gps_iono.h" +#include "gps_navigation_message.h" +#include "gps_utc_model.h" #include #include #include @@ -38,8 +59,9 @@ #include #include // for min and max #include // for floor -#include // for getenv() +#include // for memcpy #include +#include // for cout #include #include #include diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 0e189dc80..09acc2c5b 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -51,25 +51,33 @@ #ifndef GNSS_SDR_RINEX_PRINTER_H_ #define GNSS_SDR_RINEX_PRINTER_H_ -#include "Beidou_B1I.h" -#include "GLONASS_L1_L2_CA.h" -#include "GPS_L1_CA.h" -#include "Galileo_E1.h" -#include "beidou_dnav_navigation_message.h" -#include "galileo_navigation_message.h" -#include "glonass_gnav_navigation_message.h" -#include "gnss_synchro.h" -#include "gps_cnav_navigation_message.h" -#include "gps_navigation_message.h" #include -#include -#include +#include // for int32_t +#include // for strtol, strtod +#include // for fstream #include // for setprecision -#include +#include // for map #include // for stringstream -#include +#include // for string + +class Beidou_Dnav_Ephemeris; +class Beidou_Dnav_Iono; +class Beidou_Dnav_Utc_Model; +class Galileo_Ephemeris; +class Galileo_Iono; +class Galileo_Utc_Model; +class Glonass_Gnav_Almanac; +class Glonass_Gnav_Ephemeris; +class Glonass_Gnav_Utc_Model; +class Gnss_Synchro; +class Gps_CNAV_Ephemeris; +class Gps_CNAV_Iono; +class Gps_CNAV_Utc_Model; +class Gps_Ephemeris; +class Gps_Iono; +class Gps_Navigation_Message; +class Gps_Utc_Model; -class Sbas_Raw_Msg; /*! * \brief Class that handles the generation of Receiver diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt index 199abc7c7..8795eee51 100644 --- a/src/algorithms/tracking/adapters/CMakeLists.txt +++ b/src/algorithms/tracking/adapters/CMakeLists.txt @@ -98,6 +98,7 @@ target_link_libraries(tracking_adapters tracking_gr_blocks algorithms_libs gnss_sdr_flags + Gnuradio::runtime PRIVATE Volkgnsssdr::volkgnsssdr ) diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc index b9f6cf626..531f64560 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.cc @@ -38,10 +38,15 @@ #include "Galileo_E1.h" #include "configuration_interface.h" #include "display.h" +#include "dll_pll_conf_fpga.h" #include "galileo_e1_signal_processing.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include #include +#include // for round +#include // for memcpy +#include // for operator<<, GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga( diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h index 79cf7b6a4..cbc45c45b 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h @@ -39,9 +39,12 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" +#include // for basic_block_sptr, top_block_... +#include // for size_t +#include #include - +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc index b70ba9bd4..203e46357 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.cc @@ -33,10 +33,17 @@ #include "Galileo_E5a.h" #include "configuration_interface.h" #include "display.h" +#include "dll_pll_conf_fpga.h" #include "galileo_e5_signal_processing.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include +#include // for gr_complex #include +#include // for round +#include +#include // for memcpy +#include GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga( diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h index e6d736269..195cafcf5 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h @@ -34,9 +34,12 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" -#include +#include // for basic_block_sptr #include +#include // for size_t +#include +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc index 9ff88bb64..bc0cfa72c 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.cc @@ -38,10 +38,15 @@ #include "GPS_L1_CA.h" #include "configuration_interface.h" #include "display.h" +#include "dll_pll_conf_fpga.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_sdr_signal_processing.h" #include #include +#include // for round +#include // for memcpy +#include #define NUM_PRNs 32 diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h index b083495a5..680c903f2 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking_fpga.h @@ -39,9 +39,12 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" +#include +#include #include +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc index 88bb84253..8fd0fdaa2 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc @@ -39,10 +39,16 @@ #include "GPS_L2C.h" #include "configuration_interface.h" #include "display.h" +#include "dll_pll_conf_fpga.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_l2c_signal.h" #include #include +#include // for round +#include // for memcpy +#include + #define NUM_PRNs 32 diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h index 77ab71f0d..7fbe24958 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h @@ -37,11 +37,13 @@ #ifndef GNSS_SDR_gps_l2_m_dll_pll_tracking_FPGA_H_ #define GNSS_SDR_gps_l2_m_dll_pll_tracking_FPGA_H_ -#include "tracking_interface.h" -//#include "dll_pll_veml_tracking.h" #include "dll_pll_veml_tracking_fpga.h" +#include "tracking_interface.h" +#include +#include #include +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc index ed3ea37a0..41e86e726 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc @@ -40,10 +40,15 @@ #include "GPS_L5.h" #include "configuration_interface.h" #include "display.h" +#include "dll_pll_conf_fpga.h" #include "gnss_sdr_flags.h" +#include "gnss_synchro.h" #include "gps_l5_signal.h" #include #include +#include // for round +#include // for memcpy +#include #define NUM_PRNs 32 diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h index 1d6060f2f..3e2f8024b 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h @@ -40,8 +40,12 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" +#include +#include +#include #include +class Gnss_Synchro; class ConfigurationInterface; /*! diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc index 7715e2f8c..1cc9e7bdf 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -41,25 +41,25 @@ #include "Galileo_E1.h" #include "Galileo_E5a.h" #include "MATH_CONSTANTS.h" -#include "galileo_e1_signal_processing.h" -#include "galileo_e5_signal_processing.h" +#include "fpga_multicorrelator.h" +#include "gnss_satellite.h" #include "gnss_sdr_create_directory.h" -#include "gps_l2c_signal.h" -#include "gps_l5_signal.h" -#include "gps_sdr_signal_processing.h" +#include "gnss_synchro.h" #include "lock_detectors.h" #include "tracking_discriminators.h" #include #include #include #include +#include // for mp #include #include #include +#include +#include // for abs, size_t #include #include -#include -#include +#include dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h index 227939ded..681573639 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h @@ -33,18 +33,23 @@ #define GNSS_SDR_DLL_PLL_VEML_TRACKING_FPGA_H #include "dll_pll_conf_fpga.h" -#include "fpga_multicorrelator.h" -#include "gnss_synchro.h" #include "tracking_2nd_DLL_filter.h" #include "tracking_2nd_PLL_filter.h" #include +#include #include -#include -#include -#include +#include // for gr_complex +#include // for gr_vector_const_void_star +#include // for pmt_t +#include +#include // for deque +#include // for ofstream +#include // for shared_ptr +#include #include -//#include +class Fpga_Multicorrelator_8sc; +class Gnss_Synchro; class dll_pll_veml_tracking_fpga; using dll_pll_veml_tracking_fpga_sptr = boost::shared_ptr; From 9ce827437c98a25893e374948d33a2681cbea587 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 16:10:18 +0100 Subject: [PATCH 05/32] Improve includes (IWYU) --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 11 ++++++++++- .../acquisition/gnuradio_blocks/pcps_acquisition.h | 9 ++++++--- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.cc | 5 ++++- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.h | 2 ++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 0d057d87d..e4b5f2a7c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -36,13 +36,22 @@ #include "pcps_acquisition.h" #include "GLONASS_L1_L2_CA.h" // for GLONASS_TWO_PI #include "GPS_L1_CA.h" // for GPS_TWO_PI +#include "gnss_frequencies.h" #include "gnss_sdr_create_directory.h" +#include "gnss_synchro.h" #include #include #include #include +#include // for from_long +#include // for mp +#include #include -#include +#include // for fill_n, min +#include // for floor, fmod, rint, ceil +#include // for memcpy +#include +#include pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 0447dd308..a86bebf99 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -53,14 +53,17 @@ #define GNSS_SDR_PCPS_ACQUISITION_H_ #include "acq_conf.h" -#include "gnss_synchro.h" #include #include #include -#include +#include // for gr_complex +#include // for scoped_lock +#include // for gr_vector_const_void_star +#include // for lv_16sc_t +#include #include - +class Gnss_Synchro; class pcps_acquisition; using pcps_acquisition_sptr = boost::shared_ptr; diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index f86ebfe45..df7c6c867 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -45,6 +45,7 @@ #include "beidou_b1i_signal_processing.h" #include "galileo_e1_signal_processing.h" #include "galileo_e5_signal_processing.h" +#include "gnss_satellite.h" #include "gnss_sdr_create_directory.h" #include "gnss_synchro.h" #include "gps_l2c_signal.h" @@ -61,9 +62,11 @@ #include #include // for fill_n #include // for fmod, round, floor +#include // for complex +#include // for abs, size_t #include // for exception #include // for cout, cerr -#include +#include // for map dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h index c1c9d6532..c1d197da9 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h @@ -44,8 +44,10 @@ #include // for pmt_t #include // for int32_t #include // for string, ofstream +#include // for string #include // for pair + class Gnss_Synchro; class dll_pll_veml_tracking; From 2dfc95ae524b5df2a0d057376779c1aeef1dd897 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 16:56:55 +0100 Subject: [PATCH 06/32] Improve includes (IWYU) --- src/algorithms/PVT/libs/rtcm.cc | 4 ++++ src/algorithms/PVT/libs/rtcm.h | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/algorithms/PVT/libs/rtcm.cc b/src/algorithms/PVT/libs/rtcm.cc index 177ea25f6..e0a0c10a5 100644 --- a/src/algorithms/PVT/libs/rtcm.cc +++ b/src/algorithms/PVT/libs/rtcm.cc @@ -29,8 +29,11 @@ */ #include "rtcm.h" +#include "GLONASS_L1_L2_CA.h" +#include "GPS_L1_CA.h" #include "GPS_L2C.h" #include "Galileo_E1.h" +#include "Galileo_E5a.h" #include // for to_upper_copy #include #include @@ -39,6 +42,7 @@ #include // std::chrono::seconds #include // for std::fmod #include // for strtol +#include // for cout #include // for std::stringstream diff --git a/src/algorithms/PVT/libs/rtcm.h b/src/algorithms/PVT/libs/rtcm.h index 6fd9208af..5ff791503 100644 --- a/src/algorithms/PVT/libs/rtcm.h +++ b/src/algorithms/PVT/libs/rtcm.h @@ -34,11 +34,12 @@ #include "concurrent_queue.h" -#include "galileo_fnav_message.h" -#include "glonass_gnav_navigation_message.h" #include "gnss_synchro.h" -#include "gps_cnav_navigation_message.h" -#include "gps_navigation_message.h" +#include +#include +#include +#include +#include #include #include #include From 8ac42c24b71c2f7fc7e635b202fa4ea84183fafb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 18:45:27 +0100 Subject: [PATCH 07/32] Improve includes (IWYU) --- src/algorithms/PVT/libs/geojson_printer.cc | 11 ++++++++--- src/algorithms/PVT/libs/geojson_printer.h | 3 ++- src/algorithms/PVT/libs/gpx_printer.cc | 10 ++++++++-- src/algorithms/PVT/libs/gpx_printer.h | 3 ++- src/algorithms/PVT/libs/kml_printer.cc | 8 +++++++- src/algorithms/PVT/libs/kml_printer.h | 8 ++++---- src/algorithms/PVT/libs/nmea_printer.cc | 4 +++- src/algorithms/PVT/libs/nmea_printer.h | 9 +++++---- src/algorithms/PVT/libs/rtcm_printer.cc | 19 ++++++++++++++----- src/algorithms/PVT/libs/rtcm_printer.h | 16 ++++++++++++---- 10 files changed, 65 insertions(+), 26 deletions(-) diff --git a/src/algorithms/PVT/libs/geojson_printer.cc b/src/algorithms/PVT/libs/geojson_printer.cc index 504393422..e38984a88 100644 --- a/src/algorithms/PVT/libs/geojson_printer.cc +++ b/src/algorithms/PVT/libs/geojson_printer.cc @@ -31,14 +31,19 @@ #include "geojson_printer.h" +#include "pvt_solution.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include -#include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for operator<< +#include // for cout, cerr +#include // for stringstream GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/geojson_printer.h b/src/algorithms/PVT/libs/geojson_printer.h index b9bdcdb28..a74a9599d 100644 --- a/src/algorithms/PVT/libs/geojson_printer.h +++ b/src/algorithms/PVT/libs/geojson_printer.h @@ -33,11 +33,12 @@ #ifndef GNSS_SDR_GEOJSON_PRINTER_H_ #define GNSS_SDR_GEOJSON_PRINTER_H_ -#include "pvt_solution.h" + #include #include #include +class Pvt_Solution; /*! * \brief Prints PVT solutions in GeoJSON format file diff --git a/src/algorithms/PVT/libs/gpx_printer.cc b/src/algorithms/PVT/libs/gpx_printer.cc index 42c32ba5c..3066ae824 100644 --- a/src/algorithms/PVT/libs/gpx_printer.cc +++ b/src/algorithms/PVT/libs/gpx_printer.cc @@ -31,13 +31,19 @@ #include "gpx_printer.h" +#include "rtklib_solver.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for operator<< +#include // for cout, cerr +#include // for stringstream Gpx_Printer::Gpx_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/gpx_printer.h b/src/algorithms/PVT/libs/gpx_printer.h index 740be545c..e78269f8c 100644 --- a/src/algorithms/PVT/libs/gpx_printer.h +++ b/src/algorithms/PVT/libs/gpx_printer.h @@ -33,11 +33,12 @@ #ifndef GNSS_SDR_GPX_PRINTER_H_ #define GNSS_SDR_GPX_PRINTER_H_ -#include "rtklib_solver.h" + #include #include #include +class Rtklib_Solver; /*! * \brief Prints PVT information to GPX format file diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index 6157f5bc9..e1335490c 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -31,13 +31,19 @@ */ #include "kml_printer.h" +#include "rtklib_solver.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include -#include +#include // for remove +#include // for tm +#include // for exception +#include // for cout, cerr #include +#include Kml_Printer::Kml_Printer(const std::string& base_path) diff --git a/src/algorithms/PVT/libs/kml_printer.h b/src/algorithms/PVT/libs/kml_printer.h index bc2db1198..6295242f6 100644 --- a/src/algorithms/PVT/libs/kml_printer.h +++ b/src/algorithms/PVT/libs/kml_printer.h @@ -33,12 +33,12 @@ #ifndef GNSS_SDR_KML_PRINTER_H_ #define GNSS_SDR_KML_PRINTER_H_ -#include "rtklib_solver.h" -#include -#include -#include +#include // for ofstream +#include // for shared_ptr +class Rtklib_Solver; + /*! * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth) * diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index f01d12272..9186d48e0 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -35,14 +35,16 @@ #include "nmea_printer.h" #include "rtklib_solution.h" -#include +#include "rtklib_solver.h" #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_code #include #include #include #include +#include // for cout, cerr #include diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index 6ceab023c..f821ad94b 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -36,11 +36,12 @@ #ifndef GNSS_SDR_NMEA_PRINTER_H_ #define GNSS_SDR_NMEA_PRINTER_H_ -#include "rtklib_solver.h" -#include -#include -#include +#include // for ptime +#include // for ofstream +#include // for shared_ptr +#include // for string +class Rtklib_Solver; /*! * \brief This class provides a implementation of a subset of the NMEA-0183 standard for interfacing diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index e999efc42..fce92af08 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -32,17 +32,26 @@ */ #include "rtcm_printer.h" +#include "galileo_ephemeris.h" +#include "glonass_gnav_ephemeris.h" +#include "glonass_gnav_utc_model.h" +#include "gnss_synchro.h" +#include "gps_cnav_ephemeris.h" +#include "gps_ephemeris.h" +#include "rtcm.h" #include #include // for create_directories, exists #include // for path, operator<< #include // for filesystem +#include // for error_codes #include -#include -#include -#include // for O_RDWR -#include +#include // for remove +#include // for tm +#include // for exception +#include // for O_RDWR +#include // for cout, cerr #include // for tcgetattr -#include +#include // for close, write Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path) diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index 9db248eb9..4d42c1189 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -34,10 +34,18 @@ #ifndef GNSS_SDR_RTCM_PRINTER_H_ #define GNSS_SDR_RTCM_PRINTER_H_ -#include "rtcm.h" -#include // std::ofstream -#include -#include // std::shared_ptr +#include // for int32_t +#include // for std::ofstream +#include // for std::map +#include // std::shared_ptr + +class Galileo_Ephemeris; +class Glonass_Gnav_Ephemeris; +class Glonass_Gnav_Utc_Model; +class Gnss_Synchro; +class Gps_CNAV_Ephemeris; +class Gps_Ephemeris; +class Rtcm; /*! * \brief This class provides a implementation of a subset of the RTCM Standard 10403.2 messages From d549d190249efbbdf7bf6c7447c097d72565e4ce Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 18:58:57 +0100 Subject: [PATCH 08/32] Fix test --- .../unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc index 1d7580b96..771c0a8ea 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc @@ -31,6 +31,7 @@ #include "nmea_printer.h" #include "rtklib_rtkpos.h" +#include "rtklib_solver.h" #include #include #include From 87a6a0fe0e905cd0533779b1abc7c5ec94736061 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 19:16:18 +0100 Subject: [PATCH 09/32] Fix make check if ENABLE_FPGA option is ON --- src/tests/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index c6e4ab268..0ba25350c 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -550,7 +550,7 @@ endif() set(CMAKE_CTEST_COMMAND ctest -V) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(flowgraph_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/gnss_flowgraph_test.cc @@ -589,7 +589,7 @@ endif() ######################################################### -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(gnss_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc @@ -640,7 +640,7 @@ endif() ######################################################### -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(gnuradio_block_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc @@ -696,7 +696,7 @@ set_property(TEST matio_test PROPERTY TIMEOUT 30) ######################################################### -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(acq_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -734,7 +734,7 @@ endif() ######################################################### -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(trk_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc @@ -773,7 +773,7 @@ endif() ######################################################### -if(NOT ENABLE_PACKAGING) +if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) add_executable(control_thread_test ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc @@ -796,7 +796,7 @@ if(NOT ENABLE_PACKAGING) core_receiver core_system_parameters ) - +message(STATUS "+++++++++++++++++++++++++++${ENABLE_FPGA} ${ENABLE_PACKAGING}") add_test(control_thread_test control_thread_test) set_property(TEST control_thread_test PROPERTY TIMEOUT 30) @@ -807,6 +807,10 @@ endif() if(ENABLE_PACKAGING) add_dependencies(check matio_test) else() - add_dependencies(check control_thread_test flowgraph_test gnss_block_test - gnuradio_block_test acq_test trk_test matio_test) + if(ENABLE_FPGA) + add_dependencies(check matio_test) + else() + add_dependencies(check control_thread_test flowgraph_test gnss_block_test + gnuradio_block_test acq_test trk_test matio_test) + endif() endif() From 9689dd82067d45946cf09e448d4ea4e04915382f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 19:17:36 +0100 Subject: [PATCH 10/32] Remove garbage --- src/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 0ba25350c..d7763d66c 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -796,7 +796,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) core_receiver core_system_parameters ) -message(STATUS "+++++++++++++++++++++++++++${ENABLE_FPGA} ${ENABLE_PACKAGING}") + add_test(control_thread_test control_thread_test) set_property(TEST control_thread_test PROPERTY TIMEOUT 30) From dd7a52c93bf2a6949b69b8f76db831bc6fc0f610 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 21:54:39 +0100 Subject: [PATCH 11/32] Fix headers --- src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 2 +- src/algorithms/PVT/libs/hybrid_ls_pvt.h | 2 +- .../adapters/beidou_b1i_pcps_acquisition.cc | 2 +- .../adapters/beidou_b1i_pcps_acquisition.h | 4 +-- ...ileo_e1_pcps_ambiguous_acquisition_fpga.cc | 7 +++-- ...lileo_e1_pcps_ambiguous_acquisition_fpga.h | 14 ++++----- .../galileo_e5a_pcps_acquisition_fpga.h | 14 +++++---- .../gps_l1_ca_pcps_acquisition_fpga.h | 10 +++---- .../gps_l2_m_pcps_acquisition_fpga.cc | 14 ++++----- .../adapters/gps_l2_m_pcps_acquisition_fpga.h | 29 +++++++++---------- .../adapters/gps_l5i_pcps_acquisition_fpga.cc | 3 +- .../adapters/gps_l5i_pcps_acquisition_fpga.h | 20 ++++++------- .../pcps_acquisition_fine_doppler_cc.cc | 2 +- .../pcps_acquisition_fine_doppler_cc.h | 2 +- src/algorithms/acquisition/libs/acq_conf.h | 2 +- .../libs/galileo_e5_signal_processing.h | 2 +- src/algorithms/libs/rtklib/rtklib_stream.h | 4 +-- .../adapters/custom_udp_signal_source.cc | 3 +- .../adapters/custom_udp_signal_source.h | 3 +- .../galileo_e1_dll_pll_veml_tracking_fpga.h | 13 ++++----- .../galileo_e5a_dll_pll_tracking_fpga.h | 4 +-- .../gps_l2_m_dll_pll_tracking_fpga.cc | 4 +-- .../adapters/gps_l2_m_dll_pll_tracking_fpga.h | 12 ++++---- .../adapters/gps_l5_dll_pll_tracking_fpga.cc | 2 +- .../adapters/gps_l5_dll_pll_tracking_fpga.h | 7 +++-- src/core/system_parameters/Beidou_B1I.h | 2 +- src/core/system_parameters/Galileo_E5a.h | 2 +- .../system_parameters/gps_cnav_utc_model.cc | 2 +- .../system_parameters/gps_cnav_utc_model.h | 2 +- .../common-files/observable_tests_flags.h | 2 +- .../system-tests/libs/position_test_flags.h | 2 +- .../libs/true_observables_reader.h | 2 +- 32 files changed, 97 insertions(+), 98 deletions(-) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index de9d70b4e..e114cc560 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -1,5 +1,5 @@ /*! - * \file galileo_e1_ls_pvt.cc + * \file hybrid_ls_pvt.cc * \brief Implementation of a Least Squares Position, Velocity, and Time * (PVT) solver, based on K.Borre's Matlab receiver. * \author Javier Arribas, 2011. jarribas(at)cttc.es diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.h b/src/algorithms/PVT/libs/hybrid_ls_pvt.h index 79313c92b..4409d4bba 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.h +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.h @@ -1,5 +1,5 @@ /*! - * \file galileo_e1_ls_pvt.h + * \file hybrid_ls_pvt.h * \brief Interface of a Least Squares Position, Velocity, and Time (PVT) * solver, based on K.Borre's Matlab receiver. * \author Javier Arribas, 2011. jarribas(at)cttc.es diff --git a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.cc index 6c95c26a6..c8ecc37b3 100644 --- a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.cc @@ -8,7 +8,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver diff --git a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h index 334aff555..f01b6abdf 100644 --- a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h @@ -1,5 +1,5 @@ /*! - * \file beidou_bi1_pcps_acquisition.h + * \file beidou_b1i_pcps_acquisition.h * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for * Beidou B1I signals * \authors
    @@ -8,7 +8,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc index cc3cfc31c..4fb6fb644 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.cc @@ -77,12 +77,12 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga( uint32_t sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 4); acq_parameters.sampled_ms = sampled_ms; - acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); //will be true in future versions + acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); // could be true in future versions - //--- Find number of samples per spreading code (4 ms) ----------------- + // Find number of samples per spreading code (4 ms) auto code_length = static_cast(std::round(static_cast(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS))); - acq_parameters.code_length = code_length; + // The FPGA can only use FFT lengths that are a power of two. float nbits = ceilf(log2f((float)code_length * 2)); uint32_t nsamples_total = pow(2, nbits); @@ -254,6 +254,7 @@ void GalileoE1PcpsAmbiguousAcquisitionFpga::set_state(int state) acquisition_fpga_->set_state(state); } + void GalileoE1PcpsAmbiguousAcquisitionFpga::connect(gr::top_block_sptr top_block) { if (top_block) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h index 38a096c58..41a405794 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h @@ -1,7 +1,7 @@ /*! * \file galileo_e1_pcps_ambiguous_acquisition_fpga.h * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for - * Galileo E1 Signals + * Galileo E1 Signals for the FPGA * \author Marc Majoral, 2019. mmajoral(at)cttc.es * * ------------------------------------------------------------------------- @@ -37,7 +37,7 @@ #include "pcps_acquisition_fpga.h" #include #include -#include // for basic_block_sptr, top_... +#include // for basic_block_sptr, top_block_sptr #include // for lv_16sc_t #include // for size_t #include @@ -46,8 +46,8 @@ class Gnss_Synchro; class ConfigurationInterface; /*! - * \brief This class adapts a PCPS acquisition block to an - * AcquisitionInterface for Galileo E1 Signals + * \brief This class adapts a PCPS acquisition block off-loaded on an FPGA + * to an AcquisitionInterface for Galileo E1 Signals */ class GalileoE1PcpsAmbiguousAcquisitionFpga : public AcquisitionInterface { @@ -86,7 +86,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; @@ -136,8 +136,8 @@ public: void set_state(int state) override; /*! - * \brief Stop running acquisition - */ + * \brief Stop running acquisition + */ void stop_acquisition() override; void set_resampler_latency(uint32_t latency_samples __attribute__((unused))) override{}; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h index d312e9955..bd17742a1 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h @@ -36,15 +36,20 @@ #include "acquisition_interface.h" #include "pcps_acquisition_fpga.h" #include -#include // for basic_block_sptr, top_... +#include // for basic_block_sptr, top_block_sptr #include // for lv_16sc_t -#include // for size_t +#include // for size_t #include #include class Gnss_Synchro; class ConfigurationInterface; + +/*! + * \brief This class adapts a PCPS acquisition block off-loaded on an FPGA + * to an AcquisitionInterface for Galileo E5a signals + */ class GalileoE5aPcpsAcquisitionFpga : public AcquisitionInterface { public: @@ -70,7 +75,7 @@ public: inline size_t item_size() override { - return sizeof(int); + return sizeof(lv_16sc_t); } void connect(gr::top_block_sptr top_block) override; @@ -81,7 +86,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; @@ -149,7 +154,6 @@ public: private: ConfigurationInterface* configuration_; - pcps_acquisition_fpga_sptr acquisition_fpga_; gr::blocks::stream_to_vector::sptr stream_to_vector_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h index 1977fd69b..8a9160c4b 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h @@ -39,15 +39,15 @@ #include "pcps_acquisition_fpga.h" #include // for basic_block_sptr, top_block_sptr #include // for lv_16sc_t -#include -#include +#include // for size_t +#include // for string class Gnss_Synchro; class ConfigurationInterface; /*! - * \brief This class adapts a PCPS acquisition block to an AcquisitionInterface - * for GPS L1 C/A signals + * \brief This class adapts a PCPS acquisition block off-loaded on an FPGA + * to an AcquisitionInterface for GPS L1 C/A signals */ class GpsL1CaPcpsAcquisitionFpga : public AcquisitionInterface { @@ -86,7 +86,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc index 9599fe91d..8dddca5c2 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.cc @@ -1,14 +1,14 @@ /*! - * \file gps_l2_m_pcps_acquisition.cc - * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for - * GPS L2 M signals + * \file gps_l2_m_pcps_acquisition_fpga.cc + * \brief Adapts an FPGA-offloaded PCPS acquisition block + * to an AcquisitionInterface for GPS L2 M signals * \authors
      - *
    • Javier Arribas, 2015. jarribas(at)cttc.es + *
    • Javier Arribas, 2019. jarribas(at)cttc.es *
    * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -87,14 +87,13 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( std::string device_name = configuration_->property(role + ".devicename", default_device_name); acq_parameters.device_name = device_name; acq_parameters.samples_per_ms = nsamples_total / acq_parameters.sampled_ms; - //acq_parameters.samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); acq_parameters.samples_per_code = nsamples_total; acq_parameters.downsampling_factor = configuration_->property(role + ".downsampling_factor", 1.0); acq_parameters.total_block_exp = configuration_->property(role + ".total_block_exp", 14); acq_parameters.excludelimit = static_cast(std::round(static_cast(fs_in_) / GPS_L2_M_CODE_RATE_HZ)); - // compute all the GPS L1 PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time + // compute all the GPS L2C PRN Codes (this is done only once upon the class constructor in order to avoid re-computing the PRN codes every time // a channel is assigned) auto* fft_if = new gr::fft::fft_complex(vector_length, true); // Direct FFT // allocate memory to compute all the PRNs and compute all the possible codes @@ -132,7 +131,6 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga( } } - //acq_parameters acq_parameters.all_fft_codes = d_all_fft_codes_; // temporary buffers that we can delete diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h index cd0ced64c..70593ea67 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h @@ -1,14 +1,14 @@ /*! - * \file gps_l2_m_pcps_acquisition.h - * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for - * GPS L2 M signals + * \file gps_l2_m_pcps_acquisition_fpga.h + * \brief Adapts an FPGA-offloaded PCPS acquisition block + * to an AcquisitionInterface for GPS L2 M signals * \authors
      - *
    • Javier Arribas, 2015. jarribas(at)cttc.es + *
    • Javier Arribas, 2019. jarribas(at)cttc.es *
    * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -39,17 +39,17 @@ #include "pcps_acquisition_fpga.h" #include #include -#include +#include // for basic_block_sptr, top_block_sptr #include // for lv_16sc_t -#include -#include +#include // for size_t +#include // for string class Gnss_Synchro; class ConfigurationInterface; /*! - * \brief This class adapts a PCPS acquisition block to an AcquisitionInterface - * for GPS L2 M signals + * \brief This class adapts a PCPS acquisition block off-loaded on an FPGA + * to an AcquisitionInterface for GPS L2 M signals */ class GpsL2MPcpsAcquisitionFpga : public AcquisitionInterface { @@ -67,16 +67,16 @@ public: } /*! - * \brief Returns "GPS_L2_M_PCPS_Acquisition" + * \brief Returns "GPS_L2_M_PCPS_Acquisition_Fpga" */ inline std::string implementation() override { - return "GPS_L2_M_PCPS_Acquisition"; + return "GPS_L2_M_PCPS_Acquisition_Fpga"; } inline size_t item_size() override { - return sizeof(int); + return sizeof(lv_16sc_t); } void connect(gr::top_block_sptr top_block) override; @@ -87,7 +87,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; @@ -145,7 +145,6 @@ public: private: ConfigurationInterface* configuration_; - //pcps_acquisition_sptr acquisition_; pcps_acquisition_fpga_sptr acquisition_fpga_; gr::blocks::stream_to_vector::sptr stream_to_vector_; gr::blocks::float_to_complex::sptr float_to_complex_; diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc index 943cdc422..b1c0fe060 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.cc @@ -1,5 +1,5 @@ /*! - * \file gps_l5i pcps_acquisition_fpga.cc + * \file gps_l5i_pcps_acquisition_fpga.cc * \brief Adapts a PCPS acquisition block to an Acquisition Interface for * GPS L5i signals for the FPGA * \authors
      @@ -140,7 +140,6 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga( } } - //acq_parameters acq_parameters.all_fft_codes = d_all_fft_codes_; // reference for the FPGA FFT-IFFT attenuation factor diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h index 1f7106a87..79fe12967 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h @@ -1,5 +1,5 @@ /*! - * \file GPS_L5i_PCPS_Acquisition_fpga.h + * \file gps_l5i_pcps_acquisition_fpga.h * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for * GPS L5i signals for the FPGA * \authors
        @@ -32,15 +32,15 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_ -#define GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_ +#ifndef GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ +#define GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ #include "acquisition_interface.h" #include "complex_byte_to_float_x2.h" #include "pcps_acquisition_fpga.h" #include #include -#include // for basic_block_sptr, top_... +#include // for basic_block_sptr, top_block_sptr #include // for lv_16sc_t #include // for size_t #include @@ -49,8 +49,8 @@ class Gnss_Synchro; class ConfigurationInterface; /*! - * \brief This class adapts a PCPS acquisition block to an AcquisitionInterface - * for GPS L5i signals + * \brief This class adapts a PCPS acquisition block off-loaded on an FPGA + * to an AcquisitionInterface for GPS L5i signals */ class GpsL5iPcpsAcquisitionFpga : public AcquisitionInterface { @@ -77,7 +77,7 @@ public: inline size_t item_size() override { - return sizeof(int); + return sizeof(lv_16sc_t); } void connect(gr::top_block_sptr top_block) override; @@ -88,7 +88,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; @@ -118,7 +118,7 @@ public: void init() override; /*! - * \brief Sets local code for GPS L2/M PCPS acquisition algorithm. + * \brief Sets local code for GPS L5 PCPS acquisition algorithm. */ void set_local_code() override; @@ -165,4 +165,4 @@ private: float calculate_threshold(float pfa); }; -#endif /* GNSS_SDR_GPS_L5i_PCPS_ACQUISITION_FPGA_H_ */ +#endif /* GNSS_SDR_GPS_L5I_PCPS_ACQUISITION_FPGA_H_ */ diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index ee8ee0c8a..eab92d8a8 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -1,5 +1,5 @@ /*! - * \file pcps_acquisition_fine_doppler_acquisition_cc.cc + * \file pcps_acquisition_fine_doppler_cc.cc * \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation * \authors
          *
        • Javier Arribas, 2013. jarribas(at)cttc.es diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index e414c6611..211f3ca13 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -1,5 +1,5 @@ /*! - * \file pcps_acquisition_fine_doppler_acquisition_cc.h + * \file pcps_acquisition_fine_doppler_cc.h * \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation * for GPS L1 C/A signal * diff --git a/src/algorithms/acquisition/libs/acq_conf.h b/src/algorithms/acquisition/libs/acq_conf.h index af81d8806..70d7a8a72 100644 --- a/src/algorithms/acquisition/libs/acq_conf.h +++ b/src/algorithms/acquisition/libs/acq_conf.h @@ -1,5 +1,5 @@ /*! - * \file acq_conf.cc + * \file acq_conf.h * \brief Class that contains all the configuration parameters for generic * acquisition block based on the PCPS algoritm. * \author Carles Fernandez, 2018. cfernandez(at)cttc.es diff --git a/src/algorithms/libs/galileo_e5_signal_processing.h b/src/algorithms/libs/galileo_e5_signal_processing.h index 7a7dfc8cc..d9b6f5b9f 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.h +++ b/src/algorithms/libs/galileo_e5_signal_processing.h @@ -1,5 +1,5 @@ /*! - * \file galileo_e5_signal_processing.cc + * \file galileo_e5_signal_processing.h * \brief This library implements various functions for Galileo E5 signals such * as replica code generation * \author Marc Sales, 2014. marcsales92(at)gmail.com diff --git a/src/algorithms/libs/rtklib/rtklib_stream.h b/src/algorithms/libs/rtklib/rtklib_stream.h index 175c5b063..cfbc2a4f5 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.h +++ b/src/algorithms/libs/rtklib/rtklib_stream.h @@ -1,6 +1,6 @@ /*! - * \file rtklib_sbas.h - * \brief sbas functions + * \file rtklib_stream.h + * \brief streaming functions * \authors
            *
          • 2007-2013, T. Takasu *
          • 2017, Javier Arribas diff --git a/src/algorithms/signal_source/adapters/custom_udp_signal_source.cc b/src/algorithms/signal_source/adapters/custom_udp_signal_source.cc index a51d0c793..d030863ff 100644 --- a/src/algorithms/signal_source/adapters/custom_udp_signal_source.cc +++ b/src/algorithms/signal_source/adapters/custom_udp_signal_source.cc @@ -1,6 +1,5 @@ /*! - * \file udp_signal_source.cc - * + * \file custom_udp_signal_source.cc * \brief Receives ip frames containing samples in UDP frame encapsulation * using a high performance packet capture library (libpcap) * \author Javier Arribas jarribas (at) cttc.es diff --git a/src/algorithms/signal_source/adapters/custom_udp_signal_source.h b/src/algorithms/signal_source/adapters/custom_udp_signal_source.h index 18cc21c9e..87ed44496 100644 --- a/src/algorithms/signal_source/adapters/custom_udp_signal_source.h +++ b/src/algorithms/signal_source/adapters/custom_udp_signal_source.h @@ -1,6 +1,5 @@ /*! - * \file udp_signal_source.h - * + * \file custom_udp_signal_source.h * \brief Receives ip frames containing samples in UDP frame encapsulation * using a high performance packet capture library (libpcap) * \author Javier Arribas jarribas (at) cttc.es diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h index cbc45c45b..690f0039f 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking_fpga.h @@ -1,7 +1,7 @@ /*! * \file galileo_e1_dll_pll_veml_tracking_fpga.h - * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block - * to a TrackingInterface for Galileo E1 signals for the FPGA + * \brief Adapts a DLL+PLL VEML (Very Early Minus Late) tracking loop block + * to a TrackingInterface for Galileo E1 signals for the FPGA * \author Marc Majoral, 2019. mmajoral(at)cttc.cat * * Code DLL + carrier PLL according to the algorithms described in: @@ -39,10 +39,10 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" -#include // for basic_block_sptr, top_block_... +#include // for basic_block_sptr, basic_block_sptr #include // for size_t -#include -#include +#include // for uint32_t +#include // for string class Gnss_Synchro; class ConfigurationInterface; @@ -90,7 +90,7 @@ public: /*! * \brief Set acquisition/tracking common Gnss_Synchro object pointer * to efficiently exchange synchronization data between acquisition and - * tracking blocks + * tracking blocks */ void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; @@ -101,7 +101,6 @@ public: */ void stop_tracking() override; - private: dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc; uint32_t channel_; diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h index 195cafcf5..eeaa1da6c 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking_fpga.h @@ -35,8 +35,8 @@ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" #include // for basic_block_sptr -#include -#include // for size_t +#include // For uint32_t +#include // for size_t #include class Gnss_Synchro; diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc index 8fd0fdaa2..7b821a9f9 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.cc @@ -1,7 +1,7 @@ /*! * \file gps_l2_m_dll_pll_tracking_fpga.cc * \brief Implementation of an adapter of a DLL+PLL tracking loop block - * for GPS L2C to a TrackingInterface + * for GPS L2C to a TrackingInterface for the FPGA * \author Javier Arribas, 2019. jarribas(at)cttc.es * * Code DLL + carrier PLL according to the algorithms described in: @@ -11,7 +11,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h index 7fbe24958..85dcc4707 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking_fpga.h @@ -1,7 +1,7 @@ /*! * \file gps_l2_m_dll_pll_tracking_fpga.h * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L2C to a TrackingInterface + * for GPS L2C to a TrackingInterface for the FPGA * \author Marc Majoral, 2019, mmajoral(at)cttc.es * * Code DLL + carrier PLL according to the algorithms described in: @@ -11,7 +11,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -34,8 +34,8 @@ * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_gps_l2_m_dll_pll_tracking_FPGA_H_ -#define GNSS_SDR_gps_l2_m_dll_pll_tracking_FPGA_H_ +#ifndef GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_FPGA_H_ +#define GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_FPGA_H_ #include "dll_pll_veml_tracking_fpga.h" #include "tracking_interface.h" @@ -92,13 +92,13 @@ public: void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; void start_tracking() override; + /*! * \brief Stop running tracking */ void stop_tracking() override; private: - //dll_pll_veml_tracking_sptr tracking_; dll_pll_veml_tracking_fpga_sptr tracking_fpga_sc; unsigned int channel_; std::string role_; @@ -107,4 +107,4 @@ private: int* d_ca_codes; }; -#endif // GNSS_SDR_gps_l2_m_dll_pll_tracking_FPGA_H_ +#endif // GNSS_SDR_GPS_L2_M_DLL_PLL_TRACKING_FPGA_H_ diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc index 41e86e726..b733b07f3 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.cc @@ -1,7 +1,7 @@ /*! * \file gps_l5_dll_pll_tracking_fpga.cc * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L5 to a TrackingInterface + * for GPS L5 to a TrackingInterface for the FPGA * \author Marc Majoral, 2019. mmajoral(at)cttc.cat * Javier Arribas, 2019. jarribas(at)cttc.es * diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h index 3e2f8024b..149fa107a 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking_fpga.h @@ -1,7 +1,7 @@ /*! * \file gps_l5_dll_pll_tracking_fpga.h * \brief Interface of an adapter of a DLL+PLL tracking loop block - * for GPS L5 to a TrackingInterface + * for GPS L5 to a TrackingInterface for the FPGA * \author Marc Majoral, 2019. mmajoral(at)cttc.cat * Javier Arribas, 2019. jarribas(at)cttc.es * @@ -66,10 +66,10 @@ public: return role_; } - //! Returns "GPS_L5_DLL_PLL_Tracking" + //! Returns "GPS_L5_DLL_PLL_Tracking_Fpga" inline std::string implementation() override { - return "GPS_L5_DLL_PLL_Tracking"; + return "GPS_L5_DLL_PLL_Tracking_Fpga"; } inline size_t item_size() override @@ -94,6 +94,7 @@ public: void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override; void start_tracking() override; + /*! * \brief Stop running tracking */ diff --git a/src/core/system_parameters/Beidou_B1I.h b/src/core/system_parameters/Beidou_B1I.h index b31f470e9..bf2066ce7 100644 --- a/src/core/system_parameters/Beidou_B1I.h +++ b/src/core/system_parameters/Beidou_B1I.h @@ -1,5 +1,5 @@ /*! - * \file beidou_b1I.h + * \file Beidou_B1I.h * \brief Defines system parameters for BeiDou B1I signal and DNAV data * \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.com * \author Damian Miralles, 2018. dmiralles2009@gmail.com diff --git a/src/core/system_parameters/Galileo_E5a.h b/src/core/system_parameters/Galileo_E5a.h index 19122372c..5c7e5c350 100644 --- a/src/core/system_parameters/Galileo_E5a.h +++ b/src/core/system_parameters/Galileo_E5a.h @@ -1,4 +1,4 @@ -/* +/*! * \file Galileo_E5a.h * \brief Defines system parameters for Galileo E5a signal and NAV data * \author Marc Sales, 2014. marcsales92@gmail.com diff --git a/src/core/system_parameters/gps_cnav_utc_model.cc b/src/core/system_parameters/gps_cnav_utc_model.cc index 673329f31..75dc0452b 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.cc +++ b/src/core/system_parameters/gps_cnav_utc_model.cc @@ -1,5 +1,5 @@ /* - * \file gps_cnav_utc_model.h + * \file gps_cnav_utc_model.cc * \brief Interface of a GPS CNAV UTC MODEL storage * \author Javier Arribas, 2015. jarribas(at)cttc.es * diff --git a/src/core/system_parameters/gps_cnav_utc_model.h b/src/core/system_parameters/gps_cnav_utc_model.h index abe801cf9..7691cd1d3 100644 --- a/src/core/system_parameters/gps_cnav_utc_model.h +++ b/src/core/system_parameters/gps_cnav_utc_model.h @@ -1,5 +1,5 @@ /*! - * \file gps_utc_model.h + * \file gps_cnav_utc_model.h * \brief Interface of a GPS UTC MODEL storage * \author Javier Arribas, 2013. jarribas(at)cttc.es * diff --git a/src/tests/common-files/observable_tests_flags.h b/src/tests/common-files/observable_tests_flags.h index 37d2bab99..5284ac37a 100644 --- a/src/tests/common-files/observable_tests_flags.h +++ b/src/tests/common-files/observable_tests_flags.h @@ -1,5 +1,5 @@ /*! - * \file tracking_tests_flags.h + * \file observable_tests_flags.h * \brief Helper file for unit testing * \author Javier Arribas, 2018. jarribas(at)cttc.es * diff --git a/src/tests/system-tests/libs/position_test_flags.h b/src/tests/system-tests/libs/position_test_flags.h index 1ebe296e6..460ba9634 100644 --- a/src/tests/system-tests/libs/position_test_flags.h +++ b/src/tests/system-tests/libs/position_test_flags.h @@ -1,5 +1,5 @@ /*! - * \file signal_generator_flags.h + * \file position_test_flags.h * \brief Helper file for unit testing * \author Javier Arribas, 2018. jarribas(at)cttc.es * diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h index f17561f84..7f05158c9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.h @@ -1,5 +1,5 @@ /*! - * \file tlm_dump_reader.h + * \file true_observables_reader.h * \brief Helper file for unit testing * \author Javier Arribas, 2017. jarribas(at)cttc.es * From cf108a46c828600b21f7a1cde8ea0c5159e53d5d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Mar 2019 23:59:35 +0100 Subject: [PATCH 12/32] Break dependency by moving files --- src/algorithms/libs/CMakeLists.txt | 19 ------------------- src/core/libs/CMakeLists.txt | 17 +++++++++++++++++ .../libs/gnss_sdr_fpga_sample_counter.cc | 0 .../libs/gnss_sdr_fpga_sample_counter.h | 0 .../libs/gnss_sdr_sample_counter.cc | 0 .../libs/gnss_sdr_sample_counter.h | 7 ++++--- .../libs/gnss_sdr_time_counter.cc | 0 .../libs/gnss_sdr_time_counter.h | 9 +++++---- 8 files changed, 26 insertions(+), 26 deletions(-) rename src/{algorithms => core}/libs/gnss_sdr_fpga_sample_counter.cc (100%) rename src/{algorithms => core}/libs/gnss_sdr_fpga_sample_counter.h (100%) rename src/{algorithms => core}/libs/gnss_sdr_sample_counter.cc (100%) rename src/{algorithms => core}/libs/gnss_sdr_sample_counter.h (95%) rename src/{algorithms => core}/libs/gnss_sdr_time_counter.cc (100%) rename src/{algorithms => core}/libs/gnss_sdr_time_counter.h (95%) diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index 4e2a1962b..7998e3c68 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -22,7 +22,6 @@ set(GNSS_SPLIBS_SOURCES gps_l2c_signal.cc gps_l5_signal.cc galileo_e1_signal_processing.cc - gnss_sdr_sample_counter.cc gnss_signal_processing.cc gps_sdr_signal_processing.cc glonass_l1_signal_processing.cc @@ -46,7 +45,6 @@ set(GNSS_SPLIBS_HEADERS gps_l2c_signal.h gps_l5_signal.h galileo_e1_signal_processing.h - gnss_sdr_sample_counter.h gnss_signal_processing.h gps_sdr_signal_processing.h glonass_l1_signal_processing.h @@ -67,29 +65,12 @@ set(GNSS_SPLIBS_HEADERS geofunctions.h ) -if(ENABLE_FPGA) - set(GNSS_SPLIBS_SOURCES - ${GNSS_SPLIBS_SOURCES} - gnss_sdr_time_counter.cc - gnss_sdr_fpga_sample_counter.cc - ) - set(GNSS_SPLIBS_HEADERS - ${GNSS_SPLIBS_HEADERS} - gnss_sdr_time_counter.h - gnss_sdr_fpga_sample_counter.h - ) -endif() - if(OPENCL_FOUND) set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES} opencl/fft_execute.cc # Needs OpenCL opencl/fft_setup.cc # Needs OpenCL opencl/fft_kernelstring.cc # Needs OpenCL ) -endif() - - -if(OPENCL_FOUND) include_directories(${OPENCL_INCLUDE_DIRS}) if(OS_IS_MACOSX) set(OPT_LIBRARIES ${OPT_LIBRARIES} "-framework OpenCL") diff --git a/src/core/libs/CMakeLists.txt b/src/core/libs/CMakeLists.txt index 68b52890c..a61dd6e2b 100644 --- a/src/core/libs/CMakeLists.txt +++ b/src/core/libs/CMakeLists.txt @@ -23,6 +23,7 @@ set(CORE_LIBS_SOURCES INIReader.cc string_converter.cc gnss_sdr_supl_client.cc + gnss_sdr_sample_counter.cc ) set(CORE_LIBS_HEADERS @@ -30,8 +31,22 @@ set(CORE_LIBS_HEADERS INIReader.h string_converter.h gnss_sdr_supl_client.h + gnss_sdr_sample_counter.h ) +if(ENABLE_FPGA) + set(CORE_LIBS_SOURCES + ${CORE_LIBS_SOURCES} + gnss_sdr_fpga_sample_counter.cc + gnss_sdr_time_counter.cc + ) + set(CORE_LIBS_HEADERS + ${CORE_LIBS_HEADERS} + gnss_sdr_fpga_sample_counter.h + gnss_sdr_time_counter.h + ) +endif() + list(SORT CORE_LIBS_HEADERS) list(SORT CORE_LIBS_SOURCES) @@ -42,6 +57,7 @@ add_library(core_libs ${CORE_LIBS_SOURCES} ${CORE_LIBS_HEADERS}) target_link_libraries(core_libs PUBLIC Boost::boost + Gnuradio::runtime core_libs_supl core_system_parameters PRIVATE @@ -51,6 +67,7 @@ target_link_libraries(core_libs Pugixml::pugixml ) + if(ENABLE_CLANG_TIDY) if(CLANG_TIDY_EXE) set_target_properties(core_libs diff --git a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc b/src/core/libs/gnss_sdr_fpga_sample_counter.cc similarity index 100% rename from src/algorithms/libs/gnss_sdr_fpga_sample_counter.cc rename to src/core/libs/gnss_sdr_fpga_sample_counter.cc diff --git a/src/algorithms/libs/gnss_sdr_fpga_sample_counter.h b/src/core/libs/gnss_sdr_fpga_sample_counter.h similarity index 100% rename from src/algorithms/libs/gnss_sdr_fpga_sample_counter.h rename to src/core/libs/gnss_sdr_fpga_sample_counter.h diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.cc b/src/core/libs/gnss_sdr_sample_counter.cc similarity index 100% rename from src/algorithms/libs/gnss_sdr_sample_counter.cc rename to src/core/libs/gnss_sdr_sample_counter.cc diff --git a/src/algorithms/libs/gnss_sdr_sample_counter.h b/src/core/libs/gnss_sdr_sample_counter.h similarity index 95% rename from src/algorithms/libs/gnss_sdr_sample_counter.h rename to src/core/libs/gnss_sdr_sample_counter.h index d1b215916..a20502b9f 100644 --- a/src/algorithms/libs/gnss_sdr_sample_counter.h +++ b/src/core/libs/gnss_sdr_sample_counter.h @@ -28,8 +28,9 @@ * * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_SAMPLE_COUNTER_H_ -#define GNSS_SDR_SAMPLE_COUNTER_H_ + +#ifndef GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_ +#define GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_ #include #include @@ -73,4 +74,4 @@ public: gr_vector_void_star &output_items); }; -#endif /*GNSS_SDR_SAMPLE_COUNTER_H_*/ +#endif /*GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_*/ diff --git a/src/algorithms/libs/gnss_sdr_time_counter.cc b/src/core/libs/gnss_sdr_time_counter.cc similarity index 100% rename from src/algorithms/libs/gnss_sdr_time_counter.cc rename to src/core/libs/gnss_sdr_time_counter.cc diff --git a/src/algorithms/libs/gnss_sdr_time_counter.h b/src/core/libs/gnss_sdr_time_counter.h similarity index 95% rename from src/algorithms/libs/gnss_sdr_time_counter.h rename to src/core/libs/gnss_sdr_time_counter.h index e52795573..7be810ec7 100644 --- a/src/algorithms/libs/gnss_sdr_time_counter.h +++ b/src/core/libs/gnss_sdr_time_counter.h @@ -28,8 +28,9 @@ * * ------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_TIME_COUNTER_H_ -#define GNSS_SDR_TIME_COUNTER_H_ + +#ifndef GNSS_SDR_GNSS_SDR_TIME_COUNTER_H_ +#define GNSS_SDR_GNSS_SDR_TIME_COUNTER_H_ #include #include @@ -55,11 +56,11 @@ private: bool flag_days; // True if the receiver has been running for at least 1 day uint32_t current_days; // Receiver time in days since the beginning of the run int32_t report_interval_ms; + friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter(); public: - friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter(); int 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); }; -#endif /*GNSS_SDR_SAMPLE_COUNTER_H_*/ +#endif /*GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H_*/ From f0424617bd1f8f22bb9f8e181ccccc4698cef341 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 7 Mar 2019 00:15:28 +0100 Subject: [PATCH 13/32] IWYU --- src/algorithms/libs/geofunctions.cc | 1 + src/algorithms/libs/gnss_sdr_create_directory.cc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/algorithms/libs/geofunctions.cc b/src/algorithms/libs/geofunctions.cc index 48137050b..8670b9504 100644 --- a/src/algorithms/libs/geofunctions.cc +++ b/src/algorithms/libs/geofunctions.cc @@ -30,6 +30,7 @@ */ #include "geofunctions.h" +#include // for sin, cos, sqrt, abs, pow const double STRP_PI = 3.1415926535898; // Pi as defined in IS-GPS-200E diff --git a/src/algorithms/libs/gnss_sdr_create_directory.cc b/src/algorithms/libs/gnss_sdr_create_directory.cc index d0af41952..2a3c66cad 100644 --- a/src/algorithms/libs/gnss_sdr_create_directory.cc +++ b/src/algorithms/libs/gnss_sdr_create_directory.cc @@ -28,13 +28,13 @@ * ------------------------------------------------------------------------- */ - #include "gnss_sdr_create_directory.h" #include // for create_directories, exists #include // for path, operator<< #include // for filesystem -#include - +#include // for error_code +#include // for exception +#include // for ofstream bool gnss_sdr_create_directory(const std::string& foldername) { From 5f40824c4f92a08452d89a9946f0487a8e2a34a5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 7 Mar 2019 08:28:18 +0100 Subject: [PATCH 14/32] Reorder includes --- .../beidou_b1i_telemetry_decoder_gs.h | 19 ++++++++----------- .../galileo_telemetry_decoder_gs.h | 8 ++++---- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h index e38bfd206..dc281e84d 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.h @@ -1,10 +1,9 @@ /*! * \file beidou_b1i_telemetry_decoder_gs.h * \brief Implementation of a BEIDOU BI1 DNAV data decoder block - * \details Code added as part of GSoC 2018 program. However new modifications - * included to mimic decoding of existing signals + * \details Code added as part of GSoC 2018 program. * \author Damian Miralles, 2018. dmiralles2009(at)gmail.com - * \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.es + * \author Sergi Segura, 2018. sergi.segura.munoz(at)gmail.es * * ------------------------------------------------------------------------- * @@ -35,15 +34,15 @@ #define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_GS_H -#include "gnss_satellite.h" #include "beidou_dnav_navigation_message.h" +#include "gnss_satellite.h" #include -#include -#include // for gr_vector_const_void_star +#include // for boost::shared_ptr +#include // for block +#include // for gr_vector_const_void_star +#include #include #include -#include // for boost::shared_ptr -#include class beidou_b1i_telemetry_decoder_gs; @@ -52,12 +51,10 @@ using beidou_b1i_telemetry_decoder_gs_sptr = boost::shared_ptrGLONASS ICD - * */ class beidou_b1i_telemetry_decoder_gs : public gr::block { diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h index 3fbbabd68..f08c37b81 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.h @@ -34,15 +34,15 @@ #include "galileo_fnav_message.h" -#include // for boost::shared_ptr -#include // for gr_vector_const_void_star #include "galileo_navigation_message.h" #include "gnss_satellite.h" #include -#include +#include // for boost::shared_ptr +#include // for block +#include // for gr_vector_const_void_star +#include #include #include -#include class galileo_telemetry_decoder_gs; From 69431e535dfc37e342cf5257cb52895e5f43eae7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 7 Mar 2019 08:53:12 +0100 Subject: [PATCH 15/32] Delete gitlab file --- .gitlab-ci.yml | 695 ------------------------------------------------- 1 file changed, 695 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c9bb2b25c..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,695 +0,0 @@ -# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab -# -# Useful links: -# Website: https://gnss-sdr.org -# Upstream repository: https://github.com/gnss-sdr/gnss-sdr.git -# Dockerfile at https://github.com/carlesfernandez/docker-gnsssdr -# Docker cloud image: carlesfernandez/docker-gnsssdr -# -# In order to use this system and be able to make changes, you will need: -# - A GitHub account https://github.com -# - A GitLab account https://gitlab.com -# - A Docker Hub account https://hub.docker.com -# - A repository at Docker Hub. -# -# In order to use this system, please fork at GitHub the upstream -# repository; import that forked repo at GitLab; then add, commit and push to -# your GitLab repo this .gitlab-ci.yml file; and finally go to your project page -# at GitLab and set up the following secret variables. In the left panel: -# Settings > CI / CD > Secret variables -# -# DOCKER_HUB_USER -# DOCKER_HUB_REPO -# DOCKER_HUB_PASSWORD -# -# You will need either to protect your branch, or to leave those variables -# unproctected. -# -# For instance, my settings are: -# DOCKER_HUB_USER = carlesfernandez -# DOCKER_HUB_REPO = docker-gnsssdr -# DOCKER_HUB_PASSWORD = ******************** -# -# If you want to make changes in the source code, branch-off from the 'next' -# branch of your forked repository and, if needed, add new jobs in this -# file at the 'deploy' and 'experiment' stages. Please do not use the next -# branch for your changes, always open a new branch from next and work there. -# -# Feel free to delete the docker-gnsssdr and docker-pybombs-gnsssdr jobs, -# they are for developers' team only. Actually, this is their CI/CD system. -# -# More info about how to contribute to GNSS-SDR at -# https://github.com/gnss-sdr/gnss-sdr/blob/master/CONTRIBUTING.md -# -# (C) Carles Fernandez-Prades, 2018 cfernandez@cttc.cat - - -# This is performed before the scripts in the stages step -before_script: - - source /etc/profile - - -# Defines stages which are to be executed -stages: - - build - - test - - deploy - - experiment - - -# Stage "build" -archlinux: - image: archlinux/base:latest - stage: build - before_script: - - pwd - script: - - pacman -Syu --noconfirm - - pacman -S --noconfirm gcc make cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libpcap blas lapack gflags google-glog openssl python-mako python-six pugixml libmatio gtest - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -centos7: - image: centos:centos7 - stage: build - before_script: - - pwd - script: - - yum install -y wget - - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - - rpm -Uvh epel-release-latest-7.noarch.rpm - - yum install -y make automake gcc gcc-c++ kernel-devel libtool hdf5-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -crosscompile: - image: ubuntu:xenial - stage: build - tags: - - kepler - script: - - apt-get update - - apt-get install -y build-essential xz-utils curl gawk wget git-core diffstat unzip texinfo gcc-multilib chrpath socat cpio python python3 python3-pip python3-pexpect debianutils iputils-ping - - curl -k https://sites.cttc.es/gnss_files/SDK/Sumo/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh - - echo "d25313709bc8c13eba01f7f9a589d8c6 oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh" > sdk.md5 - - md5sum -c sdk.md5 - - chmod +x ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh - - sh ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh -y - - . /usr/local/oecore-x86_64/environment-setup-armv7ahf-neon-oe-linux-gnueabi - - cd build - - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake -DENABLE_OSMOSDR=ON -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON -DENABLE_RAW_UDP=ON -DENABLE_INSTALL_TESTS=ON -DCMAKE_C_FLAGS_RELEASE="-s" -DCMAKE_CXX_FLAGS_RELEASE="-s" -DENABLE_PACKAGING=ON -DENABLE_FPGA=ON .. - - make -j - - mkdir local_install - - make install DESTDIR=./local_install - - rm ./local_install/usr/bin/front-end-cal - - rm ./local_install/usr/bin/ttff - - cd .. - - mkdir binaries - - mkdir binaries/bin - - mkdir binaries/share - - cp build/local_install/usr/bin/* binaries/bin/ - - cp build/local_install/usr/share/gnss-sim/* binaries/share/ - allow_failure: true - artifacts: - paths: - - binaries/* - - -debian8: - image: debian:jessie-slim - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential libtool automake libhdf5-dev cmake git ca-certificates libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libgfortran-4.9-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -debian9: - image: debian:stretch-slim - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -debian10: - image: debian:buster-slim - stage: build - script: - - apt-get update - - apt-get upgrade -y - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libiio-dev gr-iio libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -fedora26: - image: fedora:26 - stage: build - before_script: - - source ~/.bash_profile - script: - - yum install -y make automake gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -fedora28: - image: fedora:28 - stage: build - before_script: - - source ~/.bash_profile - script: - - yum install -y make automake gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -fedora29: - image: fedora:29 - stage: build - before_script: - - source ~/.bash_profile - script: - - yum install -y make gcc gcc-c++ kernel-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python3-mako python3-six matio-devel - - cd build - - cmake -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -fedora-rawhide: - image: fedora:rawhide - stage: build - before_script: - - source ~/.bash_profile - script: - - dnf upgrade -y --nogpgcheck - - yum install -y automake gcc gcc-c++ kernel-devel make cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel pugixml-devel libpcap-devel blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -opensuse42.3: - image: opensuse/leap:42.3 - stage: build - before_script: - - pwd - script: - - zypper -n up - - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six - - cd build - - cmake -DENABLE_PACKAGING=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -opensuse-leap15.0: - image: opensuse/leap:15.0 - stage: build - before_script: - - pwd - script: - - zypper -n up - - zypper -n install cmake git gcc-c++ boost-devel libboost_atomic-devel libboost_chrono-devel libboost_thread-devel libboost_system-devel libboost_filesystem-devel libboost_serialization-devel log4cpp-devel gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six - - cd build - - cmake -DENABLE_PACKAGING=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -opensuse-tumbleweed: - image: opensuse/tumbleweed - stage: build - before_script: - - pwd - script: - - zypper -n dup - - zypper -n 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 openssl-devel python-Mako python-six - - cd build - - cmake -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -ubuntu14.04: - image: ubuntu:trusty - stage: build - script: - - apt-get update - - apt-get install -y apt-file - - apt-file update - - apt-get install -y software-properties-common - - add-apt-repository -y ppa:myriadrf/gnuradio - - add-apt-repository -y ppa:myriadrf/drivers - - apt-get update - - apt-get install -y --no-install-recommends build-essential libtool automake libhdf5-dev cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libpcap-dev libblas-dev liblapack-dev libgfortran-4.7-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - - cd build - - cmake -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -ubuntu16.04: - image: ubuntu:xenial - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -ubuntu18.04: - image: ubuntu:bionic - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -ubuntu18.10: - image: ubuntu:cosmic - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -ubuntu19.04: - image: ubuntu:disco - stage: build - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - -coverity-scan: - image: ubuntu:xenial - stage: build - script: - - apt-get update - - apt-get install -y wget curl - - wget -O ./cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --post-data "project=$COVERITY_SCAN_USER%2Fgnss-sdr&token=$COVERITY_SCAN_TOKEN" - - tar xvzf cov-analysis-linux64.tgz - - export PATH=$PATH:$(pwd)/cov-analysis-linux64-2017.07/bin - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - - cd build - - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON -DENABLE_FPGA=ON .. - - cov-build --dir cov-int make -j2 - - tar cvzf gnss-sdr.tgz cov-int - - curl --form token=$COVERITY_SCAN_TOKEN --form email=$COVERITY_SCAN_EMAIL --form file=@$(pwd)/gnss-sdr.tgz --form version="0.0.9-next" --form description=" " https://scan.coverity.com/builds?project=$COVERITY_SCAN_USER%2Fgnss-sdr --progress-bar | tee -a "log_upload.txt" ; test ${PIPESTATUS[0]} -eq 0 - when: manual - allow_failure: true - - -# Stage "test" -run-tests-x86_64: - image: debian:stretch-slim - stage: test - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - mkdir build-test - - mkdir build64 - - cd build-test - - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute Unit Tests - - ../install/run_tests --gtest_output=xml - - mv *.xml ../build64/ - # Execute System Tests - - ../install/position_test - - mv position_test*.txt ../build64/ - - cd .. - - rm -rf build-test - artifacts: - paths: - - build64/*.xml - - build64/*.txt - - -run-tests-i386: - image: i386/debian:stretch-slim - stage: test - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - mkdir build-test - - mkdir build32 - - cd build-test - - cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute Unit Tests - - ../install/run_tests --gtest_output=xml - - mv *.xml ../build32/ - # Execute System Tests - - ../install/position_test - - mv position_test*.txt ../build32/ - - cd .. - - rm -rf build-test - artifacts: - paths: - - build32/*.xml - - build32/*.txt - - -observables-test-180417100529: - image: ubuntu:bionic - stage: test - tags: - - kepler - when: manual - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot - - mkdir build-test - - mkdir build64 - - cd build-test - - cmake -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute Unit Tests - - export DISPLAY=unknown - - echo "Running HybridObservablesTest for GPS L1 CA..." - - ../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=25.0 --DLL_bw_hz_start=1.5 --PLL_narrow_bw_hz=10.0 --DLL_narrow_bw_hz=0.75 --disable_generator=1 --enable_external_signal_file=1 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=4.0 --extend_correlation_symbols=5 --external_signal_acquisition_doppler_step_hz=10 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --show_plots=0 --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=30 --gtest_output=xml:test_results.xml - - echo "Running HybridObservablesTest for Galileo E1..." - - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=5.0 --DLL_bw_hz_start=0.75 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=50000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=Galileo_E1_DLL_PLL_VEML_Tracking --external_signal_acquisition_doppler_step_hz=25 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=15 --gtest_output=xml:test_results.xml - - echo "Running HybridObservablesTest for GPS L5..." - - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=25.0 --DLL_bw_hz_start=2.5 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=250000000 --external_signal_acquisition_threshold=2.4 --trk_test_implementation=GPS_L5_DLL_PLL_Tracking --external_signal_acquisition_dwells=10 --external_signal_acquisition_doppler_step_hz=10 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L5E5_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=5 --gtest_output=xml:test_results.xml - - echo "Running HybridObservablesTest for Galileo E5a..." - - ../install/run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=30.0 --DLL_bw_hz_start=1.0 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.2 --trk_test_implementation=Galileo_E5a_DLL_PLL_Tracking --external_signal_acquisition_doppler_step_hz=10 --show_plots=0 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L5E5_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=5 --gtest_output=xml:test_results.xml - - mv *.xml ../build64/ - - cd .. - - rm -rf build-test - artifacts: - paths: - - build64/*.xml - - -leo-observables-test-180417120737: - image: ubuntu:bionic - stage: test - tags: - - kepler - when: manual - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot - - mkdir build-test - - mkdir build64 - - cd build-test - - cmake -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute Unit Tests - - export DISPLAY=unknown - - echo "Running HybridObservablesTest for GPS L1 CA..." - - ../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=30.0 --DLL_bw_hz_start=1.0 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --external_signal_acquisition_dwells=5 --external_signal_acquisition_doppler_step_hz=50 --show_plots=0 --signal_file=/captures/gitlab_test_signals/dynamic/180417120737.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/rinex_obs/rinex-obs_V1_A1-spacecraft.txt skip_trk_transitory_s=20 --external_signal_acquisition_doppler_max_hz=50000 --gtest_output=xml:test_results.xml - - echo "Running HybridObservablesTest for Galileo E1..." - - ../../install/run_tests --gtest_filter=HybridObservablesTest* -PLL_bw_hz_start=15 --DLL_bw_hz_start=0.5 --disable_generator=1 --enable_external_signal_file=1 --show_plots=true --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=2.5 --trk_test_implementation=Galileo_E1_DLL_PLL_VEML_Tracking --external_signal_acquisition_dwells=1 --external_signal_acquisition_doppler_step_hz=50 --show_plots=0 --signal_file=/captures/gitlab_test_signals/dynamic/180417120737.A_L1E1_12500000Hz_ichar.dat --filename_rinex_obs=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/rinex_obs/rinex-obs_V1_A1-spacecraft.txt skip_trk_transitory_s=5 --external_signal_acquisition_doppler_max_hz=50000 --gtest_output=xml:test_results.xml - - mv *.xml ../build64/ - - cd .. - - rm -rf build-test - artifacts: - paths: - - build64/*.xml - - -position-test-180417100529: - image: ubuntu:bionic - stage: test - tags: - - kepler - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot - - mkdir build-test - - mkdir position-test - - cd build-test - - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute System Tests - - export DISPLAY=unknown - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 - - mkdir ../position-test/L1 && rm PVT_*.* && mv *.ps ../position-test/L1/ && mv GSDR* ../position-test/L1/ - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 - - mkdir ../position-test/E1 && rm PVT_*.* && mv *.ps ../position-test/E1 && mv GSDR* ../position-test/E1 - - ../install/position_test -config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 - - mkdir ../position-test/L1E1 && rm PVT_*.* && mv *.ps ../position-test/L1E1/ && mv GSDR* ../position-test/L1E1/ - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/L5 && rm PVT_*.* && mv *.ps ../position-test/L5/ && mv GSDR* ../position-test/L5/ - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/E5 && rm PVT_*.* && mv *.ps ../position-test/E5 && mv GSDR* ../position-test/E5 - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/L5E5 && rm PVT_*.* && mv *.ps ../position-test/L5E5 && [ -f GSDR* ] && mv GSDR* ../position-test/L5E5 - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/L1L5 && rm PVT_*.* && mv *.ps ../position-test/L1L5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1L5 - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/E1E5 && rm PVT_*.* && mv *.ps ../position-test/E1E5 && [ -f GSDR* ] && mv GSDR* ../position-test/E1E5 - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/L1E1L5E5 && rm PVT_*.* && mv *.ps ../position-test/L1E1L5E5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1E1L5E5 - - mv *.xml ../position-test/ - - cd .. - - rm -rf build-test - artifacts: - paths: - - position-test/* - - position-test/L1/* - - position-test/E1/* - - position-test/L1E1/* - - position-test/L5/* - - position-test/L5E5/* - - position-test/L1L5/* - - position-test/E1E5/* - - position-test/L1E1L5E5/* - allow_failure: true - - -leo-position-test-180417120737: - image: ubuntu:bionic - stage: test - when: manual - tags: - - kepler - script: - - apt-get update - - apt-get install -y --no-install-recommends build-essential cmake ca-certificates git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libpugixml-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest gnuplot - - mkdir build-test - - mkdir leo_position - - cd build-test - - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - # Execute System Tests - - export DISPLAY=unknown - - mkdir gpsL1 && cd gpsL1 - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 - - cd .. && cp -r gpsL1 /../leo_position - - mkdir galE1 && cd galE1 - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 - - cd .. && cp -r galE1 /../leo_position - - mkdir gpsL1galE1 && cd gpsL1galE1 - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L1E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 - - cd .. && cp -r gpsL1galE1 /../leo_position - - mkdir gpsL5 && cd gpsL5 - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test=1 --show_plots=0 - - cd .. && cp -r gpsL5 /../leo_position - - mkdir galE5a && cd galE5a - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 - - cd .. && cp -r galE5a /../leo_position - - mkdir galE5a && cd galE5a - - ../../install/position_test --config_file_ptest=/captures/gitlab_test_signals/dynamic/gnss-sdr_180417120737.A_L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/dynamic/leo_pvt_test/2018_04_17_12_44_39/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 - - cd .. && cp -r galE5a /../leo_position - artifacts: - paths: - - leo_position/* - allow_failure: true - - -run-tests-armhf: - image: carlesfernandez/gnsssdr-dev-arm32v7:sumo - stage: test - tags: - - arm - when: manual - dependencies: - - crosscompile - script: - - cp binaries/bin/* /usr/bin/ - - mkdir /usr/share/gnss-sim/ - - cp -f binaries/share/* /usr/share/gnss-sim/ - - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib - - ldconfig - - volk_profile -v 8111 - - volk_gnsssdr_profile - - position_test - - run_tests --gtest_filter=Matio* - - run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=25.0 --DLL_bw_hz_start=1.5 --PLL_narrow_bw_hz=10.0 --DLL_narrow_bw_hz=0.75 --disable_generator=1 --enable_external_signal_file=1 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=4.0 --extend_correlation_symbols=5 --external_signal_acquisition_doppler_step_hz=10 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --show_plots=0 --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=30 --gtest_output=xml:test_results.xml - allow_failure: true - - -# Stage "deploy" -docker-gnsssdr: - image: docker:latest - stage: deploy - services: - - docker:dind - script: - - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - - mkdir docker-build - - cd docker-build - - cp ../Dockerfile . - - docker build -t carlesfernandez/docker-gnsssdr . - - docker push carlesfernandez/docker-gnsssdr - only: - - next - allow_failure: true - - -docker-pybombs-gnsssdr: - image: docker:latest - stage: deploy - services: - - docker:dind - script: - - wget https://raw.githubusercontent.com/carlesfernandez/docker-pybombs-gnsssdr/master/Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - - mkdir docker-build - - cd docker-build - - cp ../Dockerfile . - - docker build -t carlesfernandez/docker-pybombs-gnsssdr . - - docker push carlesfernandez/docker-pybombs-gnsssdr - only: - - next - allow_failure: true - - -docker-access18: - image: docker:latest - stage: deploy - services: - - docker:dind - script: - - mkdir docker-build - - cd docker-build - - echo -e "FROM phusion/baseimage:0.11\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y --no-install-recommends build-essential cmake curl nano libarmadillo-dev libblas-dev libboost-chrono-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev libpugixml-dev libgflags-dev libgoogle-glog-dev googletest libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev git ca-certificates gnuradio-dev python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool fig2dev octave pstoedit gnuplot-x11 && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/gnss-sdr/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && NPROC=$(grep -c ^processor /proc/cpuinfo) && make -j$(($NPROC+1)) && make install && rm -rf /home/src\nWORKDIR /home\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN rm -rf /tmp/* /var/tmp/*\nCMD [\"bash\"]" > Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - - docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO . - - docker tag $DOCKER_HUB_USER/$DOCKER_HUB_REPO:latest $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 - - -# Stage "experiment" -run-access18: - image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 - stage: experiment - script: - - apt-get update - # Grab the data set - - mkdir -p exp-access18/data - - cd exp-access18/data - - curl https://zenodo.org/record/1184601/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - - tar xvfJ L2_signal_samples.tar.xz - - echo "3a04c1eeb970776bb77f5e3b7eaff2df L2_signal_samples.tar.xz" > data.md5 - - md5sum -c data.md5 - - cd .. - # Execute the experiment - - cp ../src/utils/reproducibility/ieee-access18/L2-access18.conf . - - cp ../src/utils/reproducibility/ieee-access18/plot_dump.m . - - cp -r ../src/utils/matlab/libs/geoFunctions . - - gnss-sdr --c=L2-access18.conf - - octave --no-gui plot_dump.m - - epspdf Figure2.eps Figure2.pdf - - cd .. - - mkdir access18 - - cp exp-access18/*.pdf access18/ - artifacts: - paths: - - access18/*.pdf From 10a42945e6a3e06e7c709dbfbea6278c78e03a52 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 8 Mar 2019 10:24:06 +0100 Subject: [PATCH 16/32] Make constructors private, fix documentation --- src/core/libs/gnss_sdr_fpga_sample_counter.h | 2 +- src/core/libs/gnss_sdr_sample_counter.cc | 3 +++ src/core/libs/gnss_sdr_sample_counter.h | 3 ++- src/core/libs/gnss_sdr_time_counter.cc | 3 +++ src/core/libs/gnss_sdr_time_counter.h | 1 + src/core/monitor/gnss_synchro_monitor.h | 22 ++++++++++---------- src/core/monitor/gnss_synchro_udp_sink.cc | 1 + src/core/monitor/gnss_synchro_udp_sink.h | 5 +++++ src/core/receiver/gnss_flowgraph.cc | 4 ++-- 9 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/core/libs/gnss_sdr_fpga_sample_counter.h b/src/core/libs/gnss_sdr_fpga_sample_counter.h index f30bb78c0..1f5db0b2d 100644 --- a/src/core/libs/gnss_sdr_fpga_sample_counter.h +++ b/src/core/libs/gnss_sdr_fpga_sample_counter.h @@ -48,6 +48,7 @@ gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, class gnss_sdr_fpga_sample_counter : public gr::block { private: + friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms); gnss_sdr_fpga_sample_counter(double _fs, int32_t _interval_ms); uint32_t test_register(uint32_t writeval); void configure_samples_per_output(uint32_t interval); @@ -76,7 +77,6 @@ private: bool is_open; public: - friend gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms); ~gnss_sdr_fpga_sample_counter(); int general_work(int noutput_items, gr_vector_int &ninput_items, diff --git a/src/core/libs/gnss_sdr_sample_counter.cc b/src/core/libs/gnss_sdr_sample_counter.cc index 954d5d674..a20032edd 100644 --- a/src/core/libs/gnss_sdr_sample_counter.cc +++ b/src/core/libs/gnss_sdr_sample_counter.cc @@ -65,6 +65,9 @@ gnss_sdr_sample_counter::gnss_sdr_sample_counter( } +gnss_sdr_sample_counter::~gnss_sdr_sample_counter() = default; + + gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size) { gnss_sdr_sample_counter_sptr sample_counter_(new gnss_sdr_sample_counter(_fs, _interval_ms, _size)); diff --git a/src/core/libs/gnss_sdr_sample_counter.h b/src/core/libs/gnss_sdr_sample_counter.h index a20502b9f..af36ba869 100644 --- a/src/core/libs/gnss_sdr_sample_counter.h +++ b/src/core/libs/gnss_sdr_sample_counter.h @@ -51,6 +51,7 @@ gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter( class gnss_sdr_sample_counter : public gr::sync_decimator { private: + friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size); gnss_sdr_sample_counter(double _fs, int32_t _interval_ms, size_t _size); uint32_t samples_per_output; double fs; @@ -68,7 +69,7 @@ private: bool flag_enable_send_msg; public: - friend gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(double _fs, int32_t _interval_ms, size_t _size); + ~gnss_sdr_sample_counter(); int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/src/core/libs/gnss_sdr_time_counter.cc b/src/core/libs/gnss_sdr_time_counter.cc index 2bf29fa77..1daabf071 100644 --- a/src/core/libs/gnss_sdr_time_counter.cc +++ b/src/core/libs/gnss_sdr_time_counter.cc @@ -52,6 +52,9 @@ gnss_sdr_time_counter::gnss_sdr_time_counter() : gr::block("time_counter", } +gnss_sdr_time_counter::~gnss_sdr_time_counter() = default; + + gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter() { gnss_sdr_time_counter_sptr counter_(new gnss_sdr_time_counter()); diff --git a/src/core/libs/gnss_sdr_time_counter.h b/src/core/libs/gnss_sdr_time_counter.h index 7be810ec7..76a7e09ed 100644 --- a/src/core/libs/gnss_sdr_time_counter.h +++ b/src/core/libs/gnss_sdr_time_counter.h @@ -59,6 +59,7 @@ private: friend gnss_sdr_time_counter_sptr gnss_sdr_make_time_counter(); public: + ~gnss_sdr_time_counter(); int 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); }; diff --git a/src/core/monitor/gnss_synchro_monitor.h b/src/core/monitor/gnss_synchro_monitor.h index 632fa72ed..03c37ab28 100644 --- a/src/core/monitor/gnss_synchro_monitor.h +++ b/src/core/monitor/gnss_synchro_monitor.h @@ -35,6 +35,8 @@ #define GNSS_SDR_GNSS_SYNCHRO_MONITOR_H #include "gnss_synchro_udp_sink.h" +#include +#include // for gr_vector_void_star #include #include #include @@ -51,7 +53,9 @@ gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels, const std::vector& udp_addresses); /*! - * \brief This class implements a block that computes the PVT solution with Galileo E1 signals + * \brief This class implements a monitoring block which allows sending + * a data stream with the receiver internal parameters (Gnss_Synchro objects) + * to local or remote clients over UDP. */ class gnss_synchro_monitor : public gr::sync_block { @@ -61,21 +65,17 @@ private: int udp_port, const std::vector& udp_addresses); - unsigned int d_nchannels; - - int d_decimation_factor; - - std::unique_ptr udp_sink_ptr; - - int count; - - -public: gnss_synchro_monitor(unsigned int n_channels, int decimation_factor, int udp_port, const std::vector& udp_addresses); + unsigned int d_nchannels; + int d_decimation_factor; + std::unique_ptr udp_sink_ptr; + int count; + +public: ~gnss_synchro_monitor(); //!< Default destructor int work(int noutput_items, gr_vector_const_void_star& input_items, diff --git a/src/core/monitor/gnss_synchro_udp_sink.cc b/src/core/monitor/gnss_synchro_udp_sink.cc index 2978537ea..23cb236c4 100644 --- a/src/core/monitor/gnss_synchro_udp_sink.cc +++ b/src/core/monitor/gnss_synchro_udp_sink.cc @@ -44,6 +44,7 @@ Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(std::vector addresses, } } + bool Gnss_Synchro_Udp_Sink::write_gnss_synchro(const std::vector& stocks) { std::ostringstream archive_stream; diff --git a/src/core/monitor/gnss_synchro_udp_sink.h b/src/core/monitor/gnss_synchro_udp_sink.h index d72b2f18a..bfaebf45d 100644 --- a/src/core/monitor/gnss_synchro_udp_sink.h +++ b/src/core/monitor/gnss_synchro_udp_sink.h @@ -35,10 +35,15 @@ #include "gnss_synchro.h" #include #include +#include #include #include +/*! + * \brief This class sends serialized Gnss_Synchro objects + * over UDP to one or multiple endpoints. + */ class Gnss_Synchro_Udp_Sink { public: diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 5881a3c49..898461d16 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -1664,10 +1664,10 @@ void GNSSFlowgraph::init() if (enable_monitor_) { - GnssSynchroMonitor_ = gr::basic_block_sptr(new gnss_synchro_monitor(channels_count_, + GnssSynchroMonitor_ = gnss_synchro_make_monitor(channels_count_, configuration_->property("Monitor.decimation_factor", 1), configuration_->property("Monitor.udp_port", 1234), - udp_addr_vec)); + udp_addr_vec); } } From 6a24b65d6464c35f9e4b97783f2ae71ecd4acae5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 8 Mar 2019 10:28:04 +0100 Subject: [PATCH 17/32] Fix for VS --- .../volk_gnsssdr/lib/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt index 5211c1cf5..095028f60 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt @@ -313,6 +313,9 @@ if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86) #MSVC 64 bit does not have MMX, overrule it if(${SIZEOF_CPU} EQUAL 64 AND MSVC) overrule_arch(mmx "No MMX for Win64") + if(MSVC_VERSION GREATER 1700) + OVERRULE_ARCH(sse "No SSE for Win64 Visual Studio 2013") + endif() endif() endif() @@ -582,7 +585,7 @@ target_include_directories(volk_gnsssdr_obj #Add dynamic library add_library(volk_gnsssdr SHARED $) -target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries} m) +target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries}) target_include_directories(volk_gnsssdr PUBLIC $ PUBLIC $ @@ -593,7 +596,10 @@ target_include_directories(volk_gnsssdr ) #Configure target properties -set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC") +if(NOT MSVC) + set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC") + target_link_libraries(volk_gnsssdr m) +endif() set_target_properties(volk_gnsssdr PROPERTIES SOVERSION ${LIBVER}) set_target_properties(volk_gnsssdr PROPERTIES DEFINE_SYMBOL "volk_gnsssdr_EXPORTS") @@ -608,7 +614,10 @@ install(TARGETS volk_gnsssdr #Configure static library if(ENABLE_STATIC_LIBS) add_library(volk_gnsssdr_static STATIC $) - target_link_libraries(volk_gnsssdr_static ${volk_gnsssdr_libraries} pthread m) + target_link_libraries(volk_gnsssdr_static ${volk_gnsssdr_libraries} pthread) + if(NOT MSVC) + target_link_libraries(volk_gnsssdr_static m) + endif() target_include_directories(volk_gnsssdr_static PUBLIC $ PUBLIC $ From 1ee044b5a9b8c4044cbf74db57dae5205e4ca6d8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 8 Mar 2019 23:20:08 +0100 Subject: [PATCH 18/32] Fix documentation --- .../signal_source/adapters/custom_udp_signal_source.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/signal_source/adapters/custom_udp_signal_source.h b/src/algorithms/signal_source/adapters/custom_udp_signal_source.h index 87ed44496..37e80caf7 100644 --- a/src/algorithms/signal_source/adapters/custom_udp_signal_source.h +++ b/src/algorithms/signal_source/adapters/custom_udp_signal_source.h @@ -64,7 +64,7 @@ public: } /*! - * \brief Returns "UDP_Signal_Source" + * \brief Returns "Custom_UDP_Signal_Source" */ inline std::string implementation() override { From 8cb6b76651a6d7082d70c8d3c4e006848a345397 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 8 Mar 2019 23:21:09 +0100 Subject: [PATCH 19/32] Make the role name more uniform --- src/algorithms/signal_source/adapters/gn3s_signal_source.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/gn3s_signal_source.h b/src/algorithms/signal_source/adapters/gn3s_signal_source.h index 8fb7637f5..df799f019 100644 --- a/src/algorithms/signal_source/adapters/gn3s_signal_source.h +++ b/src/algorithms/signal_source/adapters/gn3s_signal_source.h @@ -59,11 +59,11 @@ public: } /*! - * \brief Returns "Gn3sSignalSource". + * \brief Returns "Gn3s_Signal_Source". */ inline std::string implementation() override { - return "Gn3sSignalSource"; + return "Gn3s_Signal_Source"; } inline size_t item_size() override From 0c7ec44cdb1775e53e3bc4be1ba7c2652e564430 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 01:39:32 +0100 Subject: [PATCH 20/32] Generate CMake summary report --- CMakeLists.txt | 452 +++++++++++++++++++++++------ cmake/Modules/FindGNURADIO.cmake | 7 + cmake/Modules/FindGOOGLETEST.cmake | 51 ++++ src/tests/CMakeLists.txt | 16 +- 4 files changed, 441 insertions(+), 85 deletions(-) create mode 100644 cmake/Modules/FindGOOGLETEST.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 492169801..6ca0e123e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,50 +43,100 @@ endif() # Determine optional blocks/libraries to be built (default: not built) # Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..' ######################################################################## +include(FeatureSummary) # Support of optional RF front-ends option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON) +add_feature_info(ENABLE_UHD ENABLE_UHD "Enables UHD_Signal_Source for using RF front-ends from the USRP family. Requires gr-uhd.") + option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source" OFF) -option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF) +add_feature_info(ENABLE_OSMOSDR ENABLE_OSMOSDR "Enables Osmosdr_Signal_Source and RtlTcp_Signal_Source for using RF front-ends compatible with the OsmoSDR driver. Requires gr-osmosdr.") + +option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) +add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") + option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) +add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") + option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) +add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") + option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) +add_feature_info(ENABLE_PLUTOSDR ENABLE_PLUTOSDR "Enables Plutosdr_Signal_Source for using ADALM-PLUTO boards. Requires gr-iio.") + option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) -option(ENABLE_AD9361 "Enable the use of AD9361 directo to FPGA hardware, requires libiio" OFF) +add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") + +option(ENABLE_AD9361 "Enable the use of AD9361 direct to FPGA hardware, requires libiio" OFF) +add_feature_info(ENABLE_AD9361 ENABLE_AD9361 "Enables Ad9361_Fpga_Signal_Source for devices with the AD9361 chipset. Requires libiio.") + option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample source, requires libpcap" OFF) +add_feature_info(ENABLE_RAW_UDP ENABLE_RAW_UDP "Enables Custom_UDP_Signal_Source for custom UDP packet sample source. Requires libpcap.") # Performance analysis tools option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) +add_feature_info(ENABLE_GPERFTOOLS ENABLE_GPERFTOOLS "Enables performance analysis. Requires Gperftools.") + option(ENABLE_GPROF "Enable the use of the GNU profiler tool 'gprof'" OFF) +add_feature_info(ENABLE_GPROF ENABLE_GPROF "Enables performance analysis with 'gprof'.") # Code correctness option(ENABLE_CLANG_TIDY "Enable the use of clang-tidy when compiling" OFF) +add_feature_info(ENABLE_CLANG_TIDY ENABLE_CLANG_TIDY "Runs clang-tidy along with the compiler. Requires Clang.") # Acceleration option(ENABLE_PROFILING "Enable execution of volk_gnsssdr_profile at the end of the building" OFF) +add_feature_info(ENABLE_PROFILING ENABLE_PROFILING "Runs volk_gnsssdr_profile at the end of the building.") + option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF) +add_feature_info(ENABLE_OPENCL ENABLE_OPENCL "Enables GPS_L1_CA_PCPS_OpenCl_Acquisition (experimental). Requires OpenCL.") + option(ENABLE_CUDA "Enable building of processing blocks implemented with CUDA (experimental, requires CUDA SDK)" OFF) -option(ENABLE_FPGA "Enable building of processing blocks implemented with FPGA (experimental, requires EZDMA driver)" OFF) +add_feature_info(ENABLE_CUDA ENABLE_CUDA "Enables GPS_L1_CA_DLL_PLL_Tracking_GPU (experimental). Requires CUDA.") + +option(ENABLE_FPGA "Enable building of processing blocks implemented with FPGA" OFF) +add_feature_info(ENABLE_FPGA ENABLE_FPGA "Enables building of processing blocks for FPGA off-loading.") # Building and packaging options option(ENABLE_GENERIC_ARCH "Builds a portable binary" OFF) + option(ENABLE_PACKAGING "Enable software packaging" OFF) +add_feature_info(ENABLE_PACKAGING ENABLE_PACKAGING "Enables software packaging.") + option(ENABLE_OWN_GLOG "Download glog and link it to gflags" OFF) +add_feature_info(ENABLE_OWN_GLOG ENABLE_OWN_GLOG "Forces the downloading and building of Google glog.") + option(ENABLE_OWN_ARMADILLO "Download and build Armadillo locally" OFF) +add_feature_info(ENABLE_OWN_ARMADILLO ENABLE_OWN_ARMADILLO "Forces the downloading and building of Armadillo.") + option(ENABLE_LOG "Enable logging" ON) +add_feature_info(ENABLE_LOG ENABLE_LOG "Enables runtime internal logging with Google glog.") + if(ENABLE_PACKAGING) set(ENABLE_GENERIC_ARCH ON) endif() # Testing option(ENABLE_UNIT_TESTING "Build unit tests" ON) +add_feature_info(ENABLE_UNIT_TESTING ENABLE_UNIT_TESTING "Enables building of Unit Tests.") + option(ENABLE_UNIT_TESTING_MINIMAL "Build a minimal set of unit tests" OFF) +add_feature_info(ENABLE_UNIT_TESTING_MINIMAL ENABLE_UNIT_TESTING_MINIMAL "Enables building a minimal set of Unit Tests.") + option(ENABLE_UNIT_TESTING_EXTRA "Download external files and build extra unit tests" OFF) +add_feature_info(ENABLE_UNIT_TESTING_EXTRA ENABLE_UNIT_TESTING_EXTRA "Enables building of Extra Unit Tests and downloading of external data files.") + option(ENABLE_SYSTEM_TESTING "Build system tests" OFF) +add_feature_info(ENABLE_SYSTEM_TESTING ENABLE_SYSTEM_TESTING "Enables building of System Tests.") + option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF) +add_feature_info(ENABLE_SYSTEM_TESTING_EXTRA ENABLE_SYSTEM_TESTING_EXTRA "Enables building of Extra System Tests and downloading of external tools.") + if(ENABLE_SYSTEM_TESTING_EXTRA) set(ENABLE_SYSTEM_TESTING ON) endif() option(ENABLE_OWN_GPSTK "Force to download, build and link GPSTk for system tests, even if it is already installed" OFF) +add_feature_info(ENABLE_OWN_GPSTK ENABLE_OWN_GPSTK "Forces the downloading and building of GPSTk for system tests.") + option(ENABLE_INSTALL_TESTS "Install QA code system-wide" OFF) if(ENABLE_FPGA) set(ENABLE_INSTALL_TESTS ON) @@ -131,6 +181,7 @@ set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_I # Environment setup ######################################################################## include(ExternalProject) + # Detect 64-bits machine if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ARCH_64BITS TRUE) @@ -321,7 +372,7 @@ endif() if(NOT CMAKE_MAKE_PROGRAM_PRETTY_NAME) set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "${CMAKE_MAKE_PROGRAM}") endif() - +add_feature_info(ENABLE_INSTALL_TESTS ENABLE_INSTALL_TESTS "Install test binaries when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} install'.") ################################################################################ @@ -501,6 +552,11 @@ else() endif() find_package(Threads REQUIRED) endif() +set_package_properties(Threads PROPERTIES + URL "https://computing.llnl.gov/tutorials/pthreads/" + DESCRIPTION "Implements the POSIX Threads execution model" + PURPOSE "Used to implement parallelism." +) @@ -511,29 +567,34 @@ enable_testing() if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR $ENV{GTEST_DIR}) - endif() - if(GTEST_DIR) message(STATUS "Googletest root folder set at ${GTEST_DIR}") - find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR} ${GTEST_DIR}/googletest) - if(LIBGTEST_DEV_DIR) - message(STATUS "Googletest has been found.") - else() - message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") - endif() - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/googletest/include) - else() - find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/googletest/googletest /usr/src/gtest /usr/include/gtest /opt/local/src/gtest-1.7.0) - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS /usr/include /opt/local/src/gtest-1.7.0/include) - if(LIBGTEST_DEV_DIR) - message(STATUS "Googletest package has been found.") - else() - message(STATUS " Googletest has not been found.") - message(STATUS " Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") - endif() endif() endif() +find_package(GOOGLETEST) + +if(GTEST_DIR) + if(NOT GOOGLETEST_FOUND) + message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") + endif() +endif() + +set_package_properties(GOOGLETEST PROPERTIES + URL "https://github.com/google/googletest" + DESCRIPTION "Source code of Google's Testing Framework" + TYPE REQUIRED +) + +if(GOOGLETEST_FOUND) + set_package_properties(GOOGLETEST PROPERTIES + PURPOSE "Used for QA code." + ) +else() + set_package_properties(GOOGLETEST PROPERTIES + PURPOSE "Used for QA code. Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +endif() + ################################################################################ @@ -630,13 +691,28 @@ if(CMAKE_VERSION VERSION_LESS 3.5) IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES}) endif() endif() - +set_package_properties(Boost PROPERTIES + URL "https://www.boost.org" + DESCRIPTION "Portable C++ source libraries" + PURPOSE "Used widely across the source code." + TYPE REQUIRED +) ################################################################################ # GNU Radio - https://gnuradio.org ################################################################################ set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT) + +find_package(UHD) +if(ENABLE_UHD) + if(NOT UHD_FOUND) + set(ENABLE_UHD OFF) + else() + set(GR_REQUIRED_COMPONENTS ${GR_REQUIRED_COMPONENTS} UHD) + endif() +endif() + find_package(GNURADIO) if(PC_GNURADIO_RUNTIME_VERSION) if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) @@ -752,6 +828,26 @@ else() endif() endif() +if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND) + if(NOT TARGET Gnuradio::uhd) + add_library(Gnuradio::uhd SHARED IMPORTED) + list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR) + get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE) + set_target_properties(Gnuradio::uhd PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${GNURADIO_UHD_DIR}" + INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}" + ) + endif() +endif() +set_package_properties(GNURADIO PROPERTIES + URL "https://www.gnuradio.org/" + DESCRIPTION "The free and open software radio ecosystem" + PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." + TYPE REQUIRED +) + ################################################################################ @@ -761,6 +857,12 @@ find_package(VOLK) if(NOT VOLK_FOUND) message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") endif() +set_package_properties(VOLK PROPERTIES + URL "http://libvolk.org" + DESCRIPTION "Vector-Optimized Library of Kernels" + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + TYPE REQUIRED +) @@ -771,7 +873,12 @@ find_package(LOG4CPP) if(NOT LOG4CPP_FOUND) message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") endif() - +set_package_properties(LOG4CPP PROPERTIES + URL "http://log4cpp.sourceforge.net/" + DESCRIPTION "Library of C++ classes for flexible logging to files" + PURPOSE "Required by GNU Radio." + TYPE REQUIRED +) ################################################################################ @@ -779,7 +886,7 @@ endif() ################################################################################ find_package(VOLKGNSSSDR) if(NOT VOLKGNSSSDR_FOUND) - message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'") + message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") ############################### # Find Python required modules ############################### @@ -893,6 +1000,12 @@ if(NOT VOLKGNSSSDR_FOUND) set(ORC_LIBRARIES "") set(ORC_INCLUDE_DIRS "") endif() + set_package_properties(ORC PROPERTIES + URL "https://gstreamer.freedesktop.org/modules/orc.html" + DESCRIPTION "The Optimized Inner Loops Runtime Compiler" + PURPOSE "Used by volk_gnsssdr." + TYPE OPTIONAL + ) add_library(volk_gnsssdr UNKNOWN IMPORTED) set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}) @@ -926,9 +1039,25 @@ if(NOT VOLKGNSSSDR_FOUND) add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr-config-info ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info) + + set_package_properties(VOLKGNSSSDR PROPERTIES + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors. It will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(VOLKGNSSSDR PROPERTIES + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + ) endif() - - +set_package_properties(VOLKGNSSSDR PROPERTIES + DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR" + TYPE REQUIRED +) +set_package_properties(Git PROPERTIES + URL "https://git-scm.com" + DESCRIPTION "A free and open source distributed version control system" + PURPOSE "Manage version control, get MINOR_VERSION name for version number." + TYPE REQUIRED +) ################################################################################ # gflags - https://github.com/gflags/gflags @@ -938,7 +1067,7 @@ find_package(GFLAGS) if(NOT GFLAGS_FOUND) message(STATUS " gflags library has not been found.") message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing 'make'. ") + message(STATUS " when doing 'make'.") if(CMAKE_VERSION VERSION_LESS 3.2) ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} @@ -991,8 +1120,19 @@ if(NOT GFLAGS_FOUND) endif() set(LOCAL_GFLAGS true CACHE STRING "GFlags downloaded and built automatically" FORCE) + set_package_properties(GFLAGS PROPERTIES + PURPOSE "Used for commandline flags management. Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(GFLAGS PROPERTIES + PURPOSE "Used for commandline flags management." + ) endif() - +set_package_properties(GFLAGS PROPERTIES + URL "https://github.com/gflags/gflags" + DESCRIPTION "C++ library that implements commandline flags processing" + TYPE REQUIRED +) ################################################################################ @@ -1011,7 +1151,7 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) message(STATUS " or it is likely not linked to gflags.") endif() message(STATUS " glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing 'make'. ") + message(STATUS " when doing 'make'.") if(NOT ${LOCAL_GFLAGS}) add_library(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} UNKNOWN IMPORTED) set_property(TARGET gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} PROPERTY IMPORTED_LOCATION "${GFlags_LIBS}") @@ -1150,12 +1290,26 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c endif() set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) + + set_package_properties(GLOG PROPERTIES + PURPOSE "Used for runtime internal logging. Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(GLOG PROPERTIES + PURPOSE "Used for runtime internal logging." + ) endif() if(NOT ENABLE_LOG) message(STATUS "Logging is not enabled") endif() +set_package_properties(GLOG PROPERTIES + URL "https://github.com/google/glog" + DESCRIPTION "C++ implementation of the Google logging module" + TYPE REQUIRED +) + ############################################################################# @@ -1212,13 +1366,16 @@ if(ARMADILLO_FOUND) INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}" ) + set_package_properties(Armadillo PROPERTIES + PURPOSE "Used for matrix computations." + ) endif() endif() if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) message(STATUS " Armadillo has not been found.") message(STATUS " Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built automatically") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(armadillo_BRANCH ${GNSSSDR_ARMADILLO_LOCAL_VERSION}) set(armadillo_RELEASE ${armadillo_BRANCH}) @@ -1239,6 +1396,12 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) endif() message(FATAL_ERROR "gfortran is required to build gnss-sdr") endif() + set_package_properties(GFORTRAN PROPERTIES + URL "http://gcc.gnu.org/wiki/GFortran" + DESCRIPTION "GNU Fortran project" + PURPOSE "Required by Armadillo." + TYPE REQUIRED + ) endif() ############################################# @@ -1289,8 +1452,15 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include" INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}" ) + set_package_properties(Armadillo PROPERTIES + PURPOSE "Used for matrix computations. Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) endif() - +set_package_properties(Armadillo PROPERTIES + URL "http://arma.sourceforge.net/" + DESCRIPTION "C++ library for linear algebra and scientific computing" + TYPE REQUIRED +) ################################################################################ @@ -1328,6 +1498,12 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 /usr/lib/x86_64-linux-gnux32 /usr/lib/sh4-linux-gnu ) +set_package_properties(GnuTLS PROPERTIES + URL "https://www.gnutls.org/" + DESCRIPTION "The GnuTLS Transport Layer Security Library" + PURPOSE "Used GnuTLS library with openssl compatibility for the SUPL protocol implementation." + TYPE OPTIONAL +) if(NOT GNUTLS_OPENSSL_LIBRARY) message(STATUS "Looking for OpenSSL instead...") @@ -1351,6 +1527,12 @@ if(NOT GNUTLS_OPENSSL_LIBRARY) endif() message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") endif() + set_package_properties(OpenSSL PROPERTIES + URL "https://www.openssl.org" + DESCRIPTION "Cryptography and SSL/TLS Toolkit" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED + ) endif() @@ -1364,8 +1546,14 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS message(STATUS " Matio installed version (${MATIO_VERSION_STRING}) is too old (>= ${GNSSSDR_MATIO_MIN_VERSION} is required).") endif() message(STATUS " Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built automatically") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") find_package(ZLIB) + set_package_properties(ZLIB PROPERTIES + URL "https://www.zlib.net/" + DESCRIPTION "A Massively Spiffy Yet Delicately Unobtrusive Compression Library" + PURPOSE "Required to build Matio." + TYPE REQUIRED + ) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) if(OS_IS_LINUX) @@ -1403,6 +1591,12 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS endif() endif() find_package(HDF5) + set_package_properties(HDF5 PROPERTIES + URL "https://support.hdfgroup.org/HDF5/" + DESCRIPTION "A versatile data model, a portable file format and a software library" + PURPOSE "Required to build Matio." + TYPE REQUIRED + ) if(HDF5_FOUND) list(GET HDF5_LIBRARIES 0 HDF5_FIRST_DIR) get_filename_component(HDF5_BASE_DIR2 ${HDF5_FIRST_DIR} DIRECTORY) @@ -1424,7 +1618,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION} UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix= - BUILD_COMMAND $(MAKE) + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ) else() ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION} @@ -1467,18 +1661,32 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS else() message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr") endif() + set_package_properties(MATIO PROPERTIES + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave. Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(MATIO PROPERTIES + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + ) endif() +set_package_properties(MATIO PROPERTIES + URL "https://github.com/tbeu/matio" + DESCRIPTION "MATLAB MAT File I/O Library" + TYPE REQUIRED +) ################################################################################ # PugiXML - https://pugixml.org/ ################################################################################ -find_package(PUGIXML QUIET) +find_package(PUGIXML) if(PUGIXML_FOUND) - message(STATUS "PugiXML has been found.") + set_package_properties(PUGIXML PROPERTIES + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." + ) else() - message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built automatically when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") + message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) set(TOOLCHAIN_ARG "") if(EXISTS $ENV{OECORE_TARGET_SYSROOT}) @@ -1523,14 +1731,23 @@ else() INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}" ) endif() -endif() + set_package_properties(PUGIXML PROPERTIES + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre. PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +endif() +set_package_properties(PUGIXML PROPERTIES + URL "https://pugixml.org/" + DESCRIPTION "Light-weight, simple and fast XML parser for C++" + TYPE REQUIRED +) ################################################################################ -# Doxygen - http://www.stack.nl/~dimitri/doxygen/index.html (OPTIONAL, used if found) +# Doxygen - http://www.doxygen.nl (OPTIONAL, used if found) ################################################################################ find_package(Doxygen) +find_package(LATEX) if(DOXYGEN_FOUND) message(STATUS "Doxygen found.") message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.") @@ -1538,7 +1755,6 @@ if(DOXYGEN_FOUND) set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) - find_package(LATEX) if(PDFLATEX_COMPILER) set(GENERATE_PDF_DOCUMENTATION "YES") set(GNSSSDR_USE_MATHJAX "NO") @@ -1553,9 +1769,9 @@ if(DOXYGEN_FOUND) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/docs/doxygen/Doxyfile WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen." VERBATIM + COMMENT "Generating source code documentation with Doxygen." VERBATIM ) - if(LATEX_COMPILER) + if(PDFLATEX_COMPILER) message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf") add_custom_target(pdfmanual COMMAND ${CMAKE_MAKE_PROGRAM} @@ -1588,12 +1804,25 @@ else() message(STATUS " or simply by doing 'sudo port install doxygen +latex'.") endif() endif() +set_package_properties(Doxygen PROPERTIES + URL "http://www.doxygen.nl" + DESCRIPTION "Generates documentation from annotated C++ sources" + PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" + TYPE OPTIONAL +) +set_package_properties(LATEX PROPERTIES + URL "https://www.latex-project.org" + DESCRIPTION "High-quality typesetting system" + PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" + TYPE OPTIONAL +) ############################################################################### # OpenCL (OPTIONAL) ############################################################################### +find_package(OPENCL QUIET) if(ENABLE_OPENCL) find_package(OPENCL) if($ENV{DISABLE_OPENCL}) @@ -1617,7 +1846,12 @@ if(ENABLE_OPENCL) else() set(OPENCL_FOUND FALSE) endif() - +set_package_properties(OPENCL PROPERTIES + URL "https://www.khronos.org/opencl/" + DESCRIPTION "Library for parallel programming" + PURPOSE "Used in some processing block implementations." + TYPE OPTIONAL +) ############################################################################### @@ -1632,6 +1866,12 @@ if(ENABLE_CUDA) find_package(CUDA REQUIRED) message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") + set_package_properties(CUDA PROPERTIES + URL "https://developer.nvidia.com/cuda-downloads" + DESCRIPTION "Library for parallel programming in Nvidia GPUs" + PURPOSE "Used in some processing block implementations." + TYPE REQUIRED + ) else() message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.") @@ -1642,14 +1882,20 @@ endif() ############################################################################### # CUSTOM UDP PACKET SOURCE (OPTIONAL) ############################################################################### +find_package(PCAP) if(ENABLE_RAW_UDP) message(STATUS "High-optimized custom UDP IP packet source is enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'") - find_package(PCAP) if(NOT PCAP_FOUND) message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)") endif() endif() +set_package_properties(PCAP PROPERTIES + URL "https://www.tcpdump.org" + DESCRIPTION "A portable C/C++ library for network traffic capture" + PURPOSE "Used for the custom UDP IP packet source." + TYPE OPTIONAL +) @@ -1673,29 +1919,12 @@ endif() ######################################## # USRP Hardware Driver (UHD) - OPTIONAL ######################################## -if(ENABLE_UHD) - find_package(UHD) - if(NOT UHD_FOUND) - set(ENABLE_UHD OFF) - message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,") - message(STATUS " so all USRP-based front-ends will not be usable.") - message(STATUS " Please check https://files.ettus.com/manual/") - else() - set(GR_REQUIRED_COMPONENTS UHD) - find_package(Gnuradio) - if(NOT TARGET Gnuradio::uhd) - add_library(Gnuradio::uhd SHARED IMPORTED) - list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::uhd PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_UHD_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}" - ) - endif() - endif() -endif() +set_package_properties(UHD PROPERTIES + URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" + DESCRIPTION "USRP Hardware Driver" + PURPOSE "Used for communication with front-ends of the USRP family." + TYPE OPTIONAL +) ########################################## @@ -1707,8 +1936,8 @@ if($ENV{RTLSDR_DRIVER}) set(ENABLE_OSMOSDR ON) endif() +find_package(GROSMOSDR) if(ENABLE_OSMOSDR) - find_package(GROSMOSDR) if(GROSMOSDR_FOUND) message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ..'") @@ -1723,6 +1952,12 @@ else() message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)") endif() +set_package_properties(GROSMOSDR PROPERTIES + URL "https://osmocom.org/projects/gr-osmosdr/wiki" + DESCRIPTION "osmocom GNU Radio blocks" + PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." + TYPE OPTIONAL +) ############################################## @@ -1730,10 +1965,13 @@ endif() # IIO blocks for GNU Radio # https://github.com/analogdevicesinc/gr-iio ############################################## -if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) - find_package(GRIIO) - find_package(LIBIIO) -endif() +find_package(GRIIO) +set_package_properties(GRIIO PROPERTIES + URL "https://github.com/analogdevicesinc/gr-iio" + DESCRIPTION "IIO blocks for GNU Radio" + PURPOSE "Used for communication with PlutoSDR and FMCOMMS devices." + TYPE OPTIONAL +) ################################################################################### @@ -1741,9 +1979,13 @@ endif() # A cross platform library for interfacing with local and remote Linux IIO devices # https://github.com/analogdevicesinc/libiio ################################################################################### -if(ENABLE_AD9361) - find_package(LIBIIO) -endif() +find_package(LIBIIO) +set_package_properties(LIBIIO PROPERTIES + URL "https://github.com/analogdevicesinc/libiio" + DESCRIPTION "A library for interfacing with Linux IIO devices" + PURPOSE "Used for communication with the AD9361 chipset." + TYPE OPTIONAL +) ############################################## @@ -1765,12 +2007,18 @@ else() message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.") endif() +find_package(TELEORBIT) if(ENABLE_FLEXIBAND) - find_package(TELEORBIT) if(NOT TELEORBIT_FOUND) message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") endif() endif() +set_package_properties(TELEORBIT PROPERTIES + DESCRIPTION "The Teleorbit's Flexiband GNU Radio block." + PURPOSE "Used for communication with the Flexiband front-end." + TYPE OPTIONAL +) + ############################################## @@ -1783,14 +2031,21 @@ endif() if(GN3S_DRIVER) set(ENABLE_GN3S ON) endif() +find_package(GRGN3S QUIET) if(ENABLE_GN3S) message(STATUS "The GN3S driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'") - find_package(GRGN3S QUIET) else() message(STATUS "The (optional and experimental) GN3S driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.") endif() +set_package_properties(GRGN3S PROPERTIES + URL "https://github.com/gnss-sdr/gr-gn3s" + DESCRIPTION "The GN3S v2 front-end GNU Radio block." + PURPOSE "Used for communication with the GN3S v2 front-end." + TYPE OPTIONAL +) + ####################################################### @@ -1805,22 +2060,27 @@ if(RAW_ARRAY_DRIVER) set(ENABLE_ARRAY ON) endif() +find_package(GRDBFCTTC QUIET) if(ENABLE_ARRAY) message(STATUS "CTTC's Antenna Array front-end driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'") - find_package(GRDBFCTTC QUIET) else() message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.") endif() - +set_package_properties(GRDBFCTTC PROPERTIES + URL "https://github.com/gnss-sdr/gr-dbfcttcs" + DESCRIPTION "CTTC's array prototype GNU Radio block." + PURPOSE "Used for communication with CTTC's antenna array." + TYPE OPTIONAL +) ################################################################################ # GPerftools - https://github.com/gperftools/gperftools - OPTIONAL) ################################################################################ +find_package(GPERFTOOLS) if(ENABLE_GPERFTOOLS) - find_package(GPERFTOOLS) if(NOT GPERFTOOLS_FOUND) message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.") message(STATUS " Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.") @@ -1829,8 +2089,6 @@ if(ENABLE_GPERFTOOLS) message(STATUS "GPerftools libraries found.") message(STATUS " Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.") endif() -endif() -if(ENABLE_GPERFTOOLS) # Set GPerftools related flags if it is available # See https://github.com/gperftools/gperftools/blob/master/README if(GPERFTOOLS_FOUND) @@ -1842,6 +2100,12 @@ if(ENABLE_GPERFTOOLS) endif() endif() endif() +set_package_properties(GPERFTOOLS PROPERTIES + URL "https://github.com/gperftools/gperftools" + DESCRIPTION "Collection of performance analysis tools" + PURPOSE "Used for performance analysis." + TYPE OPTIONAL +) @@ -1942,6 +2206,26 @@ add_custom_target(uninstall ######################################################################## -# Add subdirectories (in order of deps) +# Add subdirectories ######################################################################## add_subdirectory(src) + + + +######################################################################## +# Print summary +######################################################################## +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + message(STATUS "") + message(STATUS "***************************************") + message(STATUS "* SUMMARY REPORT *") + message(STATUS "***************************************") + message(STATUS "") + if(CMAKE_VERSION VERSION_LESS 3.4) + feature_summary(WHAT ALL) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) + else() + feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + endif() +endif() diff --git a/cmake/Modules/FindGNURADIO.cmake b/cmake/Modules/FindGNURADIO.cmake index 7f5deb3ab..f56223662 100644 --- a/cmake/Modules/FindGNURADIO.cmake +++ b/cmake/Modules/FindGNURADIO.cmake @@ -43,6 +43,9 @@ macro(LIST_CONTAINS var value) endforeach() endmacro() +# Trick for feature_summary +set(GNURADIO_FOUND TRUE) + function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS}) if(NOT REQUIRED_MODULE) @@ -140,6 +143,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) # generate an error if the module is missing if(NOT GNURADIO_${EXTVAR}_FOUND) message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!") + set(GNURADIO_FOUND FALSE) # Trick for feature_summary endif() mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS) @@ -200,3 +204,6 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION) set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+") endif() endif() + +# Trick for feature_summary +set(GNURADIO_FOUND TRUE) diff --git a/cmake/Modules/FindGOOGLETEST.cmake b/cmake/Modules/FindGOOGLETEST.cmake new file mode 100644 index 000000000..4544f5127 --- /dev/null +++ b/cmake/Modules/FindGOOGLETEST.cmake @@ -0,0 +1,51 @@ +# 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 . + + +# - Try to find Googletest source code +# +# The following environment variable is optionally searched for: +# GTEST_DIR: Base directory where Googletest source code is found. +# +# The following are set after configuration is done: +# GOOGLETEST_FOUND +# LIBGTEST_DEV_DIR +# GTEST_INCLUDE_DIRS + + +find_path(LIBGTEST_DEV_DIR + NAMES src/gtest-all.cc + PATHS + ${GTEST_DIR} + ${GTEST_DIR}/googletest + /usr/src/googletest/googletest + /usr/src/gtest + /usr/include/gtest + /opt/local/src/gtest-1.7.0 +) + +find_path(GTEST_INCLUDE_DIRS + NAMES gtest/gtest.h + PATHS + ${GTEST_DIR}/googletest/include + /usr/include + /opt/local/src/gtest-1.7.0/include +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GOOGLETEST DEFAULT_MSG LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS) +mark_as_advanced(LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index d7763d66c..f9f07b097 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -184,6 +184,12 @@ find_package(Gnuplot) if(GNUPLOT_FOUND) add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}") endif() +set_package_properties(Gnuplot PROPERTIES + URL "http://www.gnuplot.info" + DESCRIPTION "A portable command-line driven graphing utility" + PURPOSE "Used to generate plots in some tests." + TYPE OPTIONAL +) if(ENABLE_UNIT_TESTING_MINIMAL) add_definitions(-DUNIT_TESTING_MINIMAL=1) @@ -194,6 +200,15 @@ endif() # Optional generator ################################################################################ option(ENABLE_GNSS_SIM_INSTALL "Enable the installation of gnss_sim on the fly" ON) +add_feature_info(ENABLE_GNSS_SIM_INSTALL ENABLE_GNSS_SIM_INSTALL "Enables downloading and building of gnss-sim.") + +find_package(GPSTK) +set_package_properties(GPSTK PROPERTIES + URL "http://www.gpstk.org" + DESCRIPTION "Library and suite of applications for satellite navigation" + PURPOSE "Used in some Extra Tests." + TYPE OPTIONAL +) if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) if(ENABLE_FPGA) set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") @@ -239,7 +254,6 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) ################################################################################ # Local installation of GPSTk http://www.gpstk.org/ ################################################################################ - find_package(GPSTK) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) message(STATUS " GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.") if("${TOOLCHAIN_ARG}" STREQUAL "") From c87a9ddc9a7ca5009c942f95e39636b17e7d7d5e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 09:26:32 +0100 Subject: [PATCH 21/32] Remove character so it does not break LaTeX compilation --- src/core/system_parameters/GLONASS_L1_L2_CA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/system_parameters/GLONASS_L1_L2_CA.h b/src/core/system_parameters/GLONASS_L1_L2_CA.h index b8c796b4f..585ab48d0 100644 --- a/src/core/system_parameters/GLONASS_L1_L2_CA.h +++ b/src/core/system_parameters/GLONASS_L1_L2_CA.h @@ -52,7 +52,7 @@ const double GLONASS_F_M_A = 0.35e9; //!< Gravitationa const double GLONASS_SEMI_MAJOR_AXIS = 6378136; //!< Semi-major axis of Earth [m] const double GLONASS_FLATTENING = 1 / 29825784; //!< Flattening parameter const double GLONASS_GRAVITY = 97803284; //!< Equatorial acceleration of gravity [mGal] -const double GLONASS_GRAVITY_CORRECTION = 0.87; //!< Correction to acceleration of gravity at sea-level due to Atmosphere[мGal] +const double GLONASS_GRAVITY_CORRECTION = 0.87; //!< Correction to acceleration of gravity at sea-level due to Atmosphere[uGal] const double GLONASS_J2 = 1082625.75e-9; //!< Second zonal harmonic of the geopotential const double GLONASS_J4 = -2370.89e-9; //!< Fourth zonal harmonic of the geopotential const double GLONASS_J6 = 6.08e-9; //!< Sixth zonal harmonic of the geopotential @@ -74,7 +74,7 @@ const double GLONASS_MOON_SEMI_MAJOR_AXIS = 3.84385243e5; //!< Semi-major ax const double GLONASS_MOON_ECCENTRICITY = 0.054900489; //!< Eccentricity of lunar orbit const double GLONASS_MOON_INCLINATION = 0.000089803977407e3; //!< Inclination of lunar orbit to ecliptic plane (5 deg 08 min 43.4 sec) [rad] -const double GLONASS_SUN_OMEGA = 0.004908229466869e3; //!< TODO What is this operation in the seconds with T?(281 deg 13 min 15.0 + 6189.03*Т sec) [rad] +const double GLONASS_SUN_OMEGA = 0.004908229466869e3; //!< TODO What is this operation in the seconds with T?(281 deg 13 min 15.0 + 6189.03 x T sec) [rad] const double GLONASS_SUN_Q0 = 0.006256583774423e3; //!< (358 deg 28 min 33.04 sec) [rad] const double GLONASS_SUN_Q1 = 0e3; //!< TODO Why is the value greater than 60?(129596579.10 sec) [rad] const double GLONASS_SUN_GM = 0.1325263e12; //!< Solar gravitational constant [km^3/s^2] From 75a22271559dcc6dab71b93e60d91b67b31a91b0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 09:27:38 +0100 Subject: [PATCH 22/32] Fix variant in doxygen port --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8f48bfd2..020b9907e 100644 --- a/README.md +++ b/README.md @@ -542,7 +542,7 @@ In a terminal, type: ~~~~~~ $ sudo port selfupdate $ sudo port upgrade outdated -$ sudo port install doxygen +latex +$ sudo port install doxygen +docs $ sudo port install gnuradio $ sudo port install armadillo $ sudo port install gnutls From 9ec3a1a1d8d6ad67724f2d0c8dbace850b59629d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 19:26:32 +0100 Subject: [PATCH 23/32] Remove PythonLib package, not needed --- cmake/Modules/SetupPython.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/Modules/SetupPython.cmake b/cmake/Modules/SetupPython.cmake index f3d59c900..5c3a0a75a 100644 --- a/cmake/Modules/SetupPython.cmake +++ b/cmake/Modules/SetupPython.cmake @@ -82,7 +82,6 @@ if(CMAKE_VERSION VERSION_LESS 3.12) gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND) gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) endif() - find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT) else() find_package(Python3 COMPONENTS Interpreter) if(Python3_FOUND) From af490868519054463f87323b2206f660d46364a1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 19:45:24 +0100 Subject: [PATCH 24/32] Document Python packages for summary --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ca0e123e..0e5dcc6bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -930,6 +930,27 @@ if(NOT VOLKGNSSSDR_FOUND) message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR") endif() + set_package_properties(Python3 PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "Required to build volk_gnsssdr." + TYPE REQUIRED + ) + + set_package_properties(Python2 PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "Required to build volk_gnsssdr." + TYPE REQUIRED + ) + + set_package_properties(PythonInterp PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "RRequired to build volk_gnsssdr." + TYPE REQUIRED + ) + set(READ_ENVIRO "") if(ENABLE_PACKAGING) if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) From 88507c6af01ee478e8c340dcfa2806ee12bf37ba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 23:48:32 +0100 Subject: [PATCH 25/32] Remove unused conditional --- CMakeLists.txt | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e5dcc6bd..7ad211f43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2236,17 +2236,15 @@ add_subdirectory(src) ######################################################################## # Print summary ######################################################################## -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - message(STATUS "") - message(STATUS "***************************************") - message(STATUS "* SUMMARY REPORT *") - message(STATUS "***************************************") - message(STATUS "") - if(CMAKE_VERSION VERSION_LESS 3.4) - feature_summary(WHAT ALL) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) - else() - feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - endif() +message(STATUS "") +message(STATUS "***************************************") +message(STATUS "* SUMMARY REPORT *") +message(STATUS "***************************************") +message(STATUS "") +if(CMAKE_VERSION VERSION_LESS 3.4) + feature_summary(WHAT ALL) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) +else() + feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) endif() From f66a2fa3d195cbb10786d326591598cd7462c72b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:24:08 +0100 Subject: [PATCH 26/32] Update changelog --- docs/changelog | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/changelog b/docs/changelog index b1c6e6397..42942beff 100644 --- a/docs/changelog +++ b/docs/changelog @@ -8,19 +8,22 @@ ### Improvements in Efficiency - Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average). -- Applied clang-tidy checks and fixes related to performance. +- 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 Interoperability: - Added the BeiDou B1I receiver chain. - Fix bug in GLONASS dual frequency receiver. +- Added a custom UDP/IP output for PVT data streaming. +- Improved Monitor block with UDP/IP output for internal receiver's data streaming. ### Improvements in Maintainability: - Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler. -- Applied clang-tidy checks and fixes related to readability. +- Applied clang-tidy checks and fixes related to readability: readability-container-size-empty, readability-identifier-naming, readability-inconsistent-declaration-parameter-name, readability-named-parameter, readability-non-const-parameter, readability-string-compare. +- Improved includes selection following suggestions by include-what-you-use (see https://include-what-you-use.org/), allowing faster compiles, fewer recompiles and making refactoring easier. ### Improvements in Portability: @@ -31,13 +34,14 @@ ### Improvements in Reliability -- Applied clang-tidy checks and fixes related to High Integrity C++. +- Applied clang-tidy checks and fixes related to High Integrity C++: performance-move-const-arg, modernize-use-auto, modernize-use-equals-default, modernize-use-equals-delete, modernize-use-noexcept, modernize-use-nullptr, cert-dcl21-cpp, misc-new-delete-overloads, cert-dcl58-cpp, cert-err52-cpp, cert-err60-cpp. ### Improvements in Usability - The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels. - Fixed program termination (avoiding hangs and segfaults in some platforms/configurations). +- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory. - Improved information provided to the user in case of failure. From 3e3887742b23acf41af0b4c7ec0b6be270fc571e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:36:09 +0100 Subject: [PATCH 27/32] Clean file from unused variables, reordering --- CMakeLists.txt | 592 ++++++++++++++++++++++++------------------------- 1 file changed, 293 insertions(+), 299 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ad211f43..704316026 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,33 +16,22 @@ # along with GNSS-SDR. If not, see . # -######################################################################## +################################################################################ # Project setup -######################################################################## +################################################################################ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ../' ") + message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ..'") endif() cmake_minimum_required(VERSION 2.8.12) project(gnss-sdr CXX C) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) -file(RELATIVE_PATH RELATIVE_CMAKE_CALL ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - -if(NOT CMAKE_PREFIX_PATH) - if(DEFINED ENV{PYBOMBS_PREFIX}) - set(CMAKE_PREFIX_PATH $ENV{PYBOMBS_PREFIX}) - endif() - if(DEFINED ENV{SNAP}) - set(CMAKE_PREFIX_PATH $ENV{SNAP}) - endif() -endif() - -######################################################################## +################################################################################ # Determine optional blocks/libraries to be built (default: not built) # Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..' -######################################################################## +################################################################################ include(FeatureSummary) # Support of optional RF front-ends option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON) @@ -51,27 +40,27 @@ add_feature_info(ENABLE_UHD ENABLE_UHD "Enables UHD_Signal_Source for using RF f option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source" OFF) add_feature_info(ENABLE_OSMOSDR ENABLE_OSMOSDR "Enables Osmosdr_Signal_Source and RtlTcp_Signal_Source for using RF front-ends compatible with the OsmoSDR driver. Requires gr-osmosdr.") -option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) -add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") - -option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) -add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") - -option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) -add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") +option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) +add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) add_feature_info(ENABLE_PLUTOSDR ENABLE_PLUTOSDR "Enables Plutosdr_Signal_Source for using ADALM-PLUTO boards. Requires gr-iio.") -option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) -add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") - option(ENABLE_AD9361 "Enable the use of AD9361 direct to FPGA hardware, requires libiio" OFF) add_feature_info(ENABLE_AD9361 ENABLE_AD9361 "Enables Ad9361_Fpga_Signal_Source for devices with the AD9361 chipset. Requires libiio.") option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample source, requires libpcap" OFF) add_feature_info(ENABLE_RAW_UDP ENABLE_RAW_UDP "Enables Custom_UDP_Signal_Source for custom UDP packet sample source. Requires libpcap.") +option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) +add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") + +option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) +add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") + +option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) +add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") + # Performance analysis tools option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) add_feature_info(ENABLE_GPERFTOOLS ENABLE_GPERFTOOLS "Enables performance analysis. Requires Gperftools.") @@ -144,25 +133,42 @@ endif() -############################### +################################################################################ # GNSS-SDR version information -############################### +################################################################################ set(THIS_IS_A_RELEASE OFF) # only related to version name, no further implications. if(NOT ${THIS_IS_A_RELEASE}) - # Get the current working branch - execute_process( - COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - # Get the latest abbreviated commit hash of the working branch - execute_process( - COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE + find_package(Git) + set_package_properties(Git PROPERTIES + URL "https://git-scm.com" + DESCRIPTION "A free and open source distributed version control system" + PURPOSE "Manage version control, get MINOR_VERSION name for version number." + TYPE REQUIRED ) + if(Git_FOUND) + # was this info set in the CMake commandline? + if(NOT GIT_BRANCH) + # no: try to find it + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_QUIET ERROR_QUIET + ) + endif(NOT GIT_BRANCH) + # was this info set in the CMake commandline? + if(NOT GIT_COMMIT_HASH) + # Get the latest abbreviated commit hash of the working branch + execute_process( + COMMAND ${GIT_EXECUTABLE} log -1 --format=%h + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_QUIET ERROR_QUIET + ) + endif(NOT GIT_COMMIT_HASH) + endif() endif() set(VERSION_INFO_MAJOR_VERSION 0) @@ -177,9 +183,9 @@ set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_I -######################################################################## +################################################################################ # Environment setup -######################################################################## +################################################################################ include(ExternalProject) # Detect 64-bits machine @@ -187,8 +193,15 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ARCH_64BITS TRUE) endif() -set(OS_IS_MACOSX "") -set(OS_IS_LINUX "") +# Set prefix path for PyBOMBS and Snaps, if defined in environment variables +if(NOT CMAKE_PREFIX_PATH) + if(DEFINED ENV{PYBOMBS_PREFIX}) + set(CMAKE_PREFIX_PATH $ENV{PYBOMBS_PREFIX}) + endif() + if(DEFINED ENV{SNAP}) + set(CMAKE_PREFIX_PATH $ENV{SNAP}) + endif() +endif() # Detect Linux Distribution if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -375,10 +388,10 @@ endif() add_feature_info(ENABLE_INSTALL_TESTS ENABLE_INSTALL_TESTS "Install test binaries when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} install'.") + ################################################################################ # Minimum required versions ################################################################################ -set(GNSSSDR_CMAKE_MIN_VERSION "2.8.12") set(GNSSSDR_GCC_MIN_VERSION "4.7.2") set(GNSSSDR_CLANG_MIN_VERSION "3.4.0") set(GNSSSDR_APPLECLANG_MIN_VERSION "500") @@ -410,16 +423,6 @@ endif() -################################################################################ -# Check CMake version -################################################################################ -if(CMAKE_VERSION VERSION_LESS ${GNSSSDR_CMAKE_MIN_VERSION}) - message(STATUS "Your CMake version is too old and does not support some features required by GNSS-SDR. CMake version must be at least ${GNSSSDR_CMAKE_MIN_VERSION}.") - message(FATAL_ERROR "Fatal error: CMake >= ${GNSSSDR_CMAKE_MIN_VERSION} required.") -endif() - - - ################################################################################ # Check compiler version ################################################################################ @@ -556,6 +559,7 @@ set_package_properties(Threads PROPERTIES URL "https://computing.llnl.gov/tutorials/pthreads/" DESCRIPTION "Implements the POSIX Threads execution model" PURPOSE "Used to implement parallelism." + TYPE REQUIRED ) @@ -572,27 +576,19 @@ if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) endif() find_package(GOOGLETEST) - -if(GTEST_DIR) - if(NOT GOOGLETEST_FOUND) - message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") - endif() -endif() - set_package_properties(GOOGLETEST PROPERTIES URL "https://github.com/google/googletest" DESCRIPTION "Source code of Google's Testing Framework" + PURPOSE "Used for Unit and System Tests." TYPE REQUIRED ) - -if(GOOGLETEST_FOUND) +if(NOT GOOGLETEST_FOUND) set_package_properties(GOOGLETEST PROPERTIES - PURPOSE "Used for QA code." - ) -else() - set_package_properties(GOOGLETEST PROPERTIES - PURPOSE "Used for QA code. Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) + if(GTEST_DIR) + message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") + endif() endif() @@ -615,6 +611,12 @@ set(Boost_ADDITIONAL_VERSIONS set(Boost_USE_MULTITHREAD ON) set(Boost_USE_STATIC_LIBS OFF) find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS atomic chrono date_time filesystem serialization system thread REQUIRED) +set_package_properties(Boost PROPERTIES + URL "https://www.boost.org" + DESCRIPTION "Portable C++ source libraries" + PURPOSE "Used widely across the source code." + TYPE REQUIRED +) if(NOT Boost_FOUND) message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") endif() @@ -686,17 +688,12 @@ if(CMAKE_VERSION VERSION_LESS 3.5) set_property(TARGET Boost::atomic PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}) set_property(TARGET Boost::atomic PROPERTY - INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES}) + INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES}) set_property(TARGET Boost::atomic PROPERTY IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES}) endif() endif() -set_package_properties(Boost PROPERTIES - URL "https://www.boost.org" - DESCRIPTION "Portable C++ source libraries" - PURPOSE "Used widely across the source code." - TYPE REQUIRED -) + ################################################################################ @@ -705,6 +702,12 @@ set_package_properties(Boost PROPERTIES set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT) find_package(UHD) +set_package_properties(UHD PROPERTIES + URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" + DESCRIPTION "USRP Hardware Driver" + PURPOSE "Used for communication with front-ends of the USRP family." + TYPE OPTIONAL +) if(ENABLE_UHD) if(NOT UHD_FOUND) set(ENABLE_UHD OFF) @@ -714,9 +717,15 @@ if(ENABLE_UHD) endif() find_package(GNURADIO) +set_package_properties(GNURADIO PROPERTIES + URL "https://www.gnuradio.org/" + DESCRIPTION "The free and open software radio ecosystem" + PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." + TYPE REQUIRED +) if(PC_GNURADIO_RUNTIME_VERSION) if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) - set(GNURADIO_RUNTIME_FOUND) + unset(GNURADIO_RUNTIME_FOUND) message(STATUS "The GNU Radio version installed in your system is too old.") endif() endif() @@ -841,12 +850,6 @@ if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND) ) endif() endif() -set_package_properties(GNURADIO PROPERTIES - URL "https://www.gnuradio.org/" - DESCRIPTION "The free and open software radio ecosystem" - PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." - TYPE REQUIRED -) @@ -854,15 +857,15 @@ set_package_properties(GNURADIO PROPERTIES # VOLK - Vector-Optimized Library of Kernels ################################################################################ find_package(VOLK) -if(NOT VOLK_FOUND) - message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") -endif() set_package_properties(VOLK PROPERTIES URL "http://libvolk.org" DESCRIPTION "Vector-Optimized Library of Kernels" PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." TYPE REQUIRED ) +if(NOT VOLK_FOUND) + message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") +endif() @@ -870,21 +873,27 @@ set_package_properties(VOLK PROPERTIES # Log4cpp - http://log4cpp.sourceforge.net/ ################################################################################ find_package(LOG4CPP) -if(NOT LOG4CPP_FOUND) - message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") -endif() set_package_properties(LOG4CPP PROPERTIES URL "http://log4cpp.sourceforge.net/" DESCRIPTION "Library of C++ classes for flexible logging to files" PURPOSE "Required by GNU Radio." TYPE REQUIRED ) +if(NOT LOG4CPP_FOUND) + message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") +endif() + ################################################################################ # volk_gnsssdr module - GNSS-SDR's own VOLK library ################################################################################ find_package(VOLKGNSSSDR) +set_package_properties(VOLKGNSSSDR PROPERTIES + DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR." + PURPOSE "Accelerates math routines targeting several SIMD processors." + TYPE REQUIRED +) if(NOT VOLKGNSSSDR_FOUND) message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") ############################### @@ -907,11 +916,11 @@ if(NOT VOLKGNSSSDR_FOUND) message(STATUS "Mako template library not found. See http://www.makotemplates.org/ ") message(STATUS " You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") - message(STATUS " sudo yum install ${PYTHON_NAME}-mako") + message(STATUS " sudo yum install ${PYTHON_NAME}-mako") elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") - message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako") + message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako") else() - message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako") + message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako") endif() message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR") endif() @@ -921,11 +930,11 @@ if(NOT VOLKGNSSSDR_FOUND) message(STATUS "python-six not found. See https://pythonhosted.org/six/ ") message(STATUS " You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") - message(STATUS " sudo yum install ${PYTHON_NAME}-six") + message(STATUS " sudo yum install ${PYTHON_NAME}-six") elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") - message(STATUS " sudo zypper install ${PYTHON_NAME}-six") + message(STATUS " sudo zypper install ${PYTHON_NAME}-six") else() - message(STATUS " sudo apt-get install ${PYTHON_NAME}-six") + message(STATUS " sudo apt-get install ${PYTHON_NAME}-six") endif() message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR") endif() @@ -983,11 +992,13 @@ if(NOT VOLKGNSSSDR_FOUND) -DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR} -DENABLE_ORC=OFF ${STRIP_VOLK_GNSSSDR_PROFILE} - ${USE_THIS_PYTHON}) + ${USE_THIS_PYTHON} + ) if(EXISTS $ENV{OECORE_TARGET_SYSROOT}) set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake - -DCROSSCOMPILE_MULTILIB=TRUE) + -DCROSSCOMPILE_MULTILIB=TRUE + ) endif() if(CMAKE_VERSION VERSION_LESS 3.2) ExternalProject_Add(volk_gnsssdr_module @@ -1017,16 +1028,16 @@ if(NOT VOLKGNSSSDR_FOUND) ) endif() find_package(ORC) - if(NOT ORC_FOUND) - set(ORC_LIBRARIES "") - set(ORC_INCLUDE_DIRS "") - endif() set_package_properties(ORC PROPERTIES URL "https://gstreamer.freedesktop.org/modules/orc.html" DESCRIPTION "The Optimized Inner Loops Runtime Compiler" PURPOSE "Used by volk_gnsssdr." TYPE OPTIONAL ) + if(NOT ORC_FOUND) + set(ORC_LIBRARIES "") + set(ORC_INCLUDE_DIRS "") + endif() add_library(volk_gnsssdr UNKNOWN IMPORTED) set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}) @@ -1049,42 +1060,39 @@ if(NOT VOLKGNSSSDR_FOUND) if(CMAKE_VERSION VERSION_LESS 3.2) add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile - ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile + ) else() add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile - BYPRODUCTS ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + BYPRODUCTS ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile + ) endif() add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr-config-info - ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info) + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info + ) set_package_properties(VOLKGNSSSDR PROPERTIES - PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors. It will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(VOLKGNSSSDR PROPERTIES - PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + PURPOSE "volk_gnsssdr will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(VOLKGNSSSDR PROPERTIES - DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR" - TYPE REQUIRED -) -set_package_properties(Git PROPERTIES - URL "https://git-scm.com" - DESCRIPTION "A free and open source distributed version control system" - PURPOSE "Manage version control, get MINOR_VERSION name for version number." - TYPE REQUIRED -) + + ################################################################################ # gflags - https://github.com/gflags/gflags ################################################################################ set(LOCAL_GFLAGS false) find_package(GFLAGS) +set_package_properties(GFLAGS PROPERTIES + URL "https://github.com/gflags/gflags" + DESCRIPTION "C++ library that implements commandline flags processing" + PURPOSE "Used for commandline flags management." + TYPE REQUIRED +) if(NOT GFLAGS_FOUND) message(STATUS " gflags library has not been found.") message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ") @@ -1142,18 +1150,10 @@ if(NOT GFLAGS_FOUND) set(LOCAL_GFLAGS true CACHE STRING "GFlags downloaded and built automatically" FORCE) set_package_properties(GFLAGS PROPERTIES - PURPOSE "Used for commandline flags management. Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(GFLAGS PROPERTIES - PURPOSE "Used for commandline flags management." + PURPOSE "Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(GFLAGS PROPERTIES - URL "https://github.com/gflags/gflags" - DESCRIPTION "C++ library that implements commandline flags processing" - TYPE REQUIRED -) + ################################################################################ @@ -1165,7 +1165,12 @@ if(NOT ${ENABLE_OWN_GLOG}) set(GLOG_FOUND ON) endif() endif() -set(glog_RELEASE ${GNSSSDR_GLOG_LOCAL_VERSION}) +set_package_properties(GLOG PROPERTIES + URL "https://github.com/google/glog" + DESCRIPTION "C++ implementation of the Google logging module" + PURPOSE "Used for runtime internal logging." + TYPE REQUIRED +) if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) message(STATUS " glog library has not been found") if(NOT GFLAGS_FOUND) @@ -1313,11 +1318,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) set_package_properties(GLOG PROPERTIES - PURPOSE "Used for runtime internal logging. Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(GLOG PROPERTIES - PURPOSE "Used for runtime internal logging." + PURPOSE "Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing 'make'." ) endif() @@ -1325,18 +1326,12 @@ if(NOT ENABLE_LOG) message(STATUS "Logging is not enabled") endif() -set_package_properties(GLOG PROPERTIES - URL "https://github.com/google/glog" - DESCRIPTION "C++ implementation of the Google logging module" - TYPE REQUIRED -) - -############################################################################# +################################################################################ # Check that BLAS (Basic Linear Algebra Subprograms) is found in the system # See http://www.netlib.org/blas/ -############################################################################# +################################################################################ find_library(BLAS blas) if(NOT BLAS) message(" The BLAS library has not been found.") @@ -1351,10 +1346,10 @@ endif() -############################################################################# +################################################################################ # Check that LAPACK (Linear Algebra PACKage) is found in the system # See http://www.netlib.org/lapack/ -############################################################################# +################################################################################ find_library(LAPACK lapack) if(NOT LAPACK) message(" The LAPACK library has not been found.") @@ -1375,6 +1370,12 @@ endif() # Armadillo - http://arma.sourceforge.net/ ################################################################################ find_package(Armadillo) +set_package_properties(Armadillo PROPERTIES + URL "http://arma.sourceforge.net/" + DESCRIPTION "C++ library for linear algebra and scientific computing" + PURPOSE "Used for matrix computations." + TYPE REQUIRED +) if(ARMADILLO_FOUND) if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION}) set(ARMADILLO_FOUND false) @@ -1387,9 +1388,6 @@ if(ARMADILLO_FOUND) INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}" ) - set_package_properties(Armadillo PROPERTIES - PURPOSE "Used for matrix computations." - ) endif() endif() @@ -1405,6 +1403,12 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) ############################################# if(NOT OS_IS_MACOSX) find_package(GFORTRAN) + set_package_properties(GFORTRAN PROPERTIES + URL "http://gcc.gnu.org/wiki/GFortran" + DESCRIPTION "GNU Fortran project" + PURPOSE "Required by Armadillo." + TYPE REQUIRED + ) if(NOT GFORTRAN) message(STATUS "The gfortran library has not been found.") message(STATUS " You can try to install it by typing:") @@ -1417,12 +1421,6 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) endif() message(FATAL_ERROR "gfortran is required to build gnss-sdr") endif() - set_package_properties(GFORTRAN PROPERTIES - URL "http://gcc.gnu.org/wiki/GFortran" - DESCRIPTION "GNU Fortran project" - PURPOSE "Required by Armadillo." - TYPE REQUIRED - ) endif() ############################################# @@ -1455,9 +1453,8 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) ) endif() - # Set up variables + # Create imported target ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir) - #set(ARMADILLO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include) if(NOT GFORTRAN) set(GFORTRAN "") endif() @@ -1474,20 +1471,22 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}" ) set_package_properties(Armadillo PROPERTIES - PURPOSE "Used for matrix computations. Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(Armadillo PROPERTIES - URL "http://arma.sourceforge.net/" - DESCRIPTION "C++ library for linear algebra and scientific computing" - TYPE REQUIRED -) + ################################################################################ # GnuTLS - https://www.gnutls.org/ ################################################################################ find_package(GnuTLS) +set_package_properties(GnuTLS PROPERTIES + URL "https://www.gnutls.org/" + DESCRIPTION "Transport Layer Security Library" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED +) find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 HINTS /usr/lib /usr/lib64 @@ -1519,17 +1518,19 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 /usr/lib/x86_64-linux-gnux32 /usr/lib/sh4-linux-gnu ) -set_package_properties(GnuTLS PROPERTIES - URL "https://www.gnutls.org/" - DESCRIPTION "The GnuTLS Transport Layer Security Library" - PURPOSE "Used GnuTLS library with openssl compatibility for the SUPL protocol implementation." - TYPE OPTIONAL -) - if(NOT GNUTLS_OPENSSL_LIBRARY) message(STATUS "Looking for OpenSSL instead...") find_package(OpenSSL) + set_package_properties(OpenSSL PROPERTIES + URL "https://www.openssl.org" + DESCRIPTION "Cryptography and SSL/TLS Toolkit" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED + ) if(OPENSSL_FOUND) + set_package_properties(GnuTLS PROPERTIES + PURPOSE "Not found, but OpenSSL can replace it." + ) set(GNUTLS_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR}) set(GNUTLS_LIBRARIES "") set(GNUTLS_OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) @@ -1548,20 +1549,20 @@ if(NOT GNUTLS_OPENSSL_LIBRARY) endif() message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") endif() - set_package_properties(OpenSSL PROPERTIES - URL "https://www.openssl.org" - DESCRIPTION "Cryptography and SSL/TLS Toolkit" - PURPOSE "Used for the SUPL protocol implementation." - TYPE REQUIRED - ) endif() -######################################################################## +################################################################################ # Matio - https://github.com/tbeu/matio -######################################################################## +################################################################################ find_package(MATIO) +set_package_properties(MATIO PROPERTIES + URL "https://github.com/tbeu/matio" + DESCRIPTION "MATLAB MAT File I/O Library" + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + TYPE REQUIRED +) if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) if(MATIO_FOUND) message(STATUS " Matio installed version (${MATIO_VERSION_STRING}) is too old (>= ${GNSSSDR_MATIO_MIN_VERSION} is required).") @@ -1660,10 +1661,10 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS add_library(Matio::matio SHARED IMPORTED) add_dependencies(Matio::matio matio-${GNSSSDR_MATIO_LOCAL_VERSION}) set_target_properties(Matio::matio PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/matio/include" - INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/matio/include" + INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" ) endif() else() @@ -1683,18 +1684,9 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr") endif() set_package_properties(MATIO PROPERTIES - PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave. Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(MATIO PROPERTIES - PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + PURPOSE "Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(MATIO PROPERTIES - URL "https://github.com/tbeu/matio" - DESCRIPTION "MATLAB MAT File I/O Library" - TYPE REQUIRED -) @@ -1702,11 +1694,13 @@ set_package_properties(MATIO PROPERTIES # PugiXML - https://pugixml.org/ ################################################################################ find_package(PUGIXML) -if(PUGIXML_FOUND) - set_package_properties(PUGIXML PROPERTIES - PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." - ) -else() +set_package_properties(PUGIXML PROPERTIES + URL "https://pugixml.org/" + DESCRIPTION "Light-weight, simple and fast XML parser for C++" + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." + TYPE REQUIRED +) +if(NOT PUGIXML_FOUND) message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) set(TOOLCHAIN_ARG "") @@ -1754,21 +1748,29 @@ else() endif() set_package_properties(PUGIXML PROPERTIES - PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre. PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(PUGIXML PROPERTIES - URL "https://pugixml.org/" - DESCRIPTION "Light-weight, simple and fast XML parser for C++" - TYPE REQUIRED -) + ################################################################################ # Doxygen - http://www.doxygen.nl (OPTIONAL, used if found) ################################################################################ find_package(Doxygen) +set_package_properties(Doxygen PROPERTIES + URL "http://www.doxygen.nl" + DESCRIPTION "Generates documentation from annotated C++ sources" + PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" + TYPE OPTIONAL +) find_package(LATEX) +set_package_properties(LATEX PROPERTIES + URL "https://www.latex-project.org" + DESCRIPTION "High-quality typesetting system" + PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" + TYPE OPTIONAL +) if(DOXYGEN_FOUND) message(STATUS "Doxygen found.") message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.") @@ -1825,25 +1827,19 @@ else() message(STATUS " or simply by doing 'sudo port install doxygen +latex'.") endif() endif() -set_package_properties(Doxygen PROPERTIES - URL "http://www.doxygen.nl" - DESCRIPTION "Generates documentation from annotated C++ sources" - PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" - TYPE OPTIONAL -) -set_package_properties(LATEX PROPERTIES - URL "https://www.latex-project.org" - DESCRIPTION "High-quality typesetting system" - PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" - TYPE OPTIONAL -) -############################################################################### +################################################################################ # OpenCL (OPTIONAL) -############################################################################### +################################################################################ find_package(OPENCL QUIET) +set_package_properties(OPENCL PROPERTIES + URL "https://www.khronos.org/opencl/" + DESCRIPTION "Library for parallel programming" + PURPOSE "Used in some processing block implementations." + TYPE OPTIONAL +) if(ENABLE_OPENCL) find_package(OPENCL) if($ENV{DISABLE_OPENCL}) @@ -1867,17 +1863,12 @@ if(ENABLE_OPENCL) else() set(OPENCL_FOUND FALSE) endif() -set_package_properties(OPENCL PROPERTIES - URL "https://www.khronos.org/opencl/" - DESCRIPTION "Library for parallel programming" - PURPOSE "Used in some processing block implementations." - TYPE OPTIONAL -) -############################################################################### + +################################################################################ # CUDA (OPTIONAL) -############################################################################### +################################################################################ if($ENV{CUDA_GPU_ACCEL}) message(STATUS "CUDA_GPU_ACCEL environment variable found.") set(ENABLE_CUDA ON) @@ -1885,14 +1876,14 @@ endif() if(ENABLE_CUDA) find_package(CUDA REQUIRED) - message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") - message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") set_package_properties(CUDA PROPERTIES URL "https://developer.nvidia.com/cuda-downloads" DESCRIPTION "Library for parallel programming in Nvidia GPUs" PURPOSE "Used in some processing block implementations." TYPE REQUIRED ) + message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") + message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") else() message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.") @@ -1900,10 +1891,16 @@ endif() -############################################################################### +################################################################################ # CUSTOM UDP PACKET SOURCE (OPTIONAL) -############################################################################### +################################################################################ find_package(PCAP) +set_package_properties(PCAP PROPERTIES + URL "https://www.tcpdump.org" + DESCRIPTION "A portable C/C++ library for network traffic capture" + PURPOSE "Used for the custom UDP IP packet source." + TYPE OPTIONAL +) if(ENABLE_RAW_UDP) message(STATUS "High-optimized custom UDP IP packet source is enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'") @@ -1911,18 +1908,12 @@ if(ENABLE_RAW_UDP) message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)") endif() endif() -set_package_properties(PCAP PROPERTIES - URL "https://www.tcpdump.org" - DESCRIPTION "A portable C/C++ library for network traffic capture" - PURPOSE "Used for the custom UDP IP packet source." - TYPE OPTIONAL -) -############################################################################### +################################################################################ # FPGA (OPTIONAL) -############################################################################### +################################################################################ if(ENABLE_FPGA) message(STATUS "FPGA Acceleration will be enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_FPGA=OFF ..'") @@ -1937,17 +1928,6 @@ endif() # Setup of optional drivers ################################################################################ -######################################## -# USRP Hardware Driver (UHD) - OPTIONAL -######################################## -set_package_properties(UHD PROPERTIES - URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" - DESCRIPTION "USRP Hardware Driver" - PURPOSE "Used for communication with front-ends of the USRP family." - TYPE OPTIONAL -) - - ########################################## # gr-osmosdr - OPTIONAL # https://github.com/osmocom/gr-osmosdr @@ -1958,6 +1938,12 @@ if($ENV{RTLSDR_DRIVER}) endif() find_package(GROSMOSDR) +set_package_properties(GROSMOSDR PROPERTIES + URL "https://osmocom.org/projects/gr-osmosdr/wiki" + DESCRIPTION "osmocom GNU Radio blocks" + PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." + TYPE OPTIONAL +) if(ENABLE_OSMOSDR) if(GROSMOSDR_FOUND) message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.") @@ -1973,12 +1959,6 @@ else() message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)") endif() -set_package_properties(GROSMOSDR PROPERTIES - URL "https://osmocom.org/projects/gr-osmosdr/wiki" - DESCRIPTION "osmocom GNU Radio blocks" - PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." - TYPE OPTIONAL -) ############################################## @@ -1995,11 +1975,11 @@ set_package_properties(GRIIO PROPERTIES ) -################################################################################### +##################################################################### # libiio - OPTIONAL -# A cross platform library for interfacing with local and remote Linux IIO devices +# A library for interfacing with local and remote Linux IIO devices # https://github.com/analogdevicesinc/libiio -################################################################################### +##################################################################### find_package(LIBIIO) set_package_properties(LIBIIO PROPERTIES URL "https://github.com/analogdevicesinc/libiio" @@ -2029,22 +2009,21 @@ else() message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.") endif() find_package(TELEORBIT) -if(ENABLE_FLEXIBAND) - if(NOT TELEORBIT_FOUND) - message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") - endif() -endif() set_package_properties(TELEORBIT PROPERTIES DESCRIPTION "The Teleorbit's Flexiband GNU Radio block." PURPOSE "Used for communication with the Flexiband front-end." TYPE OPTIONAL ) +if(ENABLE_FLEXIBAND) + if(NOT TELEORBIT_FOUND) + message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") + endif() +endif() - -############################################## +###################### # GN3S - OPTIONAL -############################################## +###################### if($ENV{GN3S_DRIVER}) message(STATUS "GN3S_DRIVER environment variable found.") set(ENABLE_GN3S ON) @@ -2053,6 +2032,12 @@ if(GN3S_DRIVER) set(ENABLE_GN3S ON) endif() find_package(GRGN3S QUIET) +set_package_properties(GRGN3S PROPERTIES + URL "https://github.com/gnss-sdr/gr-gn3s" + DESCRIPTION "The GN3S v2 front-end GNU Radio block." + PURPOSE "Used for communication with the GN3S v2 front-end." + TYPE OPTIONAL +) if(ENABLE_GN3S) message(STATUS "The GN3S driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'") @@ -2060,13 +2045,6 @@ else() message(STATUS "The (optional and experimental) GN3S driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.") endif() -set_package_properties(GRGN3S PROPERTIES - URL "https://github.com/gnss-sdr/gr-gn3s" - DESCRIPTION "The GN3S v2 front-end GNU Radio block." - PURPOSE "Used for communication with the GN3S v2 front-end." - TYPE OPTIONAL -) - ####################################################### @@ -2082,6 +2060,12 @@ if(RAW_ARRAY_DRIVER) endif() find_package(GRDBFCTTC QUIET) +set_package_properties(GRDBFCTTC PROPERTIES + URL "https://github.com/gnss-sdr/gr-dbfcttcs" + DESCRIPTION "CTTC's array prototype GNU Radio block." + PURPOSE "Used for communication with CTTC's antenna array." + TYPE OPTIONAL +) if(ENABLE_ARRAY) message(STATUS "CTTC's Antenna Array front-end driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'") @@ -2089,18 +2073,19 @@ else() message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.") endif() -set_package_properties(GRDBFCTTC PROPERTIES - URL "https://github.com/gnss-sdr/gr-dbfcttcs" - DESCRIPTION "CTTC's array prototype GNU Radio block." - PURPOSE "Used for communication with CTTC's antenna array." - TYPE OPTIONAL -) + ################################################################################ # GPerftools - https://github.com/gperftools/gperftools - OPTIONAL) ################################################################################ find_package(GPERFTOOLS) +set_package_properties(GPERFTOOLS PROPERTIES + URL "https://github.com/gperftools/gperftools" + DESCRIPTION "Collection of performance analysis tools" + PURPOSE "Used for performance analysis." + TYPE OPTIONAL +) if(ENABLE_GPERFTOOLS) if(NOT GPERFTOOLS_FOUND) message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.") @@ -2121,18 +2106,12 @@ if(ENABLE_GPERFTOOLS) endif() endif() endif() -set_package_properties(GPERFTOOLS PROPERTIES - URL "https://github.com/gperftools/gperftools" - DESCRIPTION "Collection of performance analysis tools" - PURPOSE "Used for performance analysis." - TYPE OPTIONAL -) -######################################################################## +################################################################################ # GNU gprof (OPTIONAL) - https://sourceware.org/binutils/docs/gprof/ -######################################################################## +################################################################################ if(ENABLE_GPROF) add_compile_options(-pg) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") @@ -2140,9 +2119,10 @@ if(ENABLE_GPROF) endif() -######################################################################## + +################################################################################ # Set compiler flags -######################################################################## +################################################################################ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) # Add warning flags # For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html @@ -2187,9 +2167,9 @@ endif() -######################################################################## +################################################################################ # clang-tidy https://clang.llvm.org/extra/clang-tidy/index.html -######################################################################## +################################################################################ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(NOT (CMAKE_VERSION VERSION_LESS "3.6")) find_program( @@ -2213,9 +2193,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() -######################################################################## + +################################################################################ # Create uninstall target -######################################################################## +################################################################################ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @@ -2226,16 +2207,16 @@ add_custom_target(uninstall -######################################################################## +################################################################################ # Add subdirectories -######################################################################## +################################################################################ add_subdirectory(src) -######################################################################## +################################################################################ # Print summary -######################################################################## +################################################################################ message(STATUS "") message(STATUS "***************************************") message(STATUS "* SUMMARY REPORT *") @@ -2245,6 +2226,19 @@ if(CMAKE_VERSION VERSION_LESS 3.4) feature_summary(WHAT ALL) feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) else() - feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(WHAT + REQUIRED_PACKAGES_FOUND + REQUIRED_PACKAGES_NOT_FOUND + OPTIONAL_PACKAGES_FOUND + OPTIONAL_PACKAGES_NOT_FOUND + ENABLED_FEATURES DISABLED_FEATURES + ) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT + REQUIRED_PACKAGES_FOUND + REQUIRED_PACKAGES_NOT_FOUND + OPTIONAL_PACKAGES_FOUND + OPTIONAL_PACKAGES_NOT_FOUND + ENABLED_FEATURES DISABLED_FEATURES + ) endif() +message(STATUS "GNSS-SDR is ready to be built.") From 540fd194d51c25c02c5d554f60fcb6c70276e876 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:46:07 +0100 Subject: [PATCH 28/32] Fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 704316026..94548314a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -956,7 +956,7 @@ if(NOT VOLKGNSSSDR_FOUND) set_package_properties(PythonInterp PROPERTIES URL "https://www.python.org/" DESCRIPTION "An interpreted, high-level, general-purpose programming language" - PURPOSE "RRequired to build volk_gnsssdr." + PURPOSE "Required to build volk_gnsssdr." TYPE REQUIRED ) From b10aaafb8646a7964326bbb1dc3a137d4226c8bf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 13:53:51 +0100 Subject: [PATCH 29/32] Improve Python detection --- .../volk_gnsssdr/cmake/Modules/VolkPython.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake index 06c51883c..9af2d35b1 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/VolkPython.cmake @@ -41,15 +41,23 @@ if(CMAKE_VERSION VERSION_LESS 3.12) find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED) endif() endif() - find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT) else() if(PYTHON_EXECUTABLE) message(STATUS "User set python executable ${PYTHON_EXECUTABLE}") find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED) else() - find_package(Python COMPONENTS Interpreter) - set(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR}) - set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) + find_package(Python3 COMPONENTS Interpreter) + if(Python3_FOUND) + set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) + set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR}) + endif() + if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND) + find_package(Python2 COMPONENTS Interpreter) + if(Python2_FOUND) + set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE}) + set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR}) + endif() + endif() endif() endif() From 59401870192bfa17dce6d293ff18215655f8d73b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 19:19:07 +0100 Subject: [PATCH 30/32] Fix Doxygen annotations --- src/algorithms/PVT/libs/rinex_printer.h | 22 ++++++------ src/algorithms/PVT/libs/rtcm.h | 46 ++++++++++--------------- src/algorithms/PVT/libs/rtcm_printer.h | 12 +++++-- src/algorithms/libs/gnss_sdr_flags.h | 28 +++++++-------- 4 files changed, 53 insertions(+), 55 deletions(-) diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 09acc2c5b..79ad18b94 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -96,13 +96,13 @@ public: */ ~Rinex_Printer(); - std::fstream obsFile; // satelliteSystem; // observationType; // observationCode; // satelliteSystem; //!< GPS, GLONASS, SBAS payload, Galileo or Beidou + std::map observationType; //!< PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH + std::map observationCode; //!< GNSS observation descriptors + std::string stringVersion; //!< RINEX version (2.10/2.11 or 3.01/3.02) std::string navfilename; std::string obsfilename; diff --git a/src/algorithms/PVT/libs/rtcm.h b/src/algorithms/PVT/libs/rtcm.h index 5ff791503..28ef66e71 100644 --- a/src/algorithms/PVT/libs/rtcm.h +++ b/src/algorithms/PVT/libs/rtcm.h @@ -58,7 +58,7 @@ /*! - * This class implements the generation and reading of some Message Types + * \brief This class implements the generation and reading of some Message Types * defined in the RTCM 3.2 Standard, plus some utilities to handle messages. * * Generation of the following Message Types: @@ -89,7 +89,7 @@ class Rtcm { public: - Rtcm(uint16_t port = 2101); //& observables); bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map& observables); bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map& observables); + /*! * \brief Prints L1-Only GLONASS RTK Observables * \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred. @@ -77,6 +78,7 @@ public: * \return true or false upon operation success */ bool Print_Rtcm_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables); + /*! * \brief Prints Extended L1-Only GLONASS RTK Observables * \details This GLONASS message type is used when only L1 data is present and bandwidth is very tight, often 1012 is used in such cases. @@ -87,6 +89,7 @@ public: * \return true or false upon operation success */ bool Print_Rtcm_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map& observables); + /*! * \brief Prints L1&L2 GLONASS RTK Observables * \details This GLONASS message type is not generally used or supported; type 1012 is to be preferred @@ -98,6 +101,7 @@ public: * \return true or false upon operation success */ bool Print_Rtcm_MT1011(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map& observables); + /*! * \brief Prints Extended L1&L2 GLONASS RTK Observables * \details This GLONASS message type is the most common observational message type, with L1/L2/SNR content. This is one of the most common messages found. @@ -110,8 +114,9 @@ public: */ bool Print_Rtcm_MT1012(const Glonass_Gnav_Ephemeris& glonass_gnav_ephL1, const Glonass_Gnav_Ephemeris& glonass_gnav_ephL2, double obs_time, const std::map& observables); - bool Print_Rtcm_MT1019(const Gps_Ephemeris& gps_eph); // -DECLARE_string(c); // Date: Sun, 10 Mar 2019 20:08:49 +0100 Subject: [PATCH 31/32] Fix retrieval of Git data --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94548314a..82da9bfa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,7 @@ if(NOT ${THIS_IS_A_RELEASE}) PURPOSE "Manage version control, get MINOR_VERSION name for version number." TYPE REQUIRED ) - if(Git_FOUND) + if(GIT_FOUND) # was this info set in the CMake commandline? if(NOT GIT_BRANCH) # no: try to find it @@ -154,7 +154,6 @@ if(NOT ${THIS_IS_A_RELEASE}) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_QUIET ERROR_QUIET ) endif(NOT GIT_BRANCH) # was this info set in the CMake commandline? @@ -165,7 +164,6 @@ if(NOT ${THIS_IS_A_RELEASE}) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_QUIET ERROR_QUIET ) endif(NOT GIT_COMMIT_HASH) endif() @@ -2241,4 +2239,4 @@ else() ENABLED_FEATURES DISABLED_FEATURES ) endif() -message(STATUS "GNSS-SDR is ready to be built.") +message(STATUS "GNSS-SDR v${VERSION} is ready to be built.") From fb5347038d30fe2ca4dd21de1dff21dea1039965 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 23:07:31 +0100 Subject: [PATCH 32/32] Fix wrong policy number --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82da9bfa3..c7d4acac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -497,7 +497,7 @@ endif() # Visibility # See https://gcc.gnu.org/wiki/Visibility -if(POLICY CMP0053) +if(POLICY CMP0063) cmake_policy(SET CMP0063 NEW) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_C_VISIBILITY_PRESET hidden)