From 59395432d42c504d4781d089baf6911c80384ecc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 16:50:47 +0100 Subject: [PATCH 001/194] Add .gitlab-ci.yml file --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..765ddac90 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,47 @@ +# Is performed before the scripts in the stages step +before_script: + - source /etc/profile + +# Defines stages which are to be executed +stages: + - build + - test + +# Stage "build" +run-build: + stage: build + script: + - apt-get update + - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr 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 .. + - make -j2 + - make install + # This stage is only executed for new tags + # only: + # - tags + + # The files which are to be made available in GitLab + artifacts: + paths: + - install/* + +# Stage "test" +run-test: + stage: test + script: + - apt-get update + - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - mkdir build-test + - cd build-test + - cmake .. + - make -j2 + - make check + - ../install/run_tests --gtest_output=xml + - mv *.xml ../build/ + - cd .. + - rm -rf build-test + + artifacts: + paths: + - build/*.xml From 5d03eaa802aca4f2e16b257888928e821eba0227 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 16:53:41 +0100 Subject: [PATCH 002/194] Replace googletest by libgtest-dev --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 765ddac90..7caddcd2a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr 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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From b7aeadf8fca833db47205e2d5659a5c156f9b8ab Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 16:58:53 +0100 Subject: [PATCH 003/194] Remove libuhd-dev --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7caddcd2a..25e40f875 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libuhd-dev gnuradio-dev gr-osmosdr libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From f56ed763e540c2db3efae7784a493bae32a84b54 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 17:10:14 +0100 Subject: [PATCH 004/194] Remove libuhd-dev --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25e40f875..f86aa8016 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,9 +12,9 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 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 .. + - cmake .. - make -j2 - make install # This stage is only executed for new tags @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From 14cafb3c1ad12c431c1bf82aac62228d8371d928 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 17:17:18 +0100 Subject: [PATCH 005/194] Add volk --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f86aa8016..dedaa6c17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libvolk-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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libvolk-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From b372a7f5f6f3e6c87dcff13b8ad5ec19e7b56141 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 17:25:23 +0100 Subject: [PATCH 006/194] Fix gnuradio in jessie --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dedaa6c17..cfe7e4350 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libvolk-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libgnuradio-blocks3.7.5 libgnuradio-runtime3.7.5 libgnuradio-filter3.7.5 libgnuradio-pmt3.7.5 libgnuradio-analog3.7.5 libvolk-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From 0d25ba2deff06ba9139602f3819e17688695cada Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 17:31:49 +0100 Subject: [PATCH 007/194] Fix uhd-host in jessie --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfe7e4350..8eb54eaf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: stage: build script: - apt-get update - - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test script: - apt-get update - - apt-get install -y 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From 7e01f59011f3cad7bd577fceafbbc0a57c746ea4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 17:37:03 +0100 Subject: [PATCH 008/194] Fix gnuradio in jessie --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8eb54eaf7..182b0f69c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From e0797063ca0725a3402d5110c2259d397ffac912 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 18:21:23 +0100 Subject: [PATCH 009/194] Fix libmatio in jessie --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 182b0f69c..eea4ba285 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ run-build: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev - cd build - cmake .. - make -j2 @@ -31,7 +31,7 @@ run-test: stage: test 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev - mkdir build-test - cd build-test - cmake .. From 156eeb517ac95502e022c1c47134e9eb9545963b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 19:13:51 +0100 Subject: [PATCH 010/194] Try multiple images --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eea4ba285..f463f27ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,17 @@ run-build: paths: - install/* +run-build-debian-stretch: + image: debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev + - cd build + - cmake .. + - make -j2 + - make install + # Stage "test" run-test: stage: test From c1515b12898000f13cde0660ba8272b50d612d00 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 19:34:15 +0100 Subject: [PATCH 011/194] Add multiple images --- .gitlab-ci.yml | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f463f27ba..4aca8ea0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,18 +17,35 @@ run-build: - cmake .. - make -j2 - make install - # This stage is only executed for new tags - # only: - # - tags - # The files which are to be made available in GitLab - artifacts: - paths: - - install/* + +run-build-debian-jessie: + image: debian:8.10-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + run-build-debian-stretch: image: debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + + +run-build-ubuntu-16.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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev @@ -37,6 +54,18 @@ run-build-debian-stretch: - make -j2 - make install + +run-build-ubuntu-18.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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + # Stage "test" run-test: stage: test From 8d9c3fbc24d9d6aa1af73164126ed6688cb63234 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 19:37:02 +0100 Subject: [PATCH 012/194] Fix Jessie --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4aca8ea0f..3d78047a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ run-build-debian-jessie: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. - make -j2 From 08241a1b67a9cc4c86c0767036e40b2e50c12ad5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 19:44:45 +0100 Subject: [PATCH 013/194] Add buster --- .gitlab-ci.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d78047a3..dde38a720 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ run-build: - make install -run-build-debian-jessie: +debian-jessie-build: image: debian:8.10-slim stage: build script: @@ -31,7 +31,7 @@ run-build-debian-jessie: - make install -run-build-debian-stretch: +debian-stretch-build: image: debian:9.3-slim stage: build script: @@ -43,19 +43,31 @@ run-build-debian-stretch: - make install -run-build-ubuntu-16.04: - image: ubuntu:xenial +debian-buster-build: + image: debian:buster-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - cd build - cmake .. - make -j2 - make install -run-build-ubuntu-18.04: +ubuntu-16.04-build: + 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 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 .. + - make -j2 + - make install + + +ubuntu-18.04-build: image: ubuntu:bionic stage: build script: From 0aed45c48dc1fd25883d39f7c3ee55e23d6b4576 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 20:39:39 +0100 Subject: [PATCH 014/194] Remove redundant job --- .gitlab-ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dde38a720..e0ae91796 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,16 +8,6 @@ stages: - test # Stage "build" -run-build: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev - - cd build - - cmake .. - - make -j2 - - make install - debian-jessie-build: image: debian:8.10-slim @@ -80,10 +70,11 @@ ubuntu-18.04-build: # Stage "test" run-test: + image: debian:9.3-slim stage: test 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libhdf5-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - mkdir build-test - cd build-test - cmake .. From d3db7e9d1d2e5585f1f5456442f8e47194b8deda Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 22:17:08 +0100 Subject: [PATCH 015/194] Test different archs --- .gitlab-ci.yml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0ae91796..355f10550 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,6 @@ stages: - test # Stage "build" - debian-jessie-build: image: debian:8.10-slim stage: build @@ -21,7 +20,7 @@ debian-jessie-build: - make install -debian-stretch-build: +debian-stretch-amd64-build: image: debian:9.3-slim stage: build script: @@ -32,6 +31,41 @@ debian-stretch-build: - make -j2 - make install +debian-stretch-i386-build: + image: i386/debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + + +debian-stretch-arm32-build: + image: arm32v7/debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + + +debian-stretch-arm64-build: + image: arm64v8/debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - cd build + - cmake .. + - make -j2 + - make install + debian-buster-build: image: debian:buster-slim From c9f519151fd38a4d0e0763ad14ed52704ab03e03 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 22:35:38 +0100 Subject: [PATCH 016/194] Remove ARM architectures --- .gitlab-ci.yml | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 355f10550..bf195908a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,6 +31,7 @@ debian-stretch-amd64-build: - make -j2 - make install + debian-stretch-i386-build: image: i386/debian:9.3-slim stage: build @@ -43,30 +44,6 @@ debian-stretch-i386-build: - make install -debian-stretch-arm32-build: - image: arm32v7/debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - cd build - - cmake .. - - make -j2 - - make install - - -debian-stretch-arm64-build: - image: arm64v8/debian:9.3-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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - - cd build - - cmake .. - - make -j2 - - make install - - debian-buster-build: image: debian:buster-slim stage: build @@ -102,6 +79,7 @@ ubuntu-18.04-build: - make -j2 - make install + # Stage "test" run-test: image: debian:9.3-slim From d098a56ca6a026bde9c17dcaa01d53cf2dc1a2c1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 23:48:17 +0100 Subject: [PATCH 017/194] Add Docker image build --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf195908a..57d40c9cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,6 +79,20 @@ ubuntu-18.04-build: - make -j2 - make install +docker-gnsssdr: + image: docker:latest + services: + - docker:dind + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - mkdir docker-build + - cd docker-build + - git clone https://github.com/carlesfernandez/docker-gnsssdr + - cd docker-gnsssdr + - docker build -t --pull carlesfernandez/docker-gnsssdr . + - docker push "$CI_REGISTRY_IMAGE" + # Stage "test" run-test: From 654ce90d0be8aed1d7fca378484c43345b0680b5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 23:49:48 +0100 Subject: [PATCH 018/194] Add Docker image build --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57d40c9cd..5bfcd7e48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,6 +81,7 @@ ubuntu-18.04-build: docker-gnsssdr: image: docker:latest + stage: build services: - docker:dind before_script: From a6135c449991590ef5689909cacdeb8f18809fd7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 9 Feb 2018 23:52:26 +0100 Subject: [PATCH 019/194] Fix Docker image build --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bfcd7e48..20095bd1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,6 +87,8 @@ docker-gnsssdr: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: + - apt-get update + - apt-get install -y --no-install-recommends git - mkdir docker-build - cd docker-build - git clone https://github.com/carlesfernandez/docker-gnsssdr From 6d881c3ac10256214f68f589a3992a7e8159ce3b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 00:39:25 +0100 Subject: [PATCH 020/194] Fix Docker image build --- .gitlab-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20095bd1d..1e120854d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,6 +79,7 @@ ubuntu-18.04-build: - make -j2 - make install + docker-gnsssdr: image: docker:latest stage: build @@ -87,13 +88,9 @@ docker-gnsssdr: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - apt-get update - - apt-get install -y --no-install-recommends git - mkdir docker-build - cd docker-build - - git clone https://github.com/carlesfernandez/docker-gnsssdr - - cd docker-gnsssdr - - docker build -t --pull carlesfernandez/docker-gnsssdr . + - docker build -t --pull carlesfernandez/docker-gnsssdr github.com/carlesfernandez/docker-gnsssdr - docker push "$CI_REGISTRY_IMAGE" From 918f11c34546ff892c102266c2fd9bb1614ea279 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 00:43:45 +0100 Subject: [PATCH 021/194] Fix Docker image build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e120854d..9208f61b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,7 +90,7 @@ docker-gnsssdr: script: - mkdir docker-build - cd docker-build - - docker build -t --pull carlesfernandez/docker-gnsssdr github.com/carlesfernandez/docker-gnsssdr + - docker build -t carlesfernandez/docker-gnsssdr github.com/carlesfernandez/docker-gnsssdr - docker push "$CI_REGISTRY_IMAGE" From caebea5fd6cd3a2575b48c026cb2a851f4472945 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 00:57:17 +0100 Subject: [PATCH 022/194] Fix Docker image build --- .gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9208f61b8..a9b364f5c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,6 +80,18 @@ ubuntu-18.04-build: - make install +get-dockerfile: + image: debian:9.3-slim + stage: build + script: + - apt-get update + - apt-get install -y --no-install-recommends git + - git clone https://github.com/carlesfernandez/docker-gnsssdr + artifacts: + paths: + - docker-gnsssdr/ + + docker-gnsssdr: image: docker:latest stage: build @@ -90,8 +102,11 @@ docker-gnsssdr: script: - mkdir docker-build - cd docker-build - - docker build -t carlesfernandez/docker-gnsssdr github.com/carlesfernandez/docker-gnsssdr + - cp ../docker-gnsssdr/Dockerfile . + - docker build -t -pull carlesfernandez/docker-gnsssdr . - docker push "$CI_REGISTRY_IMAGE" + dependencies: + - get-dockerfile # Stage "test" From d035855be2b5b2c4e5f2fcdc9d676c866ff654e5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 00:59:41 +0100 Subject: [PATCH 023/194] Fix Docker image build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9b364f5c..f5dbe30ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,7 +94,7 @@ get-dockerfile: docker-gnsssdr: image: docker:latest - stage: build + stage: test services: - docker:dind before_script: From e196a83060a12cdea6a38698d77a0b0a68b0ca3b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 01:04:32 +0100 Subject: [PATCH 024/194] Fix Docker image build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5dbe30ad..b0db54f77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ get-dockerfile: stage: build script: - apt-get update - - apt-get install -y --no-install-recommends git + - apt-get install -y git ca-certificates - git clone https://github.com/carlesfernandez/docker-gnsssdr artifacts: paths: From bbec8b29d2f959d400b21d890eb5da297747ca67 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 01:36:19 +0100 Subject: [PATCH 025/194] Fix Docker image build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0db54f77..23131a922 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,7 +103,7 @@ docker-gnsssdr: - mkdir docker-build - cd docker-build - cp ../docker-gnsssdr/Dockerfile . - - docker build -t -pull carlesfernandez/docker-gnsssdr . + - docker build -t carlesfernandez/docker-gnsssdr . - docker push "$CI_REGISTRY_IMAGE" dependencies: - get-dockerfile From b601e80acd69cc6a3d67660ccf45f6f4ad2a83bb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 02:54:17 +0100 Subject: [PATCH 026/194] Move docker to deploy stage --- .gitlab-ci.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23131a922..bb08c384a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ before_script: stages: - build - test + - deploy # Stage "build" debian-jessie-build: @@ -92,23 +93,6 @@ get-dockerfile: - docker-gnsssdr/ -docker-gnsssdr: - image: docker:latest - stage: test - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - mkdir docker-build - - cd docker-build - - cp ../docker-gnsssdr/Dockerfile . - - docker build -t carlesfernandez/docker-gnsssdr . - - docker push "$CI_REGISTRY_IMAGE" - dependencies: - - get-dockerfile - - # Stage "test" run-test: image: debian:9.3-slim @@ -129,3 +113,21 @@ run-test: artifacts: paths: - build/*.xml + + +# Stage "deploy" +docker-gnsssdr: + image: docker:latest + stage: deploy + services: + - docker:dind + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - mkdir docker-build + - cd docker-build + - cp ../docker-gnsssdr/Dockerfile . + - docker build -t carlesfernandez/docker-gnsssdr . + - docker push carlesfernandez/docker-gnsssdr + dependencies: + - get-dockerfile From 2d64b30373c39c237c771f9e80c560b1703d70d4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 11:16:05 +0100 Subject: [PATCH 027/194] Try to push Docker image --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb08c384a..262086545 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,7 +122,7 @@ docker-gnsssdr: services: - docker:dind before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" script: - mkdir docker-build - cd docker-build From 03b134495bf18f6955227fb579c7b0301ffcf3f6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Feb 2018 14:41:11 +0100 Subject: [PATCH 028/194] Run tests in 64 and 32 bits architectures --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 262086545..35575b835 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,25 +94,48 @@ get-dockerfile: # Stage "test" -run-test: +run-test-amd64: image: debian:9.3-slim stage: test 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 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 .. - make -j2 - make check - ../install/run_tests --gtest_output=xml - - mv *.xml ../build/ + - mv *.xml ../build64/ - cd .. - rm -rf build-test artifacts: paths: - - build/*.xml + - build64/*.xml + + +run-test-i386: + image: i386/debian:9.3-slim + stage: test + 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 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 .. + - make -j2 + - make check + - ../install/run_tests --gtest_output=xml + - mv *.xml ../build32/ + - cd .. + - rm -rf build-test + + artifacts: + paths: + - build32/*.xml # Stage "deploy" From 42d71348c54f422ee916c7fc099b3c2d3294a370 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 Feb 2018 00:48:09 +0100 Subject: [PATCH 029/194] Fix tests in i386 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35575b835..bee091c65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,7 +125,7 @@ run-test-i386: - mkdir build-test - mkdir build32 - cd build-test - - cmake .. + - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - ../install/run_tests --gtest_output=xml From 54173ca5a8f14e6ac593699fa09c671f8160f79c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 Feb 2018 13:34:46 +0100 Subject: [PATCH 030/194] Give more informative names for jobs --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bee091c65..d76bb1393 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ stages: - deploy # Stage "build" -debian-jessie-build: +debian8.10: image: debian:8.10-slim stage: build script: @@ -21,7 +21,7 @@ debian-jessie-build: - make install -debian-stretch-amd64-build: +debian9.3-amd64: image: debian:9.3-slim stage: build script: @@ -33,7 +33,7 @@ debian-stretch-amd64-build: - make install -debian-stretch-i386-build: +debian9.3_i386: image: i386/debian:9.3-slim stage: build script: @@ -45,7 +45,7 @@ debian-stretch-i386-build: - make install -debian-buster-build: +debian-buster: image: debian:buster-slim stage: build script: From 244d17260c70bdce97daf8fe9fc1e58af64ce130 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 Feb 2018 13:51:32 +0100 Subject: [PATCH 031/194] Give more informative names for jobs --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d76bb1393..ecfdf2aad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ debian8.10: - make install -debian9.3-amd64: +debian9.3: image: debian:9.3-slim stage: build script: @@ -33,7 +33,7 @@ debian9.3-amd64: - make install -debian9.3_i386: +debian9.3-i386: image: i386/debian:9.3-slim stage: build script: @@ -45,7 +45,7 @@ debian9.3_i386: - make install -debian-buster: +debian10: image: debian:buster-slim stage: build script: @@ -57,7 +57,7 @@ debian-buster: - make install -ubuntu-16.04-build: +ubuntu16.04: image: ubuntu:xenial stage: build script: @@ -69,7 +69,7 @@ ubuntu-16.04-build: - make install -ubuntu-18.04-build: +ubuntu18.04: image: ubuntu:bionic stage: build script: @@ -94,7 +94,7 @@ get-dockerfile: # Stage "test" -run-test-amd64: +run-tests-amd64: image: debian:9.3-slim stage: test script: @@ -116,7 +116,7 @@ run-test-amd64: - build64/*.xml -run-test-i386: +run-tests-i386: image: i386/debian:9.3-slim stage: test script: From 7c43031edd96ccd635d5bce1b4ea4dae2da787d1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:04:18 +0100 Subject: [PATCH 032/194] Add Experiment job --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecfdf2aad..04eece2be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: - build - test - deploy +# - experiment # Stage "build" debian8.10: @@ -154,3 +155,24 @@ docker-gnsssdr: - docker push carlesfernandez/docker-gnsssdr dependencies: - get-dockerfile + + +# Stage "experiment" +run-experiment: + image: debian:9.3-slim + stage: build + script: + - apt-get update + # Grab analysis and representation tools + - apt-get octave + # Grab the data set + - apt-get install -y curl + - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz + - tar xvzf L2_signal_samples.tar.xz ./data/ + - cd data + - md5sum L2_signal_samples.dat > data.md5 + - md5sum -c data.md5 + + artifacts: + paths: + - data/*.dat From ecb57bc324a9dd42635b875da46baf0600f355c5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:07:12 +0100 Subject: [PATCH 033/194] Fix Experiment job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04eece2be..0e17958a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -164,7 +164,7 @@ run-experiment: script: - apt-get update # Grab analysis and representation tools - - apt-get octave + - apt-get install -y octave # Grab the data set - apt-get install -y curl - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz From f68ef5fb116efff66405b78736fad5741f1fdbda Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:13:47 +0100 Subject: [PATCH 034/194] Fix Experiment job --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e17958a4..d38cae1e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -164,6 +164,7 @@ run-experiment: script: - apt-get update # Grab analysis and representation tools + - apt-get install -y openjdk-8-jre-headless default-jre-headless ca-certificates-java - apt-get install -y octave # Grab the data set - apt-get install -y curl From 04e6cdcac715c3faf42b884c10d3e55c597d1eac Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:43:33 +0100 Subject: [PATCH 035/194] Fix Experiment job --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d38cae1e2..e909be7e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -163,6 +163,7 @@ run-experiment: stage: build script: - apt-get update + - apt-get upgrade # Grab analysis and representation tools - apt-get install -y openjdk-8-jre-headless default-jre-headless ca-certificates-java - apt-get install -y octave From 797b49f4bf8c95ffef48664f8e9bf62b31b082ea Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:45:05 +0100 Subject: [PATCH 036/194] Fix Experiment job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e909be7e3..aa0d1dd80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -163,7 +163,7 @@ run-experiment: stage: build script: - apt-get update - - apt-get upgrade + - apt-get upgrade -y # Grab analysis and representation tools - apt-get install -y openjdk-8-jre-headless default-jre-headless ca-certificates-java - apt-get install -y octave From 28b8dcf3d978042e5a0aaceeacfe40909e7c0b3e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:48:19 +0100 Subject: [PATCH 037/194] Fix Experiment job --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa0d1dd80..64c6a5784 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,6 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y openjdk-8-jre-headless default-jre-headless ca-certificates-java - apt-get install -y octave # Grab the data set - apt-get install -y curl From 329224ea23f4a75249d4fcd8f83c5f445597e5df Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 12:53:18 +0100 Subject: [PATCH 038/194] Put Experiment in a container --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64c6a5784..67609c870 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,7 +159,7 @@ docker-gnsssdr: # Stage "experiment" run-experiment: - image: debian:9.3-slim + image: carlesfernandez/docker-gnsssdr:latest stage: build script: - apt-get update From d68bcc184a1a2f58f312285ac1d39f6cc9d76caf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 13:01:46 +0100 Subject: [PATCH 039/194] Fix tar arguments --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67609c870..eee365fa3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,9 +167,9 @@ run-experiment: # Grab analysis and representation tools - apt-get install -y octave # Grab the data set - - apt-get install -y curl + - apt-get install -y curl xz-utils - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - - tar xvzf L2_signal_samples.tar.xz ./data/ + - tar xvfJ L2_signal_samples.tar.xz ./data/ - cd data - md5sum L2_signal_samples.dat > data.md5 - md5sum -c data.md5 From 1f33daa210db91eef5a159f6939782f12269fe91 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 13:08:38 +0100 Subject: [PATCH 040/194] Create data folder --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eee365fa3..ea64f9737 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,7 +167,8 @@ run-experiment: # Grab analysis and representation tools - apt-get install -y octave # Grab the data set - - apt-get install -y curl xz-utils + - mkdir data + - apt-get install -y curl - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - tar xvfJ L2_signal_samples.tar.xz ./data/ - cd data From 17dd8e162bcf375014c81396a719705bb6a89546 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 14:15:20 +0100 Subject: [PATCH 041/194] Fix tar parameters --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea64f9737..97c86df79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -167,11 +167,11 @@ run-experiment: # Grab analysis and representation tools - apt-get install -y octave # Grab the data set - - mkdir data - apt-get install -y curl - - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - - tar xvfJ L2_signal_samples.tar.xz ./data/ + - mkdir data - cd data + - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz + - tar xvfJ L2_signal_samples.tar.xz - md5sum L2_signal_samples.dat > data.md5 - md5sum -c data.md5 From 7d7cc02d8896bc377d957a873be04660d4daab69 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 14:19:29 +0100 Subject: [PATCH 042/194] Data folder already created --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97c86df79..b465ee315 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,7 +168,6 @@ run-experiment: - apt-get install -y octave # Grab the data set - apt-get install -y curl - - mkdir data - cd data - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - tar xvfJ L2_signal_samples.tar.xz From ba09ff8aa8df9e3e91c5f14548c71541b9f39b8c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 14:54:54 +0100 Subject: [PATCH 043/194] Test Octave figure generation --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b465ee315..c3569eb18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -173,7 +173,13 @@ run-experiment: - tar xvfJ L2_signal_samples.tar.xz - md5sum L2_signal_samples.dat > data.md5 - md5sum -c data.md5 - + - cd .. + # Execute the experiment + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-dpdflatexstandalone\"); " >> my_test_file.m + - octave my_test_file.m + - mkdir results + - cp results.pdf results/ + artifacts: paths: - - data/*.dat + - results/*.pdf From 91c907230c85bfdcd1dca0c26ce96b51ab844020 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 15:34:48 +0100 Subject: [PATCH 044/194] Add packages --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3569eb18..dd087ced4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,7 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y octave + - apt-get install -y octave epstool fig2dev # Grab the data set - apt-get install -y curl - cd data @@ -174,12 +174,12 @@ run-experiment: - md5sum L2_signal_samples.dat > data.md5 - md5sum -c data.md5 - cd .. - # Execute the experiment + # Execute the experiment (example) - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-dpdflatexstandalone\"); " >> my_test_file.m - octave my_test_file.m - mkdir results - cp results.pdf results/ - + artifacts: paths: - results/*.pdf From 851d9a99acbb74a6b541afa1aefac0016bc2b9c2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 15:39:21 +0100 Subject: [PATCH 045/194] Remove fig2dev --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd087ced4..37293628a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,7 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y octave epstool fig2dev + - apt-get install -y octave epstool # Grab the data set - apt-get install -y curl - cd data From 89b64623fe620c818e35dd568959191c414c44b1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 15:47:18 +0100 Subject: [PATCH 046/194] Add slang-xfig --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37293628a..02ac1151d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,7 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y octave epstool + - apt-get install -y octave epstool slang-xfig transfig # Grab the data set - apt-get install -y curl - cd data From 9a563f02cc40c272fef2e2e6e6145618f958b3aa Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 16:00:34 +0100 Subject: [PATCH 047/194] Use pdf option in octave --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02ac1151d..fe2510146 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,8 +175,8 @@ run-experiment: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-dpdflatexstandalone\"); " >> my_test_file.m - - octave my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-pdf\"); " >> my_test_file.m + - octave --no-gui my_test_file.m - mkdir results - cp results.pdf results/ From 4be7f08ce47e32315b657a97a5f8d75f3a255693 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 16:26:38 +0100 Subject: [PATCH 048/194] Use pdf device for printing --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe2510146..82c6e8762 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,7 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y octave epstool slang-xfig transfig + - apt-get install -y octave texlive-latex-base texlive-fonts-recommended texlive-latex-extra # Grab the data set - apt-get install -y curl - cd data @@ -175,7 +175,7 @@ run-experiment: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-pdf\"); " >> my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-dpdf\"); " > my_test_file.m - octave --no-gui my_test_file.m - mkdir results - cp results.pdf results/ From 27781d3c2b78c36b2559324473a991eb92c70616 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 17:27:05 +0100 Subject: [PATCH 049/194] Remove get-dockerfile job --- .gitlab-ci.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82c6e8762..8473d8cbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,18 +82,6 @@ ubuntu18.04: - make install -get-dockerfile: - image: debian:9.3-slim - stage: build - script: - - apt-get update - - apt-get install -y git ca-certificates - - git clone https://github.com/carlesfernandez/docker-gnsssdr - artifacts: - paths: - - docker-gnsssdr/ - - # Stage "test" run-tests-amd64: image: debian:9.3-slim @@ -146,6 +134,9 @@ docker-gnsssdr: services: - docker:dind before_script: + - apt-get update + - apt-get install -y git ca-certificates + - git clone https://github.com/carlesfernandez/docker-gnsssdr - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" script: - mkdir docker-build @@ -153,8 +144,6 @@ docker-gnsssdr: - cp ../docker-gnsssdr/Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - docker push carlesfernandez/docker-gnsssdr - dependencies: - - get-dockerfile # Stage "experiment" @@ -165,7 +154,7 @@ run-experiment: - apt-get update - apt-get upgrade -y # Grab analysis and representation tools - - apt-get install -y octave texlive-latex-base texlive-fonts-recommended texlive-latex-extra + - apt-get install -y octave texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave # Grab the data set - apt-get install -y curl - cd data @@ -175,8 +164,9 @@ run-experiment: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.pdf\", \"-dpdf\"); " > my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-deps\"); " > my_test_file.m - octave --no-gui my_test_file.m + - epspdf results.eps results.pdf - mkdir results - cp results.pdf results/ From 71645b4e2405b263016de69e3967876b3242592e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 19:46:28 +0100 Subject: [PATCH 050/194] Minor fixes --- .gitlab-ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8473d8cbb..4299293ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,7 +83,7 @@ ubuntu18.04: # Stage "test" -run-tests-amd64: +run-tests: image: debian:9.3-slim stage: test script: @@ -133,12 +133,11 @@ docker-gnsssdr: stage: deploy services: - docker:dind - before_script: + script: - apt-get update - apt-get install -y git ca-certificates - git clone https://github.com/carlesfernandez/docker-gnsssdr - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - script: - mkdir docker-build - cd docker-build - cp ../docker-gnsssdr/Dockerfile . @@ -152,7 +151,6 @@ run-experiment: stage: build script: - apt-get update - - apt-get upgrade -y # Grab analysis and representation tools - apt-get install -y octave texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave # Grab the data set @@ -164,7 +162,7 @@ run-experiment: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\displaystyle\leftarrow x = {2\over\sqrt{\pi}}' '\int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-deps\"); " > my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\leftarrow x = {frac{2}{\sqrt{\pi}}} \int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir results From b38c4fd469931f603d776fbe814292edae7075ed Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 Feb 2018 23:03:28 +0100 Subject: [PATCH 051/194] Fix docker-gnsssdr job --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4299293ff..4c9fc1a3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,9 +134,7 @@ docker-gnsssdr: services: - docker:dind script: - - apt-get update - - apt-get install -y git ca-certificates - - git clone https://github.com/carlesfernandez/docker-gnsssdr + - wget https://github.com/carlesfernandez/docker-gnsssdr/blob/master/Dockerfile - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - mkdir docker-build - cd docker-build From 991ecb8f370b0439abb57978d9cab5a2a4fe63a5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 08:33:48 +0100 Subject: [PATCH 052/194] Fix docker deployment --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c9fc1a3b..8d17c6b86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,7 +138,7 @@ docker-gnsssdr: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - mkdir docker-build - cd docker-build - - cp ../docker-gnsssdr/Dockerfile . + - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - docker push carlesfernandez/docker-gnsssdr @@ -160,7 +160,7 @@ run-experiment: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$\leftarrow x = {frac{2}{\sqrt{\pi}}} \int_{0}^{x}e^{-t^2} dt = 0.6175$']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir results From 11c8134eb40533e1f067c36a812fd40dd209206d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 11:07:35 +0100 Subject: [PATCH 053/194] Fix docker-gnsssdr job --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d17c6b86..d64a444e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,13 +134,16 @@ docker-gnsssdr: services: - docker:dind script: - - wget https://github.com/carlesfernandez/docker-gnsssdr/blob/master/Dockerfile + - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 # Stage "experiment" @@ -150,7 +153,7 @@ run-experiment: script: - apt-get update # Grab analysis and representation tools - - apt-get install -y octave texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave + - apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave # Grab the data set - apt-get install -y curl - cd data From dcfca027f4c802fd384bb507a0790af9cd5508fd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 11:31:48 +0100 Subject: [PATCH 054/194] Create a Docker image for the experiment --- .gitlab-ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d64a444e0..00a2b1ab9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -146,10 +146,26 @@ docker-gnsssdr: allow_failure: true +docker-experiment: + image: docker:latest + stage: deploy + services: + - docker:dind + script: + - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + - mkdir docker-build + - cd docker-build + - cp ../Dockerfile . + - docker build -t carlesfernandez/docker-gnsssdr . + - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:test + - docker push carlesfernandez/docker-gnsssdr:test + + # Stage "experiment" run-experiment: - image: carlesfernandez/docker-gnsssdr:latest - stage: build + image: carlesfernandez/docker-gnsssdr:test + stage: experiment script: - apt-get update # Grab analysis and representation tools From 0b5bbce2eaea36cc2ed06dc11ff76ce219c7a1f8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 11:33:01 +0100 Subject: [PATCH 055/194] Create experiment stage --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00a2b1ab9..6e7e1f074 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: - build - test - deploy -# - experiment + - experiment # Stage "build" debian8.10: From d3824154dcbb0db44611cfea9cd2292913e2e649 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 12:56:39 +0100 Subject: [PATCH 056/194] Put experiment name in a variable, so the system can be extended easily to more experiments --- .gitlab-ci.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e7e1f074..43c00e4d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,9 @@ before_script: - source /etc/profile +variables: + EXPERIMENT_NAME: "ieee-access18" + # Defines stages which are to be executed stages: - build @@ -146,7 +149,7 @@ docker-gnsssdr: allow_failure: true -docker-experiment: +docker-$EXPERIMENT_NAME: image: docker:latest stage: deploy services: @@ -158,13 +161,13 @@ docker-experiment: - cd docker-build - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:test - - docker push carlesfernandez/docker-gnsssdr:test + - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME + - docker push carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME # Stage "experiment" -run-experiment: - image: carlesfernandez/docker-gnsssdr:test +run-$EXPERIMENT_NAME: + image: carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME stage: experiment script: - apt-get update @@ -182,9 +185,9 @@ run-experiment: - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - - mkdir results - - cp results.pdf results/ + - mkdir $EXPERIMENT_NAME + - cp results.pdf $EXPERIMENT_NAME/ artifacts: paths: - - results/*.pdf + - $EXPERIMENT_NAME/*.pdf From aed04c1550329c1a2a8084035ae9b5012613df63 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 13:02:07 +0100 Subject: [PATCH 057/194] Assign experiment name to job name --- .gitlab-ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43c00e4d7..1696f420e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,6 @@ before_script: - source /etc/profile -variables: - EXPERIMENT_NAME: "ieee-access18" - # Defines stages which are to be executed stages: - build @@ -149,7 +146,7 @@ docker-gnsssdr: allow_failure: true -docker-$EXPERIMENT_NAME: +docker-ieee-access18: image: docker:latest stage: deploy services: @@ -161,13 +158,13 @@ docker-$EXPERIMENT_NAME: - cd docker-build - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME - - docker push carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME + - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:ieee-access18 + - docker push carlesfernandez/docker-gnsssdr:ieee-access18 # Stage "experiment" -run-$EXPERIMENT_NAME: - image: carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME +run-ieee-access18: + image: carlesfernandez/docker-gnsssdr:ieee-access18 stage: experiment script: - apt-get update @@ -185,9 +182,9 @@ run-$EXPERIMENT_NAME: - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - - mkdir $EXPERIMENT_NAME - - cp results.pdf $EXPERIMENT_NAME/ + - mkdir ieee-access18 + - cp results.pdf ieee-access18/ artifacts: paths: - - $EXPERIMENT_NAME/*.pdf + - ieee-access18/*.pdf From 8c71d2150f3ff83edb839251d4c0c9d82647142f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 13:04:20 +0100 Subject: [PATCH 058/194] Shorten job names --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1696f420e..b865e2c2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -146,7 +146,7 @@ docker-gnsssdr: allow_failure: true -docker-ieee-access18: +docker-access18: image: docker:latest stage: deploy services: @@ -158,13 +158,13 @@ docker-ieee-access18: - cd docker-build - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:ieee-access18 - - docker push carlesfernandez/docker-gnsssdr:ieee-access18 + - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:access18 + - docker push carlesfernandez/docker-gnsssdr:access18 # Stage "experiment" -run-ieee-access18: - image: carlesfernandez/docker-gnsssdr:ieee-access18 +run-access18: + image: carlesfernandez/docker-gnsssdr:access18 stage: experiment script: - apt-get update @@ -182,9 +182,9 @@ run-ieee-access18: - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - - mkdir ieee-access18 - - cp results.pdf ieee-access18/ + - mkdir access18 + - cp results.pdf access18/ artifacts: paths: - - ieee-access18/*.pdf + - access18/*.pdf From 136f3d22c278fda653c0fe752036080c5b66431f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 19:18:35 +0100 Subject: [PATCH 059/194] Produce publishing-quality figure --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b865e2c2d..d6bfbf01f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,7 +165,7 @@ docker-access18: # Stage "experiment" run-access18: image: carlesfernandez/docker-gnsssdr:access18 - stage: experiment + stage: build script: - apt-get update # Grab analysis and representation tools @@ -179,7 +179,7 @@ run-access18: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir access18 From 57fc370ffad5b9063aedbce788c3c05525647de4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 Feb 2018 22:01:09 +0100 Subject: [PATCH 060/194] Add docker-pybombs-gnsssdr job and file header. Try to meake it usable for other users --- .gitlab-ci.yml | 87 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6bfbf01f..d7c9ef1f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,59 @@ +# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab +# +# Useful links: +# Website: http://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 +# +# CI_REGISTRY_USER <- Leave it blank +# CI_REGISTRY_PASWORD <- Leave it blank +# DOCKER_HUB_USER +# DOCKER_HUB_REPO +# DOCKER_HUB_PASSWORD +# +# For instance, my settings are: +# CI_REGISTRY_USER = carlesfernandez +# CI_REGISTRY_PASWORD = ******************** +# DOCKER_HUB_USER = carlesfernandez +# DOCKER_HUB_REPO = docker-gnsssdr +# DOCKER_HUB_PASSWORD = ******************** +# +# If you want to make changes in the source code, please 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. You can also change the +# DOCKERFILE_URL variable below if your changes in the source code require extra +# packages or build steps. +# +# 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 + +variables: + DOCKERFILE_URL: "https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile" + + # Is performed before the scripts in the stages step before_script: - source /etc/profile + # Defines stages which are to be executed stages: - build @@ -9,6 +61,7 @@ stages: - deploy - experiment + # Stage "build" debian8.10: image: debian:8.10-slim @@ -146,25 +199,43 @@ docker-gnsssdr: 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 "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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: - - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + - wget $DOCKERFILE_URL + - 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 tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:access18 - - docker push carlesfernandez/docker-gnsssdr:access18 + - 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 # Stage "experiment" run-access18: - image: carlesfernandez/docker-gnsssdr:access18 + image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 stage: build script: - apt-get update @@ -175,11 +246,11 @@ run-access18: - cd data - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz - tar xvfJ L2_signal_samples.tar.xz - - md5sum L2_signal_samples.dat > data.md5 + - echo "2090ad3dfb3f461314252a1e6243d714 L2_signal_samples.tar.xz" > data.md5 - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175 ']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir access18 From cbb2498dc4697392c7eb721298a7fffec720bb8c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 10:45:41 +0100 Subject: [PATCH 061/194] Move acces18 job to experiment stage --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7c9ef1f3..74af41981 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -236,7 +236,7 @@ docker-access18: # Stage "experiment" run-access18: image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 - stage: build + stage: experiment script: - apt-get update # Grab analysis and representation tools @@ -250,7 +250,8 @@ run-access18: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175 ']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m + - run_tests --gtest_filter==Multi* + - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir access18 From 306129380d8c29d8e20bd579efa6cbdfd5071b2c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 13:19:30 +0100 Subject: [PATCH 062/194] Build this specific branch for the experiment --- .gitlab-ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74af41981..ee72b6290 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,9 +33,7 @@ # # If you want to make changes in the source code, please 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. You can also change the -# DOCKERFILE_URL variable below if your changes in the source code require extra -# packages or build steps. +# file at the 'deploy' and 'experiment' stages. # # 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. @@ -45,11 +43,8 @@ # # (C) Carles Fernandez-Prades, 2018 cfernandez@cttc.cat -variables: - DOCKERFILE_URL: "https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile" - -# Is performed before the scripts in the stages step +# This is performed before the scripts in the stages step before_script: - source /etc/profile @@ -219,15 +214,14 @@ docker-pybombs-gnsssdr: docker-access18: image: docker:latest - stage: deploy + stage: build services: - docker:dind script: - - wget $DOCKERFILE_URL - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - mkdir docker-build - cd docker-build - - cp ../Dockerfile . + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > 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:access18 - docker push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18 From ccd12b4e26662218e87fa137784790ec506f96a0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 13:29:56 +0100 Subject: [PATCH 063/194] Fix access18 job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee72b6290..b47f4dd8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -218,10 +218,10 @@ docker-access18: services: - docker:dind script: - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - mkdir docker-build - cd docker-build - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From c074d2a199ab1ac2677f9b11a562792a34480751 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 13:36:13 +0100 Subject: [PATCH 064/194] Fix access18 job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b47f4dd8c..9a16b3671 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -221,7 +221,7 @@ docker-access18: - mkdir docker-build - cd docker-build - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - 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 From ba45425f10ffbebdd808eca686dddbbbf034b5d2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 13:42:29 +0100 Subject: [PATCH 065/194] Fix access18 job --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a16b3671..707c7cacf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,8 +220,9 @@ docker-access18: script: - mkdir docker-build - cd docker-build + - echo "$DOCKER_HUB_USER" - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p $DOCKER_HUB_PASSWORD + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" hub.docker.com/r/$DOCKER_HUB_USER/docker-gnsssdr/ - 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 From 349434bb2f5b5b2502420a7b0fa95a5d48bf350b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 13:45:57 +0100 Subject: [PATCH 066/194] Fix access18 job again --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 707c7cacf..69a96b81e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,7 +222,7 @@ docker-access18: - cd docker-build - echo "$DOCKER_HUB_USER" - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile - - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" hub.docker.com/r/$DOCKER_HUB_USER/docker-gnsssdr/ + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 From 9d346145691aaad4464a599ae8c9ae74b10b70c5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 14:07:59 +0100 Subject: [PATCH 067/194] Fix access18 job again --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69a96b81e..648333653 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,7 +220,6 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo "$DOCKER_HUB_USER" - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO . From 21ebefe57d484d233556ba24568790a4090b3bf9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 14:10:04 +0100 Subject: [PATCH 068/194] Fix access18 job again --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 648333653..b47f4dd8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -221,7 +221,7 @@ docker-access18: - mkdir docker-build - cd docker-build - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + - 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 From 130e0fd43f65b4bef73fcf808ad3b07c64a825ec Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 14:20:37 +0100 Subject: [PATCH 069/194] Fix access18 job again --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b47f4dd8c..7cf58c65e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,9 @@ # 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: # CI_REGISTRY_USER = carlesfernandez # CI_REGISTRY_PASWORD = ******************** @@ -220,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr.git \nRUN cd gnss-sdr\nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 57ffe33fb3ff70003577d5f9b2bc46f472c1c4e2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 14:31:53 +0100 Subject: [PATCH 070/194] Fix access18 job again --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7cf58c65e..62c291729 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr.git \nRUN cd gnss-sdr\nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From e39d05e476ca73642d48cfa6a51a6219bda44007 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 16:58:33 +0100 Subject: [PATCH 071/194] Another try --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62c291729..a75d8010b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUNls -l .git\n\RUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 448e5331888acf017edf5db8a6b2e083ce9f6974 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:00:21 +0100 Subject: [PATCH 072/194] Another try --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a75d8010b..6811b0166 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUNls -l .git\n\RUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN ls -l .git\n\RUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 340587df118f4cd46c095da0edcebe8c872b000f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:01:22 +0100 Subject: [PATCH 073/194] Another try --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6811b0166..fed886523 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN ls -l .git\n\RUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN ls -l .git\nRUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 85b1a891e8c3441dca55e0e1049e75dc4f9303c2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:26:55 +0100 Subject: [PATCH 074/194] Another try --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fed886523..11d0e25e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL \nRUN cd gnss-sdr\nRUN ls -l .git\nRUN chown $CI_REGISTRY_USER -R .git \nRUN git checkout $CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From bba697a955d112ca9fea2d4e1319e75f2350ab88 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:35:12 +0100 Subject: [PATCH 075/194] Add wget --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11d0e25e6..ae4438821 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 19123ffdb3f72e85d2dcc9fdb38ab65eda486f99 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:43:01 +0100 Subject: [PATCH 076/194] Fix user --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae4438821..3ac616331 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,6 @@ # at GitLab and set up the following secret variables. In the left panel: # Settings > CI / CD > Secret variables # -# CI_REGISTRY_USER <- Leave it blank -# CI_REGISTRY_PASWORD <- Leave it blank # DOCKER_HUB_USER # DOCKER_HUB_REPO # DOCKER_HUB_PASSWORD @@ -28,8 +26,6 @@ # unproctected. # # For instance, my settings are: -# CI_REGISTRY_USER = carlesfernandez -# CI_REGISTRY_PASWORD = ******************** # DOCKER_HUB_USER = carlesfernandez # DOCKER_HUB_REPO = docker-gnsssdr # DOCKER_HUB_PASSWORD = ******************** @@ -223,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$CI_REGISTRY_USER/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_ID/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 875234f8d7a7bcba59be2488259e0568887e814c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 17:51:30 +0100 Subject: [PATCH 077/194] Fix user --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3ac616331..9cad16028 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_ID/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 472de0ec2e6bbadfea62c0b79f4d0779c07e3e0a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 18:01:55 +0100 Subject: [PATCH 078/194] Fix user --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9cad16028..f86527682 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\n\RUN mkdir build\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 3fa959355da619d60753a767ec59181cc66fe870 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 18:05:16 +0100 Subject: [PATCH 079/194] Fix user --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f86527682..b68e11b9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\n\RUN mkdir build\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN mkdir build\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 068b34bd19ea8ad863adedfd2983999047e941ea Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 18:14:45 +0100 Subject: [PATCH 080/194] Fix user --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b68e11b9a..6d6a331ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA\nRUN mkdir build\nRUN cd build\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 4b4592cfab795be7b3337c7f058ee828d94cfa37 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 18:24:20 +0100 Subject: [PATCH 081/194] Fix user --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d6a331ca..20c9e20be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 488f5eb3c919d186a5d876cf8633e37687f2d6d5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 23:33:29 +0100 Subject: [PATCH 082/194] Another test --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20c9e20be..d5ba9a622 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,8 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile +# - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile +- echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From a50068d4841451ad65b51feb9101bdf5798902d9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 23:35:36 +0100 Subject: [PATCH 083/194] Another test --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5ba9a622..99c00b2b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,8 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build -# - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN wget https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr/repository/$CI_COMMIT_REF_NAME/archive.tar.gz\nRUN tar xvzf archive.tar.gz\nRUN ls -la\nRUN cd gnss-sdr-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA/build && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile -- echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 9de82b4c81eadecda3fde94523e409b762943e3b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 Feb 2018 23:44:17 +0100 Subject: [PATCH 084/194] Fix test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99c00b2b7..c38241455 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -219,7 +219,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex wget && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 618f4ce1993ca4fbc46fadd47b192c9289765607 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 17 Feb 2018 01:10:31 +0100 Subject: [PATCH 085/194] Move job to deploy stage --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c38241455..0e7a4aaf4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,9 +30,10 @@ # DOCKER_HUB_REPO = docker-gnsssdr # DOCKER_HUB_PASSWORD = ******************** # -# If you want to make changes in the source code, please 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. +# 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. @@ -213,7 +214,7 @@ docker-pybombs-gnsssdr: docker-access18: image: docker:latest - stage: build + stage: deploy services: - docker:dind script: From b249a5afc6a364fbc316cdd288a6fee96b953c73 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 17 Feb 2018 11:17:54 +0100 Subject: [PATCH 086/194] Add Coverity Scan job, set to manual --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e7a4aaf4..bfc57f6bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,26 @@ ubuntu18.04: - make install +coverity-scan: + image: ubuntu:xenial + stage: build + script: + - apt-get update + - wget -O ./cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --post-data "project=$COVERITY_SCAN_USER%2Fgnss-sdr&token=$COVERITY_SCAN_TOKEN" + - wget -O coverity_tool.md5 https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_USER%2Fgnss-sdr&md5=1" + - md5sum -c coverity_tool.md5 + - 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 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 .. + - 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: image: debian:9.3-slim From 04bcc2f8b65b891ec98e5f679af1802337bdc362 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 17 Feb 2018 12:25:17 +0100 Subject: [PATCH 087/194] Add wget to Coverity Scan job --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bfc57f6bb..871de61ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,6 +135,7 @@ coverity-scan: stage: build script: - apt-get update + - apt-get install -y wget - wget -O ./cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --post-data "project=$COVERITY_SCAN_USER%2Fgnss-sdr&token=$COVERITY_SCAN_TOKEN" - wget -O coverity_tool.md5 https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_USER%2Fgnss-sdr&md5=1" - md5sum -c coverity_tool.md5 From e35f05c2bf3d6a92aea7eff58f1759a2ac86f30d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 17 Feb 2018 15:05:20 +0100 Subject: [PATCH 088/194] Remove md5 check for Coverity Scan --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 871de61ea..0a86ab4da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,8 +137,6 @@ coverity-scan: - apt-get update - apt-get install -y wget - wget -O ./cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --post-data "project=$COVERITY_SCAN_USER%2Fgnss-sdr&token=$COVERITY_SCAN_TOKEN" - - wget -O coverity_tool.md5 https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_USER%2Fgnss-sdr&md5=1" - - md5sum -c coverity_tool.md5 - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev From cd6d579b2656261505d7d2c37501a9c4bf579e86 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 17 Feb 2018 15:39:59 +0100 Subject: [PATCH 089/194] Add curl for Coverity Scan submission --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a86ab4da..c783f8b1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,7 +135,7 @@ coverity-scan: stage: build script: - apt-get update - - apt-get install -y wget + - 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 From 01c339101b835cbd5c2ed1cfe9c9f23ff417cdaf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 Feb 2018 19:53:03 +0100 Subject: [PATCH 090/194] Include representation tools in experiment container --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c783f8b1f..7b4c6e9bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -239,7 +239,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 @@ -252,8 +252,6 @@ run-access18: stage: experiment script: - apt-get update - # Grab analysis and representation tools - - apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave # Grab the data set - apt-get install -y curl - cd data From dee303883301f9f339dce2343a83c131163304dd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 17:56:14 +0100 Subject: [PATCH 091/194] Add Fedora and ArchLinux build jobs --- .gitlab-ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b4c6e9bf..7677a8b4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,6 +130,65 @@ ubuntu18.04: - make install +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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake .. + - make -j2 + - make check + - make install + + +fedora27: + image: fedora:27 + 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake .. + - make -j2 + - make check + - make install + + +fedora-rawhide: + image: fedora:rawhide + stage: build + before_script: + - source ~/.bash_profile + script: + - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake .. + - make -j2 + - make check + - make install + allow_failure: true + + +archlinux: + image: base/devel:latest + stage: build + before_script: + - pwd + script: + - pacman -Syu + - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest + - cd build + - cmake -DENABLE_OSMOSDR=ON .. + - make -j2 + - make check + - make install + allow_failure: true + + coverity-scan: image: ubuntu:xenial stage: build From e88574255e4f5dc9f1e457d50a53a3ded228117b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 23 Feb 2018 22:20:35 +0100 Subject: [PATCH 092/194] Add CentOS --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7677a8b4b..f2fadac7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -189,6 +189,23 @@ archlinux: 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 cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - cd build + - cmake .. + - make -j2 + - make check + - make install + + coverity-scan: image: ubuntu:xenial stage: build From 7f87e4cc98a440e8c8badec49474ec2c49f53b5e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 00:57:12 +0100 Subject: [PATCH 093/194] Add Ubuntu 14.04 --- .gitlab-ci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2fadac7c..45986c799 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,6 +67,7 @@ debian8.10: - cd build - cmake .. - make -j2 + - make check - make install @@ -79,6 +80,7 @@ debian9.3: - cd build - cmake .. - make -j2 + - make check - make install @@ -91,6 +93,7 @@ debian9.3-i386: - cd build - cmake .. - make -j2 + - make check - make install @@ -103,6 +106,26 @@ debian10: - cd build - cmake .. - make -j2 + - make check + - make install + + + +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 + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libtool automake libhdf5-dev libgtest-dev + - cd build + - cmake .. + - make -j2 + - make check - make install @@ -115,6 +138,7 @@ ubuntu16.04: - cd build - cmake .. - make -j2 + - make check - make install @@ -127,6 +151,7 @@ ubuntu18.04: - cd build - cmake .. - make -j2 + - make check - make install @@ -198,7 +223,7 @@ centos7: - 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 cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - yum install -y make automake gcc gcc-c++ kernel-devel libtool automake hdf5-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - cmake .. - make -j2 From 45dfe6fc6f1554c85f57228eade25f03c00e9840 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 01:41:47 +0100 Subject: [PATCH 094/194] Fix Debian 8 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 45986c799..586ed4d94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,7 +63,7 @@ debian8.10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake .. - make -j2 @@ -121,7 +121,7 @@ ubuntu14.04: - apt-get install -y software-properties-common - add-apt-repository -y ppa:myriadrf/gnuradio - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libtool automake libhdf5-dev libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake .. - make -j2 From 406b6bd90d5612884d4387b432f122480247775e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 02:04:08 +0100 Subject: [PATCH 095/194] Fix Arch Linux --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 586ed4d94..b34f4c3ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,7 +110,6 @@ debian10: - make install - ubuntu14.04: image: ubuntu:trusty stage: build @@ -204,7 +203,6 @@ archlinux: before_script: - pwd script: - - pacman -Syu - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON .. From 4c171927ec2345d7db09c08e106b6e1b4950399d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 02:08:15 +0100 Subject: [PATCH 096/194] Fix Arch Linux --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b34f4c3ad..69890db48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -203,6 +203,7 @@ archlinux: before_script: - pwd script: + - pacman -Syu - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON .. From f766f6eff4a2a73d960d695f183b3e8c9c54a578 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 02:25:38 +0100 Subject: [PATCH 097/194] Fix Debian 8 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69890db48..eb78b242e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,7 +63,7 @@ debian8.10: stage: build script: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake .. - make -j2 From 1ed36c2394826580072b711dbf674f417023aef2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 02:50:49 +0100 Subject: [PATCH 098/194] Fix Arch Linux --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb78b242e..3f7e98249 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -203,7 +203,7 @@ archlinux: before_script: - pwd script: - - pacman -Syu + - pacman -Syu --noconfirm - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON .. From 069f1cb1b68bb2c95de6bf97dbd757f727262383 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 03:23:55 +0100 Subject: [PATCH 099/194] Fix Debian9.3-i386 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f7e98249..a0a5dfb9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,7 +91,7 @@ debian9.3-i386: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - cd build - - cmake .. + - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - make install From c37d10c8f7e67b9d919ae3dfff6aff70b682f9fb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 10:20:47 +0100 Subject: [PATCH 100/194] Add gr-osmosdr-devel to Fedora packages --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0a5dfb9e..afdc793e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -160,9 +160,9 @@ fedora26: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -174,9 +174,9 @@ fedora27: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -188,9 +188,9 @@ fedora-rawhide: before_script: - source ~/.bash_profile script: - - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install From 81b14c31bee11b58814459f9b3345a5f73e31195 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 11:16:30 +0100 Subject: [PATCH 101/194] Add gr-osmosdr package --- .gitlab-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index afdc793e0..1790bdc11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,9 +63,9 @@ debian8.10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -102,9 +102,9 @@ debian10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - cd build - - cmake .. + - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - make install @@ -133,9 +133,9 @@ ubuntu16.04: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. + - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - make install @@ -146,9 +146,9 @@ ubuntu18.04: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - cd build - - cmake .. + - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - make install @@ -222,9 +222,9 @@ centos7: - 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 automake hdf5-devel cmake git boost-devel boost-date-time boost-system boost-filesystem boost-thread boost-chrono boost-serialization log4cpp-devel gnuradio-devel blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six + - yum install -y make automake gcc gcc-c++ kernel-devel libtool automake 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install From 7822227888ad8adc8688d6f66b8f7cb911cbafcd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 11:23:41 +0100 Subject: [PATCH 102/194] Add gr-osmosdr option to Coverity Scan --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1790bdc11..e953a3e7b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -239,9 +239,9 @@ coverity-scan: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. + - cmake -DENABLE_OSMOSDR=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 From d44fc6f93564a891788d6185507180e0fff483ac Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 14:34:18 +0100 Subject: [PATCH 103/194] Add system tests to the test stage --- .gitlab-ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e953a3e7b..771b47648 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,21 +255,25 @@ run-tests: stage: test 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. + - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - make -j2 - - make check + # 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: @@ -277,21 +281,25 @@ run-tests-i386: stage: test 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. + - cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - make -j2 - - make check + # 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 # Stage "deploy" From 2dcdb912f41d2fce9c7c8a13ad59c81e01212836 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 16:16:47 +0100 Subject: [PATCH 104/194] Fix run-access18 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 771b47648..9acbae685 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -347,7 +347,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/$GITLAB_USER_LOGIN/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 5bd0abe8b80e0056e91b4e51d207ea74239a5b7c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 24 Feb 2018 16:33:33 +0100 Subject: [PATCH 105/194] Fix typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9acbae685..a0ac8be16 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -369,7 +369,7 @@ run-access18: - md5sum -c data.md5 - cd .. # Execute the experiment (example) - - run_tests --gtest_filter==Multi* + - run_tests --gtest_filter=Multi* - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf From a0ad77da5547461f8dcc58e55141bf035d523c36 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Feb 2018 14:46:38 +0100 Subject: [PATCH 106/194] Enable OsmoSDR where possible in build jobs --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0ac8be16..60856eb83 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,9 +76,9 @@ debian9.3: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest - cd build - - cmake .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -89,9 +89,9 @@ debian9.3-i386: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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_PACKAGING=ON .. + - cmake -DENABLE_PACKAGING=ON -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -104,7 +104,7 @@ debian10: - 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 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_PACKAGING=ON .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -135,7 +135,7 @@ ubuntu16.04: - 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 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_PACKAGING=ON .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install @@ -148,7 +148,7 @@ ubuntu18.04: - 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 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_PACKAGING=ON .. + - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - make check - make install From d5866c59b9b952481a774d1da9bec7aca1fe656a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 27 Feb 2018 18:12:32 +0100 Subject: [PATCH 107/194] Add curl --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60856eb83..632965446 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -347,7 +347,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\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 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 9e9c1d83288e04266517ee6da9cee9db0f7b56a8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 27 Feb 2018 21:06:26 +0100 Subject: [PATCH 108/194] Install recommends --- .gitlab-ci.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 632965446..6737a96ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -347,7 +347,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\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 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 @@ -362,19 +362,23 @@ run-access18: - apt-get update # Grab the data set - apt-get install -y curl - - cd data - - curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz + - 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 "2090ad3dfb3f461314252a1e6243d714 L2_signal_samples.tar.xz" > data.md5 + - echo "3a04c1eeb970776bb77f5e3b7eaff2df L2_signal_samples.tar.xz" > data.md5 - md5sum -c data.md5 - cd .. - # Execute the experiment (example) - - run_tests --gtest_filter=Multi* - - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - - octave --no-gui my_test_file.m - - epspdf results.eps results.pdf + # 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 results.pdf access18/ + - cp exp-access18/*.pdf access18/ artifacts: paths: From 0bddcd6fdfe0be74b245685ec9931731dbd22e9e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 27 Feb 2018 21:42:18 +0100 Subject: [PATCH 109/194] Add glog-devel and gflags-devel to CentOS --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6737a96ff..e5775fd8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,7 +222,7 @@ centos7: - 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 automake 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six + - yum install -y make automake gcc gcc-c++ kernel-devel libtool automake 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-develgnutls-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 From ba993c965d1554d778231a7e7fd021f0e8449600 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 13:21:00 +0100 Subject: [PATCH 110/194] Add epspdf to access18 image --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5775fd8c..63d4a52a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -347,7 +347,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-fonts-utils epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 @@ -361,7 +361,6 @@ run-access18: script: - apt-get update # Grab the data set - - apt-get install -y curl - 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 From 6ce5b83d47970fe1baeb356fc501bff79264ac31 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 14:33:53 +0100 Subject: [PATCH 111/194] Fix Cent OS --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63d4a52a2..41aea2d7d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,7 +222,7 @@ centos7: - 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 automake 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-develgnutls-devel openssl-devel python-mako python-six + - yum install -y make automake gcc gcc-c++ kernel-devel libtool automake 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 From a984f03ee57942d13ce31e7c9d4a9b08ebadfcfa Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 15:07:42 +0100 Subject: [PATCH 112/194] Allow Ubuntu 18.04 failure --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41aea2d7d..139bf3a7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,6 +152,7 @@ ubuntu18.04: - make -j2 - make check - make install + allow_failure: true fedora26: From 33d3b460ef468bfa92ca3a3528bb53ebf290c37e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 16:20:38 +0100 Subject: [PATCH 113/194] Allow Ubuntu 16.04 failure --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 139bf3a7c..a7cf36e2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,6 +139,7 @@ ubuntu16.04: - make -j2 - make check - make install + allow_failure: true ubuntu18.04: From fd0730d06107534d675adf45aa62e80cde774f7f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 Feb 2018 19:07:30 +0100 Subject: [PATCH 114/194] Fix typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7cf36e2c..be1a25acd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,7 +349,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-fonts-utils epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 519a502def15ec6296e96c460b2a2ab65f47e163 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 10:23:55 +0100 Subject: [PATCH 115/194] More fixes --- .gitlab-ci.yml | 4 ++-- .../{ieee-access => ieee-access18}/L2-access18.conf | 0 .../reproducibility/{ieee-access => ieee-access18}/README.md | 0 .../{ieee-access => ieee-access18}/plot_dump.m | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename src/utils/reproducibility/{ieee-access => ieee-access18}/L2-access18.conf (100%) rename src/utils/reproducibility/{ieee-access => ieee-access18}/README.md (100%) rename src/utils/reproducibility/{ieee-access => ieee-access18}/plot_dump.m (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60856eb83..8b974ae97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,7 +137,7 @@ ubuntu16.04: - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - - make check + # - make check - make install @@ -150,7 +150,7 @@ ubuntu18.04: - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - - make check + # - make check - make install diff --git a/src/utils/reproducibility/ieee-access/L2-access18.conf b/src/utils/reproducibility/ieee-access18/L2-access18.conf similarity index 100% rename from src/utils/reproducibility/ieee-access/L2-access18.conf rename to src/utils/reproducibility/ieee-access18/L2-access18.conf diff --git a/src/utils/reproducibility/ieee-access/README.md b/src/utils/reproducibility/ieee-access18/README.md similarity index 100% rename from src/utils/reproducibility/ieee-access/README.md rename to src/utils/reproducibility/ieee-access18/README.md diff --git a/src/utils/reproducibility/ieee-access/plot_dump.m b/src/utils/reproducibility/ieee-access18/plot_dump.m similarity index 100% rename from src/utils/reproducibility/ieee-access/plot_dump.m rename to src/utils/reproducibility/ieee-access18/plot_dump.m From a0d0e0b7ba009c4876c9b108122ed8f7c28c1e58 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 12:35:22 +0100 Subject: [PATCH 116/194] Add texlive-pictures package for epspdf --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8feb662f0..90c685d11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,7 +349,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From cb50d218d482dabe56181d9890ae4c3e333fa238 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 15:17:49 +0100 Subject: [PATCH 117/194] Enable make check in Ubuntu 16.04 and 18.04 --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90c685d11..c008c3f58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,7 +137,7 @@ ubuntu16.04: - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - # - make check + - make check - make install allow_failure: true @@ -151,7 +151,7 @@ ubuntu18.04: - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 - # - make check + - make check - make install allow_failure: true From 95d2a14390cc095a098bb1582637797cb3ed6460 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 17:37:07 +0100 Subject: [PATCH 118/194] Ubuntu 16.04 build is mandatory --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c008c3f58..60fa5f626 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,7 +139,6 @@ ubuntu16.04: - make -j2 - make check - make install - allow_failure: true ubuntu18.04: From 49408492fb208c757cbace8149633a8184216fcd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 1 Mar 2018 22:23:27 +0100 Subject: [PATCH 119/194] Remove repeated package --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60fa5f626..95b054f44 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ centos7: - 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 automake 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six + - 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - make -j2 From 01f8cec612046557ab4bdf0e79d62c6831d4312a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Mar 2018 09:58:48 +0100 Subject: [PATCH 120/194] Accelerate builds by detecting number of processors --- .gitlab-ci.yml | 56 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95b054f44..4ab84a2f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,9 @@ debian8.10: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -79,7 +81,9 @@ debian9.3: - 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 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 .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -92,7 +96,9 @@ debian9.3-i386: - 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 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_PACKAGING=ON -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -105,7 +111,9 @@ debian10: - 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 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 .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -123,7 +131,9 @@ ubuntu14.04: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -136,7 +146,9 @@ ubuntu16.04: - 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 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 .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -149,7 +161,9 @@ ubuntu18.04: - 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 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 .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install allow_failure: true @@ -164,7 +178,9 @@ fedora26: - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -178,7 +194,9 @@ fedora27: - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -192,7 +210,9 @@ fedora-rawhide: - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install allow_failure: true @@ -208,7 +228,9 @@ archlinux: - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install allow_failure: true @@ -226,7 +248,9 @@ centos7: - 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) - make check - make install @@ -261,7 +285,9 @@ run-tests: - mkdir build64 - cd build-test - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) # Execute Unit Tests - ../install/run_tests --gtest_output=xml - mv *.xml ../build64/ @@ -287,7 +313,9 @@ run-tests-i386: - mkdir build32 - cd build-test - cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - make -j2 + - grep -c ^processor /proc/cpuinfo + - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) # Execute Unit Tests - ../install/run_tests --gtest_output=xml - mv *.xml ../build32/ From f13e41f42d1986dfdf51f87f51910cf846e8dd32 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Mar 2018 10:36:22 +0100 Subject: [PATCH 121/194] Accelerate builds by detecting number of processors --- .gitlab-ci.yml | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ab84a2f5..474d38cf0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,8 +66,7 @@ debian8.10: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -81,8 +80,7 @@ debian9.3: - 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 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 .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -96,8 +94,7 @@ debian9.3-i386: - 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 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_PACKAGING=ON -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -111,8 +108,7 @@ debian10: - 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 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 .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -131,8 +127,7 @@ ubuntu14.04: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - cmake .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -146,8 +141,7 @@ ubuntu16.04: - 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 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 .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -161,8 +155,7 @@ ubuntu18.04: - 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 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 .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -178,8 +171,7 @@ fedora26: - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -194,8 +186,7 @@ fedora27: - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -210,8 +201,7 @@ fedora-rawhide: - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -228,8 +218,7 @@ archlinux: - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -248,8 +237,7 @@ centos7: - 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check - make install @@ -285,8 +273,7 @@ run-tests: - mkdir build64 - cd build-test - cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) # Execute Unit Tests - ../install/run_tests --gtest_output=xml @@ -313,8 +300,7 @@ run-tests-i386: - mkdir build32 - cd build-test - cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON .. - - grep -c ^processor /proc/cpuinfo - - export NPROC=$(grep -c ^processor /proc/cpuinfo) + - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) # Execute Unit Tests - ../install/run_tests --gtest_output=xml From 0fc1aff61c0a4f54aae6049e6a1825cff496844f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Mar 2018 10:42:57 +0100 Subject: [PATCH 122/194] Remove gnutls-devel --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 474d38cf0..3994f7ae4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,7 +168,7 @@ fedora26: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) @@ -183,7 +183,7 @@ fedora27: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) @@ -198,7 +198,7 @@ fedora-rawhide: before_script: - source ~/.bash_profile script: - - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel gnutls-devel openssl-devel python-mako python-six matio-devel + - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) @@ -234,7 +234,7 @@ centos7: - 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 blas-devel lapack-devel armadillo-devel gnutls-devel openssl-devel python-mako python-six + - 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 blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six - cd build - cmake -DENABLE_OSMOSDR=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From 010ede8007d6d2d1d56648073ce1041c0fd7652d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Mar 2018 11:34:21 +0100 Subject: [PATCH 123/194] Allow failure in builds that depend on SourceForge --- .gitlab-ci.yml | 129 +++++++++++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 63 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3994f7ae4..979f2643f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,42 @@ stages: # 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 blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest + - cd build + - cmake -DENABLE_OSMOSDR=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 blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six + - cd build + - cmake -DENABLE_OSMOSDR=ON .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + debian8.10: image: debian:8.10-slim stage: build @@ -70,6 +106,7 @@ debian8.10: - make -j$(($NPROC+1)) - make check - make install + allow_failure: true debian9.3: @@ -114,54 +151,6 @@ debian10: - make install -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 - - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - - cd build - - cmake .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -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 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 .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -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 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 .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - allow_failure: true - - fedora26: image: fedora:26 stage: build @@ -208,16 +197,19 @@ fedora-rawhide: allow_failure: true -archlinux: - image: base/devel:latest +ubuntu14.04: + image: ubuntu:trusty stage: build - before_script: - - pwd script: - - pacman -Syu --noconfirm - - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest + - 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 + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build - - cmake -DENABLE_OSMOSDR=ON .. + - cmake .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -225,16 +217,12 @@ archlinux: allow_failure: true -centos7: - image: centos:centos7 +ubuntu16.04: + image: ubuntu:xenial 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 blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six + - 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 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 .. - NPROC=$(grep -c ^processor /proc/cpuinfo) @@ -243,6 +231,21 @@ centos7: - make install +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 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 .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + coverity-scan: image: ubuntu:xenial stage: build From 05c17dcde3c28f01c3c7035d21e3284ba5a4b96e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 2 Mar 2018 12:07:34 +0100 Subject: [PATCH 124/194] Accelerate building of access18 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 979f2643f..1afe5f78f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -365,7 +365,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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 .. && make -j2 && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From d1a0f633b68fa60bef8716eda155f00b776c00be Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 4 Mar 2018 13:39:13 +0100 Subject: [PATCH 125/194] Update rawhide without gpg check --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1afe5f78f..e207dce2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -187,6 +187,7 @@ fedora-rawhide: before_script: - source ~/.bash_profile script: + - dnf upgrade -y --nogpgcheck - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. From 5b3cd1c8f215fbd6a8e5759d9b312ce9dde6ff99 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Mar 2018 11:21:00 +0100 Subject: [PATCH 126/194] Add crosscompile job --- .gitlab-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e207dce2c..4309e4072 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -94,6 +94,25 @@ centos7: allow_failure: true +crosscompile: + image: ubuntu:xenial + stage: build + script: + - apt-get update + - apt-get install -y build-essential xz-utils curl + - curl https://sites.cttc.es/gnss_files/SDK/Rocko/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh + - echo "3a59b721a1b018ce445366ba859a5988 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 -DCMAKE_INSTALL_PREFIX=/usr .. + - make + - make install DESTDIR=/usr/local/oecore-x86_64/sysroots/armv7ahf-neon-oe-linux-gnueabi/ + allow_failure: true + + debian8.10: image: debian:8.10-slim stage: build From 61b7f4f8418189823455775800a5face62d283d5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Mar 2018 11:44:53 +0100 Subject: [PATCH 127/194] Add Yocto dependencies --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4309e4072..421abea95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,7 +99,7 @@ crosscompile: stage: build script: - apt-get update - - apt-get install -y build-essential xz-utils curl + - 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 https://sites.cttc.es/gnss_files/SDK/Rocko/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh - echo "3a59b721a1b018ce445366ba859a5988 oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh" > sdk.md5 - md5sum -c sdk.md5 From 29f491dca55c6fecb5d696203bcabd340981da2c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 6 Mar 2018 15:56:06 +0100 Subject: [PATCH 128/194] Update Rocko image --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 421abea95..e84ef3676 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,13 +101,13 @@ crosscompile: - 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 https://sites.cttc.es/gnss_files/SDK/Rocko/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh - - echo "3a59b721a1b018ce445366ba859a5988 oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh" > sdk.md5 + - echo "d3c3d5f909c1ca81435108a3cfc4227b 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 -DCMAKE_INSTALL_PREFIX=/usr .. + - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON .. - make - make install DESTDIR=/usr/local/oecore-x86_64/sysroots/armv7ahf-neon-oe-linux-gnueabi/ allow_failure: true From 681158e199d962dbe812eed2dfa88a658ed120ce Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Mar 2018 11:58:45 +0100 Subject: [PATCH 129/194] Add OpenSUSE --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e84ef3676..e7e338785 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -217,6 +217,40 @@ fedora-rawhide: allow_failure: true +opensuse42.3: + image: opensuse:42.3 + stage: build + before_script: + - source ~/.bash_profile + script: + - zypper -n up + - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - cd build + - cmake -DENABLE_PACKAGING=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: + - source ~/.bash_profile + script: + - zypper -n up + - 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 armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - cd build + - cmake .. + - NPROC=$(grep -c ^processor /proc/cpuinfo) + - make -j$(($NPROC+1)) + - make check + - make install + allow_failure: true + + ubuntu14.04: image: ubuntu:trusty stage: build From ade2cc01e9065a5de54e9cbb650fd21e625fcaae Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Mar 2018 13:01:49 +0100 Subject: [PATCH 130/194] Fix OpenSUSE --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7e338785..0c6cf6157 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -221,7 +221,7 @@ opensuse42.3: image: opensuse:42.3 stage: build before_script: - - source ~/.bash_profile + - pwd script: - zypper -n up - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six @@ -238,7 +238,7 @@ opensuse-tumbleweed: image: opensuse:tumbleweed stage: build before_script: - - source ~/.bash_profile + - pwd script: - zypper -n up - 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 armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six From 3ac2860f333f3e814fb1d62e4b2920b7da47ef19 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Mar 2018 18:37:52 +0100 Subject: [PATCH 131/194] Fix Rawhide --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c6cf6157..ff71cddbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -207,7 +207,7 @@ fedora-rawhide: - source ~/.bash_profile script: - dnf upgrade -y --nogpgcheck - - yum install -y 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel - cd build - cmake -DENABLE_OSMOSDR=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From 9b63f038c7d60a16f57853699b1f65eded4ff1ff Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 Mar 2018 18:38:57 +0100 Subject: [PATCH 132/194] Upgrade local Matio to 1.15.12 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cf1a452..d8350eef1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,7 +330,7 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "unstable") set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.0") set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master") set(GNSSSDR_GPSTK_LOCAL_VERSION "2.10") -set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.11") +set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.12") From 16c5d5aad03e941b12bf357a7106675a1c771565 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 Mar 2018 20:02:44 +0100 Subject: [PATCH 133/194] Fix Ubuntu 14.04 --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff71cddbb..20a01fb2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -260,6 +260,8 @@ ubuntu14.04: - apt-file update - apt-get install -y software-properties-common - add-apt-repository -y ppa:myriadrf/gnuradio + - add-apt-repository -y ppa:myriadrf/uhd + - add-apt-repository -y ppa:ettusresearch/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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build From 812f628a221603752d687e607a28fbe0dc115041 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 Mar 2018 20:40:14 +0100 Subject: [PATCH 134/194] Fix syslog-ng warning --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a01fb2d..96bb1a0c7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -421,7 +421,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:master\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From 3dead75c2015bc90b56cb626c374f706a5ed7e02 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 12 Mar 2018 00:50:50 +0100 Subject: [PATCH 135/194] Fix Ubuntu 14.04 --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96bb1a0c7..c98f52b99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -260,8 +260,7 @@ ubuntu14.04: - apt-file update - apt-get install -y software-properties-common - add-apt-repository -y ppa:myriadrf/gnuradio - - add-apt-repository -y ppa:myriadrf/uhd - - add-apt-repository -y ppa:ettusresearch/drivers + - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev - cd build From cff55496db2302672e3062c888a160aec7f5fb73 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 3 Apr 2018 21:13:59 +0200 Subject: [PATCH 136/194] Allow debian10 to fail --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c98f52b99..3e1992a58 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,6 +168,7 @@ debian10: - make -j$(($NPROC+1)) - make check - make install + allow_failure: true fedora26: From ba07f5ef850c1d9026ea395531e7a2010f8fd210 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Apr 2018 00:00:58 +0200 Subject: [PATCH 137/194] Fix Ubuntu 14.04 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e1992a58..2a82c9fba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -263,7 +263,7 @@ ubuntu14.04: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 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 .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From 59215870c631702297f71ae8e311a878205be01c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Apr 2018 00:07:02 +0200 Subject: [PATCH 138/194] Fix debian8.10 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a82c9fba..92d0515e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -118,7 +118,7 @@ debian8.10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 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 .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From 2168d1a56bab63e00551afe35e7717f63afd649b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 5 May 2018 13:23:14 +0200 Subject: [PATCH 139/194] Return to libgtest-dev --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 92d0515e0..a029d25f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -161,7 +161,8 @@ debian10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From 9a94893e2ad1df0548cd14a1ac8d2415e313df8c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 16 May 2018 19:56:57 +0200 Subject: [PATCH 140/194] Add libpcap and the UDP source --- .gitlab-ci.yml | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a029d25f3..df3037f3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,9 +65,9 @@ archlinux: - pwd script: - pacman -Syu --noconfirm - - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest + - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libpcap blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest - cd build - - cmake -DENABLE_OSMOSDR=ON .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -84,9 +84,9 @@ centos7: - 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 blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six + - 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 libpcap-devel blas-devel lapack-devel armadillo-devel openssl-devel python-mako python-six - cd build - - cmake -DENABLE_OSMOSDR=ON .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -107,7 +107,7 @@ crosscompile: - 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 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON .. + - cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON -DENABLE_RAW_UDP=ON .. - make - make install DESTDIR=/usr/local/oecore-x86_64/sysroots/armv7ahf-neon-oe-linux-gnueabi/ allow_failure: true @@ -118,9 +118,9 @@ debian8.10: 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 libblas-dev liblapack-dev libgfortran-4.9-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -133,9 +133,9 @@ debian9.3: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -147,9 +147,9 @@ debian9.3-i386: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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_PACKAGING=ON -DENABLE_OSMOSDR=ON .. + - cmake -DENABLE_PACKAGING=ON -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -162,9 +162,9 @@ debian10: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -178,9 +178,9 @@ fedora26: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -193,9 +193,9 @@ fedora27: 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -209,9 +209,9 @@ fedora-rawhide: - 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 blas-devel lapack-devel armadillo-devel gflags-devel glog-devel openssl-devel python-mako python-six matio-devel + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -226,9 +226,9 @@ opensuse42.3: - pwd script: - zypper -n up - - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-devel libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six - cd build - - cmake -DENABLE_PACKAGING=ON .. + - cmake -DENABLE_PACKAGING=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -243,9 +243,9 @@ opensuse-tumbleweed: - pwd script: - zypper -n up - - 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 armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six + - 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 libpcap-devel armadillo-devel libtool automake hdf5-devel openssl-devel python-Mako python-six - cd build - - cmake .. + - cmake -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -264,9 +264,9 @@ ubuntu14.04: - 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 libblas-dev liblapack-dev libgfortran-4.7-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libgtest-dev + - 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 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 .. + - cmake -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -279,9 +279,9 @@ ubuntu16.04: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -293,9 +293,9 @@ ubuntu18.04: 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest + - 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 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 .. + - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) - make -j$(($NPROC+1)) - make check @@ -312,9 +312,9 @@ coverity-scan: - 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 libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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 .. + - 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 @@ -422,7 +422,7 @@ docker-access18: script: - mkdir docker-build - cd docker-build - - echo -e "FROM phusion/baseimage:master\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git ca-certificates gnuradio-dev gr-osmosdr python-mako python-six texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile + - echo -e "FROM phusion/baseimage:master\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev 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 transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 From bff0702defdde993cf67ff68e4255f60f9910311 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 19 May 2018 21:46:35 +0200 Subject: [PATCH 141/194] Add gr-iio in Debian Buster --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df3037f3c..db09c6c0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -162,9 +162,9 @@ debian10: 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 libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 gr-iio 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 .. + - 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 From f66f0b88e7036daa3674adc606d865549507eca4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 20 May 2018 00:03:31 +0200 Subject: [PATCH 142/194] Add libiio-dev to Debian Buster --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db09c6c0a..254a14769 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -162,7 +162,7 @@ debian10: 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 gr-iio libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev + - 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 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) From 4191b92a5a8abce999ae9be83a86ad299556f0c9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 15 Jun 2018 20:06:49 +0200 Subject: [PATCH 143/194] Remove gnutls from ArchLinux list of dependencies --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 254a14769..8e538818f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,7 +65,7 @@ archlinux: - pwd script: - pacman -Syu --noconfirm - - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libpcap blas lapack gflags google-glog gnutls openssl python2-mako python2-six libmatio gtest + - pacman -S --noconfirm cmake git boost boost-libs log4cpp libvolk gnuradio gnuradio-osmosdr libpcap blas lapack gflags google-glog openssl python2-mako python2-six libmatio gtest - cd build - cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - NPROC=$(grep -c ^processor /proc/cpuinfo) From f8df0786bd2578e9ae68053725746e54b57bb95d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 15 Jun 2018 21:24:32 +0200 Subject: [PATCH 144/194] Revert "Replace deprecated boost/math/common_factor_rt.hpp header by boost/integer/common_factor_rt.hpp" This reverts commit f3b07090e2bc157641163b16b731f93709877660. --- .../PVT/gnuradio_blocks/rtklib_pvt_cc.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc index 8a5ee4e8a..1fc243cb3 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_cc.cc @@ -30,9 +30,9 @@ #include "rtklib_pvt_cc.h" #include +#include #include #include -#include #include #include #include @@ -304,7 +304,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1019_rate_ms = boost::integer::lcm(5000, d_output_rate_ms); // default value if not set + d_rtcm_MT1019_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set } if (rtcm_msg_rate_ms.find(1020) != rtcm_msg_rate_ms.end()) { @@ -312,7 +312,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1020_rate_ms = boost::integer::lcm(5000, d_output_rate_ms); // default value if not set + d_rtcm_MT1020_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set } if (rtcm_msg_rate_ms.find(1045) != rtcm_msg_rate_ms.end()) { @@ -320,7 +320,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1045_rate_ms = boost::integer::lcm(5000, d_output_rate_ms); // default value if not set + d_rtcm_MT1045_rate_ms = boost::math::lcm(5000, d_output_rate_ms); // default value if not set } if (rtcm_msg_rate_ms.find(1077) != rtcm_msg_rate_ms.end()) // whatever between 1071 and 1077 { @@ -328,7 +328,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1077_rate_ms = boost::integer::lcm(1000, d_output_rate_ms); // default value if not set + d_rtcm_MT1077_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set } if (rtcm_msg_rate_ms.find(1087) != rtcm_msg_rate_ms.end()) // whatever between 1081 and 1087 { @@ -336,7 +336,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1087_rate_ms = boost::integer::lcm(1000, d_output_rate_ms); // default value if not set + d_rtcm_MT1087_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set } if (rtcm_msg_rate_ms.find(1097) != rtcm_msg_rate_ms.end()) // whatever between 1091 and 1097 { @@ -345,8 +345,8 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, } else { - d_rtcm_MT1097_rate_ms = boost::integer::lcm(1000, d_output_rate_ms); // default value if not set - d_rtcm_MSM_rate_ms = boost::integer::lcm(1000, d_output_rate_ms); // default value if not set + d_rtcm_MT1097_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set + d_rtcm_MSM_rate_ms = boost::math::lcm(1000, d_output_rate_ms); // default value if not set } b_rtcm_writing_started = false; From aae0993aa5f4be03c8964d4236f6d1f2f82ec200 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 16 Jun 2018 00:31:12 +0200 Subject: [PATCH 145/194] Preparing release 0.0.10 tagging for Docker images --- .gitlab-ci.yml | 70 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e538818f..d86c3a7d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -343,7 +343,6 @@ run-tests: - mv position_test*.txt ../build64/ - cd .. - rm -rf build-test - artifacts: paths: - build64/*.xml @@ -370,7 +369,6 @@ run-tests-i386: - mv position_test*.txt ../build32/ - cd .. - rm -rf build-test - artifacts: paths: - build32/*.xml @@ -396,6 +394,25 @@ docker-gnsssdr: 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 "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 @@ -429,6 +446,24 @@ docker-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.10.1\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev 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 transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 @@ -453,7 +488,36 @@ run-access18: - 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 3f0a7ef4fa9f3a57233602653abe4f7c8657002e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 13:05:44 +0200 Subject: [PATCH 146/194] Extend acquisition performance test to other implementations. set_state(int state) is now amandatory member for acquisition adapters --- ...alileo_e1_pcps_8ms_ambiguous_acquisition.h | 6 ++--- .../galileo_e1_pcps_ambiguous_acquisition.h | 2 +- ...leo_e1_pcps_cccwsr_ambiguous_acquisition.h | 7 +++--- ..._e1_pcps_quicksync_ambiguous_acquisition.h | 6 ++--- ...lileo_e1_pcps_tong_ambiguous_acquisition.h | 7 +++--- ...lileo_e5a_noncoherent_iq_acquisition_caf.h | 4 +-- .../adapters/galileo_e5a_pcps_acquisition.h | 2 +- .../adapters/glonass_l1_ca_pcps_acquisition.h | 2 +- .../adapters/glonass_l2_ca_pcps_acquisition.h | 2 +- .../adapters/gps_l1_ca_pcps_acquisition.h | 2 +- ...gps_l1_ca_pcps_acquisition_fine_doppler.cc | 8 +++++- .../gps_l1_ca_pcps_acquisition_fine_doppler.h | 8 ++++-- .../gps_l1_ca_pcps_acquisition_fpga.h | 2 +- .../gps_l1_ca_pcps_assisted_acquisition.h | 4 +-- .../gps_l1_ca_pcps_opencl_acquisition.h | 6 ++--- .../gps_l1_ca_pcps_quicksync_acquisition.h | 7 +++--- .../gps_l1_ca_pcps_tong_acquisition.h | 6 ++--- .../adapters/gps_l2_m_pcps_acquisition.h | 2 +- .../adapters/gps_l5i_pcps_acquisition.h | 2 +- .../pcps_acquisition_fine_doppler_cc.cc | 24 ++++++++++++++++++ .../pcps_acquisition_fine_doppler_cc.h | 7 ++++++ src/core/interfaces/acquisition_interface.h | 1 + .../gps_l1_acq_performance_test.cc | 25 ++++++++++++++++--- 23 files changed, 99 insertions(+), 43 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h index e603665dc..83917420c 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_ #define GNSS_SDR_GALILEO_E1_PCPS_8MS_AMBIGUOUS_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "galileo_pcps_8ms_acquisition_cc.h" - +#include +#include class ConfigurationInterface; @@ -123,6 +122,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; + void set_state(int state) override{}; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h index 9dfe42e9d..56f79774d 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h @@ -130,7 +130,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h index 45888040c..54b5ee54e 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_ #define GNSS_SDR_GALILEO_E1_PCPS_CCCWSR_AMBIGUOUS_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_cccwsr_acquisition_cc.h" - +#include +#include class ConfigurationInterface; @@ -124,7 +123,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h index b46fe2986..5bfa06ca2 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h @@ -32,11 +32,11 @@ #ifndef GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_ #define GNSS_SDR_GALILEO_E1_PCPS_QUICKSYNC_AMBIGUOUS_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_quicksync_acquisition_cc.h" +#include +#include class ConfigurationInterface; @@ -127,7 +127,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h index ad74c02e8..a47a22329 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_ #define GNSS_SDR_GALILEO_E1_PCPS_TONG_AMBIGUOUS_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_tong_acquisition_cc.h" - +#include +#include class ConfigurationInterface; @@ -127,7 +126,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h index 6b333fbbe..823bdc1ff 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h @@ -38,10 +38,10 @@ #ifndef GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_ #define GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_H_ -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "galileo_e5a_noncoherent_iq_acquisition_caf_cc.h" +#include class ConfigurationInterface; @@ -129,7 +129,7 @@ public: * first available sample. * \param state - int=1 forces start of acquisition */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h index 807a307b2..ebea0a5e6 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h @@ -121,7 +121,7 @@ public: * first available sample. * \param state - int=1 forces start of acquisition */ - void set_state(int state); + void set_state(int state) override; private: float calculate_threshold(float pfa); diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h index ac8295d09..8a956e045 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h @@ -130,7 +130,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h index 54b15f5be..73162f6f3 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h @@ -129,7 +129,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h index 1ac26a80a..a5ad9ef67 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h @@ -134,7 +134,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 30193cb32..88f3c8cdc 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -33,11 +33,11 @@ */ #include "gps_l1_ca_pcps_acquisition_fine_doppler.h" -#include #include "gps_sdr_signal_processing.h" #include "GPS_L1_CA.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include using google::LogMessage; @@ -161,6 +161,12 @@ void GpsL1CaPcpsAcquisitionFineDoppler::reset() } +void GpsL1CaPcpsAcquisitionFineDoppler::set_state(int state) +{ + acquisition_cc_->set_state(state); +} + + void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr top_block) { if (top_block) diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h index 74bcd28a4..a61d833e7 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h @@ -34,11 +34,10 @@ #ifndef GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_ #define GNSS_SDR_GPS_L1_CA_PCPS_ACQUISITION_FINE_DOPPLER_H_ -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_acquisition_fine_doppler_cc.h" - +#include class ConfigurationInterface; @@ -122,6 +121,11 @@ public: */ void reset() override; + /*! + * \brief If state = 1, it forces the block to start acquiring from the first sample + */ + void set_state(int state) override; + private: pcps_acquisition_fine_doppler_cc_sptr acquisition_cc_; size_t item_size_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h index b658942d5..9fac921d1 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h @@ -132,7 +132,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h index 905d3525a..0cdfd3077 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h @@ -34,11 +34,10 @@ #ifndef GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_ #define GNSS_SDR_GPS_L1_CA_PCPS_ASSISTED_ACQUISITION_H_ -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_assisted_acquisition_cc.h" - +#include class ConfigurationInterface; @@ -121,6 +120,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; + void set_state(int state) override{}; private: pcps_assisted_acquisition_cc_sptr acquisition_cc_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h index 854c6c0f6..900b65ed3 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h @@ -32,12 +32,11 @@ #ifndef GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_ #define GNSS_SDR_GPS_L1_CA_PCPS_OPENCL_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_opencl_acquisition_cc.h" - +#include +#include class ConfigurationInterface; @@ -123,6 +122,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; + void set_state(int state) override{}; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h index 590890039..f38ee7055 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h @@ -33,13 +33,12 @@ #ifndef GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_ #define GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_quicksync_acquisition_cc.h" #include "configuration_interface.h" - +#include +#include class ConfigurationInterface; @@ -129,7 +128,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h index 1e63f5801..b09f6cde0 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h @@ -32,12 +32,12 @@ #ifndef GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_ #define GNSS_SDR_GPS_L1_CA_TONG_ACQUISITION_H_ -#include -#include #include "gnss_synchro.h" #include "acquisition_interface.h" #include "pcps_tong_acquisition_cc.h" #include "configuration_interface.h" +#include +#include class ConfigurationInterface; @@ -127,7 +127,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h index f0b8a807d..ec4257aee 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h @@ -132,7 +132,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index 4a0f0a571..01d15def8 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -132,7 +132,7 @@ public: /*! * \brief If state = 1, it forces the block to start acquiring from the first sample */ - void set_state(int state); + void set_state(int state) override; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index c9b31b134..963bfffcf 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -424,6 +424,30 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star } +void pcps_acquisition_fine_doppler_cc::set_state(int state) +{ + gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler + d_state = state; + if (d_state == 1) + { + d_gnss_synchro->Acq_delay_samples = 0.0; + d_gnss_synchro->Acq_doppler_hz = 0.0; + d_gnss_synchro->Acq_samplestamp_samples = 0; + d_well_count = 0; + d_input_power = 0.0; + d_test_statistics = 0.0; + d_active = true; + } + else if (d_state == 0) + { + } + else + { + LOG(ERROR) << "State can only be set to 0 or 1"; + } +} + + int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused))) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index d34121910..2afcbd3e4 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -214,6 +214,13 @@ public: */ void set_doppler_step(unsigned int doppler_step); + /*! + * \brief If set to 1, ensures that acquisition starts at the + * first available sample. + * \param state - int=1 forces start of acquisition + */ + void set_state(int state); + /*! * \brief Parallel Code Phase Search Acquisition signal processing. */ diff --git a/src/core/interfaces/acquisition_interface.h b/src/core/interfaces/acquisition_interface.h index 10668b071..dcf140a5f 100644 --- a/src/core/interfaces/acquisition_interface.h +++ b/src/core/interfaces/acquisition_interface.h @@ -61,6 +61,7 @@ public: virtual void set_doppler_step(unsigned int doppler_step) = 0; virtual void init() = 0; virtual void set_local_code() = 0; + virtual void set_state(int state) = 0; virtual signed int mag() = 0; virtual void reset() = 0; }; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc index a92c228b9..f5923d343 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc @@ -33,6 +33,8 @@ #include "signal_generator_flags.h" #include "tracking_true_obs_reader.h" #include "true_observables_reader.h" +#include "gps_l1_ca_pcps_acquisition.h" +#include "gps_l1_ca_pcps_acquisition_fine_doppler.h" #include "display.h" #include "gnuplot_i.h" #include @@ -42,6 +44,7 @@ DEFINE_string(config_file_ptest, std::string(""), "File containing alternative configuration parameters for the acquisition performance test."); DEFINE_string(acq_test_input_file, std::string(""), "File containing raw signal data, must be in int8_t format. The signal generator will not be used."); +DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test"); DEFINE_int32(acq_test_doppler_max, 5000, "Maximum Doppler, in Hz"); DEFINE_int32(acq_test_doppler_step, 125, "Doppler step, in Hz."); @@ -200,7 +203,6 @@ protected: { } - std::vector cn0_vector; std::vector pfa_vector; @@ -223,7 +225,7 @@ protected: gr::msg_queue::sptr queue; gr::top_block_sptr top_block; - std::shared_ptr acquisition; + std::shared_ptr acquisition; std::shared_ptr config; std::shared_ptr config_f; Gnss_Synchro gnss_synchro; @@ -235,7 +237,7 @@ protected: int message; boost::thread ch_thread; - std::string implementation = "GPS_L1_CA_PCPS_Acquisition"; + std::string implementation = FLAGS_acq_test_implementation; const double baseband_sampling_freq = static_cast(FLAGS_fs_gen_sps); const int coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; @@ -457,8 +459,23 @@ int AcquisitionPerformanceTest::run_receiver() int nsamples = floor(config->property("GNSS-SDR.internal_fs_sps", 2000000) * generated_signal_duration_s); boost::shared_ptr valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); + if (FLAGS_acq_test_implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); + } + else + { + if (FLAGS_acq_test_implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); + } + else + { + bool aux = false; + EXPECT_EQ(true, aux); + } + } - acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); acquisition->set_gnss_synchro(&gnss_synchro); acquisition->set_channel(0); acquisition->set_local_code(); From adcc04c3b60235154b9830a366936cb962620301 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Wed, 4 Jul 2018 16:56:47 +0200 Subject: [PATCH 147/194] Fix GPS L1 CA fine Doppler acquisition implementation and migrate the configuration interface --- ...gps_l1_ca_pcps_acquisition_fine_doppler.cc | 17 +- .../gps_l1_ca_pcps_acquisition_fine_doppler.h | 1 - .../pcps_acquisition_fine_doppler_cc.cc | 348 ++++++++++++------ .../pcps_acquisition_fine_doppler_cc.h | 52 +-- src/tests/common-files/tracking_tests_flags.h | 1 + ...gps_l1_ca_dll_pll_tracking_pull-in_test.cc | 14 +- src/utils/front-end-cal/CMakeLists.txt | 1 + src/utils/front-end-cal/main.cc | 5 +- 8 files changed, 293 insertions(+), 146 deletions(-) diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 30193cb32..8a160dc54 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -38,6 +38,7 @@ #include "GPS_L1_CA.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" +#include "acq_conf.h" using google::LogMessage; @@ -49,29 +50,35 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( std::string default_dump_filename = "./data/acquisition.dat"; DLOG(INFO) << "role " << role; + Acq_Conf acq_parameters = Acq_Conf(); item_type_ = configuration->property(role + ".item_type", default_item_type); long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); + acq_parameters.fs_in = fs_in_; dump_ = configuration->property(role + ".dump", false); + acq_parameters.dump = dump_; dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); + acq_parameters.dump_filename = dump_filename_; doppler_max_ = configuration->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; - doppler_min_ = configuration->property(role + ".doppler_min", -doppler_max_); + acq_parameters.doppler_max = doppler_max_; sampled_ms_ = configuration->property(role + ".coherent_integration_time_ms", 1); + acq_parameters.sampled_ms = sampled_ms_; max_dwells_ = configuration->property(role + ".max_dwells", 1); + acq_parameters.max_dwells = max_dwells_; + + acq_parameters.blocking_on_standby = configuration->property(role + ".blocking_on_standby", false); //--- Find number of samples per spreading code ------------------------- vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); - + acq_parameters.samples_per_ms = vector_length_; code_ = new gr_complex[vector_length_]; if (item_type_.compare("gr_complex") == 0) { item_size_ = sizeof(gr_complex); - acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(max_dwells_, sampled_ms_, - doppler_max_, doppler_min_, fs_in_, vector_length_, - dump_, dump_filename_); + acquisition_cc_ = pcps_make_acquisition_fine_doppler_cc(acq_parameters); } else { diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h index 74bcd28a4..13e4357fe 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h @@ -131,7 +131,6 @@ private: float threshold_; int doppler_max_; unsigned int doppler_step_; - int doppler_min_; unsigned int sampled_ms_; int max_dwells_; long fs_in_; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index c9b31b134..7e1ffa903 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -40,46 +40,43 @@ #include #include // std::rotate, std::fill_n #include +#include using google::LogMessage; -pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc( - int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, - long fs_in, int samples_per_ms, bool dump, - std::string dump_filename) +pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf &conf_) { return pcps_acquisition_fine_doppler_cc_sptr( - new pcps_acquisition_fine_doppler_cc(max_dwells, sampled_ms, doppler_max, doppler_min, - fs_in, samples_per_ms, dump, dump_filename)); + new pcps_acquisition_fine_doppler_cc(conf_)); } -pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc( - int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, - long fs_in, int samples_per_ms, bool dump, - std::string dump_filename) : gr::block("pcps_acquisition_fine_doppler_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex)), - gr::io_signature::make(0, 0, sizeof(gr_complex))) +pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Conf &conf_) + : gr::block("pcps_acquisition_fine_doppler_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex)), + gr::io_signature::make(0, 0, sizeof(gr_complex))) { this->message_port_register_out(pmt::mp("events")); + acq_parameters = conf_; d_sample_counter = 0; // SAMPLE COUNTER d_active = false; - d_fs_in = fs_in; - d_samples_per_ms = samples_per_ms; - d_sampled_ms = sampled_ms; - d_config_doppler_max = doppler_max; - d_config_doppler_min = doppler_min; + d_fs_in = conf_.fs_in; + d_samples_per_ms = conf_.samples_per_ms; + d_sampled_ms = conf_.sampled_ms; + d_config_doppler_max = conf_.doppler_max; + d_config_doppler_min = -conf_.doppler_max; d_fft_size = d_sampled_ms * d_samples_per_ms; // HS Acquisition - d_max_dwells = max_dwells; + d_max_dwells = conf_.max_dwells; d_gnuradio_forecast_samples = d_fft_size; - d_input_power = 0.0; d_state = 0; d_carrier = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_fft_codes = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_magnitude = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); + d_10_ms_buffer = static_cast(volk_gnsssdr_malloc(10 * d_samples_per_ms * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + // Direct FFT d_fft_if = new gr::fft::fft_complex(d_fft_size, true); @@ -87,10 +84,10 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc( d_ifft = new gr::fft::fft_complex(d_fft_size, false); // For dumping samples into a file - d_dump = dump; - d_dump_filename = dump_filename; + d_dump = conf_.dump; + d_dump_filename = conf_.dump_filename; - d_doppler_resolution = 0; + d_n_samples_in_buffer = 0; d_threshold = 0; d_num_doppler_points = 0; d_doppler_step = 0; @@ -102,9 +99,28 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc( d_test_statistics = 0; d_well_count = 0; d_channel = 0; + d_positive_acq = 0; + d_dump_number = 0; + d_dump_channel = 0; // this implementation can only produce dumps in channel 0 + //todo: migrate config parameters to the unified acquisition config class } +// Finds next power of two +// for n. If n itself is a +// power of two then returns n +unsigned int pcps_acquisition_fine_doppler_cc::nextPowerOf2(unsigned int n) +{ + n--; + n |= n >> 1; + n |= n >> 2; + n |= n >> 4; + n |= n >> 8; + n |= n >> 16; + n++; + return n; +} + void pcps_acquisition_fine_doppler_cc::set_doppler_step(unsigned int doppler_step) { d_doppler_step = doppler_step; @@ -138,12 +154,9 @@ pcps_acquisition_fine_doppler_cc::~pcps_acquisition_fine_doppler_cc() volk_gnsssdr_free(d_carrier); volk_gnsssdr_free(d_fft_codes); volk_gnsssdr_free(d_magnitude); + volk_gnsssdr_free(d_10_ms_buffer); delete d_ifft; delete d_fft_if; - if (d_dump) - { - d_dump_file.close(); - } free_grid_memory(); } @@ -167,8 +180,12 @@ void pcps_acquisition_fine_doppler_cc::init() d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; d_gnss_synchro->Acq_samplestamp_samples = 0; - d_input_power = 0.0; d_state = 0; + + if (d_dump) + { + grid_ = arma::fmat(d_fft_size, d_num_doppler_points, arma::fill::zeros); + } } @@ -187,6 +204,7 @@ void pcps_acquisition_fine_doppler_cc::reset_grid() d_well_count = 0; for (int i = 0; i < d_num_doppler_points; i++) { + //todo: use memset here for (unsigned int j = 0; j < d_fft_size; j++) { d_grid_data[i][j] = 0.0; @@ -215,52 +233,71 @@ void pcps_acquisition_fine_doppler_cc::update_carrier_wipeoff() } -double pcps_acquisition_fine_doppler_cc::search_maximum() +double pcps_acquisition_fine_doppler_cc::compute_CAF() { - float magt = 0.0; - float fft_normalization_factor; + float firstPeak = 0.0; int index_doppler = 0; uint32_t tmp_intex_t = 0; uint32_t index_time = 0; + // Look for correlation peaks in the results ============================== + // Find the highest peak and compare it to the second highest peak + // The second peak is chosen not closer than 1 chip to the highest peak + //--- Find the correlation peak and the carrier frequency -------------- for (int i = 0; i < d_num_doppler_points; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_grid_data[i], d_fft_size); - if (d_grid_data[i][tmp_intex_t] > magt) + if (d_grid_data[i][tmp_intex_t] > firstPeak) { - magt = d_grid_data[i][tmp_intex_t]; - //std::cout<(d_fft_size) * static_cast(d_fft_size); - magt = magt / (fft_normalization_factor * fft_normalization_factor); + + // -- - Find 1 chip wide code phase exclude range around the peak + uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(this->d_fs_in)); + int32_t excludeRangeIndex1 = index_time - samplesPerChip; + int32_t excludeRangeIndex2 = index_time + samplesPerChip; + + // -- - Correct code phase exclude range if the range includes array boundaries + if (excludeRangeIndex1 < 0) + { + excludeRangeIndex1 = d_fft_size + excludeRangeIndex1; + } + else if (excludeRangeIndex2 >= static_cast(d_fft_size)) + { + excludeRangeIndex2 = excludeRangeIndex2 - d_fft_size; + } + + int32_t idx = excludeRangeIndex1; + do + { + d_grid_data[index_doppler][idx] = 0.0; + idx++; + if (idx == static_cast(d_fft_size)) idx = 0; + } + while (idx != excludeRangeIndex2); + + //--- Find the second highest correlation peak in the same freq. bin --- + volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_grid_data[index_doppler], d_fft_size); + float secondPeak = d_grid_data[index_doppler][tmp_intex_t]; // 5- Compute the test statistics and compare to the threshold - d_test_statistics = magt / (d_input_power * std::sqrt(d_well_count)); + d_test_statistics = firstPeak / secondPeak; // 4- record the maximum peak and the associated synchronization parameters d_gnss_synchro->Acq_delay_samples = static_cast(index_time); d_gnss_synchro->Acq_doppler_hz = static_cast(index_doppler * d_doppler_step + d_config_doppler_min); d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter; - // Record results to file if required - if (d_dump) - { - std::stringstream filename; - std::streamsize n = 2 * sizeof(float) * (d_fft_size); // complex file write - filename.str(""); - filename << "../data/test_statistics_" << d_gnss_synchro->System - << "_" << d_gnss_synchro->Signal << "_sat_" - << d_gnss_synchro->PRN << "_doppler_" << d_gnss_synchro->Acq_doppler_hz << ".dat"; - d_dump_file.open(filename.str().c_str(), std::ios::out | std::ios::binary); - d_dump_file.write(reinterpret_cast(d_grid_data[index_doppler]), n); //write directly |abs(x)|^2 in this Doppler bin? - d_dump_file.close(); - } - return d_test_statistics; } @@ -308,10 +345,9 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons d_ifft->execute(); // save the grid matrix delay file - volk_32fc_magnitude_squared_32f(p_tmp_vector, d_ifft->get_outbuf(), d_fft_size); - const float *old_vector = d_grid_data[doppler_index]; - volk_32f_x2_add_32f(d_grid_data[doppler_index], old_vector, p_tmp_vector, d_fft_size); + //accumulate grid values + volk_32f_x2_add_32f(d_grid_data[doppler_index], d_grid_data[doppler_index], p_tmp_vector, d_fft_size); } volk_gnsssdr_free(p_tmp_vector); @@ -319,18 +355,21 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons } -int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star &input_items) +int pcps_acquisition_fine_doppler_cc::estimate_Doppler() { // Direct FFT - int zero_padding_factor = 2; - int fft_size_extended = d_fft_size * zero_padding_factor; + int zero_padding_factor = 8; + int prn_replicas = 10; + int signal_samples = prn_replicas * d_fft_size; + //int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor); + int fft_size_extended = signal_samples * zero_padding_factor; gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true); //zero padding the entire vector std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0)); //1. generate local code aligned with the acquisition code phase estimation - gr_complex *code_replica = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + gr_complex *code_replica = static_cast(volk_gnsssdr_malloc(signal_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment())); gps_l1_ca_code_gen_complex_sampled(code_replica, d_gnss_synchro->PRN, d_fs_in, 0); @@ -342,10 +381,13 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star std::rotate(code_replica, code_replica + (d_fft_size - shift_index), code_replica + d_fft_size - 1); } + for (int n = 0; n < prn_replicas - 1; n++) + { + memcpy(&code_replica[(n + 1) * d_fft_size], code_replica, d_fft_size * sizeof(gr_complex)); + } //2. Perform code wipe-off - const gr_complex *in = reinterpret_cast(input_items[0]); //Get the input samples pointer - volk_32fc_x2_multiply_32fc(fft_operator->get_inbuf(), in, code_replica, d_fft_size); + volk_32fc_x2_multiply_32fc(fft_operator->get_inbuf(), d_10_ms_buffer, code_replica, signal_samples); // 3. Perform the FFT (zero padded!) fft_operator->execute(); @@ -380,40 +422,12 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star if (std::abs(fftFreqBins[tmp_index_freq] - d_gnss_synchro->Acq_doppler_hz) < 1000) { d_gnss_synchro->Acq_doppler_hz = static_cast(fftFreqBins[tmp_index_freq]); - //std::cout<<"FFT maximum present at "<PRN << ".dat"; - // d_dump_file.open(filename.str().c_str(), std::ios::out - // | std::ios::binary); - // d_dump_file.write(reinterpret_cast(code_replica), n); //write directly |abs(x)|^2 in this Doppler bin? - // d_dump_file.close(); - // - // filename.str(""); - // filename << "../data/signal_prn_" << d_gnss_synchro->PRN << ".dat"; - // d_dump_file.open(filename.str().c_str(), std::ios::out - // | std::ios::binary); - // d_dump_file.write(reinterpret_cast(in), n); //write directly |abs(x)|^2 in this Doppler bin? - // d_dump_file.close(); - // - // - // n = sizeof(float) * (fft_size_extended); - // filename.str(""); - // filename << "../data/fft_prn_" << d_gnss_synchro->PRN << ".dat"; - // d_dump_file.open(filename.str().c_str(), std::ios::out - // | std::ios::binary); - // d_dump_file.write(reinterpret_cast(p_tmp_vector), n); //write directly |abs(x)|^2 in this Doppler bin? - // d_dump_file.close(); } // free memory!! @@ -423,6 +437,12 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star return d_fft_size; } +// Called by gnuradio to enable drivers, etc for i/o devices. +bool pcps_acquisition_fine_doppler_cc::start() +{ + d_sample_counter = 0; + return true; +} int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, @@ -442,29 +462,33 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, * S5. Negative_Acq: Send message and stop acq -> S0 */ + int samples_remaining; switch (d_state) { case 0: // S0. StandBy - //DLOG(INFO) <<"S0"<= d_max_dwells) { d_state = 2; } + d_sample_counter += d_fft_size; // sample counter + consume_each(d_fft_size); break; case 2: // Compute test statistics and decide - //DLOG(INFO) <<"S2"< d_threshold) { d_state = 3; //perform fine doppler estimation @@ -473,15 +497,35 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, { d_state = 5; //negative acquisition } + d_n_samples_in_buffer = 0; + // Record results to file if required + if (d_dump and d_channel == d_dump_channel) + { + dump_results(d_fft_size); + } + d_sample_counter += d_fft_size; // sample counter + consume_each(d_fft_size); break; case 3: // Fine doppler estimation - //DLOG(INFO) <<"S3"< noutput_items) + { + memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast(input_items[0]), noutput_items * sizeof(gr_complex)); + d_n_samples_in_buffer += noutput_items; + d_sample_counter += noutput_items; // sample counter + consume_each(noutput_items); + } + else + { + memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast(input_items[0]), samples_remaining * sizeof(gr_complex)); + estimate_Doppler(); //disabled in repo + d_sample_counter += samples_remaining; // sample counter + consume_each(samples_remaining); + d_state = 4; + } break; case 4: // Positive_Acq - //DLOG(INFO) <<"S4"<System << " " << d_gnss_synchro->PRN; DLOG(INFO) << "sample_stamp " << d_sample_counter; @@ -489,15 +533,18 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, DLOG(INFO) << "test statistics threshold " << d_threshold; DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples; DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz; - DLOG(INFO) << "input signal power " << d_input_power; - + d_positive_acq = 1; d_active = false; // Send message to channel port //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL this->message_port_pub(pmt::mp("events"), pmt::from_long(1)); d_state = 0; + if (!acq_parameters.blocking_on_standby) + { + d_sample_counter += noutput_items; // sample counter + consume_each(noutput_items); + } break; case 5: // Negative_Acq - //DLOG(INFO) <<"S5"<System << " " << d_gnss_synchro->PRN; DLOG(INFO) << "sample_stamp " << d_sample_counter; @@ -505,20 +552,103 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, DLOG(INFO) << "test statistics threshold " << d_threshold; DLOG(INFO) << "code phase " << d_gnss_synchro->Acq_delay_samples; DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz; - DLOG(INFO) << "input signal power " << d_input_power; - + d_positive_acq = 0; d_active = false; // Send message to channel port //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL this->message_port_pub(pmt::mp("events"), pmt::from_long(2)); d_state = 0; + if (!acq_parameters.blocking_on_standby) + { + d_sample_counter += noutput_items; // sample counter + consume_each(noutput_items); + } break; default: d_state = 0; + if (!acq_parameters.blocking_on_standby) + { + d_sample_counter += noutput_items; // sample counter + consume_each(noutput_items); + } break; } - - //DLOG(INFO)<<"d_sample_counter="<System); + filename.append("_"); + filename.append(1, d_gnss_synchro->Signal[0]); + filename.append(1, d_gnss_synchro->Signal[1]); + filename.append("_ch_"); + filename.append(std::to_string(d_channel)); + filename.append("_"); + filename.append(std::to_string(d_dump_number)); + filename.append("_sat_"); + filename.append(std::to_string(d_gnss_synchro->PRN)); + filename.append(".mat"); + + mat_t *matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73); + if (matfp == NULL) + { + std::cout << "Unable to create or open Acquisition dump file" << std::endl; + d_dump = false; + } + else + { + size_t dims[2] = {static_cast(effective_fft_size), static_cast(d_num_doppler_points)}; + matvar_t *matvar = Mat_VarCreate("acq_grid", MAT_C_SINGLE, MAT_T_SINGLE, 2, dims, grid_.memptr(), 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + dims[0] = static_cast(1); + dims[1] = static_cast(1); + matvar = Mat_VarCreate("doppler_max", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &d_config_doppler_max, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("doppler_step", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &d_doppler_step, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("d_positive_acq", MAT_C_INT32, MAT_T_INT32, 1, dims, &d_positive_acq, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + float aux = static_cast(d_gnss_synchro->Acq_doppler_hz); + matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + aux = static_cast(d_gnss_synchro->Acq_delay_samples); + matvar = Mat_VarCreate("acq_delay_samples", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("test_statistic", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &d_test_statistics, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("threshold", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &d_threshold, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + aux = 0.0; + matvar = Mat_VarCreate("input_power", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("sample_counter", MAT_C_UINT64, MAT_T_UINT64, 1, dims, &d_sample_counter, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("PRN", MAT_C_UINT32, MAT_T_UINT32, 1, dims, &d_gnss_synchro->PRN, 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + Mat_Close(matfp); + } } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index d34121910..7788e12d6 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -1,8 +1,9 @@ /*! * \file pcps_acquisition_fine_doppler_acquisition_cc.h * \brief This class implements a Parallel Code Phase Search Acquisition with multi-dwells and fine Doppler estimation + * for GPS L1 C/A signal * - * Acquisition strategy (Kay Borre book + CFAR threshold). + * Acquisition strategy (Kay Borre book). *
    *
  1. Compute the input signal power estimation *
  2. Doppler serial search loop @@ -49,11 +50,13 @@ #define GNSS_SDR_PCPS_ACQUISITION_FINE_DOPPLER_CC_H_ #include "gnss_synchro.h" +#include "acq_conf.h" #include #include #include #include #include +#include class pcps_acquisition_fine_doppler_cc; @@ -61,46 +64,33 @@ typedef boost::shared_ptr pcps_acquisition_fine_doppler_cc_sptr; pcps_acquisition_fine_doppler_cc_sptr -pcps_make_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms, - int doppler_max, int doppler_min, long fs_in, int samples_per_ms, - bool dump, std::string dump_filename); +pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_); /*! * \brief This class implements a Parallel Code Phase Search Acquisition. * - * Check \ref Navitec2012 "An Open Source Galileo E1 Software Receiver", - * Algorithm 1, for a pseudocode description of this implementation. */ class pcps_acquisition_fine_doppler_cc : public gr::block { private: friend pcps_acquisition_fine_doppler_cc_sptr - pcps_make_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms, - int doppler_max, int doppler_min, long fs_in, - int samples_per_ms, bool dump, - std::string dump_filename); - - pcps_acquisition_fine_doppler_cc(int max_dwells, unsigned int sampled_ms, - int doppler_max, int doppler_min, long fs_in, - int samples_per_ms, bool dump, - std::string dump_filename); - - void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, - int doppler_offset); + pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_); + pcps_acquisition_fine_doppler_cc(const Acq_Conf& conf_); int compute_and_accumulate_grid(gr_vector_const_void_star& input_items); - int estimate_Doppler(gr_vector_const_void_star& input_items); + int estimate_Doppler(); float estimate_input_power(gr_vector_const_void_star& input_items); - double search_maximum(); + double compute_CAF(); void reset_grid(); void update_carrier_wipeoff(); void free_grid_memory(); + bool start(); + Acq_Conf acq_parameters; long d_fs_in; int d_samples_per_ms; int d_max_dwells; - unsigned int d_doppler_resolution; int d_gnuradio_forecast_samples; float d_threshold; std::string d_satellite_str; @@ -114,6 +104,7 @@ private: unsigned long int d_sample_counter; gr_complex* d_carrier; gr_complex* d_fft_codes; + gr_complex* d_10_ms_buffer; float* d_magnitude; float** d_grid_data; @@ -124,17 +115,23 @@ private: Gnss_Synchro* d_gnss_synchro; unsigned int d_code_phase; float d_doppler_freq; - float d_input_power; float d_test_statistics; - std::ofstream d_dump_file; + int d_positive_acq; + int d_state; bool d_active; int d_well_count; + int d_n_samples_in_buffer; bool d_dump; unsigned int d_channel; std::string d_dump_filename; + arma::fmat grid_; + long int d_dump_number; + unsigned int d_dump_channel; + + public: /*! * \brief Default destructor. @@ -187,6 +184,7 @@ public: inline void set_channel(unsigned int channel) { d_channel = channel; + d_dump_channel = d_channel; } /*! @@ -222,6 +220,14 @@ public: gr_vector_void_star& output_items); void forecast(int noutput_items, gr_vector_int& ninput_items_required); + + /*! + * \brief Obtains the next power of 2 greater or equal to the input parameter + * \param n - Integer value to obtain the next power of 2. + */ + unsigned int nextPowerOf2(unsigned int n); + + void dump_results(int effective_fft_size); }; #endif /* pcps_acquisition_fine_doppler_cc*/ diff --git a/src/tests/common-files/tracking_tests_flags.h b/src/tests/common-files/tracking_tests_flags.h index a536af996..dc54da91e 100644 --- a/src/tests/common-files/tracking_tests_flags.h +++ b/src/tests/common-files/tracking_tests_flags.h @@ -36,6 +36,7 @@ // Input signal configuration DEFINE_bool(enable_external_signal_file, false, "Use an external signal file capture instead of the software-defined signal generator"); +DEFINE_int32(external_signal_acquisition_threshold, 2.0, "Threshold for satellite acquisition when external file is used"); DEFINE_string(signal_file, std::string("signal_out.bin"), "Path of the external signal capture file"); DEFINE_double(CN0_dBHz_start, std::numeric_limits::infinity(), "Enable noise generator and set the CN0 start sweep value [dB-Hz]"); DEFINE_double(CN0_dBHz_stop, std::numeric_limits::infinity(), "Enable noise generator and set the CN0 stop sweep value [dB-Hz]"); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc index 296e927ba..e449fa2e0 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc @@ -334,15 +334,17 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) config = std::make_shared(); config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); + config->set_property("Acquisition.max_dwells", "10"); + config->set_property("Acquisition.dump", "true"); GNSSBlockFactory block_factory; GpsL1CaPcpsAcquisitionFineDoppler* acquisition; acquisition = new GpsL1CaPcpsAcquisitionFineDoppler(config.get(), "Acquisition", 1, 1); acquisition->set_channel(1); acquisition->set_gnss_synchro(&tmp_gnss_synchro); - acquisition->set_threshold(config->property("Acquisition.threshold", 0.005)); + acquisition->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold)); acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000)); - acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 250)); + acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500)); boost::shared_ptr msg_rx; try @@ -522,7 +524,7 @@ TEST_F(GpsL1CADllPllTrackingPullInTest, ValidationOfResults) << "Maybe sat PRN #" + std::to_string(FLAGS_test_satellite_PRN) + " is not available?"; std::cout << "Testing satellite PRN=" << test_satellite_PRN << std::endl; - std::cout << "True Initial Doppler " << true_obs_data.doppler_l1_hz << "[Hz], true Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << "[Chips]" << std::endl; + std::cout << "True Initial Doppler " << true_obs_data.doppler_l1_hz << " [Hz], true Initial code delay [Chips]=" << true_obs_data.prn_delay_chips << "[Chips]" << std::endl; true_acq_doppler_hz = true_obs_data.doppler_l1_hz; true_acq_delay_samples = (GPS_L1_CA_CODE_LENGTH_CHIPS - true_obs_data.prn_delay_chips / GPS_L1_CA_CODE_LENGTH_CHIPS) * static_cast(baseband_sampling_freq) * GPS_L1_CA_CODE_PERIOD; acq_samplestamp_samples = 0; @@ -531,8 +533,10 @@ TEST_F(GpsL1CADllPllTrackingPullInTest, ValidationOfResults) { true_acq_doppler_hz = doppler_measurements_map.find(FLAGS_test_satellite_PRN)->second; true_acq_delay_samples = code_delay_measurements_map.find(FLAGS_test_satellite_PRN)->second; - acq_samplestamp_samples = 0; //acq_samplestamp_map.find(FLAGS_test_satellite_PRN)->second; - std::cout << "Estimated Initial Doppler " << true_acq_doppler_hz << "[Hz], estimated Initial code delay " << true_acq_delay_samples << " [Samples]" << std::endl; + acq_samplestamp_samples = 0; + std::cout << "Estimated Initial Doppler " << true_acq_doppler_hz + << " [Hz], estimated Initial code delay " << true_acq_delay_samples << " [Samples]" + << " Acquisition SampleStamp is " << acq_samplestamp_map.find(FLAGS_test_satellite_PRN)->second << std::endl; } //CN0 LOOP std::vector> pull_in_results_v_v; diff --git a/src/utils/front-end-cal/CMakeLists.txt b/src/utils/front-end-cal/CMakeLists.txt index 03d6bc956..81ecf1e54 100644 --- a/src/utils/front-end-cal/CMakeLists.txt +++ b/src/utils/front-end-cal/CMakeLists.txt @@ -33,6 +33,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/libs ${CMAKE_SOURCE_DIR}/src/algorithms/libs ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 52ab62218..69b6c6e97 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -144,8 +144,6 @@ FrontEndCal_msg_rx::FrontEndCal_msg_rx() : gr::block("FrontEndCal_msg_rx", gr::i FrontEndCal_msg_rx::~FrontEndCal_msg_rx() {} - - void wait_message() { while (!stop) @@ -353,13 +351,14 @@ int main(int argc, char** argv) gnss_synchro->PRN = 1; long fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", 2048000); + configuration->set_property("Acquisition.max_dwells", "10"); GNSSBlockFactory block_factory; acquisition = new GpsL1CaPcpsAcquisitionFineDoppler(configuration.get(), "Acquisition", 1, 1); acquisition->set_channel(1); acquisition->set_gnss_synchro(gnss_synchro); - acquisition->set_threshold(configuration->property("Acquisition.threshold", 0.0)); + acquisition->set_threshold(configuration->property("Acquisition.threshold", 2.0)); acquisition->set_doppler_max(configuration->property("Acquisition.doppler_max", 10000)); acquisition->set_doppler_step(configuration->property("Acquisition.doppler_step", 250)); From 5842da980f79c05ea712e0025cb649bb7087da16 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 18:24:10 +0200 Subject: [PATCH 148/194] Remove unused variable --- .../gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 45c6620be..126716e86 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -455,7 +455,6 @@ void pcps_acquisition_fine_doppler_cc::set_state(int state) d_gnss_synchro->Acq_doppler_hz = 0.0; d_gnss_synchro->Acq_samplestamp_samples = 0; d_well_count = 0; - d_input_power = 0.0; d_test_statistics = 0.0; d_active = true; } From 7b6780eb9ea9f569ef864c7145dff658ac3af201 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 20:22:20 +0200 Subject: [PATCH 149/194] Fix building if glog is not present in the system (e.g. CentOS7) --- src/core/monitor/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/monitor/CMakeLists.txt b/src/core/monitor/CMakeLists.txt index 545e8641e..a6bc9c2f3 100644 --- a/src/core/monitor/CMakeLists.txt +++ b/src/core/monitor/CMakeLists.txt @@ -35,3 +35,4 @@ list(SORT CORE_MONITOR_LIBS_HEADERS) add_library(core_monitor_lib ${CORE_MONITOR_LIBS_SOURCES} ${CORE_MONITOR_LIBS_HEADERS}) source_group(Headers FILES ${CORE_MONITOR_LIBS_HEADERS}) target_link_libraries(core_monitor_lib ${Boost_LIBRARIES}) +add_dependencies(core_monitor_lib glog-${glog_RELEASE}) From ff7fbd397a3658292eb3b3dc737d6ec2ab64fa3f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 20:46:32 +0200 Subject: [PATCH 150/194] Fix warning about unused parameter --- src/core/system_parameters/gnss_synchro.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/system_parameters/gnss_synchro.h b/src/core/system_parameters/gnss_synchro.h index 6e240c0c3..c9cd0ee0c 100644 --- a/src/core/system_parameters/gnss_synchro.h +++ b/src/core/system_parameters/gnss_synchro.h @@ -83,6 +83,9 @@ public: template void serialize(Archive& ar, const unsigned int version) { + if (version) + { + }; // Satellite and signal info ar& System; ar& Signal; From 1cd4696da2975b9aa51f14731654c2d8e47b4a5a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Jul 2018 21:00:53 +0200 Subject: [PATCH 151/194] Fix defects detected by Coverity Scan --- .../libs/acquisition_dump_reader.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc index 8cb81718b..992c6a528 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_dump_reader.cc @@ -167,6 +167,20 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, { std::cout << "¡¡¡Unreachable Acquisition dump file!!!" << std::endl; } + acq_doppler_hz = 0.0; + acq_delay_samples = 0.0; + test_statistic = 0.0; + input_power = 0.0; + threshold = 0.0; + positive_acq = 0; + sample_counter = 0; + PRN = 0; + d_sat = 0; + d_doppler_max = doppler_max_; + d_doppler_step = doppler_step_; + d_samples_per_code = samples_per_code_; + d_num_doppler_bins = 0; + acquisition_dump_reader(basename, sat_, doppler_max_, @@ -176,6 +190,7 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, execution); } + acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, unsigned int sat, unsigned int doppler_max, @@ -197,6 +212,7 @@ acquisition_dump_reader::acquisition_dump_reader(const std::string& basename, positive_acq = 0; sample_counter = 0; PRN = 0; + if (d_doppler_step == 0) d_doppler_step = 1; d_num_doppler_bins = static_cast(ceil(static_cast(static_cast(d_doppler_max) - static_cast(-d_doppler_max)) / static_cast(d_doppler_step))); std::vector > mag_aux(d_num_doppler_bins, std::vector(d_samples_per_code)); mag = mag_aux; From d14d4ccdbcb16bc33fd8aa9343a575a92622f31b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 5 Jul 2018 10:51:23 +0200 Subject: [PATCH 152/194] Add work --- .../pcps_acquisition_fine_doppler_cc.cc | 14 ++++++++----- .../gps_l1_acq_performance_test.cc | 21 +++++++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 126716e86..7894ab48b 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -447,8 +447,9 @@ bool pcps_acquisition_fine_doppler_cc::start() void pcps_acquisition_fine_doppler_cc::set_state(int state) { - gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler + //gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler d_state = state; + if (d_state == 1) { d_gnss_synchro->Acq_delay_samples = 0.0; @@ -457,6 +458,7 @@ void pcps_acquisition_fine_doppler_cc::set_state(int state) d_well_count = 0; d_test_statistics = 0.0; d_active = true; + reset_grid(); } else if (d_state == 0) { @@ -490,6 +492,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, switch (d_state) { case 0: // S0. StandBy + std::cout << "S0."; if (d_active == true) { reset_grid(); @@ -502,6 +505,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } break; case 1: // S1. ComputeGrid + std::cout << "S1."; compute_and_accumulate_grid(input_items); d_well_count++; if (d_well_count >= d_max_dwells) @@ -523,10 +527,10 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } d_n_samples_in_buffer = 0; // Record results to file if required - if (d_dump and d_channel == d_dump_channel) - { - dump_results(d_fft_size); - } + //if (d_dump and d_channel == d_dump_channel) + // { + // dump_results(d_fft_size); + // } d_sample_counter += d_fft_size; // sample counter consume_each(d_fft_size); break; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc index f5923d343..26d622850 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc @@ -225,7 +225,7 @@ protected: gr::msg_queue::sptr queue; gr::top_block_sptr top_block; - std::shared_ptr acquisition; + std::shared_ptr acquisition; std::shared_ptr config; std::shared_ptr config_f; Gnss_Synchro gnss_synchro; @@ -298,6 +298,7 @@ void AcquisitionPerformanceTest::wait_message() while (!stop) { channel_internal_queue.wait_and_pop(message); + std::cout << "messahe received" << std::endl; process_message(); } } @@ -307,7 +308,7 @@ void AcquisitionPerformanceTest::process_message() { measurement_counter++; acquisition->reset(); - acquisition->set_state(1); + //acquisition->set_state(1); std::cout << "Progress: " << round(static_cast(measurement_counter) / static_cast(num_of_measurements) * 100.0) << "% \r" << std::flush; if (measurement_counter == num_of_measurements) { @@ -381,6 +382,7 @@ int AcquisitionPerformanceTest::configure_receiver(double cn0, float pfa, unsign config->set_property("Acquisition_1C.implementation", implementation); config->set_property("Acquisition_1C.item_type", "gr_complex"); config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max)); + config->set_property("Acquisition_1C.doppler_min", std::to_string(-doppler_max)); config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step)); config->set_property("Acquisition_1C.threshold", std::to_string(pfa)); @@ -459,13 +461,13 @@ int AcquisitionPerformanceTest::run_receiver() int nsamples = floor(config->property("GNSS-SDR.internal_fs_sps", 2000000) * generated_signal_duration_s); boost::shared_ptr valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); - if (FLAGS_acq_test_implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) + if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) { - acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); + //acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); } else { - if (FLAGS_acq_test_implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) + if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) { acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); } @@ -477,20 +479,21 @@ int AcquisitionPerformanceTest::run_receiver() } acquisition->set_gnss_synchro(&gnss_synchro); + + acquisition->init(); acquisition->set_channel(0); acquisition->set_local_code(); acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000)); acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500)); acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0)); - acquisition->set_state(1); // Ensure that acquisition starts at the first sample + //acquisition->set_state(1); // Ensure that acquisition starts at the first sample acquisition->connect(top_block); - top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); - - acquisition->init(); + acquisition->reset(); top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); top_block->connect(gr_interleaved_char_to_complex, 0, valve, 0); top_block->connect(valve, 0, acquisition->get_left_block(), 0); + top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); start_queue(); From cabf419e76435d660ac90da9eab9d36e629ed020 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 5 Jul 2018 19:02:15 +0200 Subject: [PATCH 153/194] Add Alvaro to the list of contributors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index da4b589f9..2dd1239cb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -40,6 +40,7 @@ Antonio Ramos antonio.ramosdet@gmail.com Developer Marc Majoral marc.majoral@cttc.cat Developer Jordi Vilà-Valls jordi.vila@cttc.cat Consultant Pau Closas pau.closas@northeastern.edu Consultant +Álvaro Cebrián Juan acebrianjuan@gmail.com Contributor Andres Cecilia Luque a.cecilia.luque@gmail.com Contributor Anthony Arnold anthony.arnold@uqconnect.edu.au Contributor Carlos Avilés carlos.avilesr@googlemail.com Contributor From d9f6d41eed8757d700b2bfe686169b3987156e79 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 5 Jul 2018 20:19:29 +0200 Subject: [PATCH 154/194] Fix crash of PCPS acquisition fine doppler on some systems --- .../pcps_acquisition_fine_doppler_cc.cc | 57 ++++++++++++++----- .../pcps_acquisition_fine_doppler_cc.h | 11 +++- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 7e1ffa903..d55065a4c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -133,6 +133,12 @@ void pcps_acquisition_fine_doppler_cc::set_doppler_step(unsigned int doppler_ste { d_grid_data[i] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); } + + if (d_dump) + { + grid_ = arma::fmat(d_fft_size, d_num_doppler_points, arma::fill::zeros); + } + update_carrier_wipeoff(); } @@ -181,11 +187,6 @@ void pcps_acquisition_fine_doppler_cc::init() d_gnss_synchro->Acq_doppler_hz = 0.0; d_gnss_synchro->Acq_samplestamp_samples = 0; d_state = 0; - - if (d_dump) - { - grid_ = arma::fmat(d_fft_size, d_num_doppler_points, arma::fill::zeros); - } } @@ -261,7 +262,6 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF() } } - // -- - Find 1 chip wide code phase exclude range around the peak uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(this->d_fs_in)); int32_t excludeRangeIndex1 = index_time - samplesPerChip; @@ -364,7 +364,6 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() //int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor); int fft_size_extended = signal_samples * zero_padding_factor; gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true); - //zero padding the entire vector std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0)); @@ -386,7 +385,6 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() memcpy(&code_replica[(n + 1) * d_fft_size], code_replica, d_fft_size * sizeof(gr_complex)); } //2. Perform code wipe-off - volk_32fc_x2_multiply_32fc(fft_operator->get_inbuf(), d_10_ms_buffer, code_replica, signal_samples); // 3. Perform the FFT (zero padded!) @@ -402,8 +400,8 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() //case even int counter = 0; + float* fftFreqBins= new float[fft_size_extended]; - float fftFreqBins[fft_size_extended]; std::fill_n(fftFreqBins, fft_size_extended, 0.0); for (int k = 0; k < (fft_size_extended / 2); k++) @@ -414,8 +412,9 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() for (int k = fft_size_extended / 2; k > 0; k--) { - fftFreqBins[counter] = ((-static_cast(d_fs_in) / 2) * static_cast(k)) / (static_cast(fft_size_extended) / 2.0); + fftFreqBins[counter] = ((-static_cast(d_fs_in) / 2.0) * static_cast(k)) / (static_cast(fft_size_extended) / 2.0); counter++; + } // 5. Update the Doppler estimation in Hz @@ -434,9 +433,11 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() delete fft_operator; volk_gnsssdr_free(code_replica); volk_gnsssdr_free(p_tmp_vector); + delete[] fftFreqBins; return d_fft_size; } + // Called by gnuradio to enable drivers, etc for i/o devices. bool pcps_acquisition_fine_doppler_cc::start() { @@ -444,6 +445,32 @@ bool pcps_acquisition_fine_doppler_cc::start() return true; } + +void pcps_acquisition_fine_doppler_cc::set_state(int state) +{ + //gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler + d_state = state; + + if (d_state == 1) + { + d_gnss_synchro->Acq_delay_samples = 0.0; + d_gnss_synchro->Acq_doppler_hz = 0.0; + d_gnss_synchro->Acq_samplestamp_samples = 0; + d_well_count = 0; + d_test_statistics = 0.0; + d_active = true; + reset_grid(); + } + else if (d_state == 0) + { + } + else + { + LOG(ERROR) << "State can only be set to 0 or 1"; + } +} + + int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused))) @@ -466,6 +493,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, switch (d_state) { case 0: // S0. StandBy + std::cout << "S0."; if (d_active == true) { reset_grid(); @@ -478,6 +506,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } break; case 1: // S1. ComputeGrid + std::cout << "S1."; compute_and_accumulate_grid(input_items); d_well_count++; if (d_well_count >= d_max_dwells) @@ -499,10 +528,10 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } d_n_samples_in_buffer = 0; // Record results to file if required - if (d_dump and d_channel == d_dump_channel) - { - dump_results(d_fft_size); - } + //if (d_dump and d_channel == d_dump_channel) + // { + // dump_results(d_fft_size); + // } d_sample_counter += d_fft_size; // sample counter consume_each(d_fft_size); break; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index 7788e12d6..69a5ff2cc 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -51,12 +51,12 @@ #include "gnss_synchro.h" #include "acq_conf.h" +#include #include #include #include #include #include -#include class pcps_acquisition_fine_doppler_cc; @@ -70,7 +70,6 @@ pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_); * \brief This class implements a Parallel Code Phase Search Acquisition. * */ - class pcps_acquisition_fine_doppler_cc : public gr::block { private: @@ -131,7 +130,6 @@ private: long int d_dump_number; unsigned int d_dump_channel; - public: /*! * \brief Default destructor. @@ -212,6 +210,13 @@ public: */ void set_doppler_step(unsigned int doppler_step); + /*! + * \brief If set to 1, ensures that acquisition starts at the + * first available sample. + * \param state - int=1 forces start of acquisition + */ + void set_state(int state); + /*! * \brief Parallel Code Phase Search Acquisition signal processing. */ From 6055200440ee3f18f2c8245d930ac6caff273e0e Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 5 Jul 2018 20:26:37 +0200 Subject: [PATCH 155/194] Code cleaning --- .../pcps_acquisition_fine_doppler_cc.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index d55065a4c..aab717adb 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -493,7 +493,6 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, switch (d_state) { case 0: // S0. StandBy - std::cout << "S0."; if (d_active == true) { reset_grid(); @@ -506,7 +505,6 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } break; case 1: // S1. ComputeGrid - std::cout << "S1."; compute_and_accumulate_grid(input_items); d_well_count++; if (d_well_count >= d_max_dwells) @@ -528,10 +526,10 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } d_n_samples_in_buffer = 0; // Record results to file if required - //if (d_dump and d_channel == d_dump_channel) - // { - // dump_results(d_fft_size); - // } + if (d_dump and d_channel == d_dump_channel) + { + dump_results(d_fft_size); + } d_sample_counter += d_fft_size; // sample counter consume_each(d_fft_size); break; From bad8b25ce7456d9fac750c229ca205443467b965 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 5 Jul 2018 21:30:33 +0200 Subject: [PATCH 156/194] Fix warning of unused parameter --- .../adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h | 2 +- .../acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h | 2 +- .../acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h index 83917420c..5658aa06c 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h @@ -122,7 +122,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; - void set_state(int state) override{}; + void set_state(int state __attribute__((unused))) override{}; private: ConfigurationInterface* configuration_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h index 0cdfd3077..83218aac4 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h @@ -120,7 +120,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; - void set_state(int state) override{}; + void set_state(int state __attribute__((unused))) override{}; private: pcps_assisted_acquisition_cc_sptr acquisition_cc_; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h index 900b65ed3..7d3e7b58e 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h @@ -122,7 +122,7 @@ public: * \brief Restart acquisition algorithm */ void reset() override; - void set_state(int state) override{}; + void set_state(int state __attribute__((unused))) override{}; private: ConfigurationInterface* configuration_; From 5ef6157fc1e522b34dcbe3d169275928237fe055 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 5 Jul 2018 21:31:38 +0200 Subject: [PATCH 157/194] Store acquisition results only when there is a decision --- .../pcps_acquisition_fine_doppler_cc.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index aab717adb..629f53c75 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -400,7 +400,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() //case even int counter = 0; - float* fftFreqBins= new float[fft_size_extended]; + float *fftFreqBins = new float[fft_size_extended]; std::fill_n(fftFreqBins, fft_size_extended, 0.0); @@ -414,7 +414,6 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler() { fftFreqBins[counter] = ((-static_cast(d_fs_in) / 2.0) * static_cast(k)) / (static_cast(fft_size_extended) / 2.0); counter++; - } // 5. Update the Doppler estimation in Hz @@ -525,11 +524,6 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, d_state = 5; //negative acquisition } d_n_samples_in_buffer = 0; - // Record results to file if required - if (d_dump and d_channel == d_dump_channel) - { - dump_results(d_fft_size); - } d_sample_counter += d_fft_size; // sample counter consume_each(d_fft_size); break; @@ -562,6 +556,11 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz; d_positive_acq = 1; d_active = false; + // Record results to file if required + if (d_dump and d_channel == d_dump_channel) + { + dump_results(d_fft_size); + } // Send message to channel port //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL this->message_port_pub(pmt::mp("events"), pmt::from_long(1)); d_state = 0; @@ -581,6 +580,11 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, DLOG(INFO) << "doppler " << d_gnss_synchro->Acq_doppler_hz; d_positive_acq = 0; d_active = false; + // Record results to file if required + if (d_dump and d_channel == d_dump_channel) + { + dump_results(d_fft_size); + } // Send message to channel port //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL this->message_port_pub(pmt::mp("events"), pmt::from_long(2)); d_state = 0; From c10d457ae520600c47267db771ed8e330cc5a408 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 5 Jul 2018 21:33:08 +0200 Subject: [PATCH 158/194] Accept two types of algorithms --- .../gps_l1_acq_performance_test.cc | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc index 26d622850..164dd96b4 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc @@ -44,7 +44,7 @@ DEFINE_string(config_file_ptest, std::string(""), "File containing alternative configuration parameters for the acquisition performance test."); DEFINE_string(acq_test_input_file, std::string(""), "File containing raw signal data, must be in int8_t format. The signal generator will not be used."); -DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test"); +DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test. Alternative: GPS_L1_CA_PCPS_Acquisition_Fine_Doppler"); DEFINE_int32(acq_test_doppler_max, 5000, "Maximum Doppler, in Hz"); DEFINE_int32(acq_test_doppler_step, 125, "Doppler step, in Hz."); @@ -225,7 +225,7 @@ protected: gr::msg_queue::sptr queue; gr::top_block_sptr top_block; - std::shared_ptr acquisition; + std::shared_ptr acquisition; std::shared_ptr config; std::shared_ptr config_f; Gnss_Synchro gnss_synchro; @@ -298,7 +298,6 @@ void AcquisitionPerformanceTest::wait_message() while (!stop) { channel_internal_queue.wait_and_pop(message); - std::cout << "messahe received" << std::endl; process_message(); } } @@ -308,7 +307,7 @@ void AcquisitionPerformanceTest::process_message() { measurement_counter++; acquisition->reset(); - //acquisition->set_state(1); + acquisition->set_state(1); std::cout << "Progress: " << round(static_cast(measurement_counter) / static_cast(num_of_measurements) * 100.0) << "% \r" << std::flush; if (measurement_counter == num_of_measurements) { @@ -463,7 +462,7 @@ int AcquisitionPerformanceTest::run_receiver() boost::shared_ptr valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) { - //acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); + acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); } else { @@ -479,14 +478,14 @@ int AcquisitionPerformanceTest::run_receiver() } acquisition->set_gnss_synchro(&gnss_synchro); - - acquisition->init(); acquisition->set_channel(0); - acquisition->set_local_code(); acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000)); acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500)); acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0)); - //acquisition->set_state(1); // Ensure that acquisition starts at the first sample + acquisition->init(); + acquisition->set_local_code(); + + acquisition->set_state(1); // Ensure that acquisition starts at the first sample acquisition->connect(top_block); acquisition->reset(); @@ -554,6 +553,14 @@ void AcquisitionPerformanceTest::plot_results() Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("linespoints"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.cmd("set font \"Times,18\""); g1.set_title("Receiver Operating Characteristic for GPS L1 C/A acquisition"); g1.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition_1C.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition_1C.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); @@ -580,9 +587,16 @@ void AcquisitionPerformanceTest::plot_results() g1.set_legend(); g1.savetops("ROC"); g1.savetopdf("ROC", 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output Gnuplot g2("linespoints"); + if (FLAGS_show_plots) + { + g2.showonscreen(); // window output + } + else + { + g2.disablescreen(); + } g2.cmd("set font \"Times,18\""); g2.set_title("Receiver Operating Characteristic for GPS L1 C/A valid acquisition"); g2.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition_1C.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition_1C.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); @@ -609,7 +623,6 @@ void AcquisitionPerformanceTest::plot_results() g2.set_legend(); g2.savetops("ROC-valid-detection"); g2.savetopdf("ROC-valid-detection", 18); - if (FLAGS_show_plots) g2.showonscreen(); // window output } catch (const GnuplotException& ge) { From 2f3376dc386cee9c9f524902b571bc804bea40b0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 6 Jul 2018 11:14:38 +0200 Subject: [PATCH 159/194] Ensure that a terminal is not open when the flag --noshow_plots is passed to the tests --- src/tests/system-tests/obs_system_test.cc | 27 +++++++- src/tests/system-tests/position_test.cc | 18 +++++- .../unit-tests/arithmetic/fft_length_test.cc | 17 ++++- ...ileo_e1_pcps_ambiguous_acquisition_test.cc | 9 ++- .../gps_l1_ca_pcps_acquisition_test.cc | 9 ++- .../gps_l2_m_pcps_acquisition_test.cc | 9 ++- .../gps_l1_ca_dll_pll_tracking_test.cc | 63 ++++++++++++++++--- 7 files changed, 136 insertions(+), 16 deletions(-) diff --git a/src/tests/system-tests/obs_system_test.cc b/src/tests/system-tests/obs_system_test.cc index 391c2a969..7764d865d 100644 --- a/src/tests/system-tests/obs_system_test.cc +++ b/src/tests/system-tests/obs_system_test.cc @@ -600,6 +600,14 @@ void ObsSystemTest::compute_pseudorange_error( Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("linespoints"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title(signal_name + " Pseudorange error"); g1.set_grid(); g1.set_xlabel("PRN"); @@ -620,7 +628,6 @@ void ObsSystemTest::compute_pseudorange_error( } g1.savetops("Pseudorange_error_" + signal_name); g1.savetopdf("Pseudorange_error_" + signal_name, 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output } catch (const GnuplotException& ge) { @@ -691,6 +698,14 @@ void ObsSystemTest::compute_carrierphase_error( Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("linespoints"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title(signal_name + " Carrier phase error"); g1.set_grid(); g1.set_xlabel("PRN"); @@ -711,7 +726,6 @@ void ObsSystemTest::compute_carrierphase_error( } g1.savetops("Carrier_phase_error_" + signal_name); g1.savetopdf("Carrier_phase_error_" + signal_name, 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output } catch (const GnuplotException& ge) { @@ -782,6 +796,14 @@ void ObsSystemTest::compute_doppler_error( Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("linespoints"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title(signal_name + " Doppler error"); g1.set_grid(); g1.set_xlabel("PRN"); @@ -802,7 +824,6 @@ void ObsSystemTest::compute_doppler_error( } g1.savetops("Doppler_error_" + signal_name); g1.savetopdf("Doppler_error_" + signal_name, 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output } catch (const GnuplotException& ge) { diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index 00e64ccad..f7f4dc302 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -619,6 +619,14 @@ void StaticPositionSystemTest::print_results(const std::vector& east, Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("points"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title("2D precision"); g1.set_xlabel("East [m]"); g1.set_ylabel("North [m]"); @@ -635,9 +643,16 @@ void StaticPositionSystemTest::print_results(const std::vector& east, g1.savetops("Position_test_2D"); g1.savetopdf("Position_test_2D", 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output Gnuplot g2("points"); + if (FLAGS_show_plots) + { + g2.showonscreen(); // window output + } + else + { + g2.disablescreen(); + } g2.set_title("3D precision"); g2.set_xlabel("East [m]"); g2.set_ylabel("North [m]"); @@ -656,7 +671,6 @@ void StaticPositionSystemTest::print_results(const std::vector& east, g2.savetops("Position_test_3D"); g2.savetopdf("Position_test_3D"); - if (FLAGS_show_plots) g2.showonscreen(); // window output } catch (const GnuplotException& ge) { diff --git a/src/tests/unit-tests/arithmetic/fft_length_test.cc b/src/tests/unit-tests/arithmetic/fft_length_test.cc index 78961dd2b..f7f006d99 100644 --- a/src/tests/unit-tests/arithmetic/fft_length_test.cc +++ b/src/tests/unit-tests/arithmetic/fft_length_test.cc @@ -116,6 +116,14 @@ TEST(FFTLengthTest, MeasureExecutionTime) Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("linespoints"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title("FFT execution times for different lengths"); g1.set_grid(); g1.set_xlabel("FFT length"); @@ -124,9 +132,16 @@ TEST(FFTLengthTest, MeasureExecutionTime) g1.set_style("points").plot_xy(powers_of_two, execution_times_powers_of_two, "Power of 2"); g1.savetops("FFT_execution_times_extended"); g1.savetopdf("FFT_execution_times_extended", 18); - if (FLAGS_show_plots) g1.showonscreen(); // window output Gnuplot g2("linespoints"); + if (FLAGS_show_plots) + { + g2.showonscreen(); // window output + } + else + { + g2.disablescreen(); + } g2.set_title("FFT execution times for different lengths (up to 2^{14}=16384)"); g2.set_grid(); g2.set_xlabel("FFT length"); diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc index d4477ee8d..49ddff306 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc @@ -201,6 +201,14 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid() Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("lines"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title("Galileo E1b/c signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN)); g1.set_xlabel("Doppler [Hz]"); g1.set_ylabel("Sample"); @@ -209,7 +217,6 @@ void GalileoE1PcpsAmbiguousAcquisitionTest::plot_grid() g1.savetops("Galileo_E1_acq_grid"); g1.savetopdf("Galileo_E1_acq_grid"); - if (FLAGS_show_plots) g1.showonscreen(); } catch (const GnuplotException& ge) { diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index e9ee38210..caae8882e 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -202,6 +202,14 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid() Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("lines"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title("GPS L1 C/A signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN)); g1.set_xlabel("Doppler [Hz]"); g1.set_ylabel("Sample"); @@ -210,7 +218,6 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid() g1.savetops("GPS_L1_acq_grid"); g1.savetopdf("GPS_L1_acq_grid"); - if (FLAGS_show_plots) g1.showonscreen(); } catch (const GnuplotException &ge) { diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc index 7092fac26..5fa9a4890 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc @@ -205,6 +205,14 @@ void GpsL2MPcpsAcquisitionTest::plot_grid() Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("impulses"); + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title("GPS L2CM signal acquisition for satellite PRN #" + std::to_string(gnss_synchro.PRN)); g1.set_xlabel("Doppler [Hz]"); g1.set_ylabel("Sample"); @@ -213,7 +221,6 @@ void GpsL2MPcpsAcquisitionTest::plot_grid() g1.savetops("GPS_L2CM_acq_grid"); g1.savetopdf("GPS_L2CM_acq_grid"); - if (FLAGS_show_plots) g1.showonscreen(); } catch (const GnuplotException &ge) { diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 523be87a3..98c40ad20 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -795,7 +795,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values.size(); current_cn0_idx++) { Gnuplot g1("linespoints"); - if (FLAGS_show_plots) g1.showonscreen(); // window output + if (FLAGS_show_plots) + { + g1.showonscreen(); // window output + } + else + { + g1.disablescreen(); + } g1.set_title(std::to_string(generator_CN0_values.at(current_cn0_idx)) + " dB-Hz, " + "PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz" + "GPS L1 C/A (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g1.set_grid(); g1.set_xlabel("Time [s]"); @@ -809,7 +816,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) g1.savetopdf("Correlators_outputs" + std::to_string(generator_CN0_values.at(current_cn0_idx)), 18); } Gnuplot g2("points"); - if (FLAGS_show_plots) g2.showonscreen(); // window output + if (FLAGS_show_plots) + { + g2.showonscreen(); // window output + } + else + { + g2.disablescreen(); + } g2.set_multiplot(ceil(static_cast(generator_CN0_values.size()) / 2.0), ceil(static_cast(generator_CN0_values.size()) / 2)); for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values.size(); current_cn0_idx++) @@ -840,7 +854,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) g3.set_legend(); g3.savetops("CN0_output"); g3.savetopdf("CN0_output", 18); - if (FLAGS_show_plots) g3.showonscreen(); // window output + if (FLAGS_show_plots) + { + g3.showonscreen(); // window output + } + else + { + g3.disablescreen(); + } } //PLOT ERROR FIGURES (only if it is used the signal generator) @@ -849,7 +870,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) if (FLAGS_plot_detail_level >= 1) { Gnuplot g5("points"); - if (FLAGS_show_plots) g5.showonscreen(); // window output + if (FLAGS_show_plots) + { + g5.showonscreen(); // window output + } + else + { + g5.disablescreen(); + } g5.set_title("Code delay error, PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g5.set_grid(); g5.set_xlabel("Time [s]"); @@ -874,7 +902,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) Gnuplot g6("points"); - if (FLAGS_show_plots) g6.showonscreen(); // window output + if (FLAGS_show_plots) + { + g6.showonscreen(); // window output + } + else + { + g6.disablescreen(); + } g6.set_title("Accumulated carrier phase error, PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g6.set_grid(); g6.set_xlabel("Time [s]"); @@ -898,7 +933,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) g6.savetopdf("Carrier_phase_error_output", 18); Gnuplot g4("points"); - if (FLAGS_show_plots) g4.showonscreen(); // window output + if (FLAGS_show_plots) + { + g4.showonscreen(); // window output + } + else + { + g4.disablescreen(); + } g4.set_multiplot(ceil(static_cast(generator_CN0_values.size()) / 2.0), ceil(static_cast(generator_CN0_values.size()) / 2)); for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values_sweep_copy.at(config_idx).size(); current_cn0_idx++) @@ -942,7 +984,14 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) //plot metrics Gnuplot g7("linespoints"); - if (FLAGS_show_plots) g7.showonscreen(); // window output + if (FLAGS_show_plots) + { + g7.showonscreen(); // window output + } + else + { + g7.disablescreen(); + } g7.set_title("Doppler error metrics (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g7.set_grid(); g7.set_xlabel("CN0 [dB-Hz]"); From fe6a6ce5b7dcc8f0fc395ef6408ffcdfaf92de81 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 6 Jul 2018 19:56:32 +0200 Subject: [PATCH 160/194] Fix building with Pybombs --- .gitlab-ci.yml | 523 -------------------------------- src/core/monitor/CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 523 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index d86c3a7d0..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,523 +0,0 @@ -# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab -# -# Useful links: -# Website: http://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 python2-mako python2-six 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 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 - 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 https://sites.cttc.es/gnss_files/SDK/Rocko/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh - - echo "d3c3d5f909c1ca81435108a3cfc4227b 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 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON -DENABLE_RAW_UDP=ON .. - - make - - make install DESTDIR=/usr/local/oecore-x86_64/sysroots/armv7ahf-neon-oe-linux-gnueabi/ - allow_failure: true - - -debian8.10: - image: debian:8.10-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 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.3: - image: debian:9.3-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 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 - - -debian9.3-i386: - image: i386/debian:9.3-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 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_PACKAGING=ON -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON .. - - NPROC=$(grep -c ^processor /proc/cpuinfo) - - make -j$(($NPROC+1)) - - make check - - make install - - -debian10: - image: debian:buster-slim - stage: build - script: - - apt-get update - - apt-get upgrade -y - - apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libiio-dev gr-iio 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 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 - - -fedora27: - image: fedora:27 - 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 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 - - -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 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:42.3 - stage: build - before_script: - - pwd - script: - - zypper -n up - - zypper -n install cmake git gcc-c++ boost-devel log4cpp-devel gnuradio-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 up - - 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 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 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 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 - - -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 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 - 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 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: - 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 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 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 - - -# 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 "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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:master\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev 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 transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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.10.1\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y 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 libgflags-dev libgoogle-glog-dev libgtest-dev 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 transfig octave && 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\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\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 diff --git a/src/core/monitor/CMakeLists.txt b/src/core/monitor/CMakeLists.txt index a6bc9c2f3..00f051f39 100644 --- a/src/core/monitor/CMakeLists.txt +++ b/src/core/monitor/CMakeLists.txt @@ -27,6 +27,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/core/system_parameters ${GLOG_INCLUDE_DIRS} ${GFlags_INCLUDE_DIRS} + ${GNURADIO_RUNTIME_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ) From 89c00560f298ebc0c5d75dc115c014a43114384e Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Sat, 7 Jul 2018 15:39:09 +0200 Subject: [PATCH 161/194] Fix Acquisition fine Doppler implementation --- .../pcps_acquisition_fine_doppler_cc.cc | 41 ++++++++----- .../pcps_acquisition_fine_doppler_cc.h | 2 - src/tests/common-files/tracking_tests_flags.h | 1 + ...gps_l1_ca_dll_pll_tracking_pull-in_test.cc | 61 +++++++++++++------ 4 files changed, 72 insertions(+), 33 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index 629f53c75..69fedeb6f 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -63,10 +63,8 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con d_active = false; d_fs_in = conf_.fs_in; d_samples_per_ms = conf_.samples_per_ms; - d_sampled_ms = conf_.sampled_ms; d_config_doppler_max = conf_.doppler_max; - d_config_doppler_min = -conf_.doppler_max; - d_fft_size = d_sampled_ms * d_samples_per_ms; + d_fft_size = d_samples_per_ms; // HS Acquisition d_max_dwells = conf_.max_dwells; d_gnuradio_forecast_samples = d_fft_size; @@ -75,7 +73,7 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con d_fft_codes = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_magnitude = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); - d_10_ms_buffer = static_cast(volk_gnsssdr_malloc(10 * d_samples_per_ms * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_10_ms_buffer = static_cast(volk_gnsssdr_malloc(50 * d_samples_per_ms * sizeof(gr_complex), volk_gnsssdr_get_alignment())); // Direct FFT d_fft_if = new gr::fft::fft_complex(d_fft_size, true); @@ -126,7 +124,7 @@ void pcps_acquisition_fine_doppler_cc::set_doppler_step(unsigned int doppler_ste d_doppler_step = doppler_step; // Create the search grid array - d_num_doppler_points = floor(std::abs(d_config_doppler_max - d_config_doppler_min) / d_doppler_step); + d_num_doppler_points = floor(std::abs(2 * d_config_doppler_max) / d_doppler_step); d_grid_data = new float *[d_num_doppler_points]; for (int i = 0; i < d_num_doppler_points; i++) @@ -222,7 +220,7 @@ void pcps_acquisition_fine_doppler_cc::update_carrier_wipeoff() d_grid_doppler_wipeoffs = new gr_complex *[d_num_doppler_points]; for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++) { - doppler_hz = d_config_doppler_min + d_doppler_step * doppler_index; + doppler_hz = d_doppler_step * doppler_index - d_config_doppler_max; // doppler search steps // compute the carrier doppler wipe-off signal and store it phase_step_rad = static_cast(GPS_TWO_PI) * doppler_hz / static_cast(d_fs_in); @@ -295,7 +293,7 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF() // 4- record the maximum peak and the associated synchronization parameters d_gnss_synchro->Acq_delay_samples = static_cast(index_time); - d_gnss_synchro->Acq_doppler_hz = static_cast(index_doppler * d_doppler_step + d_config_doppler_min); + d_gnss_synchro->Acq_doppler_hz = static_cast(index_doppler * d_doppler_step - d_config_doppler_max); d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter; return d_test_statistics; @@ -333,6 +331,7 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons // doppler search steps // Perform the carrier wipe-off volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs[doppler_index], d_fft_size); + // 3- Perform the FFT-based convolution (parallel time search) // Compute the FFT of the carrier wiped--off incoming signal d_fft_if->execute(); @@ -352,6 +351,14 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons volk_gnsssdr_free(p_tmp_vector); return d_fft_size; + //debug + // std::cout << "iff=["; + // for (int n = 0; n < d_fft_size; n++) + // { + // std::cout << std::real(d_ifft->get_outbuf()[n]) << "+" << std::imag(d_ifft->get_outbuf()[n]) << "i,"; + // } + // std::cout << "]\n"; + // getchar(); } @@ -495,6 +502,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, if (d_active == true) { reset_grid(); + d_n_samples_in_buffer = 0; d_state = 1; } if (!acq_parameters.blocking_on_standby) @@ -505,6 +513,8 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, break; case 1: // S1. ComputeGrid compute_and_accumulate_grid(input_items); + memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast(input_items[0]), d_fft_size * sizeof(gr_complex)); + d_n_samples_in_buffer += d_fft_size; d_well_count++; if (d_well_count >= d_max_dwells) { @@ -522,10 +532,9 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, else { d_state = 5; //negative acquisition + d_n_samples_in_buffer = 0; } - d_n_samples_in_buffer = 0; - d_sample_counter += d_fft_size; // sample counter - consume_each(d_fft_size); + break; case 3: // Fine doppler estimation samples_remaining = 10 * d_samples_per_ms - d_n_samples_in_buffer; @@ -539,10 +548,14 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, } else { - memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast(input_items[0]), samples_remaining * sizeof(gr_complex)); - estimate_Doppler(); //disabled in repo - d_sample_counter += samples_remaining; // sample counter - consume_each(samples_remaining); + if (samples_remaining > 0) + { + memcpy(&d_10_ms_buffer[d_n_samples_in_buffer], reinterpret_cast(input_items[0]), samples_remaining * sizeof(gr_complex)); + d_sample_counter += samples_remaining; // sample counter + consume_each(samples_remaining); + } + estimate_Doppler(); //disabled in repo + d_n_samples_in_buffer = 0; d_state = 4; } break; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h index 69a5ff2cc..4bdf583d5 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.h @@ -94,11 +94,9 @@ private: float d_threshold; std::string d_satellite_str; int d_config_doppler_max; - int d_config_doppler_min; int d_num_doppler_points; int d_doppler_step; - unsigned int d_sampled_ms; unsigned int d_fft_size; unsigned long int d_sample_counter; gr_complex* d_carrier; diff --git a/src/tests/common-files/tracking_tests_flags.h b/src/tests/common-files/tracking_tests_flags.h index dc54da91e..275c90017 100644 --- a/src/tests/common-files/tracking_tests_flags.h +++ b/src/tests/common-files/tracking_tests_flags.h @@ -61,6 +61,7 @@ DEFINE_double(acq_Delay_error_chips_start, 2.0, "Acquisition Code Delay error st DEFINE_double(acq_Delay_error_chips_stop, -2.0, "Acquisition Code Delay error stop sweep value [Chips]"); DEFINE_double(acq_Delay_error_chips_step, -0.1, "Acquisition Code Delay error sweep step value [Chips]"); +DEFINE_int64(skip_samples, 0, "Skip an initial transitory in the processed signal file capture [samples]"); DEFINE_int32(plot_detail_level, 0, "Specify the desired plot detail (0,1,2): 0 - Minimum plots (default) 2 - Plot all tracking parameters"); diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc index e449fa2e0..0ca01547d 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc @@ -40,10 +40,12 @@ #include #include #include +#include #include #include "GPS_L1_CA.h" #include "gnss_block_factory.h" #include "tracking_interface.h" +#include "gps_l1_ca_pcps_acquisition.h" #include "gps_l1_ca_pcps_acquisition_fine_doppler.h" #include "in_memory_configuration.h" #include "tracking_true_obs_reader.h" @@ -71,6 +73,7 @@ private: public: int rx_message; + gr::top_block_sptr top_block; ~Acquisition_msg_rx(); //!< Default destructor }; @@ -87,6 +90,7 @@ void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg) { long int message = pmt::to_long(msg); rx_message = message; + top_block->stop(); //stop the flowgraph } catch (boost::bad_any_cast& e) { @@ -335,16 +339,36 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); config->set_property("Acquisition.max_dwells", "10"); + config->set_property("Acquisition.blocking_on_standby", "true"); config->set_property("Acquisition.dump", "true"); - GNSSBlockFactory block_factory; + config->set_property("Acquisition.dump_filename", "./data/acquisition.dat"); + + config->set_property("Acquisition.use_CFAR_algorithm", "false"); GpsL1CaPcpsAcquisitionFineDoppler* acquisition; - acquisition = new GpsL1CaPcpsAcquisitionFineDoppler(config.get(), "Acquisition", 1, 1); + acquisition = new GpsL1CaPcpsAcquisitionFineDoppler(config.get(), "Acquisition", 1, 0); + + //GpsL1CaPcpsAcquisition* acquisition; + //acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 0); acquisition->set_channel(1); acquisition->set_gnss_synchro(&tmp_gnss_synchro); acquisition->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold)); - acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000)); + acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 25000)); acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500)); + acquisition->connect(top_block); + + + gr::blocks::file_source::sptr file_source; + std::string file = FLAGS_signal_file; + const char* file_name = file.c_str(); + file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); + file_source->seek(2 * FLAGS_skip_samples, 0); //skip head. ibyte, two bytes per complex sample + gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make(); + gr::blocks::head::sptr head_samples = gr::blocks::head::make(sizeof(gr_complex), baseband_sampling_freq * FLAGS_duration); + + top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); + top_block->connect(gr_interleaved_char_to_complex, 0, head_samples, 0); + top_block->connect(head_samples, 0, acquisition->get_left_block(), 0); boost::shared_ptr msg_rx; try @@ -357,15 +381,8 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) exit(0); } - gr::blocks::file_source::sptr file_source; - std::string file = FLAGS_signal_file; - const char* file_name = file.c_str(); - file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); - gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make(); - gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); - top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); - top_block->connect(gr_interleaved_char_to_complex, 0, acquisition->get_left_block(), 0); - top_block->msg_connect(acquisition->get_left_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); + msg_rx->top_block = top_block; + top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); // 5. Run the flowgraph // Get visible GPS satellites (positive acquisitions with Doppler measurements) @@ -380,6 +397,7 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) code_delay_measurements_map.clear(); acq_samplestamp_map.clear(); + for (unsigned int PRN = 1; PRN < 33; PRN++) { tmp_gnss_synchro.PRN = PRN; @@ -387,6 +405,7 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) acquisition->init(); acquisition->set_local_code(); acquisition->reset(); + acquisition->set_state(1); msg_rx->rx_message = 0; top_block->run(); if (start_msg == true) @@ -412,10 +431,17 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) std::cout << " . "; } top_block->stop(); - file_source->seek(0, 0); + file_source->seek(2 * FLAGS_skip_samples, 0); //skip head. ibyte, two bytes per complex sample + head_samples.reset(); std::cout.flush(); } std::cout << "]" << std::endl; + std::cout << "-------------------------------------------\n"; + + for (auto& x : doppler_measurements_map) + { + std::cout << "DETECTED PRN: " << x.first << " with Doppler: " << x.second << " [Hz], code phase: " << code_delay_measurements_map.at(x.first) << " [samples] at signal SampleStamp " << acq_samplestamp_map.at(x.first) << "\n"; + } // report the elapsed time end = std::chrono::system_clock::now(); @@ -587,19 +613,20 @@ TEST_F(GpsL1CADllPllTrackingPullInTest, ValidationOfResults) gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make(); gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(Gnss_Synchro)); + gr::blocks::head::sptr head_samples = gr::blocks::head::make(sizeof(gr_complex), baseband_sampling_freq * FLAGS_duration); top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); - top_block->connect(gr_interleaved_char_to_complex, 0, tracking->get_left_block(), 0); + top_block->connect(gr_interleaved_char_to_complex, 0, head_samples, 0); + top_block->connect(head_samples, 0, tracking->get_left_block(), 0); top_block->connect(tracking->get_right_block(), 0, sink, 0); top_block->msg_connect(tracking->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); - - file_source->seek(acq_samplestamp_samples, 0); + file_source->seek(2 * FLAGS_skip_samples + acq_samplestamp_samples, 0); //skip head. ibyte, two bytes per complex sample }) << "Failure connecting the blocks of tracking test."; //******************************************************************** //***** STEP 5: Perform the signal tracking and read the results ***** //******************************************************************** - std::cout << "------------ START TRACKING -------------" << std::endl; + std::cout << "--- START TRACKING WITH PULL-IN ERROR: " << acq_doppler_error_hz_values.at(current_acq_doppler_error_idx) << " [Hz] and " << acq_delay_error_chips_values.at(current_acq_doppler_error_idx).at(current_acq_code_error_idx) << " [Chips] ---" << std::endl; tracking->start_tracking(); std::chrono::time_point start, end; EXPECT_NO_THROW({ From d76dab62485f6aa08a3a5526a2b6b4623225f787 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 8 Jul 2018 13:26:30 +0200 Subject: [PATCH 162/194] Implement non-coherent acquisition --- .../gnuradio_blocks/pcps_acquisition.cc | 54 +++++++++++++------ .../gnuradio_blocks/pcps_acquisition.h | 6 ++- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index a9d6f8c53..c77b48ef1 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -63,7 +63,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_positive_acq = 0; d_state = 0; d_old_freq = 0; - d_well_count = 0; + d_num_noncoherent_integrations_counter = 0; d_fft_size = acq_parameters.sampled_ms * acq_parameters.samples_per_ms; d_mag = 0; d_input_power = 0.0; @@ -82,6 +82,8 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_cshort = true; } + d_tmp_buffer = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); + // COD: // Experimenting with the overlap/save technique for handling bit trannsitions // The problem: Circular correlation is asynchronous with the received code. @@ -110,6 +112,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_gnss_synchro = 0; d_grid_doppler_wipeoffs = nullptr; d_grid_doppler_wipeoffs_step_two = nullptr; + d_magnitude_grid = nullptr; d_worker_active = false; d_data_buffer = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); if (d_cshort) @@ -134,8 +137,10 @@ pcps_acquisition::~pcps_acquisition() for (unsigned int i = 0; i < d_num_doppler_bins; i++) { volk_gnsssdr_free(d_grid_doppler_wipeoffs[i]); + volk_gnsssdr_free(d_magnitude_grid[i]); } delete[] d_grid_doppler_wipeoffs; + delete[] d_magnitude_grid; } if (acq_parameters.make_2_steps) { @@ -147,6 +152,7 @@ pcps_acquisition::~pcps_acquisition() } volk_gnsssdr_free(d_fft_codes); volk_gnsssdr_free(d_magnitude); + volk_gnsssdr_free(d_tmp_buffer); delete d_ifft; delete d_fft_if; volk_gnsssdr_free(d_data_buffer); @@ -243,9 +249,12 @@ void pcps_acquisition::init() d_grid_doppler_wipeoffs_step_two[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); } } + + d_magnitude_grid = new float*[d_num_doppler_bins]; for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++) { d_grid_doppler_wipeoffs[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_magnitude_grid[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); int doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * doppler_index; update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler); } @@ -268,6 +277,7 @@ void pcps_acquisition::update_grid_doppler_wipeoffs() } } + void pcps_acquisition::update_grid_doppler_wipeoffs_step2() { for (unsigned int doppler_index = 0; doppler_index < acq_parameters.num_doppler_bins_step2; doppler_index++) @@ -277,6 +287,7 @@ void pcps_acquisition::update_grid_doppler_wipeoffs_step2() } } + void pcps_acquisition::set_state(int state) { gr::thread::scoped_lock lock(d_setlock); // require mutex with work function called by the scheduler @@ -286,7 +297,6 @@ void pcps_acquisition::set_state(int state) d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; d_gnss_synchro->Acq_samplestamp_samples = 0; - d_well_count = 0; d_mag = 0.0; d_input_power = 0.0; d_test_statistics = 0.0; @@ -434,7 +444,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) d_input_power = 0.0; d_mag = 0.0; - d_well_count++; + d_num_noncoherent_integrations_counter++; DLOG(INFO) << "Channel: " << d_channel << " , doing acquisition of satellite: " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN @@ -474,14 +484,22 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) // Search maximum size_t offset = (acq_parameters.bit_transition_flag ? effective_fft_size : 0); - volk_32fc_magnitude_squared_32f(d_magnitude, d_ifft->get_outbuf() + offset, effective_fft_size); - volk_gnsssdr_32f_index_max_32u(&indext, d_magnitude, effective_fft_size); - magt = d_magnitude[indext]; + if (d_num_noncoherent_integrations_counter == 1) + { + volk_32fc_magnitude_squared_32f(d_magnitude_grid[doppler_index], d_ifft->get_outbuf() + offset, effective_fft_size); + } + else + { + volk_32fc_magnitude_squared_32f(d_tmp_buffer, d_ifft->get_outbuf() + offset, effective_fft_size); + volk_32f_x2_add_32f(d_magnitude_grid[doppler_index], d_magnitude_grid[doppler_index], d_tmp_buffer, effective_fft_size); + } + volk_gnsssdr_32f_index_max_32u(&indext, d_magnitude_grid[doppler_index], effective_fft_size); + magt = d_magnitude_grid[doppler_index][indext]; if (acq_parameters.use_CFAR_algorithm_flag) { // Normalize the maximum value to correct the scale factor introduced by FFTW - magt = d_magnitude[indext] / (fft_normalization_factor * fft_normalization_factor); + magt = magt / (fft_normalization_factor * fft_normalization_factor); } // 4- record the maximum peak and the associated synchronization parameters if (d_mag < magt) @@ -491,7 +509,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) if (!acq_parameters.use_CFAR_algorithm_flag) { // Search grid noise floor approximation for this doppler line - volk_32f_accumulator_s32f(&d_input_power, d_magnitude, effective_fft_size); + volk_32f_accumulator_s32f(&d_input_power, d_magnitude_grid[doppler_index], effective_fft_size); d_input_power = (d_input_power - d_mag) / (effective_fft_size - 1); } @@ -517,7 +535,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) // Record results to file if required if (acq_parameters.dump and d_channel == d_dump_channel) { - memcpy(grid_.colptr(doppler_index), d_magnitude, sizeof(float) * effective_fft_size); + memcpy(grid_.colptr(doppler_index), d_magnitude_grid[doppler_index], sizeof(float) * effective_fft_size); } } } @@ -616,12 +634,13 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) d_state = 0; // Positive acquisition } } - else if (d_well_count == acq_parameters.max_dwells) + + if (d_num_noncoherent_integrations_counter == acq_parameters.max_dwells) { + if (d_state != 0) send_negative_acquisition(); d_state = 0; d_active = false; d_step_two = false; - send_negative_acquisition(); } } else @@ -657,10 +676,16 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) } } d_worker_active = false; - // Record results to file if required - if (acq_parameters.dump and d_channel == d_dump_channel) + + if ((d_num_noncoherent_integrations_counter == acq_parameters.max_dwells) or (d_positive_acq == 1)) { - pcps_acquisition::dump_results(effective_fft_size); + // Record results to file if required + if (acq_parameters.dump and d_channel == d_dump_channel) + { + pcps_acquisition::dump_results(effective_fft_size); + } + d_num_noncoherent_integrations_counter = 0; + d_positive_acq = 0; } } @@ -706,7 +731,6 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), d_gnss_synchro->Acq_delay_samples = 0.0; d_gnss_synchro->Acq_doppler_hz = 0.0; d_gnss_synchro->Acq_samplestamp_samples = 0; - d_well_count = 0; d_mag = 0.0; d_input_power = 0.0; d_test_statistics = 0.0; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 91bfaf112..d26c98d5e 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -106,12 +106,14 @@ private: float d_input_power; float d_test_statistics; float* d_magnitude; + float** d_magnitude_grid; + float* d_tmp_buffer; long d_old_freq; int d_state; unsigned int d_channel; unsigned int d_doppler_step; float d_doppler_center_step_two; - unsigned int d_well_count; + unsigned int d_num_noncoherent_integrations_counter; unsigned int d_fft_size; unsigned int d_num_doppler_bins; unsigned long int d_sample_counter; @@ -150,7 +152,7 @@ public: } /*! - * \brief Initializes acquisition algorithm. + * \brief Initializes acquisition algorithm and reserves memory. */ void init(); From cfc19c8df9c4453cd9bec4778d1a09d07bf28a26 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 8 Jul 2018 13:30:49 +0200 Subject: [PATCH 163/194] Bugfix: satellites assigned in initialization were never added to the list --- src/core/receiver/gnss_flowgraph.cc | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index b5b978d9f..20209506a 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -418,7 +418,7 @@ void GNSSFlowgraph::connect() } if (sat == 0) { - channels_.at(i)->set_signal(search_next_signal(gnss_signal, true)); + channels_.at(i)->set_signal(search_next_signal(gnss_signal, false)); } else { @@ -1357,9 +1357,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool { case evGPS_1C: result = available_GPS_1C_signals_.front(); - if (pop) + available_GPS_1C_signals_.pop_front(); + if (!pop) { - available_GPS_1C_signals_.pop_front(); + available_GPS_1C_signals_.push_back(result); } if (tracked) { @@ -1387,9 +1388,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGPS_2S: result = available_GPS_2S_signals_.front(); - if (pop) + available_GPS_2S_signals_.pop_front(); + if (!pop) { - available_GPS_2S_signals_.pop_front(); + available_GPS_2S_signals_.push_back(result); } if (tracked) { @@ -1417,9 +1419,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGPS_L5: result = available_GPS_L5_signals_.front(); - if (pop) + available_GPS_L5_signals_.pop_front(); + if (!pop) { - available_GPS_L5_signals_.pop_front(); + available_GPS_L5_signals_.push_back(result); } if (tracked) { @@ -1447,9 +1450,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGAL_1B: result = available_GAL_1B_signals_.front(); - if (pop) + available_GAL_1B_signals_.pop_front(); + if (!pop) { - available_GAL_1B_signals_.pop_front(); + available_GAL_1B_signals_.push_back(result); } if (tracked) { @@ -1471,9 +1475,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGAL_5X: result = available_GAL_5X_signals_.front(); - if (pop) + available_GAL_5X_signals_.pop_front(); + if (!pop) { - available_GAL_5X_signals_.pop_front(); + available_GAL_5X_signals_.push_back(result); } if (tracked) { @@ -1495,9 +1500,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGLO_1G: result = available_GLO_1G_signals_.front(); - if (pop) + available_GLO_1G_signals_.pop_front(); + if (!pop) { - available_GLO_1G_signals_.pop_front(); + available_GLO_1G_signals_.push_back(result); } if (tracked) { @@ -1519,9 +1525,10 @@ Gnss_Signal GNSSFlowgraph::search_next_signal(std::string searched_signal, bool case evGLO_2G: result = available_GLO_2G_signals_.front(); - if (pop) + available_GLO_2G_signals_.pop_front(); + if (!pop) { - available_GLO_2G_signals_.pop_front(); + available_GLO_2G_signals_.push_back(result); } if (tracked) { From 6b67037fed1738674e67a09b05c9c93674bb6555 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 9 Jul 2018 17:56:47 +0200 Subject: [PATCH 164/194] Add first-to-second peak statistic --- .../galileo_e1_pcps_ambiguous_acquisition.cc | 1 + .../adapters/galileo_e5a_pcps_acquisition.cc | 1 + .../glonass_l1_ca_pcps_acquisition.cc | 1 + .../glonass_l2_ca_pcps_acquisition.cc | 1 + .../adapters/gps_l1_ca_pcps_acquisition.cc | 1 + ...gps_l1_ca_pcps_acquisition_fine_doppler.cc | 1 + .../gps_l1_ca_pcps_acquisition_fpga.cc | 1 + .../adapters/gps_l2_m_pcps_acquisition.cc | 1 + .../adapters/gps_l5i_pcps_acquisition.cc | 1 + .../gnuradio_blocks/pcps_acquisition.cc | 115 +++++++++++------- .../gnuradio_blocks/pcps_acquisition.h | 3 + src/algorithms/acquisition/libs/acq_conf.cc | 1 + src/algorithms/acquisition/libs/acq_conf.h | 1 + 13 files changed, 85 insertions(+), 44 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index f377a72c8..a98207678 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -58,6 +58,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index 85aaee1d3..9ff35a922 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -57,6 +57,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast(acq_parameters.fs_in))); acq_pilot_ = configuration_->property(role + ".acquire_pilot", false); acq_iq_ = configuration_->property(role + ".acquire_iq", false); if (acq_iq_) diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index b654881d7..43354e627 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -59,6 +59,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil(GLONASS_L1_CA_CHIP_PERIOD * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc index 1f5d251fb..374b69e35 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc @@ -58,6 +58,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil(GLONASS_L2_CA_CHIP_PERIOD * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index f5602b1b6..18c728412 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -60,6 +60,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 44dcfc0ee..68d67dac8 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -56,6 +56,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( long fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(acq_parameters.fs_in))); dump_ = configuration->property(role + ".dump", false); acq_parameters.dump = dump_; dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc index 8480441f7..a8e2a3f17 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.cc @@ -60,6 +60,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); long fs_in = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in; + acq_parameters.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(acq_parameters.fs_in))); doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; acq_parameters.doppler_max = doppler_max_; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 2fbb72252..e68de5230 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -60,6 +60,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil((1.0 / GPS_L2_M_CODE_RATE_HZ) * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index da30699fa..82d9d0720 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -59,6 +59,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( long fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; + acq_parameters.samples_per_chip = static_cast(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast(acq_parameters.fs_in))); dump_ = configuration_->property(role + ".dump", false); acq_parameters.dump = dump_; acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index c77b48ef1..276a72db7 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -127,6 +127,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_step_two = false; d_dump_number = 0; d_dump_channel = acq_parameters.dump_channel; + samplesPerChip = acq_parameters.samples_per_chip; } @@ -426,14 +427,72 @@ void pcps_acquisition::dump_results(int effective_fft_size) } } +float pcps_acquisition::first_vs_second_peak_statistics(uint32_t& indext, int& doppler) +{ + float firstPeak = 0.0; + int index_doppler = 0; + uint32_t tmp_intex_t = 0; + uint32_t index_time = 0; + + // Look for correlation peaks in the results ============================== + // Find the highest peak and compare it to the second highest peak + // The second peak is chosen not closer than 1 chip to the highest peak + //--- Find the correlation peak and the carrier frequency -------------- + for (int i = 0; i < d_num_doppler_bins; i++) + { + volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); + if (d_magnitude_grid[i][tmp_intex_t] > firstPeak) + { + firstPeak = d_magnitude_grid[i][tmp_intex_t]; + index_doppler = i; + index_time = tmp_intex_t; + } + } + indext = index_time; + doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * index_doppler; + + // -- - Find 1 chip wide code phase exclude range around the peak + //uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(this->d_fs_in)); + int32_t excludeRangeIndex1 = index_time - samplesPerChip; + int32_t excludeRangeIndex2 = index_time + samplesPerChip; + + // -- - Correct code phase exclude range if the range includes array boundaries + if (excludeRangeIndex1 < 0) + { + excludeRangeIndex1 = d_fft_size + excludeRangeIndex1; + } + else if (excludeRangeIndex2 >= static_cast(d_fft_size)) + { + excludeRangeIndex2 = excludeRangeIndex2 - d_fft_size; + } + + int32_t idx = excludeRangeIndex1; + memcpy(d_tmp_buffer, d_magnitude_grid[index_doppler], d_fft_size); + do + { + d_tmp_buffer[idx] = 0.0; + idx++; + if (idx == static_cast(d_fft_size)) idx = 0; + } + while (idx != excludeRangeIndex2); + + //--- Find the second highest correlation peak in the same freq. bin --- + volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_tmp_buffer, d_fft_size); + float secondPeak = d_tmp_buffer[tmp_intex_t]; + + // 5- Compute the test statistics and compare to the threshold + return firstPeak / secondPeak; +} + void pcps_acquisition::acquisition_core(unsigned long int samp_count) { gr::thread::scoped_lock lk(d_setlock); // initialize acquisition algorithm - uint32_t indext = 0; float magt = 0.0; + int doppler = 0; + uint32_t indext = 0; const gr_complex* in = d_data_buffer; // Get the input samples pointer int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size); if (d_cshort) @@ -466,9 +525,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) { for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++) { - // doppler search steps - int doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * doppler_index; - + // Remove doppler volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs[doppler_index], d_fft_size); // 3- Perform the FFT-based convolution (parallel time search) @@ -482,7 +539,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) // compute the inverse FFT d_ifft->execute(); - // Search maximum + // compute squared magnitude (and accumulate in case of non-coherent integration) size_t offset = (acq_parameters.bit_transition_flag ? effective_fft_size : 0); if (d_num_noncoherent_integrations_counter == 1) { @@ -493,51 +550,21 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) volk_32fc_magnitude_squared_32f(d_tmp_buffer, d_ifft->get_outbuf() + offset, effective_fft_size); volk_32f_x2_add_32f(d_magnitude_grid[doppler_index], d_magnitude_grid[doppler_index], d_tmp_buffer, effective_fft_size); } - volk_gnsssdr_32f_index_max_32u(&indext, d_magnitude_grid[doppler_index], effective_fft_size); - magt = d_magnitude_grid[doppler_index][indext]; - - if (acq_parameters.use_CFAR_algorithm_flag) - { - // Normalize the maximum value to correct the scale factor introduced by FFTW - magt = magt / (fft_normalization_factor * fft_normalization_factor); - } - // 4- record the maximum peak and the associated synchronization parameters - if (d_mag < magt) - { - d_mag = magt; - - if (!acq_parameters.use_CFAR_algorithm_flag) - { - // Search grid noise floor approximation for this doppler line - volk_32f_accumulator_s32f(&d_input_power, d_magnitude_grid[doppler_index], effective_fft_size); - d_input_power = (d_input_power - d_mag) / (effective_fft_size - 1); - } - - // In case that acq_parameters.bit_transition_flag = true, we compare the potentially - // new maximum test statistics (d_mag/d_input_power) with the value in - // d_test_statistics. When the second dwell is being processed, the value - // of d_mag/d_input_power could be lower than d_test_statistics (i.e, - // the maximum test statistics in the previous dwell is greater than - // current d_mag/d_input_power). Note that d_test_statistics is not - // restarted between consecutive dwells in multidwell operation. - - if (d_test_statistics < (d_mag / d_input_power) or !acq_parameters.bit_transition_flag) - { - d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); - d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); - d_gnss_synchro->Acq_samplestamp_samples = samp_count; - - // 5- Compute the test statistics and compare to the threshold - //d_test_statistics = 2 * d_fft_size * d_mag / d_input_power; - d_test_statistics = d_mag / d_input_power; - } - } // Record results to file if required if (acq_parameters.dump and d_channel == d_dump_channel) { memcpy(grid_.colptr(doppler_index), d_magnitude_grid[doppler_index], sizeof(float) * effective_fft_size); } } + // 5- Compute the test statistics and compare to the threshold + float computed_statistic = first_vs_second_peak_statistics(indext, doppler); + if (d_test_statistics < computed_statistic or !acq_parameters.bit_transition_flag) + { + d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); + d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); + d_gnss_synchro->Acq_samplestamp_samples = samp_count; + d_test_statistics = computed_statistic; + } } else { diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index d26c98d5e..5d648ebf3 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -95,6 +95,8 @@ private: void dump_results(int effective_fft_size); + float first_vs_second_peak_statistics(uint32_t& indext, int& doppler); + Acq_Conf acq_parameters; bool d_active; bool d_worker_active; @@ -108,6 +110,7 @@ private: float* d_magnitude; float** d_magnitude_grid; float* d_tmp_buffer; + uint32_t samplesPerChip; long d_old_freq; int d_state; unsigned int d_channel; diff --git a/src/algorithms/acquisition/libs/acq_conf.cc b/src/algorithms/acquisition/libs/acq_conf.cc index ed79db2fa..c3439b9c0 100644 --- a/src/algorithms/acquisition/libs/acq_conf.cc +++ b/src/algorithms/acquisition/libs/acq_conf.cc @@ -36,6 +36,7 @@ Acq_Conf::Acq_Conf() /* PCPS acquisition configuration */ sampled_ms = 0; max_dwells = 0; + samples_per_chip = 0; doppler_max = 0; num_doppler_bins_step2 = 0; doppler_step2 = 0.0; diff --git a/src/algorithms/acquisition/libs/acq_conf.h b/src/algorithms/acquisition/libs/acq_conf.h index 4707aeba7..afd43b1fb 100644 --- a/src/algorithms/acquisition/libs/acq_conf.h +++ b/src/algorithms/acquisition/libs/acq_conf.h @@ -40,6 +40,7 @@ class Acq_Conf public: /* PCPS Acquisition configuration */ unsigned int sampled_ms; + unsigned int samples_per_chip; unsigned int max_dwells; unsigned int doppler_max; unsigned int num_doppler_bins_step2; From dad0ba32ad1d800c7d8280492b1d499e577043d0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 07:45:49 +0200 Subject: [PATCH 165/194] Add work on noncoherent acquisition --- .../gnuradio_blocks/pcps_acquisition.cc | 100 +++++++++++++----- .../gnuradio_blocks/pcps_acquisition.h | 4 +- 2 files changed, 76 insertions(+), 28 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 276a72db7..d1e4375d1 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -97,7 +97,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu if (acq_parameters.bit_transition_flag) { d_fft_size *= 2; - acq_parameters.max_dwells = 1; //Activation of acq_parameters.bit_transition_flag invalidates the value of acq_parameters.max_dwells + acq_parameters.max_dwells = 1; // Activation of acq_parameters.bit_transition_flag invalidates the value of acq_parameters.max_dwells } d_fft_codes = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); @@ -128,6 +128,15 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_dump_number = 0; d_dump_channel = acq_parameters.dump_channel; samplesPerChip = acq_parameters.samples_per_chip; + // todo: CFAR statistic not available for non-coherent integration + if (acq_parameters.max_dwells == 1) + { + d_use_CFAR_algorithm_flag = acq_parameters.use_CFAR_algorithm_flag; + } + else + { + d_use_CFAR_algorithm_flag = false; + } } @@ -427,17 +436,49 @@ void pcps_acquisition::dump_results(int effective_fft_size) } } -float pcps_acquisition::first_vs_second_peak_statistics(uint32_t& indext, int& doppler) + +float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power) { - float firstPeak = 0.0; + float grid_maximum = 0.0; int index_doppler = 0; uint32_t tmp_intex_t = 0; uint32_t index_time = 0; + float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); // Look for correlation peaks in the results ============================== // Find the highest peak and compare it to the second highest peak // The second peak is chosen not closer than 1 chip to the highest peak //--- Find the correlation peak and the carrier frequency -------------- + for (int i = 0; i < d_num_doppler_bins; i++) + { + volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); + if (d_magnitude_grid[i][tmp_intex_t] > grid_maximum) + { + grid_maximum = d_magnitude_grid[i][tmp_intex_t]; + index_doppler = i; + index_time = tmp_intex_t; + } + } + indext = index_time; + doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * index_doppler; + + float magt = grid_maximum / (fft_normalization_factor * fft_normalization_factor); + return magt / input_power; +} + + +float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& doppler) +{ + // Look for correlation peaks in the results + // Find the highest peak and compare it to the second highest peak + // The second peak is chosen not closer than 1 chip to the highest peak + + float firstPeak = 0.0; + int index_doppler = 0; + uint32_t tmp_intex_t = 0; + uint32_t index_time = 0; + + // Find the correlation peak and the carrier frequency for (int i = 0; i < d_num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); @@ -451,12 +492,11 @@ float pcps_acquisition::first_vs_second_peak_statistics(uint32_t& indext, int& d indext = index_time; doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * index_doppler; - // -- - Find 1 chip wide code phase exclude range around the peak - //uint32_t samplesPerChip = ceil(GPS_L1_CA_CHIP_PERIOD * static_cast(this->d_fs_in)); + // Find 1 chip wide code phase exclude range around the peak int32_t excludeRangeIndex1 = index_time - samplesPerChip; int32_t excludeRangeIndex2 = index_time + samplesPerChip; - // -- - Correct code phase exclude range if the range includes array boundaries + // Correct code phase exclude range if the range includes array boundaries if (excludeRangeIndex1 < 0) { excludeRangeIndex1 = d_fft_size + excludeRangeIndex1; @@ -476,11 +516,11 @@ float pcps_acquisition::first_vs_second_peak_statistics(uint32_t& indext, int& d } while (idx != excludeRangeIndex2); - //--- Find the second highest correlation peak in the same freq. bin --- + // Find the second highest correlation peak in the same freq. bin --- volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_tmp_buffer, d_fft_size); float secondPeak = d_tmp_buffer[tmp_intex_t]; - // 5- Compute the test statistics and compare to the threshold + // Compute the test statistics and compare to the threshold return firstPeak / secondPeak; } @@ -510,36 +550,37 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) << " ,sample stamp: " << samp_count << ", threshold: " << d_threshold << ", doppler_max: " << acq_parameters.doppler_max << ", doppler_step: " << d_doppler_step - << ", use_CFAR_algorithm_flag: " << (acq_parameters.use_CFAR_algorithm_flag ? "true" : "false"); + << ", use_CFAR_algorithm_flag: " << (d_use_CFAR_algorithm_flag ? "true" : "false"); lk.unlock(); - if (acq_parameters.use_CFAR_algorithm_flag) + + if (d_use_CFAR_algorithm_flag) { - // 1- (optional) Compute the input signal power estimation + // Compute the input signal power estimation volk_32fc_magnitude_squared_32f(d_magnitude, in, d_fft_size); volk_32f_accumulator_s32f(&d_input_power, d_magnitude, d_fft_size); d_input_power /= static_cast(d_fft_size); } - // 2- Doppler frequency search loop + + // Doppler frequency grid loop if (!d_step_two) { for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++) { - // Remove doppler + // Remove Doppler volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs[doppler_index], d_fft_size); - // 3- Perform the FFT-based convolution (parallel time search) + // Perform the FFT-based convolution (parallel time search) // Compute the FFT of the carrier wiped--off incoming signal d_fft_if->execute(); - // Multiply carrier wiped--off, Fourier transformed incoming signal - // with the local FFT'd code reference using SIMD operations with VOLK library + // Multiply carrier wiped--off, Fourier transformed incoming signal with the local FFT'd code reference volk_32fc_x2_multiply_32fc(d_ifft->get_inbuf(), d_fft_if->get_outbuf(), d_fft_codes, d_fft_size); - // compute the inverse FFT + // Compute the inverse FFT d_ifft->execute(); - // compute squared magnitude (and accumulate in case of non-coherent integration) + // Compute squared magnitude (and accumulate in case of non-coherent integration) size_t offset = (acq_parameters.bit_transition_flag ? effective_fft_size : 0); if (d_num_noncoherent_integrations_counter == 1) { @@ -556,15 +597,19 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) memcpy(grid_.colptr(doppler_index), d_magnitude_grid[doppler_index], sizeof(float) * effective_fft_size); } } - // 5- Compute the test statistics and compare to the threshold - float computed_statistic = first_vs_second_peak_statistics(indext, doppler); - if (d_test_statistics < computed_statistic or !acq_parameters.bit_transition_flag) + + // Compute the test statistic + if (d_use_CFAR_algorithm_flag) { - d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); - d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); - d_gnss_synchro->Acq_samplestamp_samples = samp_count; - d_test_statistics = computed_statistic; + d_test_statistics = max_to_input_power_statistic(indext, doppler, d_input_power); } + else + { + d_test_statistics = first_vs_second_peak_statistic(indext, doppler); + } + d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); + d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); + d_gnss_synchro->Acq_samplestamp_samples = samp_count; } else { @@ -592,7 +637,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) volk_gnsssdr_32f_index_max_32u(&indext, d_magnitude, effective_fft_size); magt = d_magnitude[indext]; - if (acq_parameters.use_CFAR_algorithm_flag) + if (d_use_CFAR_algorithm_flag) { // Normalize the maximum value to correct the scale factor introduced by FFTW magt = d_magnitude[indext] / (fft_normalization_factor * fft_normalization_factor); @@ -602,7 +647,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) { d_mag = magt; - if (!acq_parameters.use_CFAR_algorithm_flag) + if (!d_use_CFAR_algorithm_flag) { // Search grid noise floor approximation for this doppler line volk_32f_accumulator_s32f(&d_input_power, d_magnitude, effective_fft_size); @@ -635,6 +680,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) } } } + lk.lock(); if (!acq_parameters.bit_transition_flag) { diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 5d648ebf3..4ca381ce0 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -95,13 +95,15 @@ private: void dump_results(int effective_fft_size); - float first_vs_second_peak_statistics(uint32_t& indext, int& doppler); + float first_vs_second_peak_statistic(uint32_t& indext, int& doppler); + float max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power); Acq_Conf acq_parameters; bool d_active; bool d_worker_active; bool d_cshort; bool d_step_two; + bool d_use_CFAR_algorithm_flag; int d_positive_acq; float d_threshold; float d_mag; From e1c26ec858395d60a88efe2dca0cbd1ada467e21 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 07:48:08 +0200 Subject: [PATCH 166/194] Add work on noncoherent acquisition --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index d1e4375d1..b77fd5e44 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -445,10 +445,7 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& dopp uint32_t index_time = 0; float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); - // Look for correlation peaks in the results ============================== - // Find the highest peak and compare it to the second highest peak - // The second peak is chosen not closer than 1 chip to the highest peak - //--- Find the correlation peak and the carrier frequency -------------- + // Find the correlation peak and the carrier frequency for (int i = 0; i < d_num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); From 394f6088aa2312e4def761707d50bdacba845120 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 08:47:04 +0200 Subject: [PATCH 167/194] Add work on noncoherent acquisition --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index b77fd5e44..d8c19ef17 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -554,8 +554,8 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) if (d_use_CFAR_algorithm_flag) { // Compute the input signal power estimation - volk_32fc_magnitude_squared_32f(d_magnitude, in, d_fft_size); - volk_32f_accumulator_s32f(&d_input_power, d_magnitude, d_fft_size); + volk_32fc_magnitude_squared_32f(d_tmp_buffer, in, d_fft_size); + volk_32f_accumulator_s32f(&d_input_power, d_tmp_buffer, d_fft_size); d_input_power /= static_cast(d_fft_size); } From 85f70fe1a395bf3990984d0470f4d350531817c3 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 16:25:16 +0200 Subject: [PATCH 168/194] Fix coherent acquisition --- .../gnuradio_blocks/pcps_acquisition.cc | 56 ++++++++++++++----- .../gnuradio_blocks/pcps_acquisition.h | 2 + .../gps_l1_acq_performance_test.cc | 2 +- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index d8c19ef17..cc71eb59d 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -64,7 +64,16 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_state = 0; d_old_freq = 0; d_num_noncoherent_integrations_counter = 0; - d_fft_size = acq_parameters.sampled_ms * acq_parameters.samples_per_ms; + d_consumed_samples = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); + if (acq_parameters.sampled_ms == 1) + { + d_fft_size = d_consumed_samples; + } + else + { + d_fft_size = d_consumed_samples * 2; + } + //d_fft_size = next power of two? //// d_mag = 0; d_input_power = 0.0; d_num_doppler_bins = 0; @@ -82,8 +91,6 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_cshort = true; } - d_tmp_buffer = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); - // COD: // Experimenting with the overlap/save technique for handling bit trannsitions // The problem: Circular correlation is asynchronous with the received code. @@ -96,12 +103,14 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu // size of the input buffer and padding the code with zeros. if (acq_parameters.bit_transition_flag) { - d_fft_size *= 2; + d_fft_size = d_consumed_samples * 2; acq_parameters.max_dwells = 1; // Activation of acq_parameters.bit_transition_flag invalidates the value of acq_parameters.max_dwells } + d_tmp_buffer = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); d_fft_codes = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_magnitude = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); + d_input_signal = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); // Direct FFT d_fft_if = new gr::fft::fft_complex(d_fft_size, true); @@ -114,10 +123,10 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_grid_doppler_wipeoffs_step_two = nullptr; d_magnitude_grid = nullptr; d_worker_active = false; - d_data_buffer = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); + d_data_buffer = static_cast(volk_gnsssdr_malloc(d_consumed_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment())); if (d_cshort) { - d_data_buffer_sc = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment())); + d_data_buffer_sc = static_cast(volk_gnsssdr_malloc(d_consumed_samples * sizeof(lv_16sc_t), volk_gnsssdr_get_alignment())); } else { @@ -163,6 +172,7 @@ pcps_acquisition::~pcps_acquisition() volk_gnsssdr_free(d_fft_codes); volk_gnsssdr_free(d_magnitude); volk_gnsssdr_free(d_tmp_buffer); + volk_gnsssdr_free(d_input_signal); delete d_ifft; delete d_fft_if; volk_gnsssdr_free(d_data_buffer); @@ -195,7 +205,15 @@ void pcps_acquisition::set_local_code(std::complex* code) } else { - memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size); + if (acq_parameters.sampled_ms == 1) + { + memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_consumed_samples); + } + else + { + std::fill_n(d_fft_if->get_inbuf(), d_fft_size - d_consumed_samples, gr_complex(0.0, 0.0)); + memcpy(d_fft_if->get_inbuf() + d_consumed_samples, code, sizeof(gr_complex) * d_consumed_samples); + } } d_fft_if->execute(); // We need the FFT of local code @@ -530,12 +548,20 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) float magt = 0.0; int doppler = 0; uint32_t indext = 0; - const gr_complex* in = d_data_buffer; // Get the input samples pointer int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size); if (d_cshort) { - volk_gnsssdr_16ic_convert_32fc(d_data_buffer, d_data_buffer_sc, d_fft_size); + volk_gnsssdr_16ic_convert_32fc(d_data_buffer, d_data_buffer_sc, d_consumed_samples); } + memcpy(d_input_signal, d_data_buffer, d_consumed_samples * sizeof(gr_complex)); + if (d_fft_size > d_consumed_samples) + { + for (unsigned int i = d_consumed_samples; i < d_fft_size; i++) + { + d_input_signal[i] = gr_complex(0.0, 0.0); + } + } + const gr_complex* in = d_input_signal; // Get the input samples pointer float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); d_input_power = 0.0; @@ -551,7 +577,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) lk.unlock(); - if (d_use_CFAR_algorithm_flag) + if (d_use_CFAR_algorithm_flag or acq_parameters.bit_transition_flag) { // Compute the input signal power estimation volk_32fc_magnitude_squared_32f(d_tmp_buffer, in, d_fft_size); @@ -780,7 +806,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), { if (!acq_parameters.blocking_on_standby) { - d_sample_counter += d_fft_size * ninput_items[0]; + d_sample_counter += d_consumed_samples * ninput_items[0]; consume_each(ninput_items[0]); } if (d_step_two) @@ -807,7 +833,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), d_state = 1; if (!acq_parameters.blocking_on_standby) { - d_sample_counter += d_fft_size * ninput_items[0]; // sample counter + d_sample_counter += d_consumed_samples * ninput_items[0]; // sample counter consume_each(ninput_items[0]); } break; @@ -818,11 +844,11 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), // Copy the data to the core and let it know that new data is available if (d_cshort) { - memcpy(d_data_buffer_sc, input_items[0], d_fft_size * sizeof(lv_16sc_t)); + memcpy(d_data_buffer_sc, input_items[0], d_consumed_samples * sizeof(lv_16sc_t)); } else { - memcpy(d_data_buffer, input_items[0], d_fft_size * sizeof(gr_complex)); + memcpy(d_data_buffer, input_items[0], d_consumed_samples * sizeof(gr_complex)); } if (acq_parameters.blocking) { @@ -834,7 +860,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), gr::thread::thread d_worker(&pcps_acquisition::acquisition_core, this, d_sample_counter); d_worker_active = true; } - d_sample_counter += d_fft_size; + d_sample_counter += d_consumed_samples; consume_each(1); break; } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 4ca381ce0..67689a86c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -112,6 +112,7 @@ private: float* d_magnitude; float** d_magnitude_grid; float* d_tmp_buffer; + gr_complex* d_input_signal; uint32_t samplesPerChip; long d_old_freq; int d_state; @@ -120,6 +121,7 @@ private: float d_doppler_center_step_two; unsigned int d_num_noncoherent_integrations_counter; unsigned int d_fft_size; + unsigned int d_consumed_samples; unsigned int d_num_doppler_bins; unsigned long int d_sample_counter; gr_complex** d_grid_doppler_wipeoffs; diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc index 164dd96b4..fa9b9e7f9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc @@ -707,7 +707,7 @@ TEST_F(AcquisitionPerformanceTest, ROC) std::cout << "Num executions: " << num_executions << std::endl; for (int execution = 1; execution <= num_executions; execution++) { - acquisition_dump_reader acq_dump(basename, observed_satellite, config->property("Acquisition_1C.doppler_max", 0), config->property("Acquisition_1C.doppler_step", 0), config->property("GNSS-SDR.internal_fs_sps", 0) * GPS_L1_CA_CODE_PERIOD * static_cast(coh_time_ms), ch, execution); + acquisition_dump_reader acq_dump(basename, observed_satellite, config->property("Acquisition_1C.doppler_max", 0), config->property("Acquisition_1C.doppler_step", 0), config->property("GNSS-SDR.internal_fs_sps", 0) * GPS_L1_CA_CODE_PERIOD * static_cast(coh_time_ms) * (config->property("Acquisition_1C.bit_transition_flag", false) ? 2 : 1), ch, execution); acq_dump.read_binary_acq(); if (acq_dump.positive_acq) { From f965cf750d7eddef0ffbe2502948e6c5274bb9c9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 17:20:37 +0200 Subject: [PATCH 169/194] Accept coherent and noncoherent integration --- .../acquisition/gps_l1_acq_performance_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc index 164dd96b4..af2ed3b65 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc @@ -181,7 +181,7 @@ protected: num_thresholds = pfa_vector.size(); - int aux2 = ((generated_signal_duration_s * 1000 - FLAGS_acq_test_coherent_time_ms) / FLAGS_acq_test_coherent_time_ms); + int aux2 = ((generated_signal_duration_s * 1000 - (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells)) / (FLAGS_acq_test_coherent_time_ms * FLAGS_acq_test_max_dwells)); if ((FLAGS_acq_test_num_meas > 0) and (FLAGS_acq_test_num_meas < aux2)) { num_of_measurements = static_cast(FLAGS_acq_test_num_meas); From d9b9df3718cd7cafa379ea8fbfbc5c2cf7cf6ed0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 17:43:05 +0200 Subject: [PATCH 170/194] Fix warning, improve code consistency --- .../gnuradio_blocks/pcps_acquisition.cc | 18 +++++++++--------- .../gnuradio_blocks/pcps_acquisition.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index cc71eb59d..646975ae4 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -136,7 +136,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_step_two = false; d_dump_number = 0; d_dump_channel = acq_parameters.dump_channel; - samplesPerChip = acq_parameters.samples_per_chip; + d_samplesPerChip = acq_parameters.samples_per_chip; // todo: CFAR statistic not available for non-coherent integration if (acq_parameters.max_dwells == 1) { @@ -458,13 +458,13 @@ void pcps_acquisition::dump_results(int effective_fft_size) float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power) { float grid_maximum = 0.0; - int index_doppler = 0; + unsigned int index_doppler = 0; uint32_t tmp_intex_t = 0; uint32_t index_time = 0; float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); // Find the correlation peak and the carrier frequency - for (int i = 0; i < d_num_doppler_bins; i++) + for (unsigned int i = 0; i < d_num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); if (d_magnitude_grid[i][tmp_intex_t] > grid_maximum) @@ -475,7 +475,7 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& dopp } } indext = index_time; - doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * index_doppler; + doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * static_cast(index_doppler); float magt = grid_maximum / (fft_normalization_factor * fft_normalization_factor); return magt / input_power; @@ -489,12 +489,12 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& do // The second peak is chosen not closer than 1 chip to the highest peak float firstPeak = 0.0; - int index_doppler = 0; + unsigned int index_doppler = 0; uint32_t tmp_intex_t = 0; uint32_t index_time = 0; // Find the correlation peak and the carrier frequency - for (int i = 0; i < d_num_doppler_bins; i++) + for (unsigned int i = 0; i < d_num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); if (d_magnitude_grid[i][tmp_intex_t] > firstPeak) @@ -505,11 +505,11 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& do } } indext = index_time; - doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * index_doppler; + doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * static_cast(index_doppler); // Find 1 chip wide code phase exclude range around the peak - int32_t excludeRangeIndex1 = index_time - samplesPerChip; - int32_t excludeRangeIndex2 = index_time + samplesPerChip; + int32_t excludeRangeIndex1 = index_time - d_samplesPerChip; + int32_t excludeRangeIndex2 = index_time + d_samplesPerChip; // Correct code phase exclude range if the range includes array boundaries if (excludeRangeIndex1 < 0) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index 67689a86c..e39648525 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -113,7 +113,7 @@ private: float** d_magnitude_grid; float* d_tmp_buffer; gr_complex* d_input_signal; - uint32_t samplesPerChip; + uint32_t d_samplesPerChip; long d_old_freq; int d_state; unsigned int d_channel; From 0bc894a91f356f75927e3bbce08b51fd4fe4d01f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 18:41:24 +0200 Subject: [PATCH 171/194] Header fix --- src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc | 2 +- src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h | 2 +- .../{gps_l1_acq_performance_test.cc => acq_performance_test.cc} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/tests/unit-tests/signal-processing-blocks/acquisition/{gps_l1_acq_performance_test.cc => acq_performance_test.cc} (100%) diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 82d9d0720..66537426c 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -1,5 +1,5 @@ /*! - * \file gps_l5i pcps_acquisition.cc + * \file gps_l5i_pcps_acquisition.cc * \brief Adapts a PCPS acquisition block to an Acquisition Interface for * GPS L5i signals * \authors
      diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index 01d15def8..3db500def 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -1,5 +1,5 @@ /*! - * \file GPS_L5i_PCPS_Acquisition.h + * \file gps_l5i_pcps_acquisition.h * \brief Adapts a PCPS acquisition block to an AcquisitionInterface for * GPS L5i signals * \authors
        diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc similarity index 100% rename from src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc rename to src/tests/unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc From 0ad24adeabbed0a12bf9143d7cbafe7fa556c791 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jul 2018 18:43:36 +0200 Subject: [PATCH 172/194] Make acquisition performance test multisystem --- src/tests/test_main.cc | 2 +- .../acquisition/acq_performance_test.cc | 182 +++++++++++++----- 2 files changed, 130 insertions(+), 54 deletions(-) diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc index eb010b807..caaff6be4 100644 --- a/src/tests/test_main.cc +++ b/src/tests/test_main.cc @@ -145,7 +145,7 @@ DECLARE_string(log_dir); #if EXTRA_TESTS #include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc" #include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc" -#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_acq_performance_test.cc" +#include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc" 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 ea78cd410..111dc775d 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 @@ -1,5 +1,5 @@ /*! - * \file gps_l1_acq_performance_test.cc + * \file acq_performance_test.cc * \brief This class implements an acquisition performance test * \author Carles Fernandez-Prades, 2018. cfernandez(at)cttc.cat * @@ -29,22 +29,27 @@ * ------------------------------------------------------------------------- */ -#include "test_flags.h" -#include "signal_generator_flags.h" -#include "tracking_true_obs_reader.h" -#include "true_observables_reader.h" #include "gps_l1_ca_pcps_acquisition.h" #include "gps_l1_ca_pcps_acquisition_fine_doppler.h" +#include "galileo_e1_pcps_ambiguous_acquisition.h" +#include "galileo_e5a_pcps_acquisition.h" +#include "glonass_l1_ca_pcps_acquisition.h" +#include "glonass_l2_ca_pcps_acquisition.h" +#include "gps_l2_m_pcps_acquisition.h" +#include "gps_l5i_pcps_acquisition.h" #include "display.h" #include "gnuplot_i.h" +#include "signal_generator_flags.h" +#include "test_flags.h" +#include "tracking_true_obs_reader.h" +#include "true_observables_reader.h" #include #include -#include -#include + DEFINE_string(config_file_ptest, std::string(""), "File containing alternative configuration parameters for the acquisition performance test."); DEFINE_string(acq_test_input_file, std::string(""), "File containing raw signal data, must be in int8_t format. The signal generator will not be used."); -DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test. Alternative: GPS_L1_CA_PCPS_Acquisition_Fine_Doppler"); +DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition"), "Acquisition block implementation under test. Alternatives: GPS_L1_CA_PCPS_Acquisition, GPS_L1_CA_PCPS_Acquisition_Fine_Doppler, Galileo_E1_PCPS_Ambiguous_Acquisition, GLONASS_L1_CA_PCPS_Acquisition, GLONASS_L2_CA_PCPS_Acquisition, GPS_L2_M_PCPS_Acquisition, Galileo_E5a_Pcps_Acquisition, GPS_L5i_PCPS_Acquisition"); DEFINE_int32(acq_test_doppler_max, 5000, "Maximum Doppler, in Hz"); DEFINE_int32(acq_test_doppler_step, 125, "Doppler step, in Hz."); @@ -154,6 +159,53 @@ protected: { cn0_vector = {0.0}; } + + if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) + { + signal_id = "1C"; + system_id = 'G'; + } + else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) + { + signal_id = "1C"; + system_id = 'G'; + } + else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0) + { + signal_id = "1B"; + system_id = 'E'; + } + else if (implementation.compare("GLONASS_L1_CA_PCPS_Acquisition") == 0) + { + signal_id = "1G"; + system_id = 'R'; + } + else if (implementation.compare("GLONASS_L2_CA_PCPS_Acquisition") == 0) + { + signal_id = "2G"; + system_id = 'R'; + } + else if (implementation.compare("GPS_L2_M_PCPS_Acquisition") == 0) + { + signal_id = "2S"; + system_id = 'G'; + } + else if (implementation.compare("Galileo_E5a_Pcps_Acquisition") == 0) + { + signal_id = "5X"; + system_id = 'E'; + } + else if (implementation.compare("GPS_L5i_PCPS_Acquisition") == 0) + { + signal_id = "L5"; + system_id = 'G'; + } + else + { + signal_id = "1C"; + system_id = 'G'; + } + init(); if (FLAGS_acq_test_pfa_init > 0.0) @@ -257,6 +309,8 @@ protected: std::vector> Pfa; std::vector> Pd_correct; + std::string signal_id; + private: std::string generator_binary; std::string p1; @@ -268,6 +322,7 @@ private: std::string filename_rinex_obs = FLAGS_filename_rinex_obs; std::string filename_raw_data = FLAGS_filename_raw_data; + char system_id; double compute_stdev_precision(const std::vector& vec); double compute_stdev_accuracy(const std::vector& vec, double ref); @@ -277,8 +332,8 @@ private: void AcquisitionPerformanceTest::init() { gnss_synchro.Channel_ID = 0; - gnss_synchro.System = 'G'; - std::string signal = "1C"; + gnss_synchro.System = system_id; + std::string signal = signal_id; signal.copy(gnss_synchro.Signal, 2, 0); gnss_synchro.PRN = observed_satellite; message = 0; @@ -378,51 +433,51 @@ int AcquisitionPerformanceTest::configure_receiver(double cn0, float pfa, unsign config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(sampling_rate_internal)); // Set Acquisition - config->set_property("Acquisition_1C.implementation", implementation); - config->set_property("Acquisition_1C.item_type", "gr_complex"); - config->set_property("Acquisition_1C.doppler_max", std::to_string(doppler_max)); - config->set_property("Acquisition_1C.doppler_min", std::to_string(-doppler_max)); - config->set_property("Acquisition_1C.doppler_step", std::to_string(doppler_step)); + config->set_property("Acquisition.implementation", implementation); + config->set_property("Acquisition.item_type", "gr_complex"); + config->set_property("Acquisition.doppler_max", std::to_string(doppler_max)); + config->set_property("Acquisition.doppler_min", std::to_string(-doppler_max)); + config->set_property("Acquisition.doppler_step", std::to_string(doppler_step)); - config->set_property("Acquisition_1C.threshold", std::to_string(pfa)); - //if (FLAGS_acq_test_pfa_init > 0.0) config->supersede_property("Acquisition_1C.pfa", std::to_string(pfa)); + config->set_property("Acquisition.threshold", std::to_string(pfa)); + //if (FLAGS_acq_test_pfa_init > 0.0) config->supersede_property("Acquisition.pfa", std::to_string(pfa)); if (FLAGS_acq_test_pfa_init > 0.0) { - config->supersede_property("Acquisition_1C.pfa", std::to_string(pfa)); + config->supersede_property("Acquisition.pfa", std::to_string(pfa)); } if (FLAGS_acq_test_use_CFAR_algorithm) { - config->set_property("Acquisition_1C.use_CFAR_algorithm", "true"); + config->set_property("Acquisition.use_CFAR_algorithm", "true"); } else { - config->set_property("Acquisition_1C.use_CFAR_algorithm", "false"); + config->set_property("Acquisition.use_CFAR_algorithm", "false"); } - config->set_property("Acquisition_1C.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms)); + config->set_property("Acquisition.coherent_integration_time_ms", std::to_string(coherent_integration_time_ms)); if (FLAGS_acq_test_bit_transition_flag) { - config->set_property("Acquisition_1C.bit_transition_flag", "true"); + config->set_property("Acquisition.bit_transition_flag", "true"); } else { - config->set_property("Acquisition_1C.bit_transition_flag", "false"); + config->set_property("Acquisition.bit_transition_flag", "false"); } - config->set_property("Acquisition_1C.max_dwells", std::to_string(FLAGS_acq_test_max_dwells)); + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_acq_test_max_dwells)); - config->set_property("Acquisition_1C.repeat_satellite", "true"); + config->set_property("Acquisition.repeat_satellite", "true"); - config->set_property("Acquisition_1C.blocking", "true"); - config->set_property("Acquisition_1C.make_two_steps", "false"); - config->set_property("Acquisition_1C.second_nbins", std::to_string(4)); - config->set_property("Acquisition_1C.second_doppler_step", std::to_string(125)); + config->set_property("Acquisition.blocking", "true"); + config->set_property("Acquisition.make_two_steps", "false"); + config->set_property("Acquisition.second_nbins", std::to_string(4)); + config->set_property("Acquisition.second_doppler_step", std::to_string(125)); - config->set_property("Acquisition_1C.dump", "true"); + 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_1C.dump_filename", dump_file); - config->set_property("Acquisition_1C.dump_channel", std::to_string(dump_channel)); - config->set_property("Acquisition_1C.blocking_on_standby", "true"); + config->set_property("Acquisition.dump_filename", dump_file); + config->set_property("Acquisition.dump_channel", std::to_string(dump_channel)); + config->set_property("Acquisition.blocking_on_standby", "true"); config_f = 0; } @@ -462,26 +517,47 @@ int AcquisitionPerformanceTest::run_receiver() boost::shared_ptr valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); if (implementation.compare("GPS_L1_CA_PCPS_Acquisition") == 0) { - acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GLONASS_L1_CA_PCPS_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GLONASS_L2_CA_PCPS_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GPS_L2_M_PCPS_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("Galileo_E5a_Pcps_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GPS_L5i_PCPS_Acquisition") == 0) + { + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); } else { - if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) - { - acquisition = std::make_shared(config.get(), "Acquisition_1C", 1, 0); - } - else - { - bool aux = false; - EXPECT_EQ(true, aux); - } + bool aux = false; + EXPECT_EQ(true, aux); } acquisition->set_gnss_synchro(&gnss_synchro); acquisition->set_channel(0); - acquisition->set_doppler_max(config->property("Acquisition_1C.doppler_max", 10000)); - acquisition->set_doppler_step(config->property("Acquisition_1C.doppler_step", 500)); - acquisition->set_threshold(config->property("Acquisition_1C.threshold", 0.0)); + acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 10000)); + acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500)); + acquisition->set_threshold(config->property("Acquisition.threshold", 0.0)); acquisition->init(); acquisition->set_local_code(); @@ -563,7 +639,7 @@ void AcquisitionPerformanceTest::plot_results() } g1.cmd("set font \"Times,18\""); g1.set_title("Receiver Operating Characteristic for GPS L1 C/A acquisition"); - g1.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition_1C.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition_1C.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); + g1.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); g1.cmd("set logscale x"); g1.cmd("set yrange [0:1]"); g1.cmd("set xrange[0.0001:1]"); @@ -599,7 +675,7 @@ void AcquisitionPerformanceTest::plot_results() } g2.cmd("set font \"Times,18\""); g2.set_title("Receiver Operating Characteristic for GPS L1 C/A valid acquisition"); - g2.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition_1C.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition_1C.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); + g2.cmd("set label 1 \"" + std::string("Coherent integration time: ") + std::to_string(config->property("Acquisition.coherent_integration_time_ms", 1)) + " ms, Non-coherent integrations: " + std::to_string(config->property("Acquisition.max_dwells", 1)) + " \" at screen 0.12, 0.83 font \"Times,16\""); g2.cmd("set logscale x"); g2.cmd("set yrange [0:1]"); g2.cmd("set xrange[0.0001:1]"); @@ -692,22 +768,22 @@ TEST_F(AcquisitionPerformanceTest, ROC) run_receiver(); // count executions - std::string basename = path_str + std::string("/acquisition_") + std::to_string(*it) + "_" + std::to_string(iter) + "_" + std::to_string(pfa_vector[pfa_iter]) + "_" + gnss_synchro.System + "_1C"; + std::string basename = path_str + std::string("/acquisition_") + std::to_string(*it) + "_" + std::to_string(iter) + "_" + std::to_string(pfa_vector[pfa_iter]) + "_" + gnss_synchro.System + "_" + signal_id; int num_executions = count_executions(basename, observed_satellite); // Read measured data - int ch = config->property("Acquisition_1C.dump_channel", 0); + int ch = config->property("Acquisition.dump_channel", 0); arma::vec meas_timestamp_s = arma::zeros(num_executions, 1); arma::vec meas_doppler = arma::zeros(num_executions, 1); arma::vec positive_acq = arma::zeros(num_executions, 1); arma::vec meas_acq_delay_chips = arma::zeros(num_executions, 1); - double coh_time_ms = config->property("Acquisition_1C.coherent_integration_time_ms", 1); + double coh_time_ms = config->property("Acquisition.coherent_integration_time_ms", 1); std::cout << "Num executions: " << num_executions << std::endl; for (int execution = 1; execution <= num_executions; execution++) { - acquisition_dump_reader acq_dump(basename, observed_satellite, config->property("Acquisition_1C.doppler_max", 0), config->property("Acquisition_1C.doppler_step", 0), config->property("GNSS-SDR.internal_fs_sps", 0) * GPS_L1_CA_CODE_PERIOD * static_cast(coh_time_ms) * (config->property("Acquisition_1C.bit_transition_flag", false) ? 2 : 1), ch, execution); + acquisition_dump_reader acq_dump(basename, observed_satellite, config->property("Acquisition.doppler_max", 0), config->property("Acquisition.doppler_step", 0), config->property("GNSS-SDR.internal_fs_sps", 0) * GPS_L1_CA_CODE_PERIOD * static_cast(coh_time_ms) * (config->property("Acquisition.bit_transition_flag", false) ? 2 : 1), ch, execution); acq_dump.read_binary_acq(); if (acq_dump.positive_acq) { @@ -827,7 +903,7 @@ TEST_F(AcquisitionPerformanceTest, ROC) for (int i = 0; i < num_clean_executions - 1; i++) { - if (abs(clean_delay_estimation_error(i)) < 0.5 and abs(clean_doppler_estimation_error(i)) < static_cast(config->property("Acquisition_1C.doppler_step", 1)) / 2.0) + if (abs(clean_delay_estimation_error(i)) < 0.5 and abs(clean_doppler_estimation_error(i)) < static_cast(config->property("Acquisition.doppler_step", 1)) / 2.0) { correctly_detected = correctly_detected + 1.0; } From 9881857fa599673471646420ea41a9b9a3b288ac Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 11 Jul 2018 14:51:34 +0200 Subject: [PATCH 173/194] Fix Acquisition for L2C and E1B --- .../galileo_e1_pcps_ambiguous_acquisition.cc | 13 +++++----- .../adapters/gps_l2_m_pcps_acquisition.cc | 4 +-- .../gnuradio_blocks/pcps_acquisition.cc | 4 +-- .../acquisition/acq_performance_test.cc | 25 ++++++++++++++++++- .../ieee-access18/L2-access18.conf | 2 +- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index a98207678..7f1df1c2f 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -59,24 +59,23 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; acq_parameters.samples_per_chip = static_cast(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast(acq_parameters.fs_in))); - dump_ = configuration_->property(role + ".dump", false); - acq_parameters.dump = dump_; - acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); - blocking_ = configuration_->property(role + ".blocking", true); - acq_parameters.blocking = blocking_; doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; acq_parameters.doppler_max = doppler_max_; - sampled_ms_ = 4; + sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); acq_parameters.sampled_ms = sampled_ms_; bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); acq_parameters.bit_transition_flag = bit_transition_flag_; use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions acq_parameters.use_CFAR_algorithm_flag = use_CFAR_algorithm_flag_; acquire_pilot_ = configuration_->property(role + ".acquire_pilot", false); //will be true in future versions - max_dwells_ = configuration_->property(role + ".max_dwells", 1); acq_parameters.max_dwells = max_dwells_; + dump_ = configuration_->property(role + ".dump", false); + acq_parameters.dump = dump_; + acq_parameters.dump_channel = configuration_->property(role + ".dump_channel", 0); + blocking_ = configuration_->property(role + ".blocking", true); + acq_parameters.blocking = blocking_; dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code (4 ms) ----------------- diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index e68de5230..132c5ff1c 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -100,10 +100,10 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( acq_parameters.samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); acq_parameters.samples_per_code = code_length_; acq_parameters.it_size = item_size_; - acq_parameters.sampled_ms = 20; + acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 20); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); - acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", true); + acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false); acquisition_ = pcps_make_acquisition(acq_parameters); DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")"; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 646975ae4..3ff1ac23c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -65,7 +65,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_old_freq = 0; d_num_noncoherent_integrations_counter = 0; d_consumed_samples = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); - if (acq_parameters.sampled_ms == 1) + if (acq_parameters.sampled_ms == (acq_parameters.samples_per_code / acq_parameters.samples_per_ms)) // { d_fft_size = d_consumed_samples; } @@ -205,7 +205,7 @@ void pcps_acquisition::set_local_code(std::complex* code) } else { - if (acq_parameters.sampled_ms == 1) + if (acq_parameters.sampled_ms == (acq_parameters.samples_per_code / acq_parameters.samples_per_ms)) { memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_consumed_samples); } 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 111dc775d..312085442 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 @@ -164,46 +164,69 @@ protected: { signal_id = "1C"; system_id = 'G'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) { signal_id = "1C"; system_id = 'G'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0) { signal_id = "1B"; system_id = 'E'; + if (FLAGS_acq_test_coherent_time_ms == 1) + { + coherent_integration_time_ms = 4; + } + else + { + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + } } else if (implementation.compare("GLONASS_L1_CA_PCPS_Acquisition") == 0) { signal_id = "1G"; system_id = 'R'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else if (implementation.compare("GLONASS_L2_CA_PCPS_Acquisition") == 0) { signal_id = "2G"; system_id = 'R'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else if (implementation.compare("GPS_L2_M_PCPS_Acquisition") == 0) { signal_id = "2S"; system_id = 'G'; + if (FLAGS_acq_test_coherent_time_ms == 1) + { + coherent_integration_time_ms = 20; + } + else + { + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + } } else if (implementation.compare("Galileo_E5a_Pcps_Acquisition") == 0) { signal_id = "5X"; system_id = 'E'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else if (implementation.compare("GPS_L5i_PCPS_Acquisition") == 0) { signal_id = "L5"; system_id = 'G'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } else { signal_id = "1C"; system_id = 'G'; + coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } init(); @@ -292,7 +315,7 @@ protected: std::string implementation = FLAGS_acq_test_implementation; const double baseband_sampling_freq = static_cast(FLAGS_fs_gen_sps); - const int coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + int coherent_integration_time_ms; const int in_acquisition = 1; const int dump_channel = 0; diff --git a/src/utils/reproducibility/ieee-access18/L2-access18.conf b/src/utils/reproducibility/ieee-access18/L2-access18.conf index e4bc4ae44..d51a040d2 100644 --- a/src/utils/reproducibility/ieee-access18/L2-access18.conf +++ b/src/utils/reproducibility/ieee-access18/L2-access18.conf @@ -85,7 +85,7 @@ Acquisition_2S.doppler_step=125 Acquisition_2S.use_CFAR_algorithm=false -Acquisition_2S.threshold=19.5 +Acquisition_2S.threshold=10 Acquisition_2S.blocking=true From e2c78ccdfa5b1a837923dcf0c88fe554f4ae988c Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Wed, 11 Jul 2018 19:38:08 +0200 Subject: [PATCH 174/194] Simplification of the GPS L1 CA telemetry decoder and synchronizer. Improving preamble detection reliability --- .../gps_l1_ca_telemetry_decoder_cc.cc | 295 ++++++++++-------- .../gps_l1_ca_telemetry_decoder_cc.h | 24 +- 2 files changed, 172 insertions(+), 147 deletions(-) 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 78ff3aaa9..e509a3b90 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 @@ -83,26 +83,20 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc( } } d_stat = 0; - d_symbol_accumulator = 0; - d_symbol_accumulator_counter = 0; - d_frame_bit_index = 0; d_flag_frame_sync = false; - d_GPS_frame_4bytes = 0; d_prev_GPS_frame_4bytes = 0; - d_flag_parity = false; d_TOW_at_Preamble_ms = 0; flag_TOW_set = false; d_flag_preamble = false; d_flag_new_tow_available = false; - d_word_number = 0; d_channel = 0; flag_PLL_180_deg_phase_locked = false; d_preamble_time_samples = 0; d_TOW_at_current_symbol_ms = 0; - d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS + 1); // Change fixed buffer size - d_symbol_history.clear(); // Clear all the elements in the buffer - d_make_correlation = true; - d_symbol_counter_corr = 0; + d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); // Change fixed buffer size + d_symbol_history.clear(); // Clear all the elements in the buffer + d_crc_error_synchronization_counter = 0; + d_current_subframe_symbol = 0; } @@ -150,9 +144,10 @@ bool gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(unsigned int gpsword) void gps_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satellite) { + d_nav.reset(); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); DLOG(INFO) << "Setting decoder Finite State Machine to satellite " << d_satellite; - d_GPS_FSM.i_satellite_PRN = d_satellite.get_PRN(); + d_nav.i_satellite_PRN = d_satellite.get_PRN(); DLOG(INFO) << "Navigation Satellite set to " << d_satellite; } @@ -160,7 +155,7 @@ void gps_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite &satelli void gps_l1_ca_telemetry_decoder_cc::set_channel(int channel) { d_channel = channel; - d_GPS_FSM.i_channel_ID = channel; + d_nav.i_channel_ID = channel; DLOG(INFO) << "Navigation channel set to " << channel; // ############# ENABLE DATA FILE LOG ################# if (d_dump == true) @@ -186,10 +181,128 @@ void gps_l1_ca_telemetry_decoder_cc::set_channel(int channel) } +bool gps_l1_ca_telemetry_decoder_cc::decode_subframe() +{ + char subframe[GPS_SUBFRAME_LENGTH]; + + int symbol_accumulator_counter = 0; + int frame_bit_index = 0; + int word_index = 0; + uint32_t GPS_frame_4bytes = 0; + float symbol_accumulator = 0; + bool subframe_synchro_confirmation = false; + bool CRC_ok = true; + + for (int n = 0; n < GPS_SUBFRAME_MS; n++) + { + //******* SYMBOL TO BIT ******* + // extended correlation to bit period is enabled in tracking! + symbol_accumulator += d_subframe_symbols[n]; // accumulate the input value in d_symbol_accumulator + symbol_accumulator_counter++; + if (symbol_accumulator_counter == 20) + { + //symbol to bit + if (symbol_accumulator > 0) GPS_frame_4bytes += 1; //insert the telemetry bit in LSB + symbol_accumulator = 0; + symbol_accumulator_counter = 0; + + //******* bits to words ****** + frame_bit_index++; + if (frame_bit_index == 30) + { + frame_bit_index = 0; + // parity check + // Each word in wordbuff is composed of: + // Bits 0 to 29 = the GPS data word + // Bits 30 to 31 = 2 LSBs of the GPS word ahead. + // prepare the extended frame [-2 -1 0 ... 30] + if (d_prev_GPS_frame_4bytes & 0x00000001) + { + GPS_frame_4bytes = GPS_frame_4bytes | 0x40000000; + } + if (d_prev_GPS_frame_4bytes & 0x00000002) + { + GPS_frame_4bytes = GPS_frame_4bytes | 0x80000000; + } + /* Check that the 2 most recently logged words pass parity. Have to first + invert the data bits according to bit 30 of the previous word. */ + if (GPS_frame_4bytes & 0x40000000) + { + GPS_frame_4bytes ^= 0x3FFFFFC0; // invert the data bits (using XOR) + } + if (gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(GPS_frame_4bytes)) + { + subframe_synchro_confirmation = true; + } + else + { + //std::cout << "word invalid sat " << this->d_satellite << std::endl; + CRC_ok = false; + //break; + } + //add word to subframe + // insert the word in the correct position of the subframe + std::memcpy(&subframe[word_index * GPS_WORD_LENGTH], &GPS_frame_4bytes, sizeof(uint32_t)); + word_index++; + d_prev_GPS_frame_4bytes = GPS_frame_4bytes; // save the actual frame + GPS_frame_4bytes = 0; + } + else + { + GPS_frame_4bytes <<= 1; //shift 1 bit left the telemetry word + } + } + } + + + //decode subframe + // NEW GPS SUBFRAME HAS ARRIVED! + if (CRC_ok) + { + int subframe_ID = d_nav.subframe_decoder(subframe); //decode the subframe + std::cout << "New GPS NAV message received in channel " << this->d_channel << ": " + << "subframe " + << subframe_ID << " from satellite " + << Gnss_Satellite(std::string("GPS"), d_nav.i_satellite_PRN) << std::endl; + + switch (subframe_ID) + { + case 3: //we have a new set of ephemeris data for the current SV + if (d_nav.satellite_validation() == true) + { + // get ephemeris object for this SV (mandatory) + std::shared_ptr tmp_obj = std::make_shared(d_nav.get_ephemeris()); + this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); + } + break; + case 4: // Possible IONOSPHERE and UTC model update (page 18) + if (d_nav.flag_iono_valid == true) + { + std::shared_ptr tmp_obj = std::make_shared(d_nav.get_iono()); + this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); + } + if (d_nav.flag_utc_model_valid == true) + { + std::shared_ptr tmp_obj = std::make_shared(d_nav.get_utc_model()); + this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); + } + break; + case 5: + // get almanac (if available) + //TODO: implement almanac reader in navigation_message + break; + default: + break; + } + d_flag_new_tow_available = true; + } + + return subframe_synchro_confirmation; +} + int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)), gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { - int corr_value = 0; int preamble_diff_ms = 0; Gnss_Synchro **out = reinterpret_cast(&output_items[0]); // Get the output buffer pointer @@ -198,15 +311,25 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__ Gnss_Synchro current_symbol; //structure to save the synchronization information and send the output object to the next block //1. Copy the current tracking output 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) + { + d_subframe_symbols[d_current_subframe_symbol] = d_symbol_history.at(0).Prompt_I; + d_current_subframe_symbol++; + } + d_symbol_history.push_back(current_symbol); //add new symbol to the symbol queue consume_each(1); - unsigned int required_symbols = GPS_CA_PREAMBLE_LENGTH_SYMBOLS; d_flag_preamble = false; - if ((d_symbol_history.size() > required_symbols) and (d_make_correlation or !d_flag_frame_sync)) + + //******* preamble correlation ******** + int corr_value = 0; + if ((d_symbol_history.size() == GPS_CA_PREAMBLE_LENGTH_SYMBOLS)) // and (d_make_correlation or !d_flag_frame_sync)) { - //******* preamble correlation ******** + // std::cout << "-------\n"; for (unsigned int i = 0; i < GPS_CA_PREAMBLE_LENGTH_SYMBOLS; i++) { if (d_symbol_history.at(i).Flag_valid_symbol_output == true) @@ -221,38 +344,27 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__ } } } - if (std::abs(corr_value) >= GPS_CA_PREAMBLE_LENGTH_SYMBOLS) - { - d_symbol_counter_corr++; - } } + //******* frame sync ****************** if (std::abs(corr_value) == GPS_CA_PREAMBLE_LENGTH_SYMBOLS) { //TODO: Rewrite with state machine if (d_stat == 0) { - d_GPS_FSM.Event_gps_word_preamble(); //record the preamble sample stamp d_preamble_time_samples = d_symbol_history.at(0).Tracking_sample_counter; // record the preamble sample stamp DLOG(INFO) << "Preamble detection for SAT " << this->d_satellite << "d_symbol_history.at(0).Tracking_sample_counter=" << d_symbol_history.at(0).Tracking_sample_counter; - //sync the symbol to bits integrator - d_symbol_accumulator = 0; - d_symbol_accumulator_counter = 0; - d_frame_bit_index = 0; d_stat = 1; // enter into frame pre-detection status } else if (d_stat == 1) //check 6 seconds of preamble separation { preamble_diff_ms = std::round(((static_cast(d_symbol_history.at(0).Tracking_sample_counter) - d_preamble_time_samples) / static_cast(d_symbol_history.at(0).fs)) * 1000.0); - if (std::abs(preamble_diff_ms - GPS_SUBFRAME_MS) < 1) + if (std::abs(preamble_diff_ms - GPS_SUBFRAME_MS) % GPS_SUBFRAME_MS == 0) { DLOG(INFO) << "Preamble confirmation for SAT " << this->d_satellite; - d_GPS_FSM.Event_gps_word_preamble(); d_flag_preamble = true; - d_make_correlation = false; - d_symbol_counter_corr = 0; d_preamble_time_samples = d_symbol_history.at(0).Tracking_sample_counter; // record the PRN start sample index associated to the preamble if (!d_flag_frame_sync) { @@ -269,131 +381,46 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__ DLOG(INFO) << " Frame sync SAT " << this->d_satellite << " with preamble start at " << static_cast(d_preamble_time_samples) / static_cast(d_symbol_history.at(0).fs) << " [s]"; } + + //try to decode the subframe: + if (decode_subframe() == false) + { + d_crc_error_synchronization_counter++; + if (d_crc_error_synchronization_counter > 3) + { + DLOG(INFO) << "TOO MANY CRC ERRORS: Lost of frame sync SAT " << this->d_satellite << std::endl; + d_stat = 0; //lost of frame sync + d_flag_frame_sync = false; + flag_TOW_set = false; + d_crc_error_synchronization_counter = 0; + } + } + d_current_subframe_symbol = 0; } } } else { - d_symbol_counter_corr++; - if (d_symbol_counter_corr > (GPS_SUBFRAME_MS - GPS_CA_TELEMETRY_SYMBOLS_PER_BIT)) - { - d_make_correlation = true; - } if (d_stat == 1) { preamble_diff_ms = round(((static_cast(d_symbol_history.at(0).Tracking_sample_counter) - static_cast(d_preamble_time_samples)) / static_cast(d_symbol_history.at(0).fs)) * 1000.0); - if (preamble_diff_ms > GPS_SUBFRAME_MS + 1) + if (preamble_diff_ms > GPS_SUBFRAME_MS) { DLOG(INFO) << "Lost of frame sync SAT " << this->d_satellite << " preamble_diff= " << preamble_diff_ms; + // std::cout << "Lost of frame sync SAT " << this->d_satellite << " preamble_diff= " << preamble_diff_ms << std::endl; d_stat = 0; //lost of frame sync d_flag_frame_sync = false; flag_TOW_set = false; - d_make_correlation = true; - d_symbol_counter_corr = 0; + d_current_subframe_symbol = 0; + d_crc_error_synchronization_counter = 0; } } } - //******* SYMBOL TO BIT ******* - if (d_symbol_history.at(0).Flag_valid_symbol_output == true) - { - // extended correlation to bit period is enabled in tracking! - d_symbol_accumulator += d_symbol_history.at(0).Prompt_I; // accumulate the input value in d_symbol_accumulator - d_symbol_accumulator_counter += d_symbol_history.at(0).correlation_length_ms; - } - if (d_symbol_accumulator_counter >= 20) - { - if (d_symbol_accumulator > 0) - { //symbol to bit - d_GPS_frame_4bytes += 1; //insert the telemetry bit in LSB - } - d_symbol_accumulator = 0; - d_symbol_accumulator_counter = 0; - //******* bits to words ****** - d_frame_bit_index++; - if (d_frame_bit_index == 30) - { - d_frame_bit_index = 0; - // parity check - // Each word in wordbuff is composed of: - // Bits 0 to 29 = the GPS data word - // Bits 30 to 31 = 2 LSBs of the GPS word ahead. - // prepare the extended frame [-2 -1 0 ... 30] - if (d_prev_GPS_frame_4bytes & 0x00000001) - { - d_GPS_frame_4bytes = d_GPS_frame_4bytes | 0x40000000; - } - if (d_prev_GPS_frame_4bytes & 0x00000002) - { - d_GPS_frame_4bytes = d_GPS_frame_4bytes | 0x80000000; - } - /* Check that the 2 most recently logged words pass parity. Have to first - invert the data bits according to bit 30 of the previous word. */ - if (d_GPS_frame_4bytes & 0x40000000) - { - d_GPS_frame_4bytes ^= 0x3FFFFFC0; // invert the data bits (using XOR) - } - if (gps_l1_ca_telemetry_decoder_cc::gps_word_parityCheck(d_GPS_frame_4bytes)) - { - memcpy(&d_GPS_FSM.d_GPS_frame_4bytes, &d_GPS_frame_4bytes, sizeof(char) * 4); - //d_GPS_FSM.d_preamble_time_ms = d_preamble_time_seconds * 1000.0; - d_GPS_FSM.Event_gps_word_valid(); - // send TLM data to PVT using asynchronous message queues - if (d_GPS_FSM.d_flag_new_subframe == true) - { - switch (d_GPS_FSM.d_subframe_ID) - { - case 3: //we have a new set of ephemeris data for the current SV - if (d_GPS_FSM.d_nav.satellite_validation() == true) - { - // get ephemeris object for this SV (mandatory) - std::shared_ptr tmp_obj = std::make_shared(d_GPS_FSM.d_nav.get_ephemeris()); - this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); - } - break; - case 4: // Possible IONOSPHERE and UTC model update (page 18) - if (d_GPS_FSM.d_nav.flag_iono_valid == true) - { - std::shared_ptr tmp_obj = std::make_shared(d_GPS_FSM.d_nav.get_iono()); - this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); - } - if (d_GPS_FSM.d_nav.flag_utc_model_valid == true) - { - std::shared_ptr tmp_obj = std::make_shared(d_GPS_FSM.d_nav.get_utc_model()); - this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj)); - } - break; - case 5: - // get almanac (if available) - //TODO: implement almanac reader in navigation_message - break; - default: - break; - } - d_GPS_FSM.clear_flag_new_subframe(); - d_flag_new_tow_available = true; - } - - d_flag_parity = true; - } - else - { - d_GPS_FSM.Event_gps_word_invalid(); - d_flag_parity = false; - } - d_prev_GPS_frame_4bytes = d_GPS_frame_4bytes; // save the actual frame - d_GPS_frame_4bytes = d_GPS_frame_4bytes & 0; - } - else - { - d_GPS_frame_4bytes <<= 1; //shift 1 bit left the telemetry word - } - } - //2. Add the telemetry decoder information if (this->d_flag_preamble == true and d_flag_new_tow_available == true) { - d_TOW_at_current_symbol_ms = static_cast(d_GPS_FSM.d_nav.d_TOW) * 1000 + GPS_L1_CA_CODE_PERIOD_MS + GPS_CA_PREAMBLE_DURATION_MS; + d_TOW_at_current_symbol_ms = static_cast(d_nav.d_TOW) * 1000 + GPS_L1_CA_CODE_PERIOD_MS + GPS_CA_PREAMBLE_DURATION_MS; d_TOW_at_Preamble_ms = d_TOW_at_current_symbol_ms; flag_TOW_set = true; d_flag_new_tow_available = false; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h index 52f1f1049..5c6a07f52 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h @@ -72,7 +72,9 @@ private: bool gps_word_parityCheck(unsigned int gpsword); - // class private vars + bool decode_subframe(); + bool new_decoder(); + int d_crc_error_synchronization_counter; int *d_preambles_symbols; unsigned int d_stat; @@ -80,26 +82,22 @@ private: // symbols boost::circular_buffer d_symbol_history; - - double d_symbol_accumulator; - short int d_symbol_accumulator_counter; - - // symbol counting - bool d_make_correlation; - unsigned int d_symbol_counter_corr; + float d_subframe_symbols[GPS_SUBFRAME_MS]; //symbols per subframe + int d_current_subframe_symbol; + //double d_symbol_accumulator; + //short int d_symbol_accumulator_counter; //bits and frame - unsigned short int d_frame_bit_index; - unsigned int d_GPS_frame_4bytes; + //unsigned short int d_frame_bit_index; + //unsigned int d_GPS_frame_4bytes; unsigned int d_prev_GPS_frame_4bytes; - bool d_flag_parity; + //bool d_flag_parity; bool d_flag_preamble; bool d_flag_new_tow_available; - int d_word_number; + //int d_word_number; // navigation message vars Gps_Navigation_Message d_nav; - GpsL1CaSubframeFsm d_GPS_FSM; bool d_dump; Gnss_Satellite d_satellite; From d4d0ad0042e66eec82f73345120254f8e1ad179e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 12 Jul 2018 07:50:30 +0200 Subject: [PATCH 175/194] Fix bug that could cause repeating a satellite in a different channel --- src/core/receiver/gnss_flowgraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 20209506a..7f43e83c8 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -418,7 +418,7 @@ void GNSSFlowgraph::connect() } if (sat == 0) { - channels_.at(i)->set_signal(search_next_signal(gnss_signal, false)); + //channels_.at(i)->set_signal(search_next_signal(gnss_signal, false)); } else { From 15e86c841cf2a61fcc05f7ac7f7773ee90aa3feb Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 12 Jul 2018 09:36:50 +0200 Subject: [PATCH 176/194] Remove unused files and code --- .../gps_l1_ca_telemetry_decoder_cc.cc | 1 - .../gps_l1_ca_telemetry_decoder_cc.h | 8 +- .../telemetry_decoder/libs/CMakeLists.txt | 3 +- .../libs/gps_l1_ca_subframe_fsm.cc | 289 ------------------ .../libs/gps_l1_ca_subframe_fsm.h | 100 ------ 5 files changed, 2 insertions(+), 399 deletions(-) delete mode 100644 src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc delete mode 100644 src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h 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 e509a3b90..395f7a7fd 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 @@ -238,7 +238,6 @@ bool gps_l1_ca_telemetry_decoder_cc::decode_subframe() { //std::cout << "word invalid sat " << this->d_satellite << std::endl; CRC_ok = false; - //break; } //add word to subframe // insert the word in the correct position of the subframe diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h index 5c6a07f52..ce35078eb 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.h @@ -32,7 +32,7 @@ #define GNSS_SDR_GPS_L1_CA_TELEMETRY_DECODER_CC_H #include "GPS_L1_CA.h" -#include "gps_l1_ca_subframe_fsm.h" +#include "gps_navigation_message.h" #include "gnss_satellite.h" #include "gnss_synchro.h" #include @@ -84,17 +84,11 @@ private: boost::circular_buffer d_symbol_history; float d_subframe_symbols[GPS_SUBFRAME_MS]; //symbols per subframe int d_current_subframe_symbol; - //double d_symbol_accumulator; - //short int d_symbol_accumulator_counter; //bits and frame - //unsigned short int d_frame_bit_index; - //unsigned int d_GPS_frame_4bytes; unsigned int d_prev_GPS_frame_4bytes; - //bool d_flag_parity; bool d_flag_preamble; bool d_flag_new_tow_available; - //int d_word_number; // navigation message vars Gps_Navigation_Message d_nav; diff --git a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt index 523ef2df2..b8a2fcd2f 100644 --- a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt @@ -18,8 +18,7 @@ add_subdirectory(libswiftcnav) -set(TELEMETRY_DECODER_LIB_SOURCES - gps_l1_ca_subframe_fsm.cc +set(TELEMETRY_DECODER_LIB_SOURCES viterbi_decoder.cc ) diff --git a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc deleted file mode 100644 index d5317734e..000000000 --- a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.cc +++ /dev/null @@ -1,289 +0,0 @@ -/*! - * \file gps_l1_ca_subframe_fsm.cc - * \brief Implementation of a GPS NAV message word-to-subframe decoder state machine - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) - * - * GNSS-SDR is a software defined Global Navigation - * Satellite Systems receiver - * - * This file is part of GNSS-SDR. - * - * GNSS-SDR is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNSS-SDR is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNSS-SDR. If not, see . - * - * ------------------------------------------------------------------------- - */ - -#include "gps_l1_ca_subframe_fsm.h" -#include "gnss_satellite.h" -#include -#include -#include -#include -#include -#include - - -//************ GPS WORD TO SUBFRAME DECODER STATE MACHINE ********** -struct Ev_gps_word_valid : sc::event -{ -}; - - -struct Ev_gps_word_invalid : sc::event -{ -}; - - -struct Ev_gps_word_preamble : sc::event -{ -}; - - -struct gps_subframe_fsm_S0 : public sc::state -{ -public: - // sc::transition(event,next_status) - typedef sc::transition reactions; - gps_subframe_fsm_S0(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S0 "< -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S1(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S1 "< -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S2(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S2 "<().gps_word_to_subframe(0); - } -}; - - -struct gps_subframe_fsm_S3 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S3(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S3 "<().gps_word_to_subframe(1); - } -}; - - -struct gps_subframe_fsm_S4 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S4(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S4 "<().gps_word_to_subframe(2); - } -}; - - -struct gps_subframe_fsm_S5 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S5(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S5 "<().gps_word_to_subframe(3); - } -}; - - -struct gps_subframe_fsm_S6 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S6(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S6 "<().gps_word_to_subframe(4); - } -}; - - -struct gps_subframe_fsm_S7 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S7(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S7 "<().gps_word_to_subframe(5); - } -}; - - -struct gps_subframe_fsm_S8 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S8(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S8 "<().gps_word_to_subframe(6); - } -}; - - -struct gps_subframe_fsm_S9 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S9(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S9 "<().gps_word_to_subframe(7); - } -}; - - -struct gps_subframe_fsm_S10 : public sc::state -{ -public: - typedef mpl::list, - sc::transition > - reactions; - - gps_subframe_fsm_S10(my_context ctx) : my_base(ctx) - { - //std::cout<<"Enter S10 "<().gps_word_to_subframe(8); - } -}; - - -struct gps_subframe_fsm_S11 : public sc::state -{ -public: - typedef sc::transition reactions; - - gps_subframe_fsm_S11(my_context ctx) : my_base(ctx) - { - //std::cout<<"Completed GPS Subframe!"<().gps_word_to_subframe(9); - context().gps_subframe_to_nav_msg(); //decode the subframe - // DECODE SUBFRAME - //std::cout<<"Enter S11"<d_subframe); //decode the subframe - std::cout << "New GPS NAV message received in channel " << i_channel_ID << ": " - << "subframe " - << d_subframe_ID << " from satellite " - << Gnss_Satellite(std::string("GPS"), i_satellite_PRN) << std::endl; - d_nav.i_satellite_PRN = i_satellite_PRN; - d_nav.i_channel_ID = i_channel_ID; - - d_flag_new_subframe = true; -} - - -void GpsL1CaSubframeFsm::Event_gps_word_valid() -{ - this->process_event(Ev_gps_word_valid()); -} - - -void GpsL1CaSubframeFsm::Event_gps_word_invalid() -{ - this->process_event(Ev_gps_word_invalid()); -} - - -void GpsL1CaSubframeFsm::Event_gps_word_preamble() -{ - this->process_event(Ev_gps_word_preamble()); -} diff --git a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h b/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h deleted file mode 100644 index 9a9a04bd8..000000000 --- a/src/algorithms/telemetry_decoder/libs/gps_l1_ca_subframe_fsm.h +++ /dev/null @@ -1,100 +0,0 @@ -/*! - * \file gps_l1_ca_subframe_fsm.h - * \brief Interface of a GPS NAV message word-to-subframe decoder state machine - * \author Javier Arribas, 2011. jarribas(at)cttc.es - * - * ------------------------------------------------------------------------- - * - * Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors) - * - * GNSS-SDR is a software defined Global Navigation - * Satellite Systems receiver - * - * This file is part of GNSS-SDR. - * - * GNSS-SDR is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GNSS-SDR is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNSS-SDR. If not, see . - * - * ------------------------------------------------------------------------- - */ - - -#ifndef GNSS_SDR_GPS_L1_CA_SUBFRAME_FSM_H_ -#define GNSS_SDR_GPS_L1_CA_SUBFRAME_FSM_H_ - -#include "GPS_L1_CA.h" -#include "gps_navigation_message.h" -#include "gps_ephemeris.h" -#include "gps_iono.h" -#include "gps_almanac.h" -#include "gps_utc_model.h" -#include - -namespace sc = boost::statechart; -namespace mpl = boost::mpl; - -struct gps_subframe_fsm_S0; -struct gps_subframe_fsm_S1; -struct gps_subframe_fsm_S2; -struct gps_subframe_fsm_S3; -struct gps_subframe_fsm_S4; -struct gps_subframe_fsm_S5; -struct gps_subframe_fsm_S6; -struct gps_subframe_fsm_S7; -struct gps_subframe_fsm_S8; -struct gps_subframe_fsm_S9; -struct gps_subframe_fsm_S10; -struct gps_subframe_fsm_S11; - - -/*! - * \brief This class implements a Finite State Machine that handles the decoding - * of the GPS L1 C/A NAV message - */ -class GpsL1CaSubframeFsm : public sc::state_machine -{ -public: - GpsL1CaSubframeFsm(); //!< The constructor starts the Finite State Machine - void clear_flag_new_subframe(); - // channel and satellite info - int i_channel_ID; //!< Channel id - unsigned int i_satellite_PRN; //!< Satellite PRN number - - Gps_Navigation_Message d_nav; //!< GPS L1 C/A navigation message object - - // GPS SV and System parameters - Gps_Ephemeris ephemeris; //!< Object that handles GPS ephemeris parameters - Gps_Almanac almanac; //!< Object that handles GPS almanac data - Gps_Utc_Model utc_model; //!< Object that handles UTM model parameters - Gps_Iono iono; //!< Object that handles ionospheric parameters - - char d_subframe[GPS_SUBFRAME_LENGTH]; - int d_subframe_ID; - bool d_flag_new_subframe; - char d_GPS_frame_4bytes[GPS_WORD_LENGTH]; - //double d_preamble_time_ms; - - void gps_word_to_subframe(int position); //!< inserts the word in the correct position of the subframe - - /*! - * \brief This function decodes a NAv message subframe and pushes the information to the right queues - */ - void gps_subframe_to_nav_msg(); - - //FSM EVENTS - void Event_gps_word_valid(); //!< FSM event: the received word is valid - void Event_gps_word_invalid(); //!< FSM event: the received word is not valid - void Event_gps_word_preamble(); //!< FSM event: word preamble detected -}; - -#endif From 605ba079c873f0bb40288c8ad54619e836cab7c2 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 12 Jul 2018 15:26:24 +0200 Subject: [PATCH 177/194] Fix unified tracking binary dump artifacts in code delay estimation --- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index bd822c74c..70eef4727 100755 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -399,7 +399,8 @@ void dll_pll_veml_tracking::start_tracking() double T_prn_mod_seconds = T_chip_mod_seconds * static_cast(d_code_length_chips); double T_prn_mod_samples = T_prn_mod_seconds * trk_parameters.fs_in; - d_current_prn_length_samples = std::round(T_prn_mod_samples); + //d_current_prn_length_samples = std::round(T_prn_mod_samples); + d_current_prn_length_samples = std::floor(T_prn_mod_samples); double T_prn_true_seconds = static_cast(d_code_length_chips) / d_code_chip_rate; double T_prn_true_samples = T_prn_true_seconds * trk_parameters.fs_in; @@ -753,7 +754,8 @@ void dll_pll_veml_tracking::update_tracking_vars() // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation T_prn_samples = T_prn_seconds * trk_parameters.fs_in; K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * trk_parameters.fs_in; - d_current_prn_length_samples = static_cast(round(K_blk_samples)); // round to a discrete number of samples + //d_current_prn_length_samples = static_cast(round(K_blk_samples)); // round to a discrete number of samples + d_current_prn_length_samples = static_cast(std::floor(K_blk_samples)); // round to a discrete number of samples //################### PLL COMMANDS ################################################# // carrier phase step (NCO phase increment per sample) [rads/sample] @@ -834,6 +836,7 @@ void dll_pll_veml_tracking::log_data(bool integrating) float tmp_VE, tmp_E, tmp_P, tmp_L, tmp_VL; float tmp_float; double tmp_double; + unsigned long int tmp_long_int; if (trk_parameters.track_pilot) { if (interchange_iq) @@ -900,7 +903,8 @@ void dll_pll_veml_tracking::log_data(bool integrating) d_dump_file.write(reinterpret_cast(&prompt_I), sizeof(float)); d_dump_file.write(reinterpret_cast(&prompt_Q), sizeof(float)); // PRN start sample stamp - d_dump_file.write(reinterpret_cast(&d_sample_counter), sizeof(unsigned long int)); + tmp_long_int = d_sample_counter + d_current_prn_length_samples; + d_dump_file.write(reinterpret_cast(&tmp_long_int), sizeof(unsigned long int)); // accumulated carrier phase tmp_float = d_acc_carrier_phase_rad; d_dump_file.write(reinterpret_cast(&tmp_float), sizeof(float)); From 7dd0f7143e612553596dcfe9c0cad2c6c8c52fcd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 12 Jul 2018 18:21:48 +0200 Subject: [PATCH 178/194] Minor code cleaning --- src/core/receiver/gnss_flowgraph.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 7f43e83c8..1f72636f6 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -416,11 +416,7 @@ void GNSSFlowgraph::connect() { LOG(WARNING) << e.what(); } - if (sat == 0) - { - //channels_.at(i)->set_signal(search_next_signal(gnss_signal, false)); - } - else + if (sat != 0) { std::string gnss_system; Gnss_Signal signal_value; From 75d0645276dbbba791a197c5a1d81afbfd58f107 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 12 Jul 2018 18:52:38 +0200 Subject: [PATCH 179/194] Add RMSE exports to MATLAB in tracking unit test --- src/tests/common-files/tracking_tests_flags.h | 2 + .../gps_l1_ca_dll_pll_tracking_test.cc | 114 +++++++++++++++--- 2 files changed, 101 insertions(+), 15 deletions(-) diff --git a/src/tests/common-files/tracking_tests_flags.h b/src/tests/common-files/tracking_tests_flags.h index 275c90017..a09b1b49e 100644 --- a/src/tests/common-files/tracking_tests_flags.h +++ b/src/tests/common-files/tracking_tests_flags.h @@ -65,6 +65,8 @@ DEFINE_int64(skip_samples, 0, "Skip an initial transitory in the processed signa DEFINE_int32(plot_detail_level, 0, "Specify the desired plot detail (0,1,2): 0 - Minimum plots (default) 2 - Plot all tracking parameters"); +DEFINE_double(skip_trk_transitory_s, 1.0, "Skip the initial tracking output signal to avoid transitory results [s]"); + //Emulated acquisition configuration //Tracking configuration diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 98c40ad20..310f29ee7 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -136,20 +137,24 @@ public: arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error); + double& std_dev_error, + double& rmse); std::vector check_results_acc_carrier_phase(arma::vec& true_time_s, arma::vec& true_value, arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error); + double& std_dev_error, + double& rmse); std::vector check_results_codephase(arma::vec& true_time_s, arma::vec& true_value, arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error); + double& std_dev_error, + double& rmse); + bool save_mat_xy(std::vector& x, std::vector& y, std::string filename); GpsL1CADllPllTrackingTest() { factory = std::make_shared(); @@ -267,7 +272,8 @@ std::vector GpsL1CADllPllTrackingTest::check_results_doppler(arma::vec& arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error) + double& std_dev_error, + double& rmse) { // 1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -289,7 +295,7 @@ std::vector GpsL1CADllPllTrackingTest::check_results_doppler(arma::vec& std::vector err_std_vector(err.colptr(0), err.colptr(0) + err.n_rows); arma::vec err2 = arma::square(err); - double rmse = sqrt(arma::mean(err2)); + rmse = sqrt(arma::mean(err2)); // 3. Mean err and variance double error_mean = arma::mean(err); @@ -317,7 +323,8 @@ std::vector GpsL1CADllPllTrackingTest::check_results_acc_carrier_phase(a arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error) + double& std_dev_error, + double& rmse) { // 1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -337,7 +344,7 @@ std::vector GpsL1CADllPllTrackingTest::check_results_acc_carrier_phase(a //conversion between arma::vec and std:vector std::vector err_std_vector(err.colptr(0), err.colptr(0) + err.n_rows); - double rmse = sqrt(arma::mean(err2)); + rmse = sqrt(arma::mean(err2)); // 3. Mean err and variance double error_mean = arma::mean(err); @@ -364,7 +371,8 @@ std::vector GpsL1CADllPllTrackingTest::check_results_codephase(arma::vec arma::vec& meas_time_s, arma::vec& meas_value, double& mean_error, - double& std_dev_error) + double& std_dev_error, + double& rmse) { // 1. True value interpolation to match the measurement times arma::vec true_value_interp; @@ -385,7 +393,7 @@ std::vector GpsL1CADllPllTrackingTest::check_results_codephase(arma::vec std::vector err_std_vector(err.colptr(0), err.colptr(0) + err.n_rows); arma::vec err2 = arma::square(err); - double rmse = sqrt(arma::mean(err2)); + rmse = sqrt(arma::mean(err2)); // 3. Mean err and variance double error_mean = arma::mean(err); @@ -420,12 +428,15 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) //data containers for config param sweep std::vector> mean_doppler_error_sweep; //swep config param and cn0 sweep std::vector> std_dev_doppler_error_sweep; //swep config param and cn0 sweep + std::vector> rmse_doppler_sweep; //swep config param and cn0 sweep std::vector> mean_code_phase_error_sweep; //swep config param and cn0 sweep std::vector> std_dev_code_phase_error_sweep; //swep config param and cn0 sweep + std::vector> rmse_code_phase_sweep; //swep config param and cn0 sweep std::vector> mean_carrier_phase_error_sweep; //swep config param and cn0 sweep std::vector> std_dev_carrier_phase_error_sweep; //swep config param and cn0 sweep + std::vector> rmse_carrier_phase_sweep; //swep config param and cn0 sweep std::vector> trk_valid_timestamp_s_sweep; std::vector> generator_CN0_values_sweep_copy; @@ -532,10 +543,13 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) std::vector mean_doppler_error; std::vector std_dev_doppler_error; + std::vector rmse_doppler; std::vector mean_code_phase_error; std::vector std_dev_code_phase_error; + std::vector rmse_code_phase; std::vector mean_carrier_phase_error; std::vector std_dev_carrier_phase_error; + std::vector rmse_carrier_phase; std::vector valid_CN0_values; configure_receiver(PLL_wide_bw_values.at(config_idx), @@ -707,7 +721,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) epoch_counter++; } // Align initial measurements and cut the tracking pull-in transitory - double pull_in_offset_s = 1.0; + double pull_in_offset_s = FLAGS_skip_trk_transitory_s; arma::uvec initial_meas_point = arma::find(trk_timestamp_s >= (true_timestamp_s(0) + pull_in_offset_s), 1, "first"); if (initial_meas_point.size() > 0 and tracking_last_msg != 3) @@ -720,20 +734,24 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) double mean_error; double std_dev_error; + double rmse; valid_CN0_values.push_back(generator_CN0_values.at(current_cn0_idx)); //save the current cn0 value (valid tracking) - doppler_error_hz = check_results_doppler(true_timestamp_s, true_Doppler_Hz, trk_timestamp_s, trk_Doppler_Hz, mean_error, std_dev_error); + doppler_error_hz = check_results_doppler(true_timestamp_s, true_Doppler_Hz, trk_timestamp_s, trk_Doppler_Hz, mean_error, std_dev_error, rmse); mean_doppler_error.push_back(mean_error); std_dev_doppler_error.push_back(std_dev_error); + rmse_doppler.push_back(rmse); - code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error); + code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error, rmse); mean_code_phase_error.push_back(mean_error); std_dev_code_phase_error.push_back(std_dev_error); + rmse_code_phase.push_back(rmse); - acc_carrier_phase_hz = check_results_acc_carrier_phase(true_timestamp_s, true_acc_carrier_phase_cycles, trk_timestamp_s, trk_acc_carrier_phase_cycles, mean_error, std_dev_error); + acc_carrier_phase_hz = check_results_acc_carrier_phase(true_timestamp_s, true_acc_carrier_phase_cycles, trk_timestamp_s, trk_acc_carrier_phase_cycles, mean_error, std_dev_error, rmse); mean_carrier_phase_error.push_back(mean_error); std_dev_carrier_phase_error.push_back(std_dev_error); + rmse_carrier_phase.push_back(rmse); //save tracking measurement timestamps to std::vector std::vector vector_trk_timestamp_s(trk_timestamp_s.colptr(0), trk_timestamp_s.colptr(0) + trk_timestamp_s.n_rows); @@ -760,10 +778,16 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) { mean_doppler_error_sweep.push_back(mean_doppler_error); std_dev_doppler_error_sweep.push_back(std_dev_doppler_error); + rmse_doppler_sweep.push_back(rmse_doppler); + mean_code_phase_error_sweep.push_back(mean_code_phase_error); std_dev_code_phase_error_sweep.push_back(std_dev_code_phase_error); + rmse_code_phase_sweep.push_back(rmse_code_phase); + mean_carrier_phase_error_sweep.push_back(mean_carrier_phase_error); std_dev_carrier_phase_error_sweep.push_back(std_dev_carrier_phase_error); + rmse_carrier_phase_sweep.push_back(rmse_carrier_phase); + //make a copy of the CN0 vector for each configuration parameter in order to filter the loss of lock events generator_CN0_values_sweep_copy.push_back(valid_CN0_values); } @@ -894,6 +918,10 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) catch (const GnuplotException& ge) { } + save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), + code_phase_error_sweep.at(current_cn0_idx), + "Code_error_" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g5.set_legend(); g5.set_legend(); @@ -926,6 +954,10 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) catch (const GnuplotException& ge) { } + save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), + acc_carrier_phase_error_sweep.at(current_cn0_idx), + "Carrier_phase_error_output" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g6.set_legend(); g6.set_legend(); @@ -946,7 +978,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values_sweep_copy.at(config_idx).size(); current_cn0_idx++) { g4.reset_plot(); - g4.set_title(std::to_string(static_cast(round(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)))) + "[dB-Hz], PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); + g4.set_title("Dopper error" + std::to_string(static_cast(round(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)))) + "[dB-Hz], PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g4.set_grid(); //g4.cmd("set key box opaque"); g4.set_xlabel("Time [s]"); @@ -959,6 +991,11 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) catch (const GnuplotException& ge) { } + + save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), + doppler_error_sweep.at(current_cn0_idx), + "Doppler_error_output" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g4.unset_multiplot(); g4.savetops("Doppler_error_output"); @@ -1002,14 +1039,21 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) for (unsigned int config_sweep_idx = 0; config_sweep_idx < mean_doppler_error_sweep.size(); config_sweep_idx++) { g7.plot_xy_err(generator_CN0_values_sweep_copy.at(config_sweep_idx), - mean_doppler_error_sweep.at(config_sweep_idx), + generator_CN0_values_sweep_copy.at(config_sweep_idx), std_dev_doppler_error_sweep.at(config_sweep_idx), "PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + +"," + std::to_string(DLL_wide_bw_values.at(config_sweep_idx)) + " Hz"); + + //matlab save + save_mat_xy(generator_CN0_values_sweep_copy.at(config_sweep_idx), + rmse_doppler_sweep.at(config_sweep_idx), + "RMSE_Doppler_CN0_Sweep_PLL_DLL" + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + + +"_" + std::to_string(DLL_wide_bw_values.at(config_sweep_idx))); } g7.savetops("Doppler_error_metrics"); g7.savetopdf("Doppler_error_metrics", 18); + Gnuplot g8("linespoints"); g8.set_title("Accumulated carrier phase error metrics (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); g8.set_grid(); @@ -1025,6 +1069,11 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) std_dev_carrier_phase_error_sweep.at(config_sweep_idx), "PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + +"," + std::to_string(DLL_wide_bw_values.at(config_sweep_idx)) + " Hz"); + //matlab save + save_mat_xy(generator_CN0_values_sweep_copy.at(config_sweep_idx), + rmse_carrier_phase_sweep.at(config_sweep_idx), + "RMSE_Carrier_Phase_CN0_Sweep_PLL_DLL" + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + + +"_" + std::to_string(DLL_wide_bw_values.at(config_sweep_idx))); } g8.savetops("Carrier_error_metrics"); g8.savetopdf("Carrier_error_metrics", 18); @@ -1044,6 +1093,11 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) std_dev_code_phase_error_sweep.at(config_sweep_idx), "PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + +"," + std::to_string(DLL_wide_bw_values.at(config_sweep_idx)) + " Hz"); + //matlab save + save_mat_xy(generator_CN0_values_sweep_copy.at(config_sweep_idx), + rmse_code_phase_sweep.at(config_sweep_idx), + "RMSE_Code_Phase_CN0_Sweep_PLL_DLL" + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + + +"_" + std::to_string(DLL_wide_bw_values.at(config_sweep_idx))); } g9.savetops("Code_error_metrics"); g9.savetopdf("Code_error_metrics", 18); @@ -1055,3 +1109,33 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) } } } + +bool GpsL1CADllPllTrackingTest::save_mat_xy(std::vector& x, std::vector& y, std::string filename) +{ + try + { + // WRITE MAT FILE + mat_t* matfp; + matvar_t* matvar; + filename.erase(filename.length() - 4, 4); + filename.append(".mat"); + matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT73); + if (reinterpret_cast(matfp) != NULL) + { + size_t dims[2] = {1, x.size()}; + matvar = Mat_VarCreate("x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &x[0], 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("y", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &y[0], 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + } + Mat_Close(matfp); + return true; + } + catch (const std::exception& ex) + { + return false; + } +} From 6d39e31a67c68abec76beb8a05fe3bbbdb15e2f6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 12 Jul 2018 20:01:18 +0200 Subject: [PATCH 180/194] Fix bug that was causing runtime breaks --- src/core/receiver/gnss_flowgraph.cc | 43 ++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 1f72636f6..cb9f4c937 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -416,7 +416,11 @@ void GNSSFlowgraph::connect() { LOG(WARNING) << e.what(); } - if (sat != 0) + if (sat == 0) + { + channels_.at(i)->set_signal(search_next_signal(gnss_signal, false)); + } + else { std::string gnss_system; Gnss_Signal signal_value; @@ -892,6 +896,43 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) case 1: LOG(INFO) << "Channel " << who << " ACQ SUCCESS satellite " << channels_[who]->get_signal().get_satellite(); + + // If the satellite is in the list of available ones, remove it. + switch (mapStringValues_[channels_[who]->get_signal().get_signal_str()]) + { + case evGPS_1C: + available_GPS_1C_signals_.remove(channels_[who]->get_signal()); + break; + + case evGPS_2S: + available_GPS_2S_signals_.remove(channels_[who]->get_signal()); + break; + + case evGPS_L5: + available_GPS_L5_signals_.remove(channels_[who]->get_signal()); + break; + + case evGAL_1B: + available_GAL_1B_signals_.remove(channels_[who]->get_signal()); + break; + + case evGAL_5X: + available_GAL_5X_signals_.remove(channels_[who]->get_signal()); + break; + + case evGLO_1G: + available_GLO_1G_signals_.remove(channels_[who]->get_signal()); + break; + + case evGLO_2G: + available_GLO_2G_signals_.remove(channels_[who]->get_signal()); + break; + + default: + LOG(ERROR) << "This should not happen :-("; + break; + } + channels_state_[who] = 2; acq_channels_count_--; for (unsigned int i = 0; i < channels_count_; i++) From 1b7b2da60373ce05af6e0ab8c8dad3608e855d8a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 12 Jul 2018 20:32:05 +0200 Subject: [PATCH 181/194] Reset grid after successful acquisition or reaching max number of dwells --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 3ff1ac23c..75b8e58f3 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -283,9 +283,14 @@ void pcps_acquisition::init() { d_grid_doppler_wipeoffs[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_magnitude_grid[doppler_index] = static_cast(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment())); + for (unsigned k = 0; k < d_fft_size; k++) + { + d_magnitude_grid[doppler_index][k] = 0.0; + } int doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * doppler_index; update_local_carrier(d_grid_doppler_wipeoffs[doppler_index], d_fft_size, d_old_freq + doppler); } + d_worker_active = false; if (acq_parameters.dump) @@ -782,6 +787,14 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) } d_num_noncoherent_integrations_counter = 0; d_positive_acq = 0; + // Reset grid + for (unsigned int i = 0; i < d_num_doppler_bins; i++) + { + for (unsigned k = 0; k < d_fft_size; k++) + { + d_magnitude_grid[i][k] = 0.0; + } + } } } From b9229657468f0f0238f09d84ba7931d1ddd575f9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Jul 2018 00:16:57 +0200 Subject: [PATCH 182/194] Fix number of read samples --- .../acquisition/acq_performance_test.cc | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) 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 312085442..032b575ba 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 @@ -64,9 +64,9 @@ DEFINE_double(acq_test_cn0_init, 33.0, "Initial CN0, in dBHz."); DEFINE_double(acq_test_cn0_final, 45.0, "Final CN0, in dBHz."); DEFINE_double(acq_test_cn0_step, 3.0, "CN0 step, in dB."); -DEFINE_double(acq_test_threshold_init, 11.0, "Initial acquisition threshold"); -DEFINE_double(acq_test_threshold_final, 16.0, "Final acquisition threshold"); -DEFINE_double(acq_test_threshold_step, 1.0, "Acquisition threshold step"); +DEFINE_double(acq_test_threshold_init, 3.0, "Initial acquisition threshold"); +DEFINE_double(acq_test_threshold_final, 4.0, "Final acquisition threshold"); +DEFINE_double(acq_test_threshold_step, 0.5, "Acquisition threshold step"); DEFINE_double(acq_test_pfa_init, 1e-5, "Set initial threshold via probability of false alarm. Disable with -1.0"); @@ -165,17 +165,20 @@ protected: signal_id = "1C"; system_id = 'G'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } else if (implementation.compare("GPS_L1_CA_PCPS_Acquisition_Fine_Doppler") == 0) { signal_id = "1C"; system_id = 'G'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } else if (implementation.compare("Galileo_E1_PCPS_Ambiguous_Acquisition") == 0) { signal_id = "1B"; system_id = 'E'; + min_integration_ms = 4; if (FLAGS_acq_test_coherent_time_ms == 1) { coherent_integration_time_ms = 4; @@ -190,12 +193,14 @@ protected: signal_id = "1G"; system_id = 'R'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } else if (implementation.compare("GLONASS_L2_CA_PCPS_Acquisition") == 0) { signal_id = "2G"; system_id = 'R'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } else if (implementation.compare("GPS_L2_M_PCPS_Acquisition") == 0) { @@ -209,12 +214,14 @@ protected: { coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; } + min_integration_ms = 20; } else if (implementation.compare("Galileo_E5a_Pcps_Acquisition") == 0) { signal_id = "5X"; system_id = 'E'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } else if (implementation.compare("GPS_L5i_PCPS_Acquisition") == 0) { @@ -227,6 +234,7 @@ protected: signal_id = "1C"; system_id = 'G'; coherent_integration_time_ms = FLAGS_acq_test_coherent_time_ms; + min_integration_ms = 1; } init(); @@ -327,6 +335,7 @@ protected: std::string path_str = "./acq-perf-test"; int num_thresholds; + unsigned int min_integration_ms; std::vector> Pd; std::vector> Pfa; @@ -804,9 +813,27 @@ TEST_F(AcquisitionPerformanceTest, ROC) double coh_time_ms = config->property("Acquisition.coherent_integration_time_ms", 1); std::cout << "Num executions: " << num_executions << std::endl; + + unsigned int fft_size = 0; + unsigned int d_consumed_samples = coh_time_ms * config->property("GNSS-SDR.internal_fs_sps", 0) * 0.001; // * (config->property("Acquisition.bit_transition_flag", false) ? 2 : 1); + if (coh_time_ms == min_integration_ms) + { + fft_size = d_consumed_samples; + } + else + { + fft_size = d_consumed_samples * 2; + } + for (int execution = 1; execution <= num_executions; execution++) { - acquisition_dump_reader acq_dump(basename, observed_satellite, config->property("Acquisition.doppler_max", 0), config->property("Acquisition.doppler_step", 0), config->property("GNSS-SDR.internal_fs_sps", 0) * GPS_L1_CA_CODE_PERIOD * static_cast(coh_time_ms) * (config->property("Acquisition.bit_transition_flag", false) ? 2 : 1), ch, execution); + acquisition_dump_reader acq_dump(basename, + observed_satellite, + config->property("Acquisition.doppler_max", 0), + config->property("Acquisition.doppler_step", 0), + fft_size, + ch, + execution); acq_dump.read_binary_acq(); if (acq_dump.positive_acq) { From b779f5cb3d50118d4f5ae2b62c7b8b0b12181389 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 13 Jul 2018 10:32:24 +0200 Subject: [PATCH 183/194] Fix incoherence between the number of samples per code in GPS L2 acquisition --- .../acquisition/adapters/gps_l2_m_pcps_acquisition.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 132c5ff1c..301bc14a5 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -78,8 +78,11 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code ------------------------- - code_length_ = std::round(static_cast(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS))); + //code_length_ = std::round(static_cast(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS))); + acq_parameters.samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); + acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 20); + code_length_ = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); vector_length_ = code_length_; if (bit_transition_flag_) @@ -97,10 +100,10 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( { item_size_ = sizeof(gr_complex); } - acq_parameters.samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); + acq_parameters.samples_per_code = code_length_; acq_parameters.it_size = item_size_; - acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 20); + acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); From 92a6676b9e298f3b99e03b416f023b005267acf5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Jul 2018 11:50:31 +0200 Subject: [PATCH 184/194] Enable second refinement stage in a thinner grid for coherent and/or non-coherent acquisitions --- .../gnuradio_blocks/pcps_acquisition.cc | 93 ++++++++----------- .../gnuradio_blocks/pcps_acquisition.h | 4 +- .../acquisition/acq_performance_test.cc | 23 +++-- 3 files changed, 59 insertions(+), 61 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 75b8e58f3..74bd766ab 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -460,7 +460,7 @@ void pcps_acquisition::dump_results(int effective_fft_size) } -float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power) +float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power, unsigned int num_doppler_bins, int doppler_max, int doppler_step) { float grid_maximum = 0.0; unsigned int index_doppler = 0; @@ -469,7 +469,7 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& dopp float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); // Find the correlation peak and the carrier frequency - for (unsigned int i = 0; i < d_num_doppler_bins; i++) + for (unsigned int i = 0; i < num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); if (d_magnitude_grid[i][tmp_intex_t] > grid_maximum) @@ -480,14 +480,21 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int& dopp } } indext = index_time; - doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * static_cast(index_doppler); + if (!d_step_two) + { + doppler = -static_cast(doppler_max) + doppler_step * static_cast(index_doppler); + } + else + { + doppler = static_cast(d_doppler_center_step_two + (index_doppler - (acq_parameters.num_doppler_bins_step2 / 2.0) * acq_parameters.doppler_step2)); + } float magt = grid_maximum / (fft_normalization_factor * fft_normalization_factor); return magt / input_power; } -float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& doppler) +float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& doppler, unsigned int num_doppler_bins, int doppler_max, int doppler_step) { // Look for correlation peaks in the results // Find the highest peak and compare it to the second highest peak @@ -499,7 +506,7 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& do uint32_t index_time = 0; // Find the correlation peak and the carrier frequency - for (unsigned int i = 0; i < d_num_doppler_bins; i++) + for (unsigned int i = 0; i < num_doppler_bins; i++) { volk_gnsssdr_32f_index_max_32u(&tmp_intex_t, d_magnitude_grid[i], d_fft_size); if (d_magnitude_grid[i][tmp_intex_t] > firstPeak) @@ -510,7 +517,15 @@ float pcps_acquisition::first_vs_second_peak_statistic(uint32_t& indext, int& do } } indext = index_time; - doppler = -static_cast(acq_parameters.doppler_max) + d_doppler_step * static_cast(index_doppler); + + if (!d_step_two) + { + doppler = -static_cast(doppler_max) + doppler_step * static_cast(index_doppler); + } + else + { + doppler = static_cast(d_doppler_center_step_two + (index_doppler - (acq_parameters.num_doppler_bins_step2 / 2.0) * acq_parameters.doppler_step2)); + } // Find 1 chip wide code phase exclude range around the peak int32_t excludeRangeIndex1 = index_time - d_samplesPerChip; @@ -629,11 +644,11 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) // Compute the test statistic if (d_use_CFAR_algorithm_flag) { - d_test_statistics = max_to_input_power_statistic(indext, doppler, d_input_power); + d_test_statistics = max_to_input_power_statistic(indext, doppler, d_input_power, d_num_doppler_bins, acq_parameters.doppler_max, d_doppler_step); } else { - d_test_statistics = first_vs_second_peak_statistic(indext, doppler); + d_test_statistics = first_vs_second_peak_statistic(indext, doppler, d_num_doppler_bins, acq_parameters.doppler_max, d_doppler_step); } d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); @@ -643,9 +658,6 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) { for (unsigned int doppler_index = 0; doppler_index < acq_parameters.num_doppler_bins_step2; doppler_index++) { - // doppler search steps - float doppler = d_doppler_center_step_two + (static_cast(doppler_index) - static_cast(acq_parameters.num_doppler_bins_step2) / 2.0) * acq_parameters.doppler_step2; - volk_32fc_x2_multiply_32fc(d_fft_if->get_inbuf(), in, d_grid_doppler_wipeoffs_step_two[doppler_index], d_fft_size); // 3- Perform the FFT-based convolution (parallel time search) @@ -659,54 +671,29 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) // compute the inverse FFT d_ifft->execute(); - // Search maximum size_t offset = (acq_parameters.bit_transition_flag ? effective_fft_size : 0); - volk_32fc_magnitude_squared_32f(d_magnitude, d_ifft->get_outbuf() + offset, effective_fft_size); - volk_gnsssdr_32f_index_max_32u(&indext, d_magnitude, effective_fft_size); - magt = d_magnitude[indext]; - - if (d_use_CFAR_algorithm_flag) + if (d_num_noncoherent_integrations_counter == 1) { - // Normalize the maximum value to correct the scale factor introduced by FFTW - magt = d_magnitude[indext] / (fft_normalization_factor * fft_normalization_factor); + volk_32fc_magnitude_squared_32f(d_magnitude_grid[doppler_index], d_ifft->get_outbuf() + offset, effective_fft_size); } - // 4- record the maximum peak and the associated synchronization parameters - if (d_mag < magt) + else { - d_mag = magt; - - if (!d_use_CFAR_algorithm_flag) - { - // Search grid noise floor approximation for this doppler line - volk_32f_accumulator_s32f(&d_input_power, d_magnitude, effective_fft_size); - d_input_power = (d_input_power - d_mag) / (effective_fft_size - 1); - } - - // In case that acq_parameters.bit_transition_flag = true, we compare the potentially - // new maximum test statistics (d_mag/d_input_power) with the value in - // d_test_statistics. When the second dwell is being processed, the value - // of d_mag/d_input_power could be lower than d_test_statistics (i.e, - // the maximum test statistics in the previous dwell is greater than - // current d_mag/d_input_power). Note that d_test_statistics is not - // restarted between consecutive dwells in multidwell operation. - - if (d_test_statistics < (d_mag / d_input_power) or !acq_parameters.bit_transition_flag) - { - d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); - d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); - d_gnss_synchro->Acq_samplestamp_samples = samp_count; - - // 5- Compute the test statistics and compare to the threshold - //d_test_statistics = 2 * d_fft_size * d_mag / d_input_power; - d_test_statistics = d_mag / d_input_power; - } - } - // Record results to file if required - if (acq_parameters.dump and d_channel == d_dump_channel) - { - memcpy(grid_.colptr(doppler_index), d_magnitude, sizeof(float) * effective_fft_size); + volk_32fc_magnitude_squared_32f(d_tmp_buffer, d_ifft->get_outbuf() + offset, effective_fft_size); + volk_32f_x2_add_32f(d_magnitude_grid[doppler_index], d_magnitude_grid[doppler_index], d_tmp_buffer, effective_fft_size); } } + // Compute the test statistic + if (d_use_CFAR_algorithm_flag) + { + d_test_statistics = max_to_input_power_statistic(indext, doppler, d_input_power, acq_parameters.num_doppler_bins_step2, static_cast(d_doppler_center_step_two - (static_cast(acq_parameters.num_doppler_bins_step2) / 2.0) * acq_parameters.doppler_step2), acq_parameters.doppler_step2); + } + else + { + d_test_statistics = first_vs_second_peak_statistic(indext, doppler, acq_parameters.num_doppler_bins_step2, static_cast(d_doppler_center_step_two - (static_cast(acq_parameters.num_doppler_bins_step2) / 2.0) * acq_parameters.doppler_step2), acq_parameters.doppler_step2); + } + d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); + d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); + d_gnss_synchro->Acq_samplestamp_samples = samp_count; } lk.lock(); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h index e39648525..4e71340ba 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.h @@ -95,8 +95,8 @@ private: void dump_results(int effective_fft_size); - float first_vs_second_peak_statistic(uint32_t& indext, int& doppler); - float max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power); + float first_vs_second_peak_statistic(uint32_t& indext, int& doppler, unsigned int num_doppler_bins, int doppler_max, int doppler_step); + float max_to_input_power_statistic(uint32_t& indext, int& doppler, float input_power, unsigned int num_doppler_bins, int doppler_max, int doppler_step); Acq_Conf acq_parameters; bool d_active; 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 032b575ba..9e8b86626 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 @@ -54,9 +54,12 @@ DEFINE_string(acq_test_implementation, std::string("GPS_L1_CA_PCPS_Acquisition") DEFINE_int32(acq_test_doppler_max, 5000, "Maximum Doppler, in Hz"); DEFINE_int32(acq_test_doppler_step, 125, "Doppler step, in Hz."); DEFINE_int32(acq_test_coherent_time_ms, 1, "Acquisition coherent time, in ms"); -DEFINE_int32(acq_test_max_dwells, 1, "Number of non-coherent integrations"); -DEFINE_bool(acq_test_use_CFAR_algorithm, true, "Use CFAR algorithm"); -DEFINE_bool(acq_test_bit_transition_flag, false, "Bit transition flag"); +DEFINE_int32(acq_test_max_dwells, 1, "Number of non-coherent integrations."); +DEFINE_bool(acq_test_use_CFAR_algorithm, true, "Use CFAR algorithm."); +DEFINE_bool(acq_test_bit_transition_flag, false, "Bit transition flag."); +DEFINE_bool(acq_test_make_two_steps, false, "Perform second step in a thinner grid."); +DEFINE_int32(acq_test_second_nbins, 4, "If --acq_test_make_two_steps is set to true, this parameter sets the number of bins done in the acquisition refinement stage."); +DEFINE_int32(acq_test_second_doppler_step, 10, "If --acq_test_make_two_steps is set to true, this parameter sets the Doppler step applied in the acquisition refinement stage, in Hz."); DEFINE_int32(acq_test_signal_duration_s, 2, "Generated signal duration, in s"); DEFINE_int32(acq_test_num_meas, 0, "Number of measurements per run. 0 means the complete file."); @@ -501,9 +504,17 @@ int AcquisitionPerformanceTest::configure_receiver(double cn0, float pfa, unsign config->set_property("Acquisition.repeat_satellite", "true"); config->set_property("Acquisition.blocking", "true"); - config->set_property("Acquisition.make_two_steps", "false"); - config->set_property("Acquisition.second_nbins", std::to_string(4)); - config->set_property("Acquisition.second_doppler_step", std::to_string(125)); + if (FLAGS_acq_test_make_two_steps) + { + config->set_property("Acquisition.make_two_steps", "true"); + config->set_property("Acquisition.second_nbins", std::to_string(FLAGS_acq_test_second_nbins)); + config->set_property("Acquisition.second_doppler_step", std::to_string(FLAGS_acq_test_second_doppler_step)); + } + else + { + config->set_property("Acquisition.make_two_steps", "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); From 0352108a79c61f8ac62500c4af8c4fb394688bca Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Jul 2018 14:23:14 +0200 Subject: [PATCH 185/194] Accept non-integer number of samples per code period --- .../adapters/galileo_e1_pcps_ambiguous_acquisition.cc | 10 ++++++++-- .../adapters/galileo_e5a_pcps_acquisition.cc | 4 ++-- .../adapters/glonass_l1_ca_pcps_acquisition.cc | 4 ++-- .../adapters/glonass_l2_ca_pcps_acquisition.cc | 4 ++-- .../adapters/gps_l1_ca_pcps_acquisition.cc | 4 ++-- .../acquisition/adapters/gps_l2_m_pcps_acquisition.cc | 11 ++++++++--- .../acquisition/adapters/gps_l5i_pcps_acquisition.cc | 6 +++--- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 6 ++---- src/algorithms/acquisition/libs/acq_conf.cc | 4 ++-- src/algorithms/acquisition/libs/acq_conf.h | 4 ++-- 10 files changed, 33 insertions(+), 24 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 7f1df1c2f..52487df49 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -64,6 +64,11 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( acq_parameters.doppler_max = doppler_max_; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); acq_parameters.sampled_ms = sampled_ms_; + if ((acq_parameters.sampled_ms % 4) != 0) + { + LOG(WARNING) << "Parameter coherent_integration_time_ms should be a multiple of 4. Setting it to 4"; + acq_parameters.sampled_ms = 4; + } bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); acq_parameters.bit_transition_flag = bit_transition_flag_; use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions @@ -80,9 +85,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code (4 ms) ----------------- code_length_ = static_cast(std::round(static_cast(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); - acq_parameters.samples_per_code = code_length_; - int samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); + + float samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.samples_per_ms = samples_per_ms; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(Galileo_E1_CODE_PERIOD_MS); vector_length_ = sampled_ms_ * samples_per_ms; if (bit_transition_flag_) diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index 9ff35a922..f300d6158 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -101,9 +101,9 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con LOG(WARNING) << item_type_ << " unknown acquisition item type"; } acq_parameters.it_size = item_size_; - acq_parameters.samples_per_code = code_length_; - acq_parameters.samples_per_ms = code_length_; + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.sampled_ms = sampled_ms_; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GALILEO_E5a_CODE_PERIOD_MS); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index 43354e627..81a4eb200 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -100,8 +100,8 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( } acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = sampled_ms_; - acq_parameters.samples_per_ms = code_length_; - acq_parameters.samples_per_code = code_length_; + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L1_CA_CODE_PERIOD); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc index 374b69e35..61a61383a 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc @@ -99,8 +99,8 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( } acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = sampled_ms_; - acq_parameters.samples_per_ms = code_length_; - acq_parameters.samples_per_code = code_length_; + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L2_CA_CODE_PERIOD * 1000.0); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index 18c728412..87076a66d 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -102,8 +102,8 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( { item_size_ = sizeof(gr_complex); } - acq_parameters.samples_per_ms = code_length_; - acq_parameters.samples_per_code = code_length_; + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L1_CA_CODE_PERIOD * 1000.0); acq_parameters.it_size = item_size_; acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false); acquisition_ = pcps_make_acquisition(acq_parameters); diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 301bc14a5..361a0375a 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -78,11 +78,16 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code ------------------------- - //code_length_ = std::round(static_cast(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast(GPS_L2_M_CODE_LENGTH_CHIPS))); - acq_parameters.samples_per_ms = static_cast(std::round(static_cast(fs_in_) * 0.001)); + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 20); + if ((acq_parameters.sampled_ms % 20) != 0) + { + LOG(WARNING) << "Parameter coherent_integration_time_ms should be a multiple of 20. Setting it to 20"; + acq_parameters.sampled_ms = 20; + } code_length_ = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); + vector_length_ = code_length_; if (bit_transition_flag_) @@ -101,7 +106,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( item_size_ = sizeof(gr_complex); } - acq_parameters.samples_per_code = code_length_; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L2_M_PERIOD * 1000.0); acq_parameters.it_size = item_size_; acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 66537426c..146137ef7 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -96,10 +96,10 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( { item_size_ = sizeof(gr_complex); } - acq_parameters.samples_per_code = code_length_; - acq_parameters.samples_per_ms = code_length_; + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L5i_PERIOD * 1000.0); acq_parameters.it_size = item_size_; - acq_parameters.sampled_ms = 1; + acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 74bd766ab..798d6c5ae 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -565,7 +565,6 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) gr::thread::scoped_lock lk(d_setlock); // initialize acquisition algorithm - float magt = 0.0; int doppler = 0; uint32_t indext = 0; int effective_fft_size = (acq_parameters.bit_transition_flag ? d_fft_size / 2 : d_fft_size); @@ -582,7 +581,6 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) } } const gr_complex* in = d_input_signal; // Get the input samples pointer - float fft_normalization_factor = static_cast(d_fft_size) * static_cast(d_fft_size); d_input_power = 0.0; d_mag = 0.0; @@ -650,7 +648,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) { d_test_statistics = first_vs_second_peak_statistic(indext, doppler, d_num_doppler_bins, acq_parameters.doppler_max, d_doppler_step); } - d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); + d_gnss_synchro->Acq_delay_samples = static_cast(std::fmod(static_cast(indext), acq_parameters.samples_per_code)); d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = samp_count; } @@ -691,7 +689,7 @@ void pcps_acquisition::acquisition_core(unsigned long int samp_count) { d_test_statistics = first_vs_second_peak_statistic(indext, doppler, acq_parameters.num_doppler_bins_step2, static_cast(d_doppler_center_step_two - (static_cast(acq_parameters.num_doppler_bins_step2) / 2.0) * acq_parameters.doppler_step2), acq_parameters.doppler_step2); } - d_gnss_synchro->Acq_delay_samples = static_cast(indext % acq_parameters.samples_per_code); + d_gnss_synchro->Acq_delay_samples = static_cast(std::fmod(static_cast(indext), acq_parameters.samples_per_code)); d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = samp_count; } diff --git a/src/algorithms/acquisition/libs/acq_conf.cc b/src/algorithms/acquisition/libs/acq_conf.cc index c3439b9c0..cacf0cec9 100644 --- a/src/algorithms/acquisition/libs/acq_conf.cc +++ b/src/algorithms/acquisition/libs/acq_conf.cc @@ -41,8 +41,8 @@ Acq_Conf::Acq_Conf() num_doppler_bins_step2 = 0; doppler_step2 = 0.0; fs_in = 0; - samples_per_ms = 0; - samples_per_code = 0; + samples_per_ms = 0.0; + samples_per_code = 0.0; bit_transition_flag = false; use_CFAR_algorithm_flag = false; dump = false; diff --git a/src/algorithms/acquisition/libs/acq_conf.h b/src/algorithms/acquisition/libs/acq_conf.h index afd43b1fb..b22b2bceb 100644 --- a/src/algorithms/acquisition/libs/acq_conf.h +++ b/src/algorithms/acquisition/libs/acq_conf.h @@ -46,8 +46,8 @@ public: unsigned int num_doppler_bins_step2; float doppler_step2; long fs_in; - int samples_per_ms; - int samples_per_code; + float samples_per_ms; + float samples_per_code; bool bit_transition_flag; bool use_CFAR_algorithm_flag; bool dump; From 994a4b32d8f2ad6be4ce457049f61295013b94c1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Jul 2018 15:16:48 +0200 Subject: [PATCH 186/194] Fix Glonass acquisition test --- .../acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc | 2 +- .../glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index 81a4eb200..dafc2475c 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -101,7 +101,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = sampled_ms_; acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; - acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L1_CA_CODE_PERIOD); + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L1_CA_CODE_PERIOD * 1000.0); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc index 2f7c23a2c..e5a588cff 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc @@ -341,7 +341,7 @@ void GlonassL1CaPcpsAcquisitionGSoC2017Test::config_2() std::to_string(integration_time_ms)); config->set_property("Acquisition.max_dwells", "1"); config->set_property("Acquisition.implementation", "GLONASS_L1_CA_PCPS_Acquisition"); - config->set_property("Acquisition.pfa", "0.1"); + //config->set_property("Acquisition.pfa", "0.1"); config->set_property("Acquisition.doppler_max", "10000"); config->set_property("Acquisition.doppler_step", "250"); config->set_property("Acquisition.bit_transition_flag", "false"); @@ -496,7 +496,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults) }) << "Failure setting doppler_step."; ASSERT_NO_THROW({ - acquisition->set_threshold(0.5); + acquisition->set_threshold(0.05); }) << "Failure setting threshold."; ASSERT_NO_THROW({ From a392117c0b2f66fe90079888835e30af88a8f417 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 13 Jul 2018 15:23:20 +0200 Subject: [PATCH 187/194] Improving bit synchronization in GPS L1 CA tracking --- .../gnuradio_blocks/dll_pll_veml_tracking.cc | 111 +++++++++++++++--- .../gnuradio_blocks/dll_pll_veml_tracking.h | 7 +- 2 files changed, 98 insertions(+), 20 deletions(-) diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index 70eef4727..3cb599866 100755 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -2,6 +2,7 @@ * \file dll_pll_veml_tracking.cc * \brief Implementation of a code DLL + carrier PLL tracking block. * \author Antonio Ramos, 2018 antonio.ramosdet(at)gmail.com + * Javier Arribas, 2018. jarribas(at)cttc.es * * Code DLL + carrier PLL according to the algorithms described in: * [1] K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen, @@ -84,10 +85,12 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl this->message_port_register_out(pmt::mp("events")); this->set_relative_rate(1.0 / static_cast(trk_parameters.vector_length)); + // Telemetry bit synchronization message port input (mainly for GPS L1 CA) + this->message_port_register_in(pmt::mp("preamble_samplestamp")); + // initialize internal vars d_veml = false; d_cloop = true; - d_synchonizing = false; d_code_chip_rate = 0.0; d_secondary_code_length = 0; d_secondary_code_string = nullptr; @@ -120,6 +123,30 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl d_secondary = false; trk_parameters.track_pilot = false; interchange_iq = false; + + // set the preamble + unsigned short int preambles_bits[GPS_CA_PREAMBLE_LENGTH_BITS] = GPS_PREAMBLE; + + // preamble bits to sampled symbols + d_gps_l1ca_preambles_symbols = static_cast(volk_gnsssdr_malloc(GPS_CA_PREAMBLE_LENGTH_SYMBOLS * sizeof(int), volk_gnsssdr_get_alignment())); + int n = 0; + for (int i = 0; i < GPS_CA_PREAMBLE_LENGTH_BITS; i++) + { + for (unsigned int j = 0; j < GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; j++) + { + if (preambles_bits[i] == 1) + { + d_gps_l1ca_preambles_symbols[n] = 1; + } + else + { + d_gps_l1ca_preambles_symbols[n] = -1; + } + n++; + } + } + d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); // Change fixed buffer size + d_symbol_history.clear(); // Clear all the elements in the buffer } else if (signal_type.compare("2S") == 0) { @@ -521,7 +548,6 @@ void dll_pll_veml_tracking::start_tracking() // enable tracking pull-in d_state = 1; - d_synchonizing = false; d_cloop = true; d_Prompt_buffer_deque.clear(); d_last_prompt = gr_complex(0.0, 0.0); @@ -533,6 +559,11 @@ void dll_pll_veml_tracking::start_tracking() dll_pll_veml_tracking::~dll_pll_veml_tracking() { + if (signal_type.compare("1C") == 0) + { + volk_gnsssdr_free(d_gps_l1ca_preambles_symbols); + } + if (d_dump_file.is_open()) { try @@ -1281,39 +1312,82 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) } else if (d_symbols_per_bit > 1) //Signal does not have secondary code. Search a bit transition by sign change { - if (d_synchonizing) + float current_tracking_time_s = static_cast(d_sample_counter - d_acq_sample_stamp) / trk_parameters.fs_in; + if (current_tracking_time_s > 10) { - if (d_Prompt->real() * d_last_prompt.real() > 0.0) + d_symbol_history.push_back(d_Prompt->real()); + //******* preamble correlation ******** + int corr_value = 0; + if ((d_symbol_history.size() == GPS_CA_PREAMBLE_LENGTH_SYMBOLS)) // and (d_make_correlation or !d_flag_frame_sync)) { - d_current_symbol++; + for (unsigned int i = 0; i < GPS_CA_PREAMBLE_LENGTH_SYMBOLS; i++) + { + if (d_symbol_history.at(i) < 0) // symbols clipping + { + corr_value -= d_gps_l1ca_preambles_symbols[i]; + } + else + { + corr_value += d_gps_l1ca_preambles_symbols[i]; + } + } } - else if (d_current_symbol > d_symbols_per_bit) + if (corr_value == GPS_CA_PREAMBLE_LENGTH_SYMBOLS) { - d_synchonizing = false; - d_current_symbol = 1; + //std::cout << "Preamble detected at tracking!" << std::endl; + next_state = true; } else { - d_current_symbol = 1; - d_last_prompt = *d_Prompt; + next_state = false; } } - else if (d_last_prompt.real() != 0.0) - { - d_current_symbol++; - if (d_current_symbol == d_symbols_per_bit) next_state = true; - } else { - d_last_prompt = *d_Prompt; - d_synchonizing = true; - d_current_symbol = 1; + next_state = false; } } else { next_state = true; } + + // ########### Output the tracking results to Telemetry block ########## + if (interchange_iq) + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).real()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).imag()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).real()); + } + } + else + { + if (trk_parameters.track_pilot) + { + // Note that data and pilot components are in quadrature. I and Q are interchanged + current_synchro_data.Prompt_I = static_cast((*d_Prompt_Data).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt_Data).imag()); + } + else + { + current_synchro_data.Prompt_I = static_cast((*d_Prompt).real()); + current_synchro_data.Prompt_Q = static_cast((*d_Prompt).imag()); + } + } + current_synchro_data.Code_phase_samples = d_rem_code_phase_samples; + current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad; + current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; + current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz; + current_synchro_data.Flag_valid_symbol_output = true; + current_synchro_data.correlation_length_ms = d_correlation_length_ms; + if (next_state) { // reset extended correlator d_VE_accu = gr_complex(0.0, 0.0); @@ -1324,7 +1398,6 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) d_last_prompt = gr_complex(0.0, 0.0); d_Prompt_buffer_deque.clear(); d_current_symbol = 0; - d_synchonizing = false; if (d_enable_extended_integration) { diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h index 0437e8a35..b57bc2200 100755 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.h @@ -41,6 +41,7 @@ #include #include #include +#include class dll_pll_veml_tracking; @@ -69,6 +70,7 @@ private: friend dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_); dll_pll_veml_tracking(const Dll_Pll_Conf &conf_); + void msg_handler_preamble_index(pmt::pmt_t msg); bool cn0_and_tracking_lock_status(double coh_integration_time_s); bool acquire_secondary(); @@ -102,9 +104,12 @@ private: std::string *d_secondary_code_string; std::string signal_pretty_name; + uint64_t d_preamble_sample_counter; + int *d_gps_l1ca_preambles_symbols; + boost::circular_buffer d_symbol_history; + //tracking state machine int d_state; - bool d_synchonizing; //Integration period in samples int d_correlation_length_ms; int d_n_correlator_taps; From ee90b739b5fffbb219eff152e45a8025e3dc68c5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 15 Jul 2018 04:12:20 +0200 Subject: [PATCH 188/194] Add coherent integration for GPS L2C, L5 and Galileo E1 --- .../galileo_e1_pcps_ambiguous_acquisition.cc | 7 +++-- .../adapters/galileo_e5a_pcps_acquisition.cc | 1 + .../glonass_l1_ca_pcps_acquisition.cc | 1 + .../glonass_l2_ca_pcps_acquisition.cc | 1 + .../adapters/gps_l1_ca_pcps_acquisition.cc | 1 + .../adapters/gps_l2_m_pcps_acquisition.cc | 28 +++++++++++-------- .../adapters/gps_l2_m_pcps_acquisition.h | 1 + .../adapters/gps_l5i_pcps_acquisition.cc | 13 ++++++++- .../adapters/gps_l5i_pcps_acquisition.h | 1 + .../gnuradio_blocks/pcps_acquisition.cc | 4 +-- src/algorithms/acquisition/libs/acq_conf.cc | 1 + src/algorithms/acquisition/libs/acq_conf.h | 1 + 12 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 52487df49..dd2caa33d 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -62,12 +62,13 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; acq_parameters.doppler_max = doppler_max_; - sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); + acq_parameters.ms_per_code = 4; + sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", acq_parameters.ms_per_code); acq_parameters.sampled_ms = sampled_ms_; - if ((acq_parameters.sampled_ms % 4) != 0) + if ((acq_parameters.sampled_ms % acq_parameters.ms_per_code) != 0) { LOG(WARNING) << "Parameter coherent_integration_time_ms should be a multiple of 4. Setting it to 4"; - acq_parameters.sampled_ms = 4; + acq_parameters.sampled_ms = acq_parameters.ms_per_code; } bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); acq_parameters.bit_transition_flag = bit_transition_flag_; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index f300d6158..037ba3152 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -103,6 +103,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con acq_parameters.it_size = item_size_; acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.sampled_ms = sampled_ms_; + acq_parameters.ms_per_code = 1; acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GALILEO_E5a_CODE_PERIOD_MS); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc index dafc2475c..3aedd6f0b 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.cc @@ -101,6 +101,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = sampled_ms_; acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.ms_per_code = 1; acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L1_CA_CODE_PERIOD * 1000.0); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc index 61a61383a..a849bc661 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.cc @@ -100,6 +100,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition( acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = sampled_ms_; acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.ms_per_code = 1; acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GLONASS_L2_CA_CODE_PERIOD * 1000.0); acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index 87076a66d..6900bd2d7 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -71,6 +71,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( acq_parameters.doppler_max = doppler_max_; sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 1); acq_parameters.sampled_ms = sampled_ms_; + acq_parameters.ms_per_code = 1; bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); acq_parameters.bit_transition_flag = bit_transition_flag_; use_CFAR_algorithm_flag_ = configuration_->property(role + ".use_CFAR_algorithm", true); //will be false in future versions diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 361a0375a..7dab0a72a 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -79,21 +79,17 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code ------------------------- acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; - acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 20); - if ((acq_parameters.sampled_ms % 20) != 0) + acq_parameters.ms_per_code = 20; + acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", acq_parameters.ms_per_code); + if ((acq_parameters.sampled_ms % acq_parameters.ms_per_code) != 0) { LOG(WARNING) << "Parameter coherent_integration_time_ms should be a multiple of 20. Setting it to 20"; - acq_parameters.sampled_ms = 20; + acq_parameters.sampled_ms = acq_parameters.ms_per_code; } - code_length_ = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); + code_length_ = acq_parameters.ms_per_code * acq_parameters.samples_per_ms; - vector_length_ = code_length_; - - if (bit_transition_flag_) - { - vector_length_ *= 2; - } + vector_length_ = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); code_ = new gr_complex[vector_length_]; @@ -129,6 +125,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( threshold_ = 0.0; doppler_step_ = 0; gnss_synchro_ = 0; + num_codes_ = acq_parameters.sampled_ms / acq_parameters.ms_per_code; if (in_streams_ > 1) { LOG(ERROR) << "This implementation only supports one input stream"; @@ -217,9 +214,18 @@ void GpsL2MPcpsAcquisition::init() void GpsL2MPcpsAcquisition::set_local_code() { - gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_); + std::complex* code = new std::complex[code_length_]; + + gps_l2c_m_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_); + + for (unsigned int i = 0; i < num_codes_; i++) + { + memcpy(&(code_[i * code_length_]), code, + sizeof(gr_complex) * code_length_); + } acquisition_->set_local_code(code_); + delete[] code; } diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h index ec4257aee..570de69d0 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h @@ -160,6 +160,7 @@ private: std::string role_; unsigned int in_streams_; unsigned int out_streams_; + unsigned int num_codes_; float calculate_threshold(float pfa); }; diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 146137ef7..e0c743ee8 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -98,8 +98,10 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( } acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L5i_PERIOD * 1000.0); + acq_parameters.ms_per_code = 1; acq_parameters.it_size = item_size_; acq_parameters.sampled_ms = configuration_->property(role + ".coherent_integration_time_ms", 1); + num_codes_ = acq_parameters.sampled_ms; acq_parameters.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); @@ -206,9 +208,18 @@ void GpsL5iPcpsAcquisition::init() void GpsL5iPcpsAcquisition::set_local_code() { - gps_l5i_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_); + std::complex* code = new std::complex[code_length_]; + + gps_l5i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_); + + for (unsigned int i = 0; i < num_codes_; i++) + { + memcpy(&(code_[i * code_length_]), code, + sizeof(gr_complex) * code_length_); + } acquisition_->set_local_code(code_); + delete[] code; } diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index 3db500def..a871b9c8a 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -158,6 +158,7 @@ private: std::complex* code_; Gnss_Synchro* gnss_synchro_; std::string role_; + unsigned int num_codes_; unsigned int in_streams_; unsigned int out_streams_; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 798d6c5ae..0def1dc35 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -65,7 +65,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu d_old_freq = 0; d_num_noncoherent_integrations_counter = 0; d_consumed_samples = acq_parameters.sampled_ms * acq_parameters.samples_per_ms * (acq_parameters.bit_transition_flag ? 2 : 1); - if (acq_parameters.sampled_ms == (acq_parameters.samples_per_code / acq_parameters.samples_per_ms)) // + if (acq_parameters.sampled_ms == acq_parameters.ms_per_code) { d_fft_size = d_consumed_samples; } @@ -205,7 +205,7 @@ void pcps_acquisition::set_local_code(std::complex* code) } else { - if (acq_parameters.sampled_ms == (acq_parameters.samples_per_code / acq_parameters.samples_per_ms)) + if (acq_parameters.sampled_ms == acq_parameters.ms_per_code) { memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_consumed_samples); } diff --git a/src/algorithms/acquisition/libs/acq_conf.cc b/src/algorithms/acquisition/libs/acq_conf.cc index cacf0cec9..1cbfd6a69 100644 --- a/src/algorithms/acquisition/libs/acq_conf.cc +++ b/src/algorithms/acquisition/libs/acq_conf.cc @@ -35,6 +35,7 @@ Acq_Conf::Acq_Conf() { /* PCPS acquisition configuration */ sampled_ms = 0; + ms_per_code = 0; max_dwells = 0; samples_per_chip = 0; doppler_max = 0; diff --git a/src/algorithms/acquisition/libs/acq_conf.h b/src/algorithms/acquisition/libs/acq_conf.h index b22b2bceb..662134b2d 100644 --- a/src/algorithms/acquisition/libs/acq_conf.h +++ b/src/algorithms/acquisition/libs/acq_conf.h @@ -40,6 +40,7 @@ class Acq_Conf public: /* PCPS Acquisition configuration */ unsigned int sampled_ms; + unsigned int ms_per_code; unsigned int samples_per_chip; unsigned int max_dwells; unsigned int doppler_max; From be22c6a83e8ca251da0c1920bbf57efcb358bb81 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Mon, 16 Jul 2018 15:09:35 +0200 Subject: [PATCH 189/194] Improving accumulated carrier phase error estimation in tracking unit test --- .../tracking/gps_l1_ca_dll_pll_tracking_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 310f29ee7..69425c7dd 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -339,7 +339,8 @@ std::vector GpsL1CADllPllTrackingTest::check_results_acc_carrier_phase(a // 2. RMSE arma::vec err; - err = meas_value - true_value_interp; + //it is required to remove the initial offset in the accumulated carrier phase error + err = (meas_value - meas_value(0)) - (true_value_interp - true_value_interp(0)); arma::vec err2 = arma::square(err); //conversion between arma::vec and std:vector std::vector err_std_vector(err.colptr(0), err.colptr(0) + err.n_rows); From 639eb0d59ca3b72e5e4092afc8501f20318d0ed0 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Mon, 16 Jul 2018 16:23:41 +0200 Subject: [PATCH 190/194] Bug fix in Doppler error plot in Tracking unit test --- .../tracking/gps_l1_ca_dll_pll_tracking_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 69425c7dd..3b1a84c07 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -1040,7 +1040,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) for (unsigned int config_sweep_idx = 0; config_sweep_idx < mean_doppler_error_sweep.size(); config_sweep_idx++) { g7.plot_xy_err(generator_CN0_values_sweep_copy.at(config_sweep_idx), - generator_CN0_values_sweep_copy.at(config_sweep_idx), + mean_doppler_error_sweep.at(config_sweep_idx), std_dev_doppler_error_sweep.at(config_sweep_idx), "PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_sweep_idx)) + +"," + std::to_string(DLL_wide_bw_values.at(config_sweep_idx)) + " Hz"); From 4f7bfd36410ae995161abd208bf67e7605e6750d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 16 Jul 2018 20:58:33 +0200 Subject: [PATCH 191/194] Add acq_test_skiphead flag to Acquisition performance test --- .../acquisition/acq_performance_test.cc | 6 +++++- 1 file changed, 5 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 9e8b86626..0852f66c3 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 @@ -45,6 +45,7 @@ #include "true_observables_reader.h" #include #include +#include DEFINE_string(config_file_ptest, std::string(""), "File containing alternative configuration parameters for the acquisition performance test."); @@ -78,6 +79,7 @@ DEFINE_int32(acq_test_fake_PRN, 33, "PRN number of a non-present satellite"); DEFINE_int32(acq_test_iterations, 1, "Number of iterations (same signal, different noise realization)"); 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"); // ######## GNURADIO BLOCK MESSAGE RECEVER ######### class AcqPerfTest_msg_rx; @@ -551,6 +553,7 @@ int AcquisitionPerformanceTest::run_receiver() top_block = gr::make_top_block("Acquisition test"); boost::shared_ptr msg_rx = AcqPerfTest_msg_rx_make(channel_internal_queue); + gr::blocks::skiphead::sptr skiphead = gr::blocks::skiphead::make(sizeof(gr_complex), FLAGS_acq_test_skiphead); queue = gr::msg_queue::make(0); gnss_synchro = Gnss_Synchro(); @@ -609,7 +612,8 @@ int AcquisitionPerformanceTest::run_receiver() acquisition->reset(); top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); - top_block->connect(gr_interleaved_char_to_complex, 0, valve, 0); + top_block->connect(gr_interleaved_char_to_complex, 0, skiphead, 0); + top_block->connect(skiphead, 0, valve, 0); top_block->connect(valve, 0, acquisition->get_left_block(), 0); top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events")); From e88447675d36c4b2297a7fd91a1d9b2ea1ef9769 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Tue, 17 Jul 2018 18:31:55 +0200 Subject: [PATCH 192/194] Improving tracking and observables unit test plots --- .../observables/hybrid_observables_test.cc | 93 ++++++++++++++++++- .../gps_l1_ca_dll_pll_tracking_test.cc | 60 ++++++++++-- 2 files changed, 140 insertions(+), 13 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index f93f780cc..a3247d2a5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -58,6 +58,8 @@ #include "signal_generator_flags.h" #include "gnss_sdr_sample_counter.h" #include +#include "test_flags.h" +#include "gnuplot_i.h" // ######## GNURADIO BLOCK MESSAGE RECEVER FOR TRACKING MESSAGES ######### @@ -183,6 +185,7 @@ public: int configure_generator(); int generate_signal(); + bool save_mat_xy(std::vector& x, std::vector& y, std::string filename); void check_results_carrier_phase( arma::mat& true_ch0, arma::mat& true_ch1, @@ -283,10 +286,12 @@ void HybridObservablesTest::configure_receiver() config->set_property("Tracking_1C.item_type", "gr_complex"); config->set_property("Tracking_1C.dump", "true"); config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); - config->set_property("Tracking_1C.pll_bw_hz", "35.0"); - config->set_property("Tracking_1C.dll_bw_hz", "0.5"); + config->set_property("Tracking_1C.pll_bw_hz", "5.0"); + config->set_property("Tracking_1C.dll_bw_hz", "0.20"); + config->set_property("Tracking_1C.pll_bw_narrow_hz", "1.0"); + config->set_property("Tracking_1C.dll_bw_narrow_hz", "0.1"); + config->set_property("Tracking_1C.extend_correlation_symbols", "20"); config->set_property("Tracking_1C.early_late_space_chips", "0.5"); - config->set_property("Tracking_1C.unified", "true"); config->set_property("TelemetryDecoder_1C.dump", "true"); config->set_property("Observables.dump", "true"); @@ -384,6 +389,41 @@ void HybridObservablesTest::check_results_carrier_phase( } +bool HybridObservablesTest::save_mat_xy(std::vector& x, std::vector& y, std::string filename) +{ + try + { + // WRITE MAT FILE + mat_t* matfp; + matvar_t* matvar; + filename.append(".mat"); + std::cout << "save_mat_xy write " << filename << std::endl; + matfp = Mat_CreateVer(filename.c_str(), NULL, MAT_FT_MAT5); + if (reinterpret_cast(matfp) != NULL) + { + size_t dims[2] = {1, x.size()}; + matvar = Mat_VarCreate("x", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &x[0], 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + + matvar = Mat_VarCreate("y", MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, &y[0], 0); + Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE + Mat_VarFree(matvar); + } + else + { + std::cout << "save_mat_xy: error creating file" << std::endl; + } + Mat_Close(matfp); + return true; + } + catch (const std::exception& ex) + { + std::cout << "save_mat_xy: " << ex.what() << std::endl; + return false; + } +} + void HybridObservablesTest::check_results_code_psudorange( arma::mat& true_ch0, arma::mat& true_ch1, @@ -397,7 +437,12 @@ void HybridObservablesTest::check_results_code_psudorange( int size1 = measured_ch0.col(0).n_rows; int size2 = measured_ch1.col(0).n_rows; double t1 = std::min(measured_ch0(size1 - 1, 0), measured_ch1(size2 - 1, 0)); + arma::vec t = arma::linspace(t0, t1, floor((t1 - t0) * 1e3)); + //conversion between arma::vec and std:vector + arma::vec t_from_start = arma::linspace(0, t1 - t0, floor((t1 - t0) * 1e3)); + std::vector time_vector(t_from_start.colptr(0), t_from_start.colptr(0) + t_from_start.n_rows); + arma::vec true_ch0_dist_interp; arma::vec true_ch1_dist_interp; @@ -438,6 +483,31 @@ void HybridObservablesTest::check_results_code_psudorange( << " [meters]" << std::endl; std::cout.precision(ss); + //plots + + Gnuplot g3("linespoints"); + g3.set_title("Delta Pseudorange error [m]"); + g3.set_grid(); + g3.set_xlabel("Time [s]"); + g3.set_ylabel("Pseudorange error [m]"); + //conversion between arma::vec and std:vector + std::vector range_error_m(err.colptr(0), err.colptr(0) + err.n_rows); + g3.cmd("set key box opaque"); + g3.plot_xy(time_vector, range_error_m, + "Delta pseudorrange error"); + g3.set_legend(); + g3.savetops("Delta_pseudorrange_error"); + g3.savetopdf("Delta_pseudorrange_error", 18); + if (FLAGS_show_plots) + { + g3.showonscreen(); // window output + } + else + { + g3.disablescreen(); + } + + //check results against the test tolerance ASSERT_LT(rmse, 0.5); ASSERT_LT(error_mean, 0.5); ASSERT_GT(error_mean, -0.5); @@ -468,7 +538,7 @@ TEST_F(HybridObservablesTest, ValidationOfResults) tracking_true_obs_reader true_obs_data_ch1; int test_satellite_PRN = FLAGS_test_satellite_PRN; int test_satellite_PRN2 = FLAGS_test_satellite_PRN2; - std::cout << "Testing satellite PRNs " << test_satellite_PRN << "," << test_satellite_PRN << std::endl; + std::cout << "Testing satellite PRNs " << test_satellite_PRN << "," << test_satellite_PRN2 << std::endl; std::string true_obs_file = std::string("./gps_l1_ca_obs_prn"); true_obs_file.append(std::to_string(test_satellite_PRN)); true_obs_file.append(".dat"); @@ -700,6 +770,21 @@ TEST_F(HybridObservablesTest, ValidationOfResults) } //Cut measurement initial transitory of the measurements + + double initial_transitory_s = 30.0; + + index = arma::find(measured_ch0.col(0) >= (measured_ch0(0, 0) + initial_transitory_s), 1, "first"); + if ((index.size() > 0) and (index(0) > 0)) + { + measured_ch0.shed_rows(0, index(0)); + } + index = arma::find(measured_ch1.col(0) >= (measured_ch1(0, 0) + initial_transitory_s), 1, "first"); + if ((index.size() > 0) and (index(0) > 0)) + { + measured_ch1.shed_rows(0, index(0)); + } + + index = arma::find(measured_ch0.col(0) >= true_ch0(0, 0), 1, "first"); if ((index.size() > 0) and (index(0) > 0)) { diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index 3b1a84c07..fc414de2d 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -540,6 +540,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) std::vector> doppler_error_sweep; std::vector> code_phase_error_sweep; + std::vector> code_phase_error_meters_sweep; std::vector> acc_carrier_phase_error_sweep; std::vector mean_doppler_error; @@ -697,6 +698,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) { std::vector doppler_error_hz; std::vector code_phase_error_chips; + std::vector code_phase_error_meters; std::vector acc_carrier_phase_hz; try @@ -745,6 +747,10 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) rmse_doppler.push_back(rmse); code_phase_error_chips = check_results_codephase(true_timestamp_s, true_prn_delay_chips, trk_timestamp_s, trk_prn_delay_chips, mean_error, std_dev_error, rmse); + for (unsigned int ii = 0; ii < code_phase_error_chips.size(); ii++) + { + code_phase_error_meters.push_back(GPS_L1_CA_CHIP_PERIOD * code_phase_error_chips.at(ii) * GPS_C_m_s); + } mean_code_phase_error.push_back(mean_error); std_dev_code_phase_error.push_back(std_dev_error); rmse_code_phase.push_back(rmse); @@ -760,6 +766,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) doppler_error_sweep.push_back(doppler_error_hz); code_phase_error_sweep.push_back(code_phase_error_chips); + code_phase_error_meters_sweep.push_back(code_phase_error_meters); acc_carrier_phase_error_sweep.push_back(acc_carrier_phase_hz); } else @@ -921,13 +928,48 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) } save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), code_phase_error_sweep.at(current_cn0_idx), - "Code_error_" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + "Code_error_chips" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g5.set_legend(); g5.set_legend(); - g5.savetops("Code_error_output"); - g5.savetopdf("Code_error_output", 18); + g5.savetops("Code_error_chips"); + g5.savetopdf("Code_error_chips", 18); + + Gnuplot g5b("points"); + if (FLAGS_show_plots) + { + g5b.showonscreen(); // window output + } + else + { + g5b.disablescreen(); + } + g5b.set_title("Code delay error, PLL/DLL BW: " + std::to_string(PLL_wide_bw_values.at(config_idx)) + "," + std::to_string(DLL_wide_bw_values.at(config_idx)) + " Hz (PRN #" + std::to_string(FLAGS_test_satellite_PRN) + ")"); + g5b.set_grid(); + g5b.set_xlabel("Time [s]"); + g5b.set_ylabel("Code delay error [meters]"); + + + for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values_sweep_copy.at(config_idx).size(); current_cn0_idx++) + { + try + { + g5b.plot_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), code_phase_error_meters_sweep.at(current_cn0_idx), + std::to_string(static_cast(round(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)))) + "[dB-Hz]", decimate); + } + catch (const GnuplotException& ge) + { + } + save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), + code_phase_error_sweep.at(current_cn0_idx), + "Code_error_meters" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); + } + g5b.set_legend(); + g5b.set_legend(); + g5b.savetops("Code_error_meters"); + g5b.savetopdf("Code_error_meters", 18); Gnuplot g6("points"); @@ -957,13 +999,13 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) } save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), acc_carrier_phase_error_sweep.at(current_cn0_idx), - "Carrier_phase_error_output" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + "Carrier_phase_error" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g6.set_legend(); g6.set_legend(); - g6.savetops("Carrier_phase_error_output"); - g6.savetopdf("Carrier_phase_error_output", 18); + g6.savetops("Acc_carrier_phase_error_cycles"); + g6.savetopdf("Acc_carrier_phase_error_cycles", 18); Gnuplot g4("points"); if (FLAGS_show_plots) @@ -995,12 +1037,12 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) save_mat_xy(trk_valid_timestamp_s_sweep.at(current_cn0_idx), doppler_error_sweep.at(current_cn0_idx), - "Doppler_error_output" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + + "Doppler_error" + std::to_string(generator_CN0_values_sweep_copy.at(config_idx).at(current_cn0_idx)) + std::to_string(PLL_wide_bw_values.at(config_idx)) + "_" + std::to_string(DLL_wide_bw_values.at(config_idx))); } g4.unset_multiplot(); - g4.savetops("Doppler_error_output"); - g4.savetopdf("Doppler_error_output", 18); + g4.savetops("Doppler_error_hz"); + g4.savetopdf("Doppler_error_hz", 18); } } } From f9e4bdfa594227418d5b9a91a5082c802ba8461a Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 19 Jul 2018 16:26:51 +0200 Subject: [PATCH 193/194] Fix stream_to_vector incoherence in pcps acquisition and add support for GPS L2C, L5I, Galileo E1 and E5a in tracking pull-in test --- .../galileo_e1_pcps_ambiguous_acquisition.cc | 2 +- .../adapters/gps_l1_ca_pcps_acquisition.cc | 15 +- .../gnuradio_blocks/pcps_acquisition.cc | 5 +- .../libs/gps_sdr_signal_processing.cc | 1 + src/tests/common-files/tracking_tests_flags.h | 8 +- src/tests/test_main.cc | 2 +- ...ll-in_test.cc => tracking_pull-in_test.cc} | 264 +++++++++++++----- 7 files changed, 211 insertions(+), 86 deletions(-) rename src/tests/unit-tests/signal-processing-blocks/tracking/{gps_l1_ca_dll_pll_tracking_pull-in_test.cc => tracking_pull-in_test.cc} (77%) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index dd2caa33d..cfbe8199e 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -85,7 +85,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); acq_parameters.dump_filename = dump_filename_; //--- Find number of samples per spreading code (4 ms) ----------------- - code_length_ = static_cast(std::round(static_cast(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); + code_length_ = static_cast(std::floor(static_cast(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); float samples_per_ms = static_cast(fs_in_) * 0.001; acq_parameters.samples_per_ms = samples_per_ms; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index 6900bd2d7..e9a034873 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -84,15 +84,11 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( acq_parameters.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters.make_2_steps = configuration_->property(role + ".make_two_steps", false); //--- Find number of samples per spreading code ------------------------- - code_length_ = static_cast(std::round(static_cast(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); - - vector_length_ = code_length_ * sampled_ms_; - - if (bit_transition_flag_) - { - vector_length_ *= 2; - } + code_length_ = static_cast(std::floor(static_cast(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); + acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; + acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L1_CA_CODE_PERIOD * 1000.0); + vector_length_ = std::floor(acq_parameters.sampled_ms * acq_parameters.samples_per_ms) * (acq_parameters.bit_transition_flag ? 2 : 1); code_ = new gr_complex[vector_length_]; if (item_type_.compare("cshort") == 0) @@ -103,8 +99,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( { item_size_ = sizeof(gr_complex); } - acq_parameters.samples_per_ms = static_cast(fs_in_) * 0.001; - acq_parameters.samples_per_code = acq_parameters.samples_per_ms * static_cast(GPS_L1_CA_CODE_PERIOD * 1000.0); + acq_parameters.it_size = item_size_; acq_parameters.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false); acquisition_ = pcps_make_acquisition(acq_parameters); diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index 0def1dc35..303b597a1 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -52,8 +52,8 @@ pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_) pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acquisition", - gr::io_signature::make(1, 1, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1)), - gr::io_signature::make(0, 0, conf_.it_size * conf_.sampled_ms * conf_.samples_per_ms * (conf_.bit_transition_flag ? 2 : 1))) + gr::io_signature::make(1, 1, conf_.it_size * std::floor(conf_.sampled_ms * conf_.samples_per_ms) * (conf_.bit_transition_flag ? 2 : 1)), + gr::io_signature::make(0, 0, conf_.it_size)) { this->message_port_register_out(pmt::mp("events")); @@ -798,7 +798,6 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)), * 5. Compute the test statistics and compare to the threshold * 6. Declare positive or negative acquisition using a message port */ - gr::thread::scoped_lock lk(d_setlock); if (!d_active or d_worker_active) { diff --git a/src/algorithms/libs/gps_sdr_signal_processing.cc b/src/algorithms/libs/gps_sdr_signal_processing.cc index 4dee98f05..279f7d173 100644 --- a/src/algorithms/libs/gps_sdr_signal_processing.cc +++ b/src/algorithms/libs/gps_sdr_signal_processing.cc @@ -144,6 +144,7 @@ void gps_l1_ca_code_gen_complex(std::complex* _dest, signed int _prn, uns /* * Generates complex GPS L1 C/A code for the desired SV ID and sampled to specific sampling frequency + * NOTICE: the number of samples is rounded towards zero (integer truncation) */ void gps_l1_ca_code_gen_complex_sampled(std::complex* _dest, unsigned int _prn, signed int _fs, unsigned int _chip_shift) { diff --git a/src/tests/common-files/tracking_tests_flags.h b/src/tests/common-files/tracking_tests_flags.h index a09b1b49e..914631d6e 100644 --- a/src/tests/common-files/tracking_tests_flags.h +++ b/src/tests/common-files/tracking_tests_flags.h @@ -34,9 +34,15 @@ #include #include + +DEFINE_string(trk_test_implementation, std::string("GPS_L1_CA_DLL_PLL_Tracking"), "Tracking block implementation under test, defaults to GPS_L1_CA_DLL_PLL_Tracking"); // Input signal configuration DEFINE_bool(enable_external_signal_file, false, "Use an external signal file capture instead of the software-defined signal generator"); -DEFINE_int32(external_signal_acquisition_threshold, 2.0, "Threshold for satellite acquisition when external file is used"); +DEFINE_double(external_signal_acquisition_threshold, 2.5, "Threshold for satellite acquisition when external file is used"); +DEFINE_int32(external_signal_acquisition_dwells, 5, "Maximum dwells count for satellite acquisition when external file is used"); +DEFINE_double(external_signal_acquisition_doppler_max_hz, 5000.0, "Doppler max for satellite acquisition when external file is used"); +DEFINE_double(external_signal_acquisition_doppler_step_hz, 125, "Doppler step for satellite acquisition when external file is used"); + DEFINE_string(signal_file, std::string("signal_out.bin"), "Path of the external signal capture file"); DEFINE_double(CN0_dBHz_start, std::numeric_limits::infinity(), "Enable noise generator and set the CN0 start sweep value [dB-Hz]"); DEFINE_double(CN0_dBHz_stop, std::numeric_limits::infinity(), "Enable noise generator and set the CN0 stop sweep value [dB-Hz]"); diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc index caaff6be4..536006294 100644 --- a/src/tests/test_main.cc +++ b/src/tests/test_main.cc @@ -148,7 +148,7 @@ DECLARE_string(log_dir); #include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc" #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc" -#include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc" +#include "unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc" #include "unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc" #include "unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc" #endif diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc similarity index 77% rename from src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc rename to src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc index 0ca01547d..b9ce9cee9 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc @@ -1,5 +1,5 @@ /*! - * \file gps_l1_ca_dll_pll_tracking_test.cc + * \file tracking_test.cc * \brief This class implements a tracking Pull-In test for GPS_L1_CA_DLL_PLL_Tracking * implementation based on some input parameters. * \author Javier Arribas, 2018. jarribas(at)cttc.es @@ -45,8 +45,12 @@ #include "GPS_L1_CA.h" #include "gnss_block_factory.h" #include "tracking_interface.h" +#include "gps_l2_m_pcps_acquisition.h" #include "gps_l1_ca_pcps_acquisition.h" #include "gps_l1_ca_pcps_acquisition_fine_doppler.h" +#include "galileo_e5a_noncoherent_iq_acquisition_caf.h" +#include "galileo_e5a_pcps_acquisition.h" +#include "gps_l5i_pcps_acquisition.h" #include "in_memory_configuration.h" #include "tracking_true_obs_reader.h" #include "tracking_dump_reader.h" @@ -110,32 +114,32 @@ Acquisition_msg_rx::Acquisition_msg_rx() : gr::block("Acquisition_msg_rx", gr::i Acquisition_msg_rx::~Acquisition_msg_rx() {} // ######## GNURADIO TRACKING BLOCK MESSAGE RECEVER ######### -class GpsL1CADllPllTrackingPullInTest_msg_rx; +class TrackingPullInTest_msg_rx; -typedef boost::shared_ptr GpsL1CADllPllTrackingPullInTest_msg_rx_sptr; +typedef boost::shared_ptr TrackingPullInTest_msg_rx_sptr; -GpsL1CADllPllTrackingPullInTest_msg_rx_sptr GpsL1CADllPllTrackingPullInTest_msg_rx_make(); +TrackingPullInTest_msg_rx_sptr TrackingPullInTest_msg_rx_make(); -class GpsL1CADllPllTrackingPullInTest_msg_rx : public gr::block +class TrackingPullInTest_msg_rx : public gr::block { private: - friend GpsL1CADllPllTrackingPullInTest_msg_rx_sptr GpsL1CADllPllTrackingPullInTest_msg_rx_make(); + friend TrackingPullInTest_msg_rx_sptr TrackingPullInTest_msg_rx_make(); void msg_handler_events(pmt::pmt_t msg); - GpsL1CADllPllTrackingPullInTest_msg_rx(); + TrackingPullInTest_msg_rx(); public: int rx_message; - ~GpsL1CADllPllTrackingPullInTest_msg_rx(); //!< Default destructor + ~TrackingPullInTest_msg_rx(); //!< Default destructor }; -GpsL1CADllPllTrackingPullInTest_msg_rx_sptr GpsL1CADllPllTrackingPullInTest_msg_rx_make() +TrackingPullInTest_msg_rx_sptr TrackingPullInTest_msg_rx_make() { - return GpsL1CADllPllTrackingPullInTest_msg_rx_sptr(new GpsL1CADllPllTrackingPullInTest_msg_rx()); + return TrackingPullInTest_msg_rx_sptr(new TrackingPullInTest_msg_rx()); } -void GpsL1CADllPllTrackingPullInTest_msg_rx::msg_handler_events(pmt::pmt_t msg) +void TrackingPullInTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { @@ -151,22 +155,22 @@ void GpsL1CADllPllTrackingPullInTest_msg_rx::msg_handler_events(pmt::pmt_t msg) } -GpsL1CADllPllTrackingPullInTest_msg_rx::GpsL1CADllPllTrackingPullInTest_msg_rx() : gr::block("GpsL1CADllPllTrackingPullInTest_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)) +TrackingPullInTest_msg_rx::TrackingPullInTest_msg_rx() : gr::block("TrackingPullInTest_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)) { this->message_port_register_in(pmt::mp("events")); - this->set_msg_handler(pmt::mp("events"), boost::bind(&GpsL1CADllPllTrackingPullInTest_msg_rx::msg_handler_events, this, _1)); + this->set_msg_handler(pmt::mp("events"), boost::bind(&TrackingPullInTest_msg_rx::msg_handler_events, this, _1)); rx_message = 0; } -GpsL1CADllPllTrackingPullInTest_msg_rx::~GpsL1CADllPllTrackingPullInTest_msg_rx() +TrackingPullInTest_msg_rx::~TrackingPullInTest_msg_rx() { } // ########################################################### -class GpsL1CADllPllTrackingPullInTest : public ::testing::Test +class TrackingPullInTest : public ::testing::Test { public: std::string generator_binary; @@ -176,7 +180,7 @@ public: std::string p4; std::string p5; std::string p6; - std::string implementation = "GPS_L1_CA_DLL_PLL_Tracking"; //"GPS_L1_CA_DLL_PLL_C_Aid_Tracking"; + std::string implementation = FLAGS_trk_test_implementation; const int baseband_sampling_freq = FLAGS_fs_gen_sps; @@ -208,7 +212,7 @@ public: double& mean_error, double& std_dev_error); - GpsL1CADllPllTrackingPullInTest() + TrackingPullInTest() { factory = std::make_shared(); config = std::make_shared(); @@ -216,7 +220,7 @@ public: gnss_synchro = Gnss_Synchro(); } - ~GpsL1CADllPllTrackingPullInTest() + ~TrackingPullInTest() { } @@ -235,7 +239,7 @@ public: }; -int GpsL1CADllPllTrackingPullInTest::configure_generator(double CN0_dBHz, int file_idx) +int TrackingPullInTest::configure_generator(double CN0_dBHz, int file_idx) { // Configure signal generator generator_binary = FLAGS_generator_binary; @@ -257,7 +261,7 @@ int GpsL1CADllPllTrackingPullInTest::configure_generator(double CN0_dBHz, int fi } -int GpsL1CADllPllTrackingPullInTest::generate_signal() +int TrackingPullInTest::generate_signal() { int child_status; @@ -280,48 +284,104 @@ int GpsL1CADllPllTrackingPullInTest::generate_signal() } -void GpsL1CADllPllTrackingPullInTest::configure_receiver( +void TrackingPullInTest::configure_receiver( double PLL_wide_bw_hz, double DLL_wide_bw_hz, double PLL_narrow_bw_hz, double DLL_narrow_bw_hz, int extend_correlation_symbols) { - gnss_synchro.Channel_ID = 0; - gnss_synchro.System = 'G'; - std::string signal = "1C"; - signal.copy(gnss_synchro.Signal, 2, 0); - gnss_synchro.PRN = FLAGS_test_satellite_PRN; - config = std::make_shared(); + config->set_property("Tracking.dump", "true"); + config->set_property("Tracking.dump_filename", "./tracking_ch_"); + config->set_property("Tracking.implementation", implementation); + config->set_property("Tracking.item_type", "gr_complex"); + config->set_property("Tracking.pll_bw_hz", std::to_string(PLL_wide_bw_hz)); + config->set_property("Tracking.dll_bw_hz", std::to_string(DLL_wide_bw_hz)); + config->set_property("Tracking.extend_correlation_symbols", std::to_string(extend_correlation_symbols)); + config->set_property("Tracking.pll_bw_narrow_hz", std::to_string(PLL_narrow_bw_hz)); + config->set_property("Tracking.dll_bw_narrow_hz", std::to_string(DLL_narrow_bw_hz)); + gnss_synchro.PRN = FLAGS_test_satellite_PRN; + gnss_synchro.Channel_ID = 0; config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); - // Set Tracking - config->set_property("Tracking_1C.implementation", implementation); - config->set_property("Tracking_1C.item_type", "gr_complex"); - config->set_property("Tracking_1C.pll_bw_hz", std::to_string(PLL_wide_bw_hz)); - config->set_property("Tracking_1C.dll_bw_hz", std::to_string(DLL_wide_bw_hz)); - config->set_property("Tracking_1C.early_late_space_chips", "0.5"); - config->set_property("Tracking_1C.extend_correlation_symbols", std::to_string(extend_correlation_symbols)); - config->set_property("Tracking_1C.pll_bw_narrow_hz", std::to_string(PLL_narrow_bw_hz)); - config->set_property("Tracking_1C.dll_bw_narrow_hz", std::to_string(DLL_narrow_bw_hz)); - config->set_property("Tracking_1C.early_late_space_narrow_chips", "0.5"); - config->set_property("Tracking_1C.dump", "true"); - config->set_property("Tracking_1C.dump_filename", "./tracking_ch_"); + + std::string System_and_Signal; + if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0) + { + gnss_synchro.System = 'G'; + std::string signal = "1C"; + System_and_Signal = "GPS L1 CA"; + signal.copy(gnss_synchro.Signal, 2, 0); + config->set_property("Tracking.early_late_space_chips", "0.5"); + config->set_property("Tracking.early_late_space_narrow_chips", "0.5"); + } + else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking") == 0) + { + gnss_synchro.System = 'E'; + std::string signal = "1B"; + System_and_Signal = "Galileo E1B"; + signal.copy(gnss_synchro.Signal, 2, 0); + config->set_property("Tracking.early_late_space_chips", "0.15"); + config->set_property("Tracking.very_early_late_space_chips", "0.6"); + config->set_property("Tracking.early_late_space_narrow_chips", "0.15"); + config->set_property("Tracking.very_early_late_space_narrow_chips", "0.6"); + config->set_property("Tracking.track_pilot", "true"); + } + else if (implementation.compare("GPS_L2_M_DLL_PLL_Tracking") == 0) + { + gnss_synchro.System = 'G'; + std::string signal = "2S"; + System_and_Signal = "GPS L2CM"; + signal.copy(gnss_synchro.Signal, 2, 0); + config->set_property("Tracking.early_late_space_chips", "0.5"); + config->set_property("Tracking.track_pilot", "false"); + } + else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking") == 0 or implementation.compare("Galileo_E5a_DLL_PLL_Tracking_b") == 0) + { + gnss_synchro.System = 'E'; + std::string signal = "5X"; + System_and_Signal = "Galileo E5a"; + signal.copy(gnss_synchro.Signal, 2, 0); + if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_b") == 0) + { + config->supersede_property("Tracking.implementation", std::string("Galileo_E5a_DLL_PLL_Tracking")); + } + config->set_property("Tracking.early_late_space_chips", "0.5"); + config->set_property("Tracking.track_pilot", "false"); + config->set_property("Tracking.order", "2"); + } + else if (implementation.compare("GPS_L5_DLL_PLL_Tracking") == 0) + { + gnss_synchro.System = 'G'; + std::string signal = "L5"; + System_and_Signal = "GPS L5I"; + signal.copy(gnss_synchro.Signal, 2, 0); + config->set_property("Tracking.early_late_space_chips", "0.5"); + config->set_property("Tracking.track_pilot", "false"); + config->set_property("Tracking.order", "2"); + } + else + { + std::cout << "The test can not run with the selected tracking implementation\n "; + throw(std::exception()); + } std::cout << "*****************************************\n"; std::cout << "*** Tracking configuration parameters ***\n"; std::cout << "*****************************************\n"; - std::cout << "pll_bw_hz: " << config->property("Tracking_1C.pll_bw_hz", 0.0) << " Hz\n"; - std::cout << "dll_bw_hz: " << config->property("Tracking_1C.dll_bw_hz", 0.0) << " Hz\n"; - std::cout << "pll_bw_narrow_hz: " << config->property("Tracking_1C.pll_bw_narrow_hz", 0.0) << " Hz\n"; - std::cout << "dll_bw_narrow_hz: " << config->property("Tracking_1C.dll_bw_narrow_hz", 0.0) << " Hz\n"; - std::cout << "extend_correlation_symbols: " << config->property("Tracking_1C.extend_correlation_symbols", 0) << " Symbols\n"; + std::cout << "Signal: " << System_and_Signal << "\n"; + std::cout << "implementation: " << config->property("Tracking.implementation", std::string("undefined")) << " \n"; + std::cout << "pll_bw_hz: " << config->property("Tracking.pll_bw_hz", 0.0) << " Hz\n"; + std::cout << "dll_bw_hz: " << config->property("Tracking.dll_bw_hz", 0.0) << " Hz\n"; + std::cout << "pll_bw_narrow_hz: " << config->property("Tracking.pll_bw_narrow_hz", 0.0) << " Hz\n"; + std::cout << "dll_bw_narrow_hz: " << config->property("Tracking.dll_bw_narrow_hz", 0.0) << " Hz\n"; + std::cout << "extend_correlation_symbols: " << config->property("Tracking.extend_correlation_symbols", 0) << " Symbols\n"; std::cout << "*****************************************\n"; std::cout << "*****************************************\n"; } -bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) +bool TrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) { // 1. Setup GNU Radio flowgraph (file_source -> Acquisition_10m) gr::top_block_sptr top_block; @@ -330,45 +390,110 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) // Satellite signal definition Gnss_Synchro tmp_gnss_synchro; tmp_gnss_synchro.Channel_ID = 0; - tmp_gnss_synchro.System = 'G'; - std::string signal = "1C"; - signal.copy(tmp_gnss_synchro.Signal, 2, 0); - tmp_gnss_synchro.PRN = SV_ID; - config = std::make_shared(); config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); - - config->set_property("Acquisition.max_dwells", "10"); config->set_property("Acquisition.blocking_on_standby", "true"); + config->set_property("Acquisition.blocking", "true"); config->set_property("Acquisition.dump", "true"); config->set_property("Acquisition.dump_filename", "./data/acquisition.dat"); - config->set_property("Acquisition.use_CFAR_algorithm", "false"); - GpsL1CaPcpsAcquisitionFineDoppler* acquisition; - acquisition = new GpsL1CaPcpsAcquisitionFineDoppler(config.get(), "Acquisition", 1, 0); - //GpsL1CaPcpsAcquisition* acquisition; - //acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 0); + std::shared_ptr acquisition; + + std::string System_and_Signal; + //create the correspondign acquisition block according to the desired tracking signal + if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking") == 0) + { + tmp_gnss_synchro.System = 'G'; + std::string signal = "1C"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "GPS L1 CA"; + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking") == 0) + { + tmp_gnss_synchro.System = 'E'; + std::string signal = "1B"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "Galileo E1B"; + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GPS_L2_M_DLL_PLL_Tracking") == 0) + { + tmp_gnss_synchro.System = 'G'; + std::string signal = "2S"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "GPS L2CM"; + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_b") == 0) + { + tmp_gnss_synchro.System = 'E'; + std::string signal = "5X"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "Galileo E5a"; + config->set_property("Acquisition_5X.coherent_integration_time_ms", "1"); + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + config->set_property("Acquisition.CAF_window_hz", "0"); // **Only for E5a** Resolves doppler ambiguity averaging the specified BW in the winner code delay. If set to 0 CAF filter is desactivated. Recommended value 3000 Hz + config->set_property("Acquisition.Zero_padding", "0"); //**Only for E5a** Avoids power loss and doppler ambiguity in bit transitions by correlating one code with twice the input data length, ensuring that at least one full code is present without transitions. If set to 1 it is ON, if set to 0 it is OFF. + config->set_property("Acquisition.bit_transition_flag", "false"); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + + else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking") == 0) + { + tmp_gnss_synchro.System = 'E'; + std::string signal = "5X"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "Galileo E5a"; + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else if (implementation.compare("GPS_L5_DLL_PLL_Tracking") == 0) + { + tmp_gnss_synchro.System = 'G'; + std::string signal = "L5"; + signal.copy(tmp_gnss_synchro.Signal, 2, 0); + tmp_gnss_synchro.PRN = SV_ID; + System_and_Signal = "GPS L5I"; + config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); + acquisition = std::make_shared(config.get(), "Acquisition", 1, 0); + } + else + { + std::cout << "The test can not run with the selected tracking implementation\n "; + throw(std::exception()); + } - acquisition->set_channel(1); acquisition->set_gnss_synchro(&tmp_gnss_synchro); + acquisition->set_channel(0); + acquisition->set_doppler_max(config->property("Acquisition.doppler_max", FLAGS_external_signal_acquisition_doppler_max_hz)); + acquisition->set_doppler_step(config->property("Acquisition.doppler_step", FLAGS_external_signal_acquisition_doppler_step_hz)); acquisition->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold)); - acquisition->set_doppler_max(config->property("Acquisition.doppler_max", 25000)); - acquisition->set_doppler_step(config->property("Acquisition.doppler_step", 500)); + acquisition->init(); + acquisition->set_local_code(); + acquisition->set_state(1); // Ensure that acquisition starts at the first sample acquisition->connect(top_block); - gr::blocks::file_source::sptr file_source; std::string file = FLAGS_signal_file; const char* file_name = file.c_str(); file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); file_source->seek(2 * FLAGS_skip_samples, 0); //skip head. ibyte, two bytes per complex sample gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make(); - gr::blocks::head::sptr head_samples = gr::blocks::head::make(sizeof(gr_complex), baseband_sampling_freq * FLAGS_duration); + //gr::blocks::head::sptr head_samples = gr::blocks::head::make(sizeof(gr_complex), baseband_sampling_freq * FLAGS_duration); top_block->connect(file_source, 0, gr_interleaved_char_to_complex, 0); - top_block->connect(gr_interleaved_char_to_complex, 0, head_samples, 0); - top_block->connect(head_samples, 0, acquisition->get_left_block(), 0); + top_block->connect(gr_interleaved_char_to_complex, 0, acquisition->get_left_block(), 0); + //top_block->connect(head_samples, 0, acquisition->get_left_block(), 0); boost::shared_ptr msg_rx; try @@ -411,7 +536,7 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) if (start_msg == true) { std::cout << "Reading external signal file: " << FLAGS_signal_file << std::endl; - std::cout << "Searching for GPS Satellites in L1 band..." << std::endl; + std::cout << "Searching for " << System_and_Signal << " Satellites..." << std::endl; std::cout << "["; start_msg = false; } @@ -432,7 +557,6 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) } top_block->stop(); file_source->seek(2 * FLAGS_skip_samples, 0); //skip head. ibyte, two bytes per complex sample - head_samples.reset(); std::cout.flush(); } std::cout << "]" << std::endl; @@ -440,7 +564,7 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) for (auto& x : doppler_measurements_map) { - std::cout << "DETECTED PRN: " << x.first << " with Doppler: " << x.second << " [Hz], code phase: " << code_delay_measurements_map.at(x.first) << " [samples] at signal SampleStamp " << acq_samplestamp_map.at(x.first) << "\n"; + std::cout << "DETECTED SATELLITE " << System_and_Signal << " PRN: " << x.first << " with Doppler: " << x.second << " [Hz], code phase: " << code_delay_measurements_map.at(x.first) << " [samples] at signal SampleStamp " << acq_samplestamp_map.at(x.first) << "\n"; } // report the elapsed time @@ -452,7 +576,7 @@ bool GpsL1CADllPllTrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) return true; } -TEST_F(GpsL1CADllPllTrackingPullInTest, ValidationOfResults) +TEST_F(TrackingPullInTest, ValidationOfResults) { //************************************************* //***** STEP 1: Prepare the parameters sweep ****** @@ -582,9 +706,9 @@ TEST_F(GpsL1CADllPllTrackingPullInTest, ValidationOfResults) //create flowgraph top_block = gr::make_top_block("Tracking test"); - std::shared_ptr trk_ = factory->GetBlock(config, "Tracking_1C", implementation, 1, 1); + std::shared_ptr trk_ = factory->GetBlock(config, "Tracking", config->property("Tracking.implementation", std::string("undefined")), 1, 1); std::shared_ptr tracking = std::dynamic_pointer_cast(trk_); - boost::shared_ptr msg_rx = GpsL1CADllPllTrackingPullInTest_msg_rx_make(); + boost::shared_ptr msg_rx = TrackingPullInTest_msg_rx_make(); ASSERT_NO_THROW({ From 23a036f58f8af54598a7aa5c9a2d2cc69be44519 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Fri, 20 Jul 2018 11:06:39 +0200 Subject: [PATCH 194/194] Improving Galileo E1 tracking plot in tracking pull-in unit test --- .../tracking/tracking_pull-in_test.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc index b9ce9cee9..7b34935bd 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc @@ -394,7 +394,7 @@ bool TrackingPullInTest::acquire_GPS_L1CA_signal(int SV_ID) config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); config->set_property("Acquisition.blocking_on_standby", "true"); config->set_property("Acquisition.blocking", "true"); - config->set_property("Acquisition.dump", "true"); + config->set_property("Acquisition.dump", "false"); config->set_property("Acquisition.dump_filename", "./data/acquisition.dat"); config->set_property("Acquisition.use_CFAR_algorithm", "false"); @@ -785,6 +785,8 @@ TEST_F(TrackingPullInTest, ValidationOfResults) std::vector prompt; std::vector early; std::vector late; + std::vector v_early; + std::vector v_late; std::vector promptI; std::vector promptQ; std::vector CN0_dBHz; @@ -802,6 +804,8 @@ TEST_F(TrackingPullInTest, ValidationOfResults) prompt.push_back(trk_dump.abs_P); early.push_back(trk_dump.abs_E); late.push_back(trk_dump.abs_L); + v_early.push_back(trk_dump.abs_VE); + v_late.push_back(trk_dump.abs_VL); promptI.push_back(trk_dump.prompt_I); promptQ.push_back(trk_dump.prompt_Q); CN0_dBHz.push_back(trk_dump.CN0_SNV_dB_Hz); @@ -847,6 +851,11 @@ TEST_F(TrackingPullInTest, ValidationOfResults) g1.plot_xy(trk_timestamp_s, prompt, "Prompt", decimate); g1.plot_xy(trk_timestamp_s, early, "Early", decimate); g1.plot_xy(trk_timestamp_s, late, "Late", decimate); + if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking") == 0) + { + g1.plot_xy(trk_timestamp_s, v_early, "Very Early", decimate); + g1.plot_xy(trk_timestamp_s, v_late, "Very Late", decimate); + } g1.set_legend(); //g1.savetops("Correlators_outputs" + std::to_string(generator_CN0_values.at(current_cn0_idx))); //g1.savetopdf("Correlators_outputs" + std::to_string(generator_CN0_values.at(current_cn0_idx)), 18);