1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 19:50:34 +00:00

Merge branch 'next' of github.com:gnss-sdr/gnss-sdr into pps_lime

This commit is contained in:
Javier Arribas 2023-01-13 12:34:44 +01:00
commit 09cc53f36e
38 changed files with 349 additions and 208 deletions

View File

@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
# SPDX-FileCopyrightText: 2020-2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
name: Simple CI
on:
@ -40,7 +40,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: brew update && brew install ninja pkg-config hdf5 automake armadillo lapack gflags glog gnuradio log4cpp openssl pugixml protobuf && pip3 install mako
run: |
brew update
brew install --overwrite python@3.10 python@3.11
python3.11 -m pip install mako
brew install ninja pkg-config hdf5 automake armadillo lapack \
gflags glog gnuradio log4cpp openssl pugixml protobuf
- name: configure
run: cd build && cmake -GNinja ..
- name: build
@ -55,15 +60,28 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: brew update && brew install ninja pkg-config hdf5 automake armadillo lapack gflags glog gnuradio log4cpp openssl pugixml protobuf && pip3 install mako
run: |
brew update
brew install --overwrite python@3.10 python@3.11
python3.11 -m pip install mako
brew install ninja pkg-config hdf5 automake armadillo lapack gflags glog \
gnuradio log4cpp openssl pugixml protobuf
- name: configure
run: cd build && cmake -GXcode ..
- name: build
run: cd build && xcodebuild -configuration Release
- name: check
run: cd build && xcodebuild -configuration Release -target check && ../install/volk_gnsssdr_profile && ../install/run_tests
run: |
cd build
xcodebuild -configuration Release -target check
../install/volk_gnsssdr_profile
../install/run_tests
- name: default position_test
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && xcodebuild -configuration Release -target position_test && ../install/position_test
run: |
cd build
cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON ..
xcodebuild -configuration Release -target position_test
../install/position_test
clang-format:
runs-on: macos-latest
@ -74,20 +92,36 @@ jobs:
- name: run clang-format
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cc | 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
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@v3
- name: install dependencies
run: brew update && brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp openssl pugixml protobuf && ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin && ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin && ln -s $(brew --prefix llvm)/bin/run-clang-tidy /usr/local/bin && pip3 install mako
run: |
brew update
brew install --overwrite python@3.10 python@3.11
python3.11 -m pip install mako
brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio \
log4cpp openssl pugixml protobuf
ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
ln -s $(brew --prefix llvm)/bin/run-clang-tidy /usr/local/bin
- name: Prepare run
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.12.1 core_monitor core_libs pvt_libs
- name: run clang-tidy
run: cd build && run-clang-tidy -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
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
cpplint:
runs-on: ubuntu-latest

View File

