From 96cef90369dc272fdf1b36f90cd6ab037ae3bf95 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 13 Nov 2018 12:29:13 +0100 Subject: [PATCH 01/14] Add printer for L1,E1 and E5 combination --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 1 + .../PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 05ea52e5f..292d92305 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -234,6 +234,7 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 31; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a + if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+E5a // RTKLIB PVT solver options // Settings 1 diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 7e6753b48..5ee234f30 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -1408,6 +1408,17 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; + case 33: // L1+E1+E5a + if ((gps_ephemeris_iter != d_pvt_solver->gps_ephemeris_map.cend()) and + (galileo_ephemeris_iter != d_pvt_solver->galileo_ephemeris_map.cend())) + { + std::string gal_signal("1B 5X"); + std::string gps_signal("1C"); + rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); + rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->gps_iono, d_pvt_solver->gps_utc_model, d_pvt_solver->galileo_iono, d_pvt_solver->galileo_utc_model); + b_rinex_header_written = true; // do not write header anymore + } + break; default: break; } @@ -1488,6 +1499,9 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item case 32: // L1+E1+L5+E5a rp->log_rinex_nav(rp->navMixFile, d_pvt_solver->gps_ephemeris_map, d_pvt_solver->galileo_ephemeris_map); break; + case 33: // L1+E1+E5a + rp->log_rinex_nav(rp->navMixFile, d_pvt_solver->gps_ephemeris_map, d_pvt_solver->galileo_ephemeris_map); + break; default: break; } From 00d402f4874c221b3e7249abb351bac8a65ab856 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 13 Nov 2018 12:51:14 +0100 Subject: [PATCH 02/14] Add RINEX printer for L1/E1/E5a combination --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 2 +- .../PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 292d92305..0087257c5 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -234,7 +234,7 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) pvt_output_parameters.type_of_receiver = 31; if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a - if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 32; // L1+E1+E5a + if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) pvt_output_parameters.type_of_receiver = 33; // L1+E1+E5a // RTKLIB PVT solver options // Settings 1 diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 5ee234f30..e186cbad7 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -1413,7 +1413,6 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item (galileo_ephemeris_iter != d_pvt_solver->galileo_ephemeris_map.cend())) { std::string gal_signal("1B 5X"); - std::string gps_signal("1C"); rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal); rp->rinex_nav_header(rp->navMixFile, d_pvt_solver->gps_iono, d_pvt_solver->gps_utc_model, d_pvt_solver->galileo_iono, d_pvt_solver->galileo_utc_model); b_rinex_header_written = true; // do not write header anymore @@ -1796,6 +1795,20 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_updated = true; // do not write header anymore } break; + case 33: // L1+E1+E5a + if ((gps_ephemeris_iter != d_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_pvt_solver->gps_cnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_pvt_solver->galileo_ephemeris_map.cend())) + { + rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map); + } + if (!b_rinex_header_updated and (d_pvt_solver->gps_utc_model.d_A0 != 0) and (d_pvt_solver->galileo_utc_model.A0_6 != 0)) + { + rp->update_obs_header(rp->obsFile, d_pvt_solver->gps_utc_model); + rp->update_nav_header(rp->navMixFile, d_pvt_solver->gps_iono, d_pvt_solver->gps_utc_model, d_pvt_solver->galileo_iono, d_pvt_solver->galileo_utc_model); + b_rinex_header_updated = true; // do not write header anymore + } + break; + default: + break; } } } From 969f102814314dc1500e3d81a451b25f5fcf7071 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 13 Nov 2018 13:09:39 +0100 Subject: [PATCH 03/14] Fix error in RINEX printer --- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index e186cbad7..557efaded 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -1796,7 +1796,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item } break; case 33: // L1+E1+E5a - if ((gps_ephemeris_iter != d_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_pvt_solver->gps_cnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_pvt_solver->galileo_ephemeris_map.cend())) + if ((gps_ephemeris_iter != d_pvt_solver->gps_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_pvt_solver->galileo_ephemeris_map.cend())) { rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map); } From c3ae28e2db950c04e7c6ffdb8b3e34798de740d3 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 9 Dec 2018 23:10:09 +0100 Subject: [PATCH 04/14] Recover -gitlab-ci.yml file --- .gitlab-ci.yml | 748 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 748 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..37c3ef6a4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,748 @@ +# 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: base/devel:latest + stage: build + before_script: + - pwd + script: + - pacman -Syu --noconfirm + - pacman -S --noconfirm 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 .. + - 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.11: + image: debian:8.11-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.5: + image: debian:9.5-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 + 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_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_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 + + +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 -ENABLE_RAW_UDP=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:9.3-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:9.3-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-gnsssdr-v0.0.10: + image: docker:18.05 + stage: deploy + services: + - docker:dind + script: + - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/v0.0.10/Dockerfile + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - mkdir docker-build + - cd docker-build + - cp ../Dockerfile . + - docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO . + - docker tag $DOCKER_HUB_USER/$DOCKER_HUB_REPO:latest $DOCKER_HUB_USER/$DOCKER_HUB_REPO:0.0.10 + - docker push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:0.0.10 + only: + - v0.0.10 + 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 + - docker push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 + + +docker-access18-0.0.10: + image: docker:18.05 + 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 v0.0.10 && 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-0.0.10 + - docker push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18-0.0.10 + only: + - v0.0.10 + allow_failure: true + + +# 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 + + +run-access18-0.0.10: + image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18-0.0.10 + 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 + only: + - v0.0.10 From 58922251f7ff614116e69ee476e6318b3aa2c6a9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 10:36:15 +0100 Subject: [PATCH 05/14] Add telecommand_enabled parameter, it defaults to false --- src/core/receiver/control_thread.cc | 10 +++++++--- src/core/receiver/tcp_cmd_interface.cc | 2 +- src/core/receiver/tcp_cmd_interface.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index a9ab20e54..9ebda09d0 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -197,8 +197,12 @@ ControlThread::~ControlThread() void ControlThread::telecommand_listener() { - int tcp_cmd_port = configuration_->property("GNSS-SDR.telecontrol_tcp_port", 3333); - cmd_interface_.run_cmd_server(tcp_cmd_port); + bool telecommand_enabled = configuration_->property("GNSS-SDR.telecommand_enabled", false); + if (telecommand_enabled) + { + int tcp_cmd_port = configuration_->property("GNSS-SDR.telecommand_tcp_port", 3333); + cmd_interface_.run_cmd_server(tcp_cmd_port); + } } @@ -295,7 +299,7 @@ int ControlThread::run() } -void ControlThread::set_control_queue(const gr::msg_queue::sptr& control_queue) +void ControlThread::set_control_queue(const gr::msg_queue::sptr &control_queue) { if (flowgraph_->running()) { diff --git a/src/core/receiver/tcp_cmd_interface.cc b/src/core/receiver/tcp_cmd_interface.cc index cccb12857..57b274757 100644 --- a/src/core/receiver/tcp_cmd_interface.cc +++ b/src/core/receiver/tcp_cmd_interface.cc @@ -1,7 +1,7 @@ /*! * \file tcp_cmd_interface.cc * - * \brief Class that implements a TCP telecontrol command line interface + * \brief Class that implements a TCP/IP telecommand command line interface * for GNSS-SDR * \author Javier Arribas jarribas (at) cttc.es * ------------------------------------------------------------------------- diff --git a/src/core/receiver/tcp_cmd_interface.h b/src/core/receiver/tcp_cmd_interface.h index 841270668..4cafb898d 100644 --- a/src/core/receiver/tcp_cmd_interface.h +++ b/src/core/receiver/tcp_cmd_interface.h @@ -1,7 +1,7 @@ /*! * \file tcp_cmd_interface.h * - * \brief Class that implements a TCP telecontrol command line interface + * \brief Class that implements a TCP/IP telecommand command line interface * for GNSS-SDR * \author Javier Arribas jarribas (at) cttc.es * ------------------------------------------------------------------------- From 70be265b57a4bda373359271711e315385ff2fca Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 11:21:58 +0100 Subject: [PATCH 06/14] Update XML schemas --- docs/xml-schemas/gal_almanac_map.xsd | 4 ++-- docs/xml-schemas/gal_ephemeris_map.xsd | 2 +- docs/xml-schemas/gal_utc_model.xsd | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/xml-schemas/gal_almanac_map.xsd b/docs/xml-schemas/gal_almanac_map.xsd index 390609c58..8512bfc64 100644 --- a/docs/xml-schemas/gal_almanac_map.xsd +++ b/docs/xml-schemas/gal_almanac_map.xsd @@ -12,10 +12,10 @@ - + - + diff --git a/docs/xml-schemas/gal_ephemeris_map.xsd b/docs/xml-schemas/gal_ephemeris_map.xsd index bf6c5ea20..bf2166b48 100644 --- a/docs/xml-schemas/gal_ephemeris_map.xsd +++ b/docs/xml-schemas/gal_ephemeris_map.xsd @@ -1,4 +1,4 @@ -< + diff --git a/docs/xml-schemas/gal_utc_model.xsd b/docs/xml-schemas/gal_utc_model.xsd index a589f94fb..2e1e22eed 100644 --- a/docs/xml-schemas/gal_utc_model.xsd +++ b/docs/xml-schemas/gal_utc_model.xsd @@ -10,8 +10,8 @@ - - + + From b80f22fc43f2e5581b9690343a7b9f38ec05e0c4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 12:02:19 +0100 Subject: [PATCH 07/14] Use a std::array instead of a c array --- src/algorithms/PVT/libs/rtklib_solver.cc | 2 +- src/algorithms/PVT/libs/rtklib_solver.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index 442342ece..1125e704a 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -820,7 +820,7 @@ bool rtklib_solver::get_PVT(const std::map &gnss_observables_ } } - if (index_aux > 0) dops(index_aux, azel.data(), 0.0, dop_); + if (index_aux > 0) dops(index_aux, azel.data(), 0.0, dop_.data()); this->set_valid_position(true); arma::vec rx_position_and_time(4); rx_position_and_time(0) = pvt_sol.rr[0]; // [m] diff --git a/src/algorithms/PVT/libs/rtklib_solver.h b/src/algorithms/PVT/libs/rtklib_solver.h index 453c54223..73a96166d 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.h +++ b/src/algorithms/PVT/libs/rtklib_solver.h @@ -63,6 +63,7 @@ #include "gps_navigation_message.h" #include "pvt_solution.h" #include "rtklib_rtkpos.h" +#include #include #include #include @@ -82,7 +83,7 @@ private: bool d_flag_dump_enabled; bool d_flag_dump_mat_enabled; int d_nchannels; // Number of available channels for positioning - double dop_[4]; + std::array dop_; public: sol_t pvt_sol; @@ -99,7 +100,7 @@ public: std::map galileo_ephemeris_map; //!< Map storing new Galileo_Ephemeris std::map gps_ephemeris_map; //!< Map storing new GPS_Ephemeris std::map gps_cnav_ephemeris_map; //!< Map storing new GPS_CNAV_Ephemeris - std::map glonass_gnav_ephemeris_map; //!< Map storing new GLONASS GNAV Ephmeris + std::map glonass_gnav_ephemeris_map; //!< Map storing new GLONASS GNAV Ephemeris Galileo_Utc_Model galileo_utc_model; Galileo_Iono galileo_iono; From f351615ef9726f6688a2d06f4fdc234d8994a938 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 12:08:54 +0100 Subject: [PATCH 08/14] Apply clang-tidy fix modernize-use-bool-literals --- .clang-tidy | 2 +- .../pcps_quicksync_acquisition_cc.cc | 2 +- .../libs/glonass_l1_signal_processing.cc | 2 +- .../libs/glonass_l2_signal_processing.cc | 2 +- src/algorithms/libs/gps_l5_signal.cc | 32 +++++++++---------- .../libs/gps_sdr_signal_processing.cc | 4 +-- src/algorithms/libs/rtklib/rtklib_rtksvr.cc | 2 +- src/utils/front-end-cal/main.cc | 4 +-- src/utils/rinex2assist/main.cc | 8 ++--- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 79a8beaa6..d4b3047f8 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,3 @@ --- -Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,performance-faster-string-find,performance-move-const-arg,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-named-parameter,readability-string-compare' +Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,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-named-parameter,readability-string-compare' HeaderFilterRegex: '.*' diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index 4df3e0800..11c13a979 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -247,7 +247,7 @@ void pcps_quicksync_acquisition_cc::set_state(int32_t state) d_mag = 0.0; d_input_power = 0.0; d_test_statistics = 0.0; - d_active = 1; + d_active = true; } else if (d_state == 0) { diff --git a/src/algorithms/libs/glonass_l1_signal_processing.cc b/src/algorithms/libs/glonass_l1_signal_processing.cc index 045b53626..8707985b4 100644 --- a/src/algorithms/libs/glonass_l1_signal_processing.cc +++ b/src/algorithms/libs/glonass_l1_signal_processing.cc @@ -46,7 +46,7 @@ void glonass_l1_ca_code_gen_complex(std::complex* _dest, /* int32_t _prn for (lcv = 0; lcv < 9; lcv++) { - G1_register[lcv] = 1; + G1_register[lcv] = true; } /* Generate G1 Register */ diff --git a/src/algorithms/libs/glonass_l2_signal_processing.cc b/src/algorithms/libs/glonass_l2_signal_processing.cc index f486429e1..491b0e735 100644 --- a/src/algorithms/libs/glonass_l2_signal_processing.cc +++ b/src/algorithms/libs/glonass_l2_signal_processing.cc @@ -46,7 +46,7 @@ void glonass_l2_ca_code_gen_complex(std::complex* _dest, /* int32_t _prn, for (lcv = 0; lcv < 9; lcv++) { - G1_register[lcv] = 1; + G1_register[lcv] = true; } /* Generate G1 Register */ diff --git a/src/algorithms/libs/gps_l5_signal.cc b/src/algorithms/libs/gps_l5_signal.cc index 2c1336a21..198aa27af 100644 --- a/src/algorithms/libs/gps_l5_signal.cc +++ b/src/algorithms/libs/gps_l5_signal.cc @@ -40,9 +40,9 @@ std::deque l5i_xa_shift(std::deque xa) { - if (xa == std::deque{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}) + if (xa == std::deque{true, true, true, true, true, true, true, true, true, true, true, false, true}) { - return std::deque{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + return std::deque{true, true, true, true, true, true, true, true, true, true, true, true, true}; } std::deque out(xa.begin(), xa.end() - 1); out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); @@ -52,9 +52,9 @@ std::deque l5i_xa_shift(std::deque xa) std::deque l5q_xa_shift(std::deque xa) { - if (xa == std::deque{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1}) + if (xa == std::deque{true, true, true, true, true, true, true, true, true, true, true, false, true}) { - return std::deque{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + return std::deque{true, true, true, true, true, true, true, true, true, true, true, true, true}; } std::deque out(xa.begin(), xa.end() - 1); out.push_front(xa[12] xor xa[11] xor xa[9] xor xa[8]); @@ -80,8 +80,8 @@ std::deque l5q_xb_shift(std::deque xb) std::deque make_l5i_xa() { - std::deque xa = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - std::deque y(GPS_L5i_CODE_LENGTH_CHIPS, 0); + std::deque xa = {true, true, true, true, true, true, true, true, true, true, true, true, true}; + std::deque y(GPS_L5i_CODE_LENGTH_CHIPS, false); for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) { @@ -94,8 +94,8 @@ std::deque make_l5i_xa() std::deque make_l5i_xb() { - std::deque xb = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - std::deque y(GPS_L5i_CODE_LENGTH_CHIPS, 0); + std::deque xb = {true, true, true, true, true, true, true, true, true, true, true, true, true}; + std::deque y(GPS_L5i_CODE_LENGTH_CHIPS, false); for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) { @@ -108,8 +108,8 @@ std::deque make_l5i_xb() std::deque make_l5q_xa() { - std::deque xa = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - std::deque y(GPS_L5q_CODE_LENGTH_CHIPS, 0); + std::deque xa = {true, true, true, true, true, true, true, true, true, true, true, true, true}; + std::deque y(GPS_L5q_CODE_LENGTH_CHIPS, false); for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) { @@ -122,8 +122,8 @@ std::deque make_l5q_xa() std::deque make_l5q_xb() { - std::deque xb = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - std::deque y(GPS_L5q_CODE_LENGTH_CHIPS, 0); + std::deque xb = {true, true, true, true, true, true, true, true, true, true, true, true, true}; + std::deque y(GPS_L5q_CODE_LENGTH_CHIPS, false); for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) { @@ -140,13 +140,13 @@ void make_l5i(int32_t* _dest, int32_t prn) std::deque xb = make_l5i_xb(); std::deque xa = make_l5i_xa(); - std::deque xb_shift(GPS_L5i_CODE_LENGTH_CHIPS, 0); + std::deque xb_shift(GPS_L5i_CODE_LENGTH_CHIPS, false); for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++) { xb_shift[n] = xb[(xb_offset + n) % GPS_L5i_CODE_LENGTH_CHIPS]; } - std::deque out_code(GPS_L5i_CODE_LENGTH_CHIPS, 0); + std::deque out_code(GPS_L5i_CODE_LENGTH_CHIPS, false); for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++) { _dest[n] = xa[n] xor xb_shift[n]; @@ -160,13 +160,13 @@ void make_l5q(int32_t* _dest, int32_t prn) std::deque xb = make_l5q_xb(); std::deque xa = make_l5q_xa(); - std::deque xb_shift(GPS_L5q_CODE_LENGTH_CHIPS, 0); + std::deque xb_shift(GPS_L5q_CODE_LENGTH_CHIPS, false); for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++) { xb_shift[n] = xb[(xb_offset + n) % GPS_L5q_CODE_LENGTH_CHIPS]; } - std::deque out_code(GPS_L5q_CODE_LENGTH_CHIPS, 0); + std::deque out_code(GPS_L5q_CODE_LENGTH_CHIPS, false); for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++) { _dest[n] = xa[n] xor xb_shift[n]; diff --git a/src/algorithms/libs/gps_sdr_signal_processing.cc b/src/algorithms/libs/gps_sdr_signal_processing.cc index db3c33eff..e87593f6e 100644 --- a/src/algorithms/libs/gps_sdr_signal_processing.cc +++ b/src/algorithms/libs/gps_sdr_signal_processing.cc @@ -68,8 +68,8 @@ void gps_l1_ca_code_gen_int(int32_t* _dest, int32_t _prn, uint32_t _chip_shift) for (lcv = 0; lcv < 10; lcv++) { - G1_register[lcv] = 1; - G2_register[lcv] = 1; + G1_register[lcv] = true; + G2_register[lcv] = true; } /* Generate G1 & G2 Register */ diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 04a46c910..7e34a1035 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -424,7 +424,7 @@ void decodefile(rtksvr_t *svr, int index) { /* precise clock */ /* read rinex clock */ // Disabled!! - if (1 /*readrnxc(file, &nav)<=0 */) + if (true /*readrnxc(file, &nav)<=0 */) { tracet(1, "rinex clock file read error: %s\n", file); return; diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index a5b0a7b76..c44d2c97d 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -191,7 +191,7 @@ bool front_end_capture(const std::shared_ptr& configurat catch (const boost::exception_ptr& e) { std::cout << "Exception caught in creating source " << e << std::endl; - return 0; + return false; } std::shared_ptr conditioner; @@ -202,7 +202,7 @@ bool front_end_capture(const std::shared_ptr& configurat catch (const boost::exception_ptr& e) { std::cout << "Exception caught in creating signal conditioner " << e << std::endl; - return 0; + return false; } gr::block_sptr sink; sink = gr::blocks::file_sink::make(sizeof(gr_complex), "tmp_capture.dat"); diff --git a/src/utils/rinex2assist/main.cc b/src/utils/rinex2assist/main.cc index c26b128dc..f23b58ed7 100644 --- a/src/utils/rinex2assist/main.cc +++ b/src/utils/rinex2assist/main.cc @@ -260,15 +260,15 @@ int main(int argc, char** argv) eph.d_TGD = rne.Tgd; eph.d_IODC = rne.IODC; eph.i_AODO = 0; // - eph.b_fit_interval_flag = (rne.fitint > 4) ? 1 : 0; + eph.b_fit_interval_flag = (rne.fitint > 4) ? true : false; eph.d_spare1 = 0.0; eph.d_spare2 = 0.0; eph.d_A_f0 = rne.af0; eph.d_A_f1 = rne.af1; eph.d_A_f2 = rne.af2; - eph.b_integrity_status_flag = 0; // - eph.b_alert_flag = 0; // - eph.b_antispoofing_flag = 0; // + eph.b_integrity_status_flag = false; // + eph.b_alert_flag = false; // + eph.b_antispoofing_flag = false; // eph_map[i] = eph; i++; } From 27b7a93181b9ae7afd7b0528586b8e9671890051 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 12:25:38 +0100 Subject: [PATCH 09/14] Apply clang-tidy fix readability-container-size-empty --- .clang-tidy | 2 +- src/algorithms/PVT/libs/rinex_printer.cc | 2 +- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc | 2 +- src/utils/front-end-cal/main.cc | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index d4b3047f8..fa2fd2f7c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,3 @@ --- -Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,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-named-parameter,readability-string-compare' +Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,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-container-size-empty,readability-named-parameter,readability-string-compare' HeaderFilterRegex: '.*' diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index ba92f8f61..cb7065e97 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -7057,7 +7057,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri double int_sec = 0; // Avoid compiler warning - if (glonass_band.size()) + if (!glonass_band.empty()) { } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc index 7dd78171c..33522ddc8 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc @@ -321,7 +321,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__ current_symbol = in[0][0]; // record the oldest subframe symbol before inserting a new symbol into the circular buffer - if (d_current_subframe_symbol < GPS_SUBFRAME_MS and d_symbol_history.size() > 0) + if (d_current_subframe_symbol < GPS_SUBFRAME_MS and !d_symbol_history.empty()) { d_subframe_symbols[d_current_subframe_symbol] = d_symbol_history[0].Prompt_I; d_current_subframe_symbol++; diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index c44d2c97d..b1680d51f 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -430,7 +430,7 @@ int main(int argc, char** argv) std::cout << "["; start_msg = false; } - if (gnss_sync_vector.size() > 0) + if (!gnss_sync_vector.empty()) { std::cout << " " << PRN << " "; double doppler_measurement_hz = 0; @@ -523,7 +523,7 @@ int main(int argc, char** argv) std::cout << "Longitude=" << lon_deg << " [ยบ]" << std::endl; std::cout << "Altitude=" << altitude_m << " [m]" << std::endl; - if (doppler_measurements_map.size() == 0) + if (doppler_measurements_map.empty()) { std::cout << "Sorry, no GPS satellites detected in the front-end capture, please check the antenna setup..." << std::endl; delete acquisition; From 38858dece6788d7aceaa8180095be874367cbb49 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 12:38:38 +0100 Subject: [PATCH 10/14] Apply clang-tidy fix readability-non-const-parameter --- .clang-tidy | 2 +- src/algorithms/libs/galileo_e1_signal_processing.cc | 4 ++-- src/algorithms/libs/galileo_e5_signal_processing.cc | 2 +- src/algorithms/libs/galileo_e5_signal_processing.h | 2 +- src/algorithms/libs/rtklib/rtklib_preceph.cc | 2 +- src/algorithms/libs/rtklib/rtklib_preceph.h | 2 +- src/algorithms/libs/rtklib/rtklib_rtkpos.cc | 6 +++--- src/algorithms/libs/rtklib/rtklib_rtkpos.h | 6 +++--- src/algorithms/libs/rtklib/rtklib_rtksvr.cc | 2 +- src/algorithms/libs/rtklib/rtklib_rtksvr.h | 2 +- .../gnuradio_blocks/galileo_telemetry_decoder_cc.cc | 2 +- .../gnuradio_blocks/galileo_telemetry_decoder_cc.h | 2 +- .../gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc | 2 +- .../gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h | 2 +- .../gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.cc | 2 +- .../gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.h | 2 +- src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc | 2 +- src/algorithms/telemetry_decoder/libs/viterbi_decoder.h | 2 +- 18 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index fa2fd2f7c..50fa566d0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,3 @@ --- -Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,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-container-size-empty,readability-named-parameter,readability-string-compare' +Checks: '-*,boost-use-to-string,cert-dcl21-cpp,cert-dcl58-cpp,cert-env33-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,clang-analyzer-cplusplus*,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-build-namespaces,google-runtime-int,google-runtime-references,llvm-header-guard,misc-misplaced-const,misc-new-delete-overloads,misc-non-copyable-objects,misc-static-assert,misc-throw-by-value-catch-by-reference,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-loop-convert,modernize-pass-by-value,modernize-raw-string-literal,modernize-use-auto,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-using,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-container-size-empty,readability-named-parameter,readability-non-const-parameter,readability-string-compare' HeaderFilterRegex: '.*' diff --git a/src/algorithms/libs/galileo_e1_signal_processing.cc b/src/algorithms/libs/galileo_e1_signal_processing.cc index 96bcd2397..23a8d9a94 100644 --- a/src/algorithms/libs/galileo_e1_signal_processing.cc +++ b/src/algorithms/libs/galileo_e1_signal_processing.cc @@ -68,7 +68,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn) } -void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out) +void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_out) { const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS; auto _period = static_cast(_length_out / _length_in); @@ -86,7 +86,7 @@ void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out) } -void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out) +void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_out) { const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS; auto _period = static_cast(_length_out / _length_in); diff --git a/src/algorithms/libs/galileo_e5_signal_processing.cc b/src/algorithms/libs/galileo_e5_signal_processing.cc index 400aed192..baa91706f 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.cc +++ b/src/algorithms/libs/galileo_e5_signal_processing.cc @@ -37,7 +37,7 @@ #include -void galileo_e5_a_code_gen_complex_primary(std::complex* _dest, int32_t _prn, char _Signal[3]) +void galileo_e5_a_code_gen_complex_primary(std::complex* _dest, int32_t _prn, const char _Signal[3]) { uint32_t prn = _prn - 1; uint32_t index = 0; diff --git a/src/algorithms/libs/galileo_e5_signal_processing.h b/src/algorithms/libs/galileo_e5_signal_processing.h index 46deaae24..7a7dfc8cc 100644 --- a/src/algorithms/libs/galileo_e5_signal_processing.h +++ b/src/algorithms/libs/galileo_e5_signal_processing.h @@ -42,7 +42,7 @@ * \brief Generates Galileo E5a code at 1 sample/chip * bool _pilot generates E5aQ code if true and E5aI (data signal) if false. */ -void galileo_e5_a_code_gen_complex_primary(std::complex* _dest, int32_t _prn, char _Signal[3]); +void galileo_e5_a_code_gen_complex_primary(std::complex* _dest, int32_t _prn, const char _Signal[3]); void galileo_e5_a_code_gen_tiered(std::complex* _dest, std::complex* _primary, uint32_t _prn, char _Signal[3]); diff --git a/src/algorithms/libs/rtklib/rtklib_preceph.cc b/src/algorithms/libs/rtklib/rtklib_preceph.cc index 3da6b8b5b..72c62fbf1 100644 --- a/src/algorithms/libs/rtklib/rtklib_preceph.cc +++ b/src/algorithms/libs/rtklib/rtklib_preceph.cc @@ -146,7 +146,7 @@ int addpeph(nav_t *nav, peph_t *peph) /* read sp3 body -------------------------------------------------------------*/ -void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, double *bfact, +void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, const double *bfact, char *tsys, int index, int opt, nav_t *nav) { peph_t peph; diff --git a/src/algorithms/libs/rtklib/rtklib_preceph.h b/src/algorithms/libs/rtklib/rtklib_preceph.h index 24b0b610c..1186b6a88 100644 --- a/src/algorithms/libs/rtklib/rtklib_preceph.h +++ b/src/algorithms/libs/rtklib/rtklib_preceph.h @@ -75,7 +75,7 @@ int code2sys(char code); int readsp3h(FILE *fp, gtime_t *time, char *type, int *sats, double *bfact, char *tsys); int addpeph(nav_t *nav, peph_t *peph); -void readsp3b(FILE *fp, char type, int *sats, int ns, double *bfact, +void readsp3b(FILE *fp, char type, int *sats, int ns, const double *bfact, char *tsys, int index, int opt, nav_t *nav); int cmppeph(const void *p1, const void *p2); void combpeph(nav_t *nav, int opt); diff --git a/src/algorithms/libs/rtklib/rtklib_rtkpos.cc b/src/algorithms/libs/rtklib/rtklib_rtkpos.cc index e2c05664a..1634b8fcb 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkpos.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkpos.cc @@ -541,7 +541,7 @@ void initx_rtk(rtk_t *rtk, double xi, double var, int i) /* select common satellites between rover and reference station --------------*/ -int selsat(const obsd_t *obs, double *azel, int nu, int nr, +int selsat(const obsd_t *obs, const double *azel, int nu, int nr, const prcopt_t *opt, int *sat, int *iu, int *ir) { int i, j, k = 0; @@ -1155,7 +1155,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs, /* test valid observation data -----------------------------------------------*/ -int validobs(int i, int j, int f, int nf, double *y) +int validobs(int i, int j, int f, int nf, const double *y) { /* if no phase observable, psudorange is also unusable */ return y[f + i * nf * 2] != 0.0 && y[f + j * nf * 2] != 0.0 && @@ -1302,7 +1302,7 @@ int test_sys(int sys, int m) /* double-differenced phase/code residuals -----------------------------------*/ int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x, - const double *P, const int *sat, double *y, double *e, + const double *P, const int *sat, double *y, const double *e, double *azel, const int *iu, const int *ir, int ns, double *v, double *H, double *R, int *vflg) { diff --git a/src/algorithms/libs/rtklib/rtklib_rtkpos.h b/src/algorithms/libs/rtklib/rtklib_rtkpos.h index 81234a634..3cac6b4d0 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkpos.h +++ b/src/algorithms/libs/rtklib/rtklib_rtkpos.h @@ -108,7 +108,7 @@ double baseline(const double *ru, const double *rb, double *dr); void initx_rtk(rtk_t *rtk, double xi, double var, int i); -int selsat(const obsd_t *obs, double *azel, int nu, int nr, +int selsat(const obsd_t *obs, const double *azel, int nu, int nr, const prcopt_t *opt, int *sat, int *iu, int *ir); void udpos(rtk_t *rtk, double tt); @@ -144,7 +144,7 @@ int zdres(int base, const obsd_t *obs, int n, const double *rs, const double *rr, const prcopt_t *opt, int index, double *y, double *e, double *azel); -int validobs(int i, int j, int f, int nf, double *y); +int validobs(int i, int j, int f, int nf, const double *y); void ddcov(const int *nb, int n, const double *Ri, const double *Rj, int nv, double *R); @@ -162,7 +162,7 @@ double gloicbcorr(int sat1, int sat2, const prcopt_t *opt, double lam1, int test_sys(int sys, int m); int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x, - const double *P, const int *sat, double *y, double *e, + const double *P, const int *sat, double *y, const double *e, double *azel, const int *iu, const int *ir, int ns, double *v, double *H, double *R, int *vflg); diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc index 7e34a1035..ac047012a 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.cc @@ -730,7 +730,7 @@ void rtksvrunlock(rtksvr_t *svr) { rtk_unlock(&svr->lock); } * return : status (1:ok 0:error) *-----------------------------------------------------------------------------*/ int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs, - char **paths, int *formats, int navsel, char **cmds, + char **paths, const int *formats, int navsel, char **cmds, char **rcvopts, int nmeacycle, int nmeareq, const double *nmeapos, prcopt_t *prcopt, solopt_t *solopt, stream_t *moni) diff --git a/src/algorithms/libs/rtklib/rtklib_rtksvr.h b/src/algorithms/libs/rtklib/rtklib_rtksvr.h index 0e6eb65e7..d5edbd252 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtksvr.h +++ b/src/algorithms/libs/rtklib/rtklib_rtksvr.h @@ -116,7 +116,7 @@ void rtksvrlock(rtksvr_t *svr); void rtksvrunlock(rtksvr_t *svr); int rtksvrstart(rtksvr_t *svr, int cycle, int buffsize, int *strs, - char **paths, int *formats, int navsel, char **cmds, + char **paths, const int *formats, int navsel, char **cmds, char **rcvopts, int nmeacycle, int nmeareq, const double *nmeapos, prcopt_t *prcopt, solopt_t *solopt, stream_t *moni); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.cc index 92730e4b0..3a265a6d5 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.cc @@ -60,7 +60,7 @@ void galileo_telemetry_decoder_cc::viterbi_decoder(double *page_part_symbols, in } -void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, double *in, double *out) +void galileo_telemetry_decoder_cc::deinterleaver(int32_t rows, int32_t cols, const double *in, double *out) { for (int32_t r = 0; r < rows; r++) { diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.h index fba0ec59d..c06df6010 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_cc.h @@ -78,7 +78,7 @@ private: void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits); - void deinterleaver(int32_t rows, int32_t cols, double *in, double *out); + void deinterleaver(int32_t rows, int32_t cols, const double *in, double *out); void decode_INAV_word(double *symbols, int32_t frame_length); void decode_FNAV_word(double *page_symbols, int32_t frame_length); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc index 7182e7374..7ead9f53b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc @@ -124,7 +124,7 @@ glonass_l1_ca_telemetry_decoder_cc::~glonass_l1_ca_telemetry_decoder_cc() } -void glonass_l1_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, int32_t frame_length) +void glonass_l1_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length) { double chip_acc = 0.0; int32_t chip_acc_counter = 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h index 046e30d48..1bdde14da 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h @@ -76,7 +76,7 @@ private: glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l1_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); - void decode_string(double *symbols, int32_t frame_length); + void decode_string(const double *symbols, int32_t frame_length); //!< Help with coherent tracking double d_preamble_time_samples; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.cc index 7384486d8..b250fb912 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.cc @@ -124,7 +124,7 @@ glonass_l2_ca_telemetry_decoder_cc::~glonass_l2_ca_telemetry_decoder_cc() } -void glonass_l2_ca_telemetry_decoder_cc::decode_string(double *frame_symbols, int32_t frame_length) +void glonass_l2_ca_telemetry_decoder_cc::decode_string(const double *frame_symbols, int32_t frame_length) { double chip_acc = 0.0; int32_t chip_acc_counter = 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.h index 73bf85325..8b1a25ee9 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_cc.h @@ -74,7 +74,7 @@ private: glonass_l2_ca_make_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); glonass_l2_ca_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump); - void decode_string(double *symbols, int32_t frame_length); + void decode_string(const double *symbols, int32_t frame_length); //!< Help with coherent tracking double d_preamble_time_samples; diff --git a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc index ef71c4537..957efa9a6 100644 --- a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc +++ b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.cc @@ -354,7 +354,7 @@ int Viterbi_Decoder::do_tb_and_decode(int traceback_length, int requested_decodi nn The length of the received vector This function is used by siso() */ -float Viterbi_Decoder::gamma(float rec_array[], int symbol, int nn) +float Viterbi_Decoder::gamma(const float rec_array[], int symbol, int nn) { float rm = 0; int i; diff --git a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.h b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.h index 29d656bee..c2ae1327a 100644 --- a/src/algorithms/telemetry_decoder/libs/viterbi_decoder.h +++ b/src/algorithms/telemetry_decoder/libs/viterbi_decoder.h @@ -116,7 +116,7 @@ private: int do_tb_and_decode(int traceback_length, int requested_decoding_length, int state, int bits[], float& indicator_metric); // branch metric function - float gamma(float rec_array[], int symbol, int nn); + float gamma(const float rec_array[], int symbol, int nn); // trellis generation void nsc_transit(int output_p[], int trans_p[], int input, const int g[], int KK, int nn); From 2c2ddb1de7b530ac1bdb61ff7b0ae81bbb11a901 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 13:59:57 +0100 Subject: [PATCH 11/14] Fix error in RTCM generation of L5+E5a receiver --- .../PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 3e59413e2..e0b3eafe0 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -2441,8 +2441,26 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item } if (d_rtcm_MSM_rate_ms != 0) { + std::map::const_iterator gnss_observables_iter; std::map::const_iterator gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.cbegin(); - if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend() and (d_rtcm_MT1097_rate_ms != 0)) + int gal_channel = 0; + for (gnss_observables_iter = gnss_observables_map.cbegin(); gnss_observables_iter != gnss_observables_map.cend(); gnss_observables_iter++) + { + std::string system(&gnss_observables_iter->second.System, 1); + if (gal_channel == 0) + { + if (system == "E") + { + gal_eph_iter = d_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter->second.PRN); + if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) + { + gal_channel = 1; + } + } + } + } + + if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) { d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } From e8174a5ef705b6c6a873aa7a72f85d6ea1970c21 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 11 Dec 2018 14:01:23 +0100 Subject: [PATCH 12/14] Fix error in RTCM generation of L5+E5a receiver --- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index e0b3eafe0..480a97ddd 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -2460,7 +2460,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item } } - if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend()) + if (gal_eph_iter != d_pvt_solver->galileo_ephemeris_map.cend() and (d_rtcm_MT1097_rate_ms != 0)) { d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); } From bb137661bd1b486d026679d1de43fd0d5172805e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 12 Dec 2018 01:03:33 +0100 Subject: [PATCH 13/14] Remove error message --- .../signal-processing-blocks/libs/tracking_true_obs_reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc index 25ec5b66b..efa913404 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc @@ -92,7 +92,7 @@ bool tracking_true_obs_reader::open_obs_file(std::string out_file) } catch (const std::ifstream::failure &e) { - std::cout << "Problem opening Tracking dump Log file: " << d_dump_filename.c_str() << " Error: " << e.what() << std::endl; + std::cout << "Problem opening Tracking dump Log file: " << d_dump_filename.c_str() << std::endl; return false; } } From 7557c942082598baf7b6b8f7acba8e2c0b612507 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 12 Dec 2018 01:23:05 +0100 Subject: [PATCH 14/14] Avoid storing GBs of data by default --- .../acquisition/acq_performance_test.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc index 6c5cefe8c..8b738eebf 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc @@ -87,6 +87,8 @@ DEFINE_int32(acq_test_iterations, 1, "Number of iterations (same signal, differe DEFINE_bool(plot_acq_test, false, "Plots results with gnuplot, if available"); DEFINE_int32(acq_test_skiphead, 0, "Number of samples to skip in the input file"); +DEFINE_bool(acq_test_dump, false, "Dump the results of an acquisition block into .mat files."); + // ######## GNURADIO BLOCK MESSAGE RECEVER ######### class AcqPerfTest_msg_rx; @@ -523,8 +525,15 @@ int AcquisitionPerformanceTest::configure_receiver(double cn0, float pfa, unsign config->set_property("Acquisition.make_two_steps", "false"); } + if (FLAGS_acq_test_dump) + { + config->set_property("Acquisition.dump", "true"); + } + else + { + config->set_property("Acquisition.dump", "false"); + } - config->set_property("Acquisition.dump", "true"); std::string dump_file = path_str + std::string("/acquisition_") + std::to_string(cn0) + "_" + std::to_string(iter) + "_" + std::to_string(pfa); config->set_property("Acquisition.dump_filename", dump_file); config->set_property("Acquisition.dump_channel", std::to_string(dump_channel));