mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-20 18:37:01 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
055bd52b96
126
.github/workflows/main.yml
vendored
Normal file
126
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
name: Simple CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: sudo apt-get install ninja-build libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest protobuf-compiler libprotobuf-dev
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
run: cd build && ninja
|
||||
- name: check
|
||||
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
||||
- name: default position_test
|
||||
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
||||
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install ninja pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
run: cd build && ninja
|
||||
- name: check
|
||||
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
||||
- name: default position_test
|
||||
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
||||
|
||||
|
||||
clang-format:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install llvm && ln -s /usr/local/opt/llvm/bin/clang-format /usr/local/bin
|
||||
- name: run clang-format
|
||||
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cpp -o -iname \*.hpp | xargs clang-format -style=file -i
|
||||
- name: check
|
||||
run: git diff > clang_format.patch && echo -e "if \n [ -s clang_format.patch ] \nthen \n echo "clang-format not applied:"; echo ""; more clang_format.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect
|
||||
|
||||
|
||||
clang-tidy:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && ln -s /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin && ln -s /usr/local/Cellar/llvm/9.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/9.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako && pip3 install six
|
||||
- name: Prepare run
|
||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
||||
- name: run clang-tidy
|
||||
run: cd build && run-clang-tidy.py -fix
|
||||
- name: check
|
||||
run: git diff > clang_tidy.patch && echo -e "if \n [ -s clang_tidy.patch ] \nthen \n echo "clang_tidy not applied:"; echo ""; more clang_tidy.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect
|
||||
|
||||
|
||||
volk-gnsssdr-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-python@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install mako six
|
||||
- name: configure
|
||||
shell: powershell
|
||||
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
||||
- name: build
|
||||
run: cmake --build build --config Release
|
||||
- name: test
|
||||
shell: powershell
|
||||
run: cd build; ctest -C Release
|
||||
|
||||
|
||||
volk-gnsssdr-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: sudo apt-get install build-essential python3-mako python3-six cmake
|
||||
- name: configure
|
||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && make -j2
|
||||
- name: install
|
||||
run: cd build && sudo make install && sudo ldconfig
|
||||
- name: test
|
||||
run: volk_gnsssdr_profile
|
||||
|
||||
|
||||
volk-gnsssdr-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && make -j2 && sudo make install
|
||||
- name: test
|
||||
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
||||
|
||||
|
||||
volk-gnsssdr-macos-xcode:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && xcodebuild -configuration Release
|
||||
- name: install
|
||||
run: cd build && sudo xcodebuild -configuration Release -target install
|
||||
- name: test
|
||||
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
@ -406,6 +406,22 @@ ubuntu18.04:
|
||||
- volk_gnsssdr_profile -i 3 -v 2053
|
||||
|
||||
|
||||
ubuntu18.10:
|
||||
image: ubuntu:cosmic
|
||||
stage: build
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev libprotobuf-dev protobuf-compiler
|
||||
- cd build
|
||||
- cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON ..
|
||||
- NPROC=$(grep -c ^processor /proc/cpuinfo)
|
||||
- make -j$(($NPROC+1))
|
||||
- make check
|
||||
- make install
|
||||
- volk_gnsssdr_profile -i 3 -v 2053
|
||||
allow_failure: true
|
||||
|
||||
|
||||
ubuntu19.04:
|
||||
image: ubuntu:disco
|
||||
stage: build
|
||||
@ -438,22 +454,6 @@ ubuntu19.10:
|
||||
allow_failure: true
|
||||
|
||||
|
||||
ubuntu20.04:
|
||||
image: ubuntu:focal
|
||||
stage: build
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev libprotobuf-dev protobuf-compiler
|
||||
- cd build
|
||||
- cmake -DENABLE_OSMOSDR=ON -DENABLE_RAW_UDP=ON ..
|
||||
- NPROC=$(grep -c ^processor /proc/cpuinfo)
|
||||
- make -j$(($NPROC+1))
|
||||
- make check
|
||||
- make install
|
||||
- volk_gnsssdr_profile -i 3 -v 2053
|
||||
allow_failure: true
|
||||
|
||||
|
||||
coverity-scan:
|
||||
image: ubuntu:bionic
|
||||
stage: build
|
||||
|
@ -23,7 +23,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree build, it is bad practice.\nTry 'cd build && cmake ..' instead.")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12...3.15)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.16)
|
||||
project(gnss-sdr CXX C)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
@ -645,7 +645,7 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(${FILESYSTEM_FOUND})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@ -1096,6 +1096,12 @@ if(NOT GFLAGS_FOUND)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GFLAGS_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(GFLAGS_BUILD_COMMAND "cmake" "--build" "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if((CMAKE_BUILD_TYPE MATCHES Debug) AND (CMAKE_VERSION VERSION_GREATER "3.0.2"))
|
||||
set(GFLAGS_DEBUG_POSTFIX "_debug")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
@ -1104,7 +1110,7 @@ if(NOT GFLAGS_FOUND)
|
||||
GIT_TAG v${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -1117,21 +1123,20 @@ if(NOT GFLAGS_FOUND)
|
||||
GIT_TAG v${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=ON -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
# Note: -DBUILD_gflags_nothreads_LIB=ON is required as a workaround to a bug in gflags 2.2.2. This is fixed in gflags master branch
|
||||
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include CACHE PATH "Local Gflags headers"
|
||||
)
|
||||
if((CMAKE_BUILD_TYPE MATCHES Debug) AND (CMAKE_VERSION VERSION_GREATER "3.0.2"))
|
||||
set(GFLAGS_DEBUG_POSTFIX "_debug")
|
||||
endif()
|
||||
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
@ -1140,6 +1145,11 @@ if(NOT GFLAGS_FOUND)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_BUILD_TYPE}/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_BUILD_TYPE}/gflags_static${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Gflags::gflags)
|
||||
file(MAKE_DIRECTORY ${GFlags_INCLUDE_DIRS})
|
||||
@ -1154,6 +1164,10 @@ if(NOT GFLAGS_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(Gflags::gflags INTERFACE shlwapi.lib)
|
||||
endif()
|
||||
|
||||
set(LOCAL_GFLAGS TRUE CACHE STRING "GFlags downloaded and built automatically" FORCE)
|
||||
set_package_properties(GFLAGS PROPERTIES
|
||||
PURPOSE "Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
@ -1194,6 +1208,9 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GLOG_MAKE_PROGRAM "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(GLOG_MAKE_PROGRAM "cmake" "--build" "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(GLOG_DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
@ -1227,7 +1244,7 @@ aclocal
|
||||
automake --add-missing
|
||||
autoreconf -vfi
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure --enable-shared=no"
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
@ -1355,7 +1372,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
|
||||
endif()
|
||||
add_dependencies(glog-${GNSSSDR_GLOG_LOCAL_VERSION} Gflags::gflags)
|
||||
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_BUILD_TYPE}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${GLOG_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
|
@ -16,23 +16,32 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove \"$ENV{DESTDIR}${file}\"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if(EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
elseif(IS_SYMLINK "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach(file)
|
||||
|
@ -172,12 +172,11 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); // generate Galileo E1 code, 1 sample per chip
|
||||
|
||||
const uint32_t _codeLength = _samplesPerChip * GALILEO_E1_B_CODE_LENGTH_CHIPS;
|
||||
std::unique_ptr<float> _signal_E1{new float[_codeLength]};
|
||||
gsl::span<float> _signal_E1_span(_signal_E1, _codeLength);
|
||||
std::vector<float> _signal_E1(_codeLength);
|
||||
|
||||
if (_cboc == true)
|
||||
{
|
||||
galileo_e1_gen_float(_signal_E1_span, primary_code_E1_chips, _Signal); // generate cboc 12 samples per chip
|
||||
galileo_e1_gen_float(_signal_E1, primary_code_E1_chips, _Signal); // generate cboc 12 samples per chip
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,33 +185,27 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
|
||||
for (uint32_t ii = 0; ii < _codeLength; ++ii)
|
||||
{
|
||||
_signal_E1_span[ii] = static_cast<float>(_signal_E1_int[ii]);
|
||||
_signal_E1[ii] = static_cast<float>(_signal_E1_int[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
{
|
||||
std::unique_ptr<float> _resampled_signal{new float[_samplesPerCode]};
|
||||
std::vector<float> _resampled_signal(_samplesPerCode);
|
||||
|
||||
resampler(gsl::span<float>(_signal_E1, _codeLength), gsl::span<float>(_resampled_signal, _samplesPerCode), _samplesPerChip * _codeFreqBasis, _fs); // resamples code to fs
|
||||
resampler(_signal_E1, _resampled_signal, _samplesPerChip * _codeFreqBasis, _fs); // resamples code to fs
|
||||
|
||||
_signal_E1 = std::move(_resampled_signal);
|
||||
}
|
||||
uint32_t size_signal_E1 = _codeLength;
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
{
|
||||
size_signal_E1 = _samplesPerCode;
|
||||
}
|
||||
gsl::span<float> _signal_E1_span_aux(_signal_E1, size_signal_E1);
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
std::unique_ptr<float> _signal_E1C_secondary{new float[static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode]};
|
||||
gsl::span<float> _signal_E1C_secondary_span(_signal_E1C_secondary, static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode);
|
||||
std::vector<float> _signal_E1C_secondary(static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode);
|
||||
for (uint32_t i = 0; i < static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH); i++)
|
||||
{
|
||||
for (unsigned k = 0; k < _samplesPerCode; k++)
|
||||
for (uint32_t k = 0; k < _samplesPerCode; k++)
|
||||
{
|
||||
_signal_E1C_secondary_span[i * _samplesPerCode + k] = _signal_E1_span_aux[k] * (GALILEO_E1_C_SECONDARY_CODE[i] == '0' ? 1.0F : -1.0F);
|
||||
_signal_E1C_secondary[i * _samplesPerCode + k] = _signal_E1[k] * (GALILEO_E1_C_SECONDARY_CODE[i] == '0' ? 1.0F : -1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,14 +213,10 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
|
||||
_signal_E1 = std::move(_signal_E1C_secondary);
|
||||
}
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
size_signal_E1 = static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode;
|
||||
}
|
||||
gsl::span<float> _signal_E1_span_aux2(_signal_E1, size_signal_E1);
|
||||
|
||||
for (uint32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i + delay) % _samplesPerCode] = _signal_E1_span_aux2[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _signal_E1[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal)
|
||||
@ -108,9 +109,8 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
const uint32_t _codeLength = GALILEO_E5A_CODE_LENGTH_CHIPS;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
|
||||
std::unique_ptr<std::complex<float>> _code{new std::complex<float>[_codeLength]};
|
||||
gsl::span<std::complex<float>> _code_span(_code, _codeLength);
|
||||
galileo_e5_a_code_gen_complex_primary(_code_span, _prn, _Signal);
|
||||
std::vector<std::complex<float>> _code(_codeLength);
|
||||
galileo_e5_a_code_gen_complex_primary(_code, _prn, _Signal);
|
||||
|
||||
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
|
||||
|
||||
@ -118,18 +118,13 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> _resampled_signal{new std::complex<float>[_samplesPerCode]};
|
||||
resampler(_code_span, gsl::span<std::complex<float>>(_resampled_signal, _samplesPerCode), _codeFreqBasis, _fs); // resamples code to fs
|
||||
std::vector<std::complex<float>> _resampled_signal(_samplesPerCode);
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs); // resamples code to fs
|
||||
_code = std::move(_resampled_signal);
|
||||
}
|
||||
uint32_t size_code = _codeLength;
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
size_code = _samplesPerCode;
|
||||
}
|
||||
gsl::span<std::complex<float>> _code_span_aux(_code, size_code);
|
||||
|
||||
for (uint32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i + delay) % _samplesPerCode] = _code_span_aux[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +27,9 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <iosfwd> // for ofstream
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
#include <iosfwd> // for ofstream
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
|
||||
class volk_gnsssdr_test_results_t;
|
||||
|
||||
|
@ -15,25 +15,33 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove \"$ENV{DESTDIR}${file}\"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif(NOT "${rm_retval}" STREQUAL 0)
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if(EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
elseif(IS_SYMLINK "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif()
|
||||
endforeach(file)
|
||||
|
@ -838,7 +838,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
if(ARMADILLO_VERSION_STRING VERSION_GREATER 8.400)
|
||||
set(NONLINEAR_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc
|
||||
)
|
||||
endif()
|
||||
add_executable(trk_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user