@ -26,28 +26,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3
- name: Update repositories
run: sudo apt update
# All dependencies
- name: Install dependencies
run: sudo apt install -y cmake openjdk-11-jre-headless wget unzip make python3-mako
# Setup Android SDK, and auto-accept licenses
- name: Install Android SDK
run: wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && mkdir android-sdk-linux && unzip -qq android-sdk.zip -d android-sdk-linux && export ANDROID_HOME=./android-sdk-linux && echo y | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --update && (echo y; echo y; echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --licenses
run: |
wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
mkdir android-sdk-linux
unzip -qq android-sdk.zip -d android-sdk-linux
export ANDROID_HOME=./android-sdk-linux
echo y | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --update
(echo y; echo y; echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --licenses
# Call SDKManager to install the Android NDK
- name: Install Android NDK
run: $GITHUB_WORKSPACE/android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=$GITHUB_WORKSPACE/android-sdk-linux --install "ndk;24.0.8215888" --channel=3
# Setup build directory
- name: Setup ${{ matrix.arch.name }}
shell: bash
run: cd $GITHUB_WORKSPACE/ && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-24 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
run: |
cd $GITHUB_WORKSPACE/
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=${{ matrix.arch.name }} \
-DANDROID_PLATFORM=android-24 \
../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
# Build
- name: Build ${{ matrix.arch.name }}
shell: bash

View File

@ -349,7 +349,11 @@ else()
set(GNSSSDR_GTEST_LOCAL_VERSION "1.12.1")
endif()
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GNSSTK_LOCAL_VERSION "13.7.0")
if(CMAKE_VERSION VERSION_GREATER 3.17.0)
set(GNSSSDR_GNSSTK_LOCAL_VERSION "14.0.0")
else()
set(GNSSSDR_GNSSTK_LOCAL_VERSION "13.7.0")
endif()
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.23")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.13")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.9")
@ -669,19 +673,17 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND (LOG4CPP_READY_FOR_CXX17 OR GNURA
endif()
if(FILESYSTEM_FOUND)
set(CMAKE_CXX_STANDARD 17)
# if(CMAKE_VERSION VERSION_GREATER 3.13)
# UHD 3.15.0.0-5 does not support C++20
# GNU Radio 3.10.0.git does not support C++20
# if(((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_LESS 3.14.99))) AND (GNURADIO_VERSION VERSION_LESS 3.9.99))
# set(CMAKE_CXX_STANDARD 20)
# if(CMAKE_VERSION VERSION_GREATER 3.20.99)
if(CMAKE_VERSION VERSION_GREATER 3.13)
if(((NOT UHD_FOUND) OR (UHD_FOUND AND ("${UHD_VERSION}" VERSION_GREATER 4.2.99))) AND (GNURADIO_VERSION VERSION_GREATER 3.10.3.99))
set(CMAKE_CXX_STANDARD 20)
# if(CMAKE_VERSION VERSION_GREATER 3.20.99)
# if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0.0")) OR
# ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0")))
# set(CMAKE_CXX_STANDARD 23)
# endif()
# endif()
# endif()
# endif()
# endif()
endif()
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
endif()
@ -1111,9 +1113,9 @@ if(NOT VOLKGNSSSDR_FOUND)
set(STRIP_VOLK_GNSSSDR_PROFILE "")
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
set(STRIP_VOLK_GNSSSDR_PROFILE "-DENABLE_STRIP=${ENABLE_STRIP}")
set(STRIP_VOLK_GNSSSDR_PROFILE -DENABLE_STRIP=${ENABLE_STRIP})
if(ENABLE_PACKAGING)
set(STRIP_VOLK_GNSSSDR_PROFILE "${STRIP_VOLK_GNSSSDR_PROFILE} -DCMAKE_VERBOSE_MAKEFILE=ON")
set(STRIP_VOLK_GNSSSDR_PROFILE ${STRIP_VOLK_GNSSSDR_PROFILE} -DCMAKE_VERBOSE_MAKEFILE=ON)
endif()
endif()
@ -1159,6 +1161,12 @@ if(NOT VOLKGNSSSDR_FOUND)
${STRIP_VOLK_GNSSSDR_PROFILE}
${USE_THIS_PYTHON}
)
if(CMAKE_C_FLAGS) # Required by some packaging systems
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS})
endif()
if(CMAKE_CXX_FLAGS) # Required by some packaging systems
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS})
endif()
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS}

View File

@ -20,6 +20,7 @@ All notable changes to GNSS-SDR will be documented in this file.
of samples event.
- Improved non-coherent acquisition when `Acquisition_XX.blocking=false`.
- Implemented processing of BeiDou PRN 34 up to PRN 63 signals.
- Implemented Hamming code correction for Glonass navigation message.
### Improvements in Interoperability:
@ -38,6 +39,8 @@ All notable changes to GNSS-SDR will be documented in this file.
receiver, HAS messages are decoded and reported.
- Added a `ZMQ_Signal_Source` for working with streams of samples published via
[ZeroMQ](https://zeromq.org/).
- Fixed register unpacking for Labsat3W files in `Labsat_Signal_Source`. This
fix is only available if gnss-sdr is linked against Boost >= 1.58.0.
### Improvements in Maintainability:
@ -55,14 +58,23 @@ All notable changes to GNSS-SDR will be documented in this file.
which caused issues when linking with some compilers.
- Added support for Xilinx's Zynq UltraScale+ devices (requires the
`-DENABLE_FPGA=ON` building option).
- Fixed running time error if the binary is built with the
`-Wp,-D_GLIBCXX_ASSERTIONS` compiler option. This is added by default in some
GNU/Linux distributions.
- Fixed running time error if the `gnss-sdr` binary and/or the GNU Radio
libraries were built with the `-D_GLIBCXX_ASSERTIONS` compiler option. This is
added by default in some GNU/Linux distributions (e.g., ArchLinux and Fedora).
- Fixed linking against libunwind when the glog library is built locally.
- The configuration options at building time `-DENABLE_OWN_GLOG`,
`-DENABLE_OWN_ARMADILLO`, and `-DENABLE_OWN_GNSSTK` can now be switched `ON`
and `OFF` without the need to start from an empty buiding folder.
- Improved CMake handling of the spdlog library used by GNU Radio >= 3.10.
- Make use of the C++20 standard if the environment allows for it.
- Improved passing of compiler flags to `volk_gnsssdr` if the corresponding
environment variables are defined. This fixes warnings in some packaging
systems.
- Test files are now donwloaded at configuration time instead of being included
in the source tree. This allows for a smaller package and fixes Lintian
`very-long-line-length-in-source-file` warnings since those files were not
recognized as binaries. The configuration flag `-DENABLE_PACKAGING=ON` passed
to CMake deactivates file downloading.
### Improvements in Usability:

View File

@ -1147,7 +1147,7 @@ rtklib_pvt_gs::~rtklib_pvt_gs()
}
}
}
catch (std::length_error& e)
catch (const std::exception& e)
{
LOG(WARNING) << e.what();
}

View File

@ -55,7 +55,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename,
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder.\n";
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
nmea_base_path = full_path.string();
}
}
@ -69,7 +69,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename,
if ((nmea_base_path != ".") and (d_flag_nmea_output_file == true))
{
std::cout << "NMEA files will be stored at " << nmea_base_path << '\n';
std::cout << "NMEA files will be stored at " << nmea_base_path << std::endl;
}
nmea_base_path = nmea_base_path + fs::path::preferred_separator;
@ -83,7 +83,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename,
}
else
{
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?\n";
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?" << std::endl;
}
}
@ -118,18 +118,18 @@ Nmea_Printer::~Nmea_Printer()
}
catch (const std::ofstream::failure& e)
{
std::cerr << "Problem closing NMEA dump file: " << nmea_filename << '\n';
std::cerr << "Problem closing NMEA dump file: " << nmea_filename << std::endl;
}
catch (const std::exception& e)
{
std::cerr << e.what() << '\n';
std::cerr << e.what() << std::endl;
}
if (pos == 0)
{
errorlib::error_code ec;
if (!fs::remove(fs::path(nmea_filename), ec))
{
std::cerr << "Problem removing NMEA temporary file: " << nmea_filename << '\n';
std::cerr << "Problem removing NMEA temporary file: " << nmea_filename << std::endl;
}
}
try
@ -138,7 +138,7 @@ Nmea_Printer::~Nmea_Printer()
}
catch (const std::exception& e)
{
std::cerr << e.what() << '\n';
std::cerr << e.what() << std::endl;
}
}
@ -212,14 +212,12 @@ bool Nmea_Printer::Print_Nmea_Line(const Rtklib_Solver* const pvt_data, bool pri
{
try
{
// GPRMC
nmea_file_descriptor << GPRMC;
// GPGGA (Global Positioning System Fixed Data)
nmea_file_descriptor << GPGGA;
// GPGSA
nmea_file_descriptor << GPGSA;
// GPGSV
nmea_file_descriptor << GPGSV;
nmea_file_descriptor
<< GPRMC
<< GPGGA // GPGGA (Global Positioning System Fixed Data)
<< GPGSA
<< GPGSV
<< std::flush;
}
catch (const std::exception& ex)
{
@ -417,7 +415,7 @@ std::string Nmea_Printer::get_GPGSA() const
std::string Nmea_Printer::get_GPGSV() const
{
// GSV-GNSS Satellites in View
// $GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42*71
// $GPGSV,2,1,07,07,79,048,42,02,51,062,43,26,36,256,42,27,27,138,42,1*71
// Notice that NMEA 2.1 only supports 12 channels
std::stringstream sentence_str;
std::array<unsigned char, 1024> buff{};

View File

@ -5602,29 +5602,9 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gal
E5B_HS = "11";
}
if (E1B_HS == "11")
{
LOG(WARNING) << "Signal Component currently in Test";
}
if (E1B_HS == "10")
{
LOG(WARNING) << "Signal will be out of service";
}
if (E1B_HS == "01")
{
LOG(WARNING) << "Signal out of service";
}
E1B_HS = "00"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
std::string E1B_DVS = std::to_string(galileo_ephemeris_iter->second.E1B_DVS);
if (E1B_DVS == "1")
{
LOG(WARNING) << "Navigation data without guarantee";
}
E1B_DVS = "0"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
std::string SVhealth_str = E5B_HS + std::to_string(galileo_ephemeris_iter->second.E5b_DVS) + "11" + "1" + std::string(E1B_DVS) + std::string(E1B_HS) + std::to_string(galileo_ephemeris_iter->second.E1B_DVS);
SVhealth_str = "000000000"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
int32_t SVhealth = Rinex_Printer::toInt(SVhealth_str, 9);
line += Rinex_Printer::doub2for(static_cast<double>(SVhealth), 18, 2);
line += std::string(1, ' ');

View File

@ -776,6 +776,8 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
else
{
d_step_two = true; // Clear input buffer and make small grid acquisition
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
update_grid_doppler_wipeoffs_step2();
d_num_noncoherent_integrations_counter = 0;
d_positive_acq = 0;
d_state = 0;
@ -826,6 +828,8 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count)
else
{
d_step_two = true; // Clear input buffer and make small grid acquisition
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
update_grid_doppler_wipeoffs_step2();
d_num_noncoherent_integrations_counter = 0U;
d_state = 0;
}
@ -910,7 +914,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
if (!d_active or d_worker_active)
{
// do not consume samples while performing a non-coherent integration
bool consume_samples = ((!d_active) || (d_active && (d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells)));
bool consume_samples = ((!d_active) || (d_worker_active && (d_num_noncoherent_integrations_counter == d_acq_parameters.max_dwells)));
if ((!d_acq_parameters.blocking_on_standby) && consume_samples)
{
d_sample_counter += static_cast<uint64_t>(ninput_items[0]);
@ -918,8 +922,6 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
}
if (d_step_two)
{
d_doppler_center_step_two = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
update_grid_doppler_wipeoffs_step2();
d_state = 0;
d_active = true;
}

View File

@ -27,6 +27,7 @@
#include <volk/volk.h>
#include <volk_gnsssdr/volk_gnsssdr.h>
#include <algorithm>
#include <array>
#include <exception>
#include <sstream>
#include <utility>

View File

@ -3103,7 +3103,7 @@ void readpos(const char *file, const char *rcv, double *pos)
continue;
}
auto sta = stas[np++]; // NOLINT(readability-qualified-auto)
std::strncpy(sta, str, 16);
strncpy_no_trunc(sta, 16, str, 256);
sta[15] = '\0';
}
fclose(fp);

View File

@ -71,6 +71,12 @@ else()
target_link_libraries(volk_gnsssdr_profile PRIVATE volk_gnsssdr ${orc_lib})
endif()
if(UNIX)
target_compile_definitions(volk_gnsssdr_profile
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
)
endif()
if(ENABLE_STRIP)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
set_target_properties(volk_gnsssdr_profile
@ -94,6 +100,12 @@ else()
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${orc_lib})
endif()
if(UNIX)
target_compile_definitions(volk_gnsssdr-config-info
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
)
endif()
if(ENABLE_STRIP)
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
set_target_properties(volk_gnsssdr-config-info

View File

@ -590,11 +590,7 @@ if(NOT (ENABLE_STATIC_LIBS AND (CMAKE_GENERATOR STREQUAL Xcode)))
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC $<INSTALL_INTERFACE:include>
)
if(UNIX)
target_compile_definitions(volk_gnsssdr
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
)
endif()
if(USE_CPU_FEATURES)
if(CPUFEATURES_FOUND)
target_include_directories(volk_gnsssdr
@ -665,11 +661,6 @@ if(ENABLE_STATIC_LIBS)
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)
if(UNIX)
target_compile_definitions(volk_gnsssdr_static
PUBLIC $<$<CONFIG:Release>:_FORTIFY_SOURCE=2>$<$<CONFIG:RelWithDebInfo>:_FORTIFY_SOURCE=2>
)
endif()
set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr)
install(TARGETS volk_gnsssdr_static

View File

@ -31,10 +31,10 @@ FifoSignalSource::FifoSignalSource(ConfigurationInterface const* configuration,
[[maybe_unused]] Concurrent_Queue<pmt::pmt_t>* queue)
: SignalSourceBase(configuration, role, "Fifo_Signal_Source"s),
item_size_(sizeof(gr_complex)), // currenty output item size is always gr_complex
fifo_reader_(FifoReader::make(configuration->property(role + ".filename"s, "../data/example_capture.dat"s),
configuration->property(role + ".sample_type"s, "ishort"s))),
fifo_reader_(FifoReader::make(configuration->property(role + ".filename", "../data/example_capture.dat"s),
configuration->property(role + ".sample_type", "ishort"s))),
dump_(configuration->property(role + ".dump", false)),
dump_filename_(configuration->property(role + ".dump_filename"s, "./data/signal_source.dat"s))
dump_filename_(configuration->property(role + ".dump_filename", "./data/signal_source.dat"s))
{
if (dump_)
{

View File

@ -27,9 +27,9 @@ ZmqSignalSource::ZmqSignalSource(const ConfigurationInterface* configuration,
unsigned int /* out_stream [[maybe_unused]] */,
Concurrent_Queue<pmt::pmt_t>* /* queue [[maybe_unused]] */)
: SignalSourceBase(configuration, role, "ZMQ_Signal_Source"s),
d_item_size(decode_item_type(configuration->property(role + ".item_type"s, "gr_complex"s), nullptr, true)),
d_dump_filename(configuration->property(role + ".dump_filename"s, "data/zmq_dump.dat"s)),
d_dump(configuration->property(role + ".dump"s, false))
d_item_size(decode_item_type(configuration->property(role + ".item_type", "gr_complex"s), nullptr, true)),
d_dump_filename(configuration->property(role + ".dump_filename", "data/zmq_dump.dat"s)),
d_dump(configuration->property(role + ".dump", false))
{
auto vlen = configuration->property(role + ".vlen"s, 1);
auto pass_tags = configuration->property(role + ".pass_tags"s, false);

View File

@ -20,6 +20,7 @@
#include "gnss_block_interface.h"
#include <gnuradio/sync_block.h>
#include <array>
#include <fstream> // std::ifstream
#include <string>

View File

@ -513,11 +513,11 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
{
d_dump_filename.append(std::to_string(d_channel));
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.exceptions(std::ofstream::failbit | std::ofstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
}
catch (const std::ifstream::failure &e)
catch (const std::ofstream::failure &e)
{
LOG(WARNING) << "channel " << d_channel << " Exception opening trk dump file " << e.what();
}
@ -872,7 +872,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
d_dump_file.write(reinterpret_cast<char *>(&prn_), sizeof(uint32_t));
}
catch (const std::ifstream::failure &e)
catch (const std::ofstream::failure &e)
{
LOG(WARNING) << "Exception writing trk dump file " << e.what();
}

View File

@ -616,7 +616,7 @@ void kf_tracking::msg_handler_telemetry_to_trk(const pmt::pmt_t &msg)
}
}
}
catch (const boost::bad_any_cast &e)
catch (const wht::bad_any_cast &e)
{
LOG(WARNING) << "msg_handler_telemetry_to_trk Bad any_cast: " << e.what();
}
@ -638,7 +638,7 @@ void kf_tracking::msg_handler_pvt_to_trk(const pmt::pmt_t &msg)
std::cout << "hash code not match\n";
}
}
catch (const boost::bad_any_cast &e)
catch (const wht::bad_any_cast &e)
{
LOG(WARNING) << "msg_handler_pvt_to_trk Bad any_cast: " << e.what();
}

View File

@ -681,6 +681,8 @@ void galileo_e6_has_msg_receiver::read_MT1_body(const std::string& message_body)
d_HAS_data.satellite_submask = std::vector<uint64_t>(d_HAS_data.Nsys_sub);
d_HAS_data.delta_clock_correction_clock_subset = std::vector<std::vector<int16_t>>(d_HAS_data.Nsys_sub, std::vector<int16_t>());
const std::string str_one("1");
const std::string str_zero("0");
for (uint8_t i = 0; i < d_HAS_data.Nsys_sub; i++)
{
d_HAS_data.gnss_id_clock_subset[i] = read_has_message_body_uint8(message.substr(0, HAS_MSG_ID_CLOCK_SUBSET_LENGTH));
@ -711,11 +713,11 @@ void galileo_e6_has_msg_receiver::read_MT1_body(const std::string& message_body)
{
if ((aux & mask_value) >= 1)
{
binary.insert(0, "1");
binary.insert(0, str_one);
}
else
{
binary.insert(0, "0");
binary.insert(0, str_zero);
}
aux <<= 1;
}

View File

@ -76,16 +76,20 @@ std::vector<int> Galileo_HAS_data::get_PRNs_in_submask(uint8_t nsys) const
uint64_t sat_submask = satellite_submask[nsys];
// convert into string
std::string sat_submask_str("");
sat_submask_str.reserve(number_sats_this_gnss_id);
uint64_t aux = 1;
const std::string one_str("1");
const std::string zero_str("0");
for (int k = 0; k < number_sats_this_gnss_id - 1; k++)
{
if ((aux & sat_submask) >= 1)
{
sat_submask_str.insert(0, "1");
sat_submask_str.insert(0, one_str);
}
else
{
sat_submask_str.insert(0, "0");
sat_submask_str.insert(0, zero_str);
}
aux <<= 1;
}

View File

@ -30,9 +30,9 @@ Gnss_Satellite::Gnss_Satellite(const std::string& system_, uint32_t PRN_)
void Gnss_Satellite::reset()
{
PRN = 0;
system = std::string("");
block = std::string("");
PRN = 0;
rf_link = 0;
}
@ -43,11 +43,11 @@ std::ostream& operator<<(std::ostream& out, const Gnss_Satellite& sat) // outpu
std::string tag2;
if (sat.get_system() == "Galileo")
{
tag = "E";
tag = std::string("E");
}
if (sat.get_PRN() < 10)
{
tag2 = "0";
tag2 = std::string("0");
}
out << sat.get_system() << " PRN " << tag << tag2 << sat.get_PRN() << " (Block " << sat.get_block() << ")";
return out;
@ -85,8 +85,8 @@ Gnss_Satellite& Gnss_Satellite::operator=(const Gnss_Satellite& rhs)
if (this != &rhs)
{
this->system = rhs.system;
this->PRN = rhs.PRN;
this->block = rhs.block;
this->PRN = rhs.PRN;
this->rf_link = rhs.rf_link;
}
return *this;
@ -106,8 +106,8 @@ Gnss_Satellite& Gnss_Satellite::operator=(Gnss_Satellite&& other) noexcept
if (this != &other)
{
this->system = other.get_system();
this->PRN = other.get_PRN();
this->block = other.get_block();
this->PRN = other.get_PRN();
this->rf_link = other.get_rf_link();
}
return *this;

View File

@ -250,6 +250,10 @@ if(ARMADILLO_VERSION_STRING VERSION_GREATER 8.400)
add_definitions(-DARMADILLO_HAVE_MVNRND=1)
endif()
if(ENABLE_PACKAGING)
add_definitions(-DEXCLUDE_TESTS_REQUIRING_BINARIES=1)
endif()
if(has_std_plus_void)
add_definitions(-DCOMPILER_HAS_STD_PLUS_VOID=1)
endif()
@ -362,10 +366,17 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
if(NOT Patch_EXECUTABLE)
message(FATAL_ERROR "The patch command is not found. It is required to build GNSSTk. Please check your OS documentation and install the patch command.")
endif()
set(GNSSTK_PATCH_COMMAND
cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_static13.patch
)
if(CMAKE_VERSION VERSION_GREATER 3.17.0)
set(GNSSTK_PATCH_COMMAND
cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_static14.patch
)
else()
set(GNSSTK_PATCH_COMMAND
cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_static13.patch
)
endif()
# Patch only once
if(EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt)
set(GNSSTK_PATCH_COMMAND "")
@ -397,26 +408,48 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
set(GNSSTK_PARALLEL_BUILD "-j${NUMBER_OF_PROCESSORS}")
endif()
endif()
ExternalProject_Add(gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/SGL-UT/gnsstk
GIT_TAG v${GNSSSDR_GNSSTK_LOCAL_VERSION}
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
PATCH_COMMAND ${GNSSTK_PATCH_COMMAND}
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG}
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install
-DBUILD_EXT=ON
-DBUILD_PYTHON=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_STANDARD=14
-DCMAKE_CXX_EXTENSIONS=ON
-DCMAKE_C_STANDARD=11
-DCMAKE_C_EXTENSIONS=ON
BUILD_COMMAND ${GNSSTK_BUILD_COMMAND} ${GNSSTK_PARALLEL_BUILD}
BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_STATIC_LIBRARY_SUFFIX}
UPDATE_COMMAND ""
)
if(CMAKE_VERSION VERSION_GREATER 3.17.0)
ExternalProject_Add(gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/SGL-UT/gnsstk
GIT_TAG v${GNSSSDR_GNSSTK_LOCAL_VERSION}
GIT_SUBMODULES_RECURSE OFF
GIT_SUBMODULES ""
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
PATCH_COMMAND ${GNSSTK_PATCH_COMMAND}
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG}
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install
-DBUILD_EXT=ON
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_EXTENSIONS=ON
-DCMAKE_C_STANDARD=11
-DCMAKE_C_EXTENSIONS=ON
BUILD_COMMAND ${GNSSTK_BUILD_COMMAND} ${GNSSTK_PARALLEL_BUILD}
BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_STATIC_LIBRARY_SUFFIX}
UPDATE_COMMAND ""
)
else()
ExternalProject_Add(gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/SGL-UT/gnsstk
GIT_TAG v${GNSSSDR_GNSSTK_LOCAL_VERSION}
SOURCE_DIR ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
BINARY_DIR ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}
PATCH_COMMAND ${GNSSTK_PATCH_COMMAND}
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG}
-DCMAKE_INSTALL_PREFIX=${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install
-DBUILD_EXT=ON
-DBUILD_PYTHON=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_CXX_STANDARD=14
-DCMAKE_CXX_EXTENSIONS=ON
-DCMAKE_C_STANDARD=11
-DCMAKE_C_EXTENSIONS=ON
BUILD_COMMAND ${GNSSTK_BUILD_COMMAND} ${GNSSTK_PARALLEL_BUILD}
BUILD_BYPRODUCTS ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_STATIC_LIBRARY_SUFFIX}
UPDATE_COMMAND ""
)
endif()
endif()
set(GNSSTK_INCLUDE_DIRS ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install/include CACHE PATH "Local GNSSTK headers")
set(GNSSTK_LIBRARY ${GNSSSDR_BINARY_DIR}/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gnsstk${CMAKE_STATIC_LIBRARY_SUFFIX})
@ -438,34 +471,74 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
endif()
endif()
if(NOT ENABLE_PACKAGING OR NOT ENABLE_UNIT_TESTING_MINIMAL)
message(STATUS "Downloading some data files for testing...")
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat)
message(STATUS "Downloading file: Galileo_E1_ID_1_Fs_4Msps_8ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Galileo_E1_ID_1_Fs_4Msps_8ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=d57a02d3c7361bba2e137329b66458ef
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat)
message(STATUS "Downloading file: GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=f12ada80a2ad1bab061262e010643529
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat)
message(STATUS "Downloading file: GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=b98d6d82885354f168f279817de284b5
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin)
message(STATUS "Downloading file: NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin
SHOW_PROGRESS
EXPECTED_HASH MD5=0e2dc212309141d236897bc0af187074
)
endif()
message(STATUS "Done.")
endif()
if(ENABLE_UNIT_TESTING_EXTRA)
add_definitions(-DEXTRA_TESTS)
message(STATUS "Downloading some data files for testing...")
message(STATUS "Downloading some extra data files for testing...")
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
message(STATUS "Downloading file: gps_l2c_m_prn7_5msps.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat)
message(STATUS "Downloading file: Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Glonass_L1_CA_SIM_Fs_62Msps_4ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=ffb72fc63c116be58d5e5ccb1daaed3a
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat)
message(STATUS "Downloading file: BdsB1IStr01_fs25e6_if0_4ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB1IStr01_fs25e6_if0_4ms.dat ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB1IStr01_fs25e6_if0_4ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB1IStr01_fs25e6_if0_4ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=5a4336dad9d80f3313a16dec4fff9233
)
endif()
if(NOT EXISTS ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat)
message(STATUS "Downloading file: BdsB3IStr01_fs50e6_if0_4ms.dat")
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB3IStr01_fs50e6_if0_4ms.dat ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/BdsB3IStr01_fs50e6_if0_4ms.dat
${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/BdsB3IStr01_fs50e6_if0_4ms.dat
SHOW_PROGRESS
EXPECTED_HASH MD5=066d0d8434a8bc81e161778b7c34cc07
)
@ -479,22 +552,20 @@ if(ENABLE_UNIT_TESTING_EXTRA)
endif()
endif()
if(ENABLE_INSTALL_TESTS)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
else()
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
add_definitions(-DTEST_PATH="${GNSSSDR_BINARY_DIR}/thirdparty/")
if(NOT ENABLE_PACKAGING)
if(ENABLE_INSTALL_TESTS)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
else()
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
add_definitions(-DTEST_PATH="${GNSSSDR_BINARY_DIR}/thirdparty/")
endif()
endif()
@ -779,7 +850,9 @@ if(ENABLE_SYSTEM_TESTING)
Gnuradio::analog algorithms_libs
core_receiver
)
add_system_test(ttff)
if(NOT ENABLE_PACKAGING)
add_system_test(ttff)
endif()
if(ENABLE_SYSTEM_TESTING_EXTRA)
#### POSITION_TEST

View File

@ -0,0 +1,30 @@
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
--- CMakeLists.txt 2022-12-19 11:40:38.000000000 +0100
+++ CMakeLists.txt 2022-12-19 11:56:49.000000000 +0100
@@ -21,6 +21,16 @@
# This sets up variables contining GNU standard installation locations.
include( GNUInstallDirs )
+if(POLICY CMP0063)
+ cmake_policy(SET CMP0063 NEW)
+ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+else()
+ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
+ add_definitions(-fvisibility=hidden)
+ endif()
+endif()
+
# Set a filename for collecting exported targets.
set( EXPORT_TARGETS_FILENAME "GNSSTKTargets" )
@@ -177,7 +187,7 @@
elseif( WIN32 )
add_library( gnsstk ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
else()
- add_library( gnsstk SHARED ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
+ add_library( gnsstk STATIC ${GNSSTK_SRC_FILES} ${GNSSTK_INC_FILES} )
endif()
# always generate the header because it's an include file whose

View File

@ -1,5 +0,0 @@
/*
* SPDX-FileCopyrightText: 2012-2019 (see AUTHORS file for a list of contributors)
*
* SPDX-License-Identifier: CC-BY-4.0
*/

View File

@ -1,5 +0,0 @@
/*
* SPDX-FileCopyrightText: 2012-2019 (see AUTHORS file for a list of contributors)
*
* SPDX-License-Identifier: CC-BY-4.0
*/

View File

@ -1,5 +0,0 @@
/*
* SPDX-FileCopyrightText: 2012-2019 (see AUTHORS file for a list of contributors)
*
* SPDX-License-Identifier: CC-BY-4.0
*/

View File

@ -1,5 +0,0 @@
/*
* SPDX-FileCopyrightText: 2012-2019 (see AUTHORS file for a list of contributors)
*
* SPDX-License-Identifier: CC-BY-4.0
*/

View File

@ -54,17 +54,11 @@ DECLARE_string(log_dir);
#include "unit-tests/arithmetic/magnitude_squared_test.cc"
#include "unit-tests/arithmetic/multiply_test.cc"
#include "unit-tests/arithmetic/preamble_correlator_test.cc"
#include "unit-tests/control-plane/control_thread_test.cc"
#include "unit-tests/control-plane/file_configuration_test.cc"
#include "unit-tests/control-plane/gnss_block_factory_test.cc"
#include "unit-tests/control-plane/gnss_flowgraph_test.cc"
#include "unit-tests/control-plane/in_memory_configuration_test.cc"
#include "unit-tests/control-plane/protobuf_test.cc"
#include "unit-tests/control-plane/string_converter_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc"
@ -73,22 +67,51 @@ DECLARE_string(log_dir);
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e6_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc"
#include "unit-tests/signal-processing-blocks/adapter/adapter_test.cc"
#include "unit-tests/signal-processing-blocks/adapter/pass_through_test.cc"
#include "unit-tests/signal-processing-blocks/libs/item_type_helpers_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rtcm_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/serdes_monitor_pvt_test.cc"
#include "unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc"
#include "unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc"
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
#include "unit-tests/signal-processing-blocks/telemetry_decoder/galileo_fnav_inav_decoder_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/discriminator_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc"
#include "unit-tests/system-parameters/galileo_e1b_reed_solomon_test.cc"
#include "unit-tests/system-parameters/galileo_e6b_reed_solomon_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_crc_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_ephemeris_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_nav_message_test.cc"
#include "unit-tests/system-parameters/has_decoding_test.cc"
#ifndef EXCLUDE_TESTS_REQUIRING_BINARIES
#include "unit-tests/control-plane/control_thread_test.cc"
#include "unit-tests/control-plane/file_configuration_test.cc"
#include "unit-tests/control-plane/gnss_block_factory_test.cc"
#include "unit-tests/control-plane/gnss_flowgraph_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/filter/fir_filter_test.cc"
#include "unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc"
#include "unit-tests/signal-processing-blocks/filter/notch_filter_test.cc"
#include "unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc"
#include "unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc"
#include "unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc"
#include "unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc"
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
// #include "unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/libs/item_type_helpers_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc"
#endif
#if OPENCL_BLOCKS_TEST
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
@ -99,16 +122,6 @@ DECLARE_string(log_dir);
#include "unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc"
// #include "unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc"
#endif
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/discriminator_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/galileo_e5b_dll_pll_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc"
#if CUDA_BLOCKS_TEST
#include "unit-tests/signal-processing-blocks/tracking/gpu_multicorrelator_test.cc"
@ -120,29 +133,18 @@ DECLARE_string(log_dir);
#include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc"
#endif
#include "unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/rtcm_test.cc"
#include "unit-tests/signal-processing-blocks/pvt/serdes_monitor_pvt_test.cc"
#include "unit-tests/signal-processing-blocks/telemetry_decoder/galileo_fnav_inav_decoder_test.cc"
#include "unit-tests/system-parameters/galileo_e1b_reed_solomon_test.cc"
#include "unit-tests/system-parameters/galileo_e6b_reed_solomon_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_crc_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_ephemeris_test.cc"
#include "unit-tests/system-parameters/glonass_gnav_nav_message_test.cc"
#include "unit-tests/system-parameters/has_decoding_test.cc"
#if EXTRA_TESTS
#include "unit-tests/signal-processing-blocks/acquisition/acq_performance_test.cc"
// #include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
// #include "unit-tests/signal-processing-blocks/acquisition/beidou_b3i_pcps_acquisition_test.cc"
#ifndef EXCLUDE_TESTS_REQUIRING_BINARIES
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc"
#endif
// #include "unit-tests/signal-processing-blocks/pvt/rtklib_solver_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_gaussian_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc"
#include "unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc"
#if FPGA_BLOCKS_TEST
#include "unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test_fpga.cc"

View File

@ -20,6 +20,7 @@
#include "fir_filter.h"
#include "galileo_e1_pcps_8ms_ambiguous_acquisition.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -21,6 +21,7 @@
#include "fir_filter.h"
#include "galileo_e1_pcps_ambiguous_acquisition.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -21,6 +21,7 @@
#include "fir_filter.h"
#include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -20,6 +20,7 @@
#include "fir_filter.h"
#include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -21,6 +21,7 @@
#include "fir_filter.h"
#include "galileo_e1_pcps_tong_ambiguous_acquisition.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -19,6 +19,7 @@
#include "fir_filter.h"
#include "galileo_e5a_noncoherent_iq_acquisition_caf.h"
#include "gen_signal_source.h"
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "gnss_synchro.h"

View File

@ -30,7 +30,7 @@
#include "gnss_block_factory.h"
#include "gnss_block_interface.h"
#include "gnss_satellite.h"
#include "gnss_sdr_sample_counter.h"
#include "gnss_sdr_fpga_sample_counter.h"
#include "gnss_synchro.h"
#include "gnuplot_i.h"
#include "gps_l1_ca_dll_pll_tracking_fpga.h"