mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-09 20:26:46 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into pps_lime
This commit is contained in:
commit
933d3b3228
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install dependencies
|
||||
run: brew install ninja pkg-config hdf5 libtool automake armadillo lapack gflags glog gnuradio log4cpp pugixml protobuf && pip3 install mako
|
||||
run: brew update && brew install ninja pkg-config hdf5 libtool automake armadillo lapack gflags glog gnuradio log4cpp pugixml protobuf && pip3 install mako
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
@ -54,7 +54,7 @@ jobs:
|
||||
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/11.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/11.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako
|
||||
run: brew update && 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/11.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/11.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako
|
||||
- name: Prepare run
|
||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
||||
- name: run clang-tidy
|
||||
|
@ -332,7 +332,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "8.0.0")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.19")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.11.4")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.15.2")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.15.5")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.5.2")
|
||||
set(GNSSSDR_MATHJAX_EXTERNAL_VERSION "2.7.7")
|
||||
|
||||
|
@ -395,9 +395,9 @@ $ sudo apt-get install autoconf automake libtool curl make g++ unzip
|
||||
and then:
|
||||
|
||||
```
|
||||
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-cpp-3.13.0.tar.gz
|
||||
$ tar xvfz protobuf-cpp-3.13.0.tar.gz
|
||||
$ cd protobuf-3.13.0
|
||||
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.5/protobuf-cpp-3.15.5.tar.gz
|
||||
$ tar xvfz protobuf-cpp-3.15.5.tar.gz
|
||||
$ cd protobuf-3.15.5
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
|
@ -20,10 +20,6 @@ SignalSource.freq=1575420000
|
||||
SignalSource.switch_position=2
|
||||
SignalSource.gain_mode_rx1=slow_attack
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Pass_Through
|
||||
SignalConditioner.enable_FPGA=true
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels.in_acquisition=1
|
||||
Channels_1C.count=12
|
||||
|
@ -60,6 +60,8 @@ SPDX-FileCopyrightText: 2011-2021 Carles Fernandez-Prades <carles.fernandez@cttc
|
||||
make the receiver unusable when running on non-FPGA-enabled platforms. On
|
||||
FPGA-enabled platforms, now it is possible to run non-FPGA-enabled
|
||||
configurations.
|
||||
- Fix bug that made the Monitor block to always set to 0 the
|
||||
`carrier_phase_rads` parameter value.
|
||||
|
||||
|
||||
|
||||
|
@ -129,6 +129,7 @@ typedef enum
|
||||
AMD_BULLDOZER, // K15
|
||||
AMD_JAGUAR, // K16
|
||||
AMD_ZEN, // K17
|
||||
AMD_ZEN3, // K19
|
||||
} X86Microarchitecture;
|
||||
|
||||
// Returns the underlying microarchitecture by looking at X86Info's vendor,
|
||||
|
@ -1581,6 +1581,8 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info)
|
||||
return AMD_JAGUAR;
|
||||
case 0x17:
|
||||
return AMD_ZEN;
|
||||
case 0x19:
|
||||
return AMD_ZEN3;
|
||||
default:
|
||||
return X86_UNKNOWN;
|
||||
}
|
||||
@ -1679,6 +1681,8 @@ const char* GetX86MicroarchitectureName(X86Microarchitecture uarch)
|
||||
return "AMD_JAGUAR";
|
||||
case AMD_ZEN:
|
||||
return "AMD_ZEN";
|
||||
case AMD_ZEN3:
|
||||
return "AMD_ZEN3";
|
||||
}
|
||||
return "unknown microarchitecture";
|
||||
}
|
||||
|
@ -194,8 +194,7 @@ if(ENABLE_UHD)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PUBLIC
|
||||
Gnuradio::uhd
|
||||
PRIVATE
|
||||
Uhd::uhd
|
||||
Uhd::uhd # for uhd/config.hpp in gnuradio/uhd/usrp_source.h
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -140,7 +140,7 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
filename1 = configuration->property(role + ".filename1", empty_string);
|
||||
}
|
||||
|
||||
samples_ = configuration->property(role + ".samples", static_cast<uint64_t>(0));
|
||||
samples_ = configuration->property(role + ".samples", static_cast<int64_t>(0));
|
||||
|
||||
const double seconds_to_skip = configuration->property(role + ".seconds_to_skip", default_seconds_to_skip);
|
||||
const size_t header_size = configuration->property(role + ".header_size", 0);
|
||||
@ -148,9 +148,10 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
item_size_ = sizeof(int8_t);
|
||||
repeat_ = configuration->property(role + ".repeat", false);
|
||||
|
||||
samples_to_skip_ = 0;
|
||||
if (seconds_to_skip > 0)
|
||||
{
|
||||
samples_to_skip_ = static_cast<int64_t>(seconds_to_skip * sample_rate_) * 2;
|
||||
samples_to_skip_ = static_cast<uint64_t>(seconds_to_skip * sample_rate_) * 2;
|
||||
}
|
||||
if (header_size > 0)
|
||||
{
|
||||
@ -212,8 +213,8 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
const int64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const int64_t bytes_to_process = static_cast<int64_t>(size) - bytes_to_skip;
|
||||
const uint64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const uint64_t bytes_to_process = static_cast<uint64_t>(size) - bytes_to_skip;
|
||||
samples_ = floor(static_cast<double>(bytes_to_process) / static_cast<double>(item_size_) - ceil(0.002 * static_cast<double>(sample_rate_))); // process all the samples available in the file excluding at least the last 1 ms
|
||||
}
|
||||
|
||||
@ -238,11 +239,11 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
std::cout << "Processing file " << filename1 << ", which contains " << static_cast<double>(size) << " [bytes]\n";
|
||||
std::cout.precision(ss);
|
||||
|
||||
uint64_t samples_rx2 = 0;
|
||||
int64_t samples_rx2 = 0;
|
||||
if (size > 0)
|
||||
{
|
||||
const int64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const int64_t bytes_to_process = static_cast<int64_t>(size) - bytes_to_skip;
|
||||
const uint64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const uint64_t bytes_to_process = static_cast<uint64_t>(size) - bytes_to_skip;
|
||||
samples_rx2 = floor(static_cast<double>(bytes_to_process) / static_cast<double>(item_size_) - ceil(0.002 * static_cast<double>(sample_rate_))); // process all the samples available in the file excluding at least the last 1 ms
|
||||
}
|
||||
samples_ = std::min(samples_, samples_rx2);
|
||||
@ -442,7 +443,8 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
enable_dynamic_bit_selection_ = configuration->property(role + ".enable_dynamic_bit_selection", true);
|
||||
if (enable_dynamic_bit_selection_)
|
||||
{
|
||||
std::string device_io_name_dyn_bit_sel_0, device_io_name_dyn_bit_sel_1;
|
||||
std::string device_io_name_dyn_bit_sel_0;
|
||||
std::string device_io_name_dyn_bit_sel_1;
|
||||
|
||||
// find the uio device file corresponding to the dynamic bit selector 0 module.
|
||||
if (find_uio_dev_file_name(device_io_name_dyn_bit_sel_0, dyn_bit_sel_device_name, 0) < 0)
|
||||
@ -545,7 +547,7 @@ void Ad9361FpgaSignalSource::start()
|
||||
}
|
||||
|
||||
|
||||
void Ad9361FpgaSignalSource::run_DMA_process(const std::string &filename0, const std::string &filename1, uint64_t &samples_to_skip, size_t &item_size, uint64_t &samples, bool &repeat, uint32_t &dma_buff_offset_pos, Concurrent_Queue<pmt::pmt_t> *queue)
|
||||
void Ad9361FpgaSignalSource::run_DMA_process(const std::string &filename0, const std::string &filename1, uint64_t &samples_to_skip, size_t &item_size, int64_t &samples, bool &repeat, uint32_t &dma_buff_offset_pos, Concurrent_Queue<pmt::pmt_t> *queue)
|
||||
{
|
||||
std::ifstream infile1;
|
||||
infile1.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
|
@ -75,11 +75,11 @@ private:
|
||||
// sample block size when running in post-processing mode
|
||||
const int sample_block_size = 16384;
|
||||
|
||||
void run_DMA_process(const std::string &Filename1,
|
||||
const std::string &Filename2,
|
||||
void run_DMA_process(const std::string &filename0,
|
||||
const std::string &filename1,
|
||||
uint64_t &samples_to_skip,
|
||||
size_t &item_size,
|
||||
uint64_t &samples,
|
||||
int64_t &samples,
|
||||
bool &repeat,
|
||||
uint32_t &dma_buff_offset_pos,
|
||||
Concurrent_Queue<pmt::pmt_t> *queue);
|
||||
@ -143,7 +143,7 @@ private:
|
||||
bool rf_shutdown_;
|
||||
|
||||
// post-processing mode
|
||||
uint64_t samples_;
|
||||
int64_t samples_;
|
||||
uint64_t samples_to_skip_;
|
||||
bool repeat_;
|
||||
uint32_t num_freq_bands_;
|
||||
|
@ -500,7 +500,7 @@ void FileSourceBase::create_sink_hook() {}
|
||||
|
||||
|
||||
// Subclass hooks for connection/disconnectino
|
||||
void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::post_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::pre_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::post_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::post_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::pre_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::post_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
|
@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "rtl_tcp_dongle_info.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -115,7 +114,7 @@ double Rtl_Tcp_Dongle_Info::clip_gain(int gain) const
|
||||
}
|
||||
|
||||
double last_stop = gains.front();
|
||||
BOOST_FOREACH (double g, gains)
|
||||
for (auto g : gains)
|
||||
{
|
||||
g /= 10.0;
|
||||
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
obs->set_prompt_q(gs.Prompt_Q);
|
||||
obs->set_cn0_db_hz(gs.CN0_dB_hz);
|
||||
obs->set_carrier_doppler_hz(gs.Carrier_Doppler_hz);
|
||||
obs->set_carrier_phase_rads(gs.Carrier_phase_rads);
|
||||
obs->set_code_phase_samples(gs.Code_phase_samples);
|
||||
obs->set_tracking_sample_counter(gs.Tracking_sample_counter);
|
||||
obs->set_flag_valid_symbol_output(gs.Flag_valid_symbol_output);
|
||||
@ -143,6 +144,8 @@ public:
|
||||
gs.Prompt_Q = gs_read.prompt_q();
|
||||
gs.CN0_dB_hz = gs_read.cn0_db_hz();
|
||||
gs.Carrier_Doppler_hz = gs_read.carrier_doppler_hz();
|
||||
gs.Carrier_phase_rads = gs_read.carrier_phase_rads();
|
||||
gs.Code_phase_samples = gs_read.code_phase_samples();
|
||||
gs.Tracking_sample_counter = gs_read.tracking_sample_counter();
|
||||
gs.Flag_valid_symbol_output = gs_read.flag_valid_symbol_output();
|
||||
gs.correlation_length_ms = gs_read.correlation_length_ms();
|
||||
|
@ -112,6 +112,7 @@
|
||||
#include "two_bit_packed_file_signal_source.h"
|
||||
#include <glog/logging.h>
|
||||
#include <exception> // for exception
|
||||
#include <iostream> // for cerr
|
||||
#include <utility> // for move
|
||||
|
||||
#if RAW_UDP
|
||||
@ -188,7 +189,7 @@ std::unique_ptr<To> dynamic_unique_cast(std::unique_ptr<From>&& p)
|
||||
if (To* cast = dynamic_cast<To*>(p.get()))
|
||||
{
|
||||
result.reset(cast);
|
||||
p.release();
|
||||
p.release(); // NOLINT(bugprone-unused-return-value)
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -284,6 +285,12 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
|
||||
return conditioner_;
|
||||
}
|
||||
|
||||
if (signal_conditioner != "Signal_Conditioner")
|
||||
{
|
||||
std::cerr << "Error in configuration file: SignalConditioner.implementation=" << signal_conditioner << " is not a valid value.\n";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// single-antenna version
|
||||
std::unique_ptr<GNSSBlockInterface> conditioner_ = std::make_unique<SignalConditioner>(
|
||||
GetBlock(configuration, role_datatypeadapter, 1, 1),
|
||||
@ -299,9 +306,10 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(const Confi
|
||||
const std::string empty_implementation;
|
||||
std::string implementation = configuration->property("Observables.implementation", empty_implementation);
|
||||
LOG(INFO) << "Getting Observables with implementation " << implementation;
|
||||
if (implementation != "Hybrid_Observables")
|
||||
if (implementation.find("_Observables") == std::string::npos)
|
||||
{
|
||||
LOG(WARNING) << "Error in configuration file: please set Observables.implementation=Hybrid_Observables";
|
||||
std::cerr << "Error in configuration file: please set Observables.implementation=Hybrid_Observables\n";
|
||||
return nullptr;
|
||||
}
|
||||
unsigned int Galileo_channels = configuration->property("Channels_1B.count", 0);
|
||||
Galileo_channels += configuration->property("Channels_5X.count", 0);
|
||||
@ -333,9 +341,10 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetPVT(const Configuration
|
||||
const std::string empty_implementation;
|
||||
std::string implementation = configuration->property("PVT.implementation", empty_implementation);
|
||||
LOG(INFO) << "Getting PVT with implementation " << implementation;
|
||||
if (implementation != "RTKLIB_PVT")
|
||||
if (implementation.find("_PVT") == std::string::npos)
|
||||
{
|
||||
LOG(WARNING) << "Error in configuration file: please set PVT.implementation=RTKLIB_PVT";
|
||||
std::cerr << "Error in configuration file: please set PVT.implementation=RTKLIB_PVT\n";
|
||||
return nullptr;
|
||||
}
|
||||
unsigned int Galileo_channels = configuration->property("Channels_1B.count", 0);
|
||||
Galileo_channels += configuration->property("Channels_5X.count", 0);
|
||||
@ -389,7 +398,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel(
|
||||
std::string trk_item_type = configuration->property("Tracking_" + signal + appendix2 + item_prop, default_item_type);
|
||||
if (acq_item_type != trk_item_type)
|
||||
{
|
||||
LOG(ERROR) << "Acquisition and Tracking blocks must have the same input data type!";
|
||||
std::cerr << "Configuration error: Acquisition and Tracking blocks must have the same input data type!\n";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -411,7 +420,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel(
|
||||
}
|
||||
if (trk_->item_size() == 0)
|
||||
{
|
||||
LOG(ERROR) << trk_->role() << item_prop << "=" << acq_item_type << " is not defined for implementation " << trk_->implementation();
|
||||
std::cerr << "Configuration error: " << trk_->role() << item_prop << "=" << acq_item_type << " is not defined for implementation " << trk_->implementation() << '\n';
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -1271,13 +1280,14 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
|
||||
else
|
||||
{
|
||||
// Consider making this a fatal error, terminating the program. Unfortunately, existing unit tests expect otherwise
|
||||
LOG(ERROR) << role << "." << implementation << ": Undefined implementation for block";
|
||||
std::cerr << "Configuration error in " << role << " block: implementation " + implementation + " is not available.\n"s;
|
||||
block = nullptr;
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended.\n";
|
||||
std::cout << "Configuration error. GNSS-SDR program ended.\n";
|
||||
LOG(INFO) << "Exception raised while instantiating a block: " << e.what();
|
||||
exit(1);
|
||||
}
|
||||
return block;
|
||||
@ -1471,7 +1481,8 @@ std::unique_ptr<AcquisitionInterface> GNSSBlockFactory::GetAcqBlock(
|
||||
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << role << " block: Undefined implementation " << implementation;
|
||||
std::cerr << "Configuration error in " << role << " block: implementation " << (implementation == "Wrong"s ? "not defined."s : implementation + " not available."s) << '\n';
|
||||
block = nullptr;
|
||||
}
|
||||
return block;
|
||||
}
|
||||
@ -1631,7 +1642,8 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
|
||||
#endif
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << role << " block: Undefined implementation " << implementation;
|
||||
std::cerr << "Configuration error in " << role << " block: implementation " << (implementation == "Wrong"s ? "not defined."s : implementation + " not available."s) << '\n';
|
||||
block = nullptr;
|
||||
}
|
||||
return block;
|
||||
}
|
||||
@ -1722,7 +1734,8 @@ std::unique_ptr<TelemetryDecoderInterface> GNSSBlockFactory::GetTlmBlock(
|
||||
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << role << " block: Undefined implementation " << implementation;
|
||||
std::cerr << "Configuration error in " << role << " block: implementation " << (implementation == "Wrong"s ? "not defined."s : implementation + " not available."s) << '\n';
|
||||
block = nullptr;
|
||||
}
|
||||
|
||||
return block;
|
||||
|
@ -106,13 +106,13 @@ void GNSSFlowgraph::init()
|
||||
|
||||
for (int i = 0; i < sources_count_; i++)
|
||||
{
|
||||
std::cout << "Creating source " << i << '\n';
|
||||
DLOG(INFO) << "Creating source " << i;
|
||||
sig_source_.push_back(block_factory->GetSignalSource(configuration_.get(), queue_.get(), i));
|
||||
if (enable_fpga_offloading_ == false)
|
||||
{
|
||||
auto& src = sig_source_.back();
|
||||
auto RF_Channels = src->getRfChannels();
|
||||
std::cout << "RF Channels " << RF_Channels << '\n';
|
||||
std::cout << "RF Channels: " << RF_Channels << '\n';
|
||||
for (auto j = 0U; j < RF_Channels; ++j)
|
||||
{
|
||||
sig_conditioner_.push_back(block_factory->GetSignalConditioner(configuration_.get(), signal_conditioner_ID));
|
||||
@ -527,7 +527,8 @@ int GNSSFlowgraph::connect_fpga_flowgraph()
|
||||
{
|
||||
if (src == nullptr)
|
||||
{
|
||||
help_hint_ += " * Undefined SignalSource.implementation in the configuration file.\n";
|
||||
help_hint_ += " * Check implementation name for SignalSource block.\n";
|
||||
help_hint_ += " Signal Source block implementation for FPGA off-loading should be Ad9361_Fpga_Signal_Source\n";
|
||||
return 1;
|
||||
}
|
||||
if (src->item_size() == 0)
|
||||
@ -559,17 +560,9 @@ int GNSSFlowgraph::connect_fpga_flowgraph()
|
||||
DLOG(INFO) << "Blocks connected internally to the top_block";
|
||||
|
||||
// Connect the counter
|
||||
if (sig_source_.at(0) != nullptr)
|
||||
|
||||
if (connect_fpga_sample_counter() != 0)
|
||||
{
|
||||
if (connect_fpga_sample_counter() != 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
help_hint_ += " * Check implementation name for SignalSource block\n";
|
||||
help_hint_ += " Signal Source block implementation for FPGA off-loading should be 'Ad9361_Fpga_Signal_Source'\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -695,6 +688,12 @@ int GNSSFlowgraph::connect_signal_conditioners()
|
||||
{
|
||||
for (auto& sig : sig_conditioner_)
|
||||
{
|
||||
if (sig == nullptr)
|
||||
{
|
||||
help_hint_ += " * The Signal_Conditioner implementation set in the configuration file does not exist.\n";
|
||||
help_hint_ += " Check the Signal Conditioner documentation at https://gnss-sdr.org/docs/sp-blocks/signal-conditioner/\n";
|
||||
return error;
|
||||
}
|
||||
sig->connect(top_block_);
|
||||
}
|
||||
DLOG(INFO) << "Signal Conditioner blocks successfully connected to the top_block";
|
||||
|
@ -338,7 +338,7 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
d_HAS_data.delta_clock_c0_multiplier_clock_subset[i] = read_has_message_body_uint8(message.substr(0, HAS_MSG_DELTA_CLOCK_MULTIPLIER_SUBSET_LENGTH));
|
||||
message = std::string(message.begin() + HAS_MSG_DELTA_CLOCK_MULTIPLIER_SUBSET_LENGTH, message.end());
|
||||
}
|
||||
int number_sats_this_gnss_id = 0;
|
||||
uint64_t number_sats_this_gnss_id = 0;
|
||||
for (uint8_t j = 0; j < d_HAS_data.Nsys; j++)
|
||||
{
|
||||
if (d_HAS_data.gnss_id_mask[j] == d_HAS_data.gnss_id_clock_subset[i])
|
||||
@ -354,7 +354,7 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
}
|
||||
|
||||
d_HAS_data.satellite_submask[i].reserve(number_sats_this_gnss_id);
|
||||
for (int j = 0; j < number_sats_this_gnss_id; j++)
|
||||
for (uint64_t j = 0; j < number_sats_this_gnss_id; j++)
|
||||
{
|
||||
d_HAS_data.satellite_submask[i][j] = read_has_message_body_uint64(message.substr(0, 1));
|
||||
message = std::string(message.begin() + 1, message.end());
|
||||
@ -371,12 +371,12 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
// read code bias
|
||||
d_HAS_data.validity_interval_index_code_bias_corrections = read_has_message_body_uint8(message.substr(0, HAS_MSG_VALIDITY_INDEX_LENGTH));
|
||||
message = std::string(message.begin() + HAS_MSG_VALIDITY_INDEX_LENGTH, message.end());
|
||||
std::vector<int> number_sats(d_HAS_data.Nsys, 0);
|
||||
std::vector<int> number_codes(d_HAS_data.Nsys, 0);
|
||||
std::vector<uint64_t> number_sats(d_HAS_data.Nsys, 0);
|
||||
std::vector<uint64_t> number_codes(d_HAS_data.Nsys, 0);
|
||||
for (int sys = 0; sys < d_HAS_data.Nsys; sys++)
|
||||
{
|
||||
int number_sats_this_gnss_id = 0;
|
||||
int number_signals_this_gnss_id = 0;
|
||||
uint64_t number_sats_this_gnss_id = 0;
|
||||
uint64_t number_signals_this_gnss_id = 0;
|
||||
if (d_HAS_data.cell_mask_availability_flag[sys] == true)
|
||||
{
|
||||
uint64_t n = d_HAS_data.satellite_mask[sys];
|
||||
@ -400,14 +400,14 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
number_sats[sys] = number_sats_this_gnss_id;
|
||||
number_codes[sys] = number_signals_this_gnss_id;
|
||||
}
|
||||
int Nsat_b = std::accumulate(number_sats.begin(), number_sats.end(), 0);
|
||||
uint64_t Nsat_b = std::accumulate(number_sats.begin(), number_sats.end(), 0ULL);
|
||||
|
||||
d_HAS_data.code_bias.reserve(Nsat_b);
|
||||
int sat = 0;
|
||||
for (int sys = 0; sys < d_HAS_data.Nsys; sys++)
|
||||
{
|
||||
d_HAS_data.code_bias[sat].reserve(number_codes[sys]);
|
||||
for (int c = 0; c < number_codes[sys]; c++)
|
||||
for (uint64_t c = 0; c < number_codes[sys]; c++)
|
||||
{
|
||||
d_HAS_data.code_bias[sat][c] = read_has_message_body_int16(message.substr(0, HAS_MSG_CODE_BIAS_LENGTH));
|
||||
message = std::string(message.begin() + HAS_MSG_CODE_BIAS_LENGTH, message.end());
|
||||
@ -421,12 +421,12 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
d_HAS_data.validity_interval_index_phase_bias_corrections = read_has_message_body_uint8(message.substr(0, HAS_MSG_VALIDITY_INDEX_LENGTH));
|
||||
message = std::string(message.begin() + HAS_MSG_VALIDITY_INDEX_LENGTH, message.end());
|
||||
|
||||
std::vector<int> number_sats(d_HAS_data.Nsys, 0);
|
||||
std::vector<int> number_phases(d_HAS_data.Nsys, 0);
|
||||
std::vector<uint64_t> number_sats(d_HAS_data.Nsys, 0);
|
||||
std::vector<uint64_t> number_phases(d_HAS_data.Nsys, 0);
|
||||
for (int sys = 0; sys < d_HAS_data.Nsys; sys++)
|
||||
{
|
||||
int number_sats_this_gnss_id = 0;
|
||||
int number_signals_this_gnss_id = 0;
|
||||
uint64_t number_sats_this_gnss_id = 0;
|
||||
uint64_t number_signals_this_gnss_id = 0;
|
||||
if (d_HAS_data.cell_mask_availability_flag[sys] == true)
|
||||
{
|
||||
uint64_t n = d_HAS_data.satellite_mask[sys];
|
||||
@ -450,7 +450,7 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
number_sats[sys] = number_sats_this_gnss_id;
|
||||
number_phases[sys] = number_signals_this_gnss_id;
|
||||
}
|
||||
int Nsat_p = std::accumulate(number_sats.begin(), number_sats.end(), 0);
|
||||
uint64_t Nsat_p = std::accumulate(number_sats.begin(), number_sats.end(), 0ULL);
|
||||
|
||||
d_HAS_data.phase_bias.reserve(Nsat_p);
|
||||
d_HAS_data.phase_discontinuity_indicator.reserve(Nsat_p);
|
||||
@ -459,7 +459,7 @@ void Galileo_Cnav_Message::read_MT1_body(const std::string& message_string)
|
||||
{
|
||||
d_HAS_data.phase_bias[sat].reserve(number_phases[sys]);
|
||||
d_HAS_data.phase_discontinuity_indicator[sat].reserve(number_phases[sys]);
|
||||
for (int p = 0; p < number_phases[sys]; p++)
|
||||
for (uint64_t p = 0; p < number_phases[sys]; p++)
|
||||
{
|
||||
d_HAS_data.phase_bias[sat][p] = read_has_message_body_int16(message.substr(0, HAS_MSG_PHASE_BIAS_LENGTH));
|
||||
message = std::string(message.begin() + HAS_MSG_PHASE_BIAS_LENGTH, message.end());
|
||||
|
@ -311,7 +311,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
case 7:
|
||||
block_ = std::string("IIR-M"); // Plane A
|
||||
break;
|
||||
case 8:
|
||||
case 8: // NOLINT(bugprone-branch-clone)
|
||||
block_ = std::string("IIF"); // Plane C
|
||||
break;
|
||||
case 9:
|
||||
@ -344,7 +344,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
case 18:
|
||||
block_ = std::string("III"); // Plane D
|
||||
break;
|
||||
case 19:
|
||||
case 19: // NOLINT(bugprone-branch-clone)
|
||||
block_ = std::string("IIR"); // Plane D
|
||||
break;
|
||||
case 20:
|
||||
@ -359,7 +359,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
case 23:
|
||||
block_ = std::string("III"); // Plane E
|
||||
break;
|
||||
case 24:
|
||||
case 24: // NOLINT(bugprone-branch-clone)
|
||||
block_ = std::string("IIF"); // Plane A
|
||||
break;
|
||||
case 25:
|
||||
@ -507,7 +507,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
case 123:
|
||||
block_ = std::string("EGNOS"); // EGNOS Operational Platform. Astra 5B
|
||||
break;
|
||||
case 131:
|
||||
case 131: // NOLINT(bugprone-branch-clone)
|
||||
block_ = std::string("WAAS"); // WAAS Eutelsat 117 West B
|
||||
break;
|
||||
case 135:
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "observables_interface.h"
|
||||
#include "pvt_interface.h"
|
||||
#include "signal_source_interface.h"
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <gtest/gtest.h>
|
||||
#include <pmt/pmt.h>
|
||||
@ -55,7 +54,20 @@ TEST(GNSSBlockFactoryTest, InstantiateFileSignalSource)
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongSignalSource)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("SignalSource.implementation", "Pepito");
|
||||
configuration->set_property("SignalSource.implementation", "Parapsychological_Source");
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
// Example of a factory as a unique_ptr
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
// Example of a block as a unique_ptr
|
||||
auto signal_source = factory->GetSignalSource(configuration.get(), queue.get());
|
||||
EXPECT_EQ(nullptr, signal_source);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongSignalSource2)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("SignalSource.implementation", "Pass_Through");
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
// Example of a factory as a unique_ptr
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
@ -76,6 +88,26 @@ TEST(GNSSBlockFactoryTest, InstantiateSignalConditioner)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongSignalConditioner)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("SignalConditioner.implementation", "Signal_Ruinder");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> signal_conditioner = factory->GetSignalConditioner(configuration.get());
|
||||
EXPECT_EQ(nullptr, signal_conditioner);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongSignalConditioner2)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("SignalConditioner.implementation", "Fir_Filter");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> signal_conditioner = factory->GetSignalConditioner(configuration.get());
|
||||
EXPECT_EQ(nullptr, signal_conditioner);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateFIRFilter)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
@ -138,6 +170,7 @@ TEST(GNSSBlockFactoryTest, InstantiateFreqXlatingFIRFilter)
|
||||
|
||||
configuration->set_property("InputFilter.sampling_frequency", "4000000");
|
||||
configuration->set_property("InputFilter.IF", "34000");
|
||||
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> input_filter = factory->GetBlock(configuration.get(), "InputFilter", 1, 1);
|
||||
|
||||
@ -151,10 +184,8 @@ TEST(GNSSBlockFactoryTest, InstantiatePulseBlankingFilter)
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
configuration->set_property("InputFilter.implementation", "Pulse_Blanking_Filter");
|
||||
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> input_filter = factory->GetBlock(configuration.get(), "InputFilter", 1, 1);
|
||||
|
||||
EXPECT_STREQ("InputFilter", input_filter->role().c_str());
|
||||
EXPECT_STREQ("Pulse_Blanking_Filter", input_filter->implementation().c_str());
|
||||
}
|
||||
@ -165,10 +196,8 @@ TEST(GNSSBlockFactoryTest, InstantiateNotchFilter)
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
configuration->set_property("InputFilter.implementation", "Notch_Filter");
|
||||
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> input_filter = factory->GetBlock(configuration.get(), "InputFilter", 1, 1);
|
||||
|
||||
EXPECT_STREQ("InputFilter", input_filter->role().c_str());
|
||||
EXPECT_STREQ("Notch_Filter", input_filter->implementation().c_str());
|
||||
}
|
||||
@ -179,15 +208,24 @@ TEST(GNSSBlockFactoryTest, InstantiateNotchFilterLite)
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
configuration->set_property("InputFilter.implementation", "Notch_Filter_Lite");
|
||||
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> input_filter = factory->GetBlock(configuration.get(), "InputFilter", 1, 1);
|
||||
|
||||
EXPECT_STREQ("InputFilter", input_filter->role().c_str());
|
||||
EXPECT_STREQ("Notch_Filter_Lite", input_filter->implementation().c_str());
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongFilter)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
configuration->set_property("InputFilter.implementation", "Pollen_Filter");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> input_filter = factory->GetBlock(configuration.get(), "InputFilter", 1, 1);
|
||||
EXPECT_EQ(nullptr, input_filter);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateDirectResampler)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
@ -199,6 +237,16 @@ TEST(GNSSBlockFactoryTest, InstantiateDirectResampler)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongResampler)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Resampler.implementation", "RaNdOm_Resampler");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<GNSSBlockInterface> resampler = factory->GetBlock(configuration.get(), "Resampler", 1, 1);
|
||||
EXPECT_EQ(nullptr, resampler);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateGpsL1CaPcpsAcquisition)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
@ -247,6 +295,16 @@ TEST(GNSSBlockFactoryTest, InstantiateGalileoE1PcpsAmbiguousAcquisition)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongAcquisition)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Alchemy");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(configuration.get(), "Acquisition", 1, 0);
|
||||
EXPECT_EQ(nullptr, acq_);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateGpsL1CaDllPllTracking)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
@ -283,6 +341,16 @@ TEST(GNSSBlockFactoryTest, InstantiateGalileoE1DllPllVemlTracking)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongTracking)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Tracking.implementation", "The perfect tracking");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> trk_ = factory->GetBlock(configuration.get(), "Tracking", 1, 1);
|
||||
EXPECT_EQ(nullptr, trk_);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateGpsL1CaTelemetryDecoder)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
@ -294,17 +362,35 @@ TEST(GNSSBlockFactoryTest, InstantiateGpsL1CaTelemetryDecoder)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongTelemetryDecoder)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("TelemetryDecoder.implementation", "GPS_Xenomorphic_Telemetry_Decoder");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> telemetry_decoder = factory->GetBlock(configuration.get(), "TelemetryDecoder", 1, 1);
|
||||
EXPECT_EQ(nullptr, telemetry_decoder);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateEmptyTelemetryDecoder)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("TelemetryDecoder.implementation", std::string(""));
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> telemetry_decoder = factory->GetBlock(configuration.get(), "TelemetryDecoder", 1, 1);
|
||||
EXPECT_EQ(nullptr, telemetry_decoder);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateChannels)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Channels_1C.count", "2");
|
||||
configuration->set_property("Channels_1E.count", "0");
|
||||
configuration->set_property("Channels.in_acquisition", "2");
|
||||
configuration->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
configuration->set_property("Tracking_1C.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
configuration->set_property("TelemetryDecoder_1C.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
configuration->set_property("Channel0.item_type", "gr_complex");
|
||||
configuration->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
configuration->set_property("Channel1.item_type", "gr_complex");
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels = factory->GetChannels(configuration.get(), queue.get());
|
||||
@ -313,18 +399,37 @@ TEST(GNSSBlockFactoryTest, InstantiateChannels)
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateObservables)
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongObservables)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Observables.implementation", "Supercalifragilistic_Observables");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
auto observables = factory->GetObservables(configuration.get());
|
||||
EXPECT_EQ(nullptr, observables);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongObservables2)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Observables.implementation", "Pass_Through");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
auto observables = factory->GetObservables(configuration.get());
|
||||
EXPECT_STREQ("Observables", observables->role().c_str());
|
||||
EXPECT_STREQ("Pass_Through", observables->implementation().c_str());
|
||||
EXPECT_EQ(nullptr, observables);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateGpsL1CaObservables)
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongObservables3)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Observables.implementation", "RTKLIB_PVT");
|
||||
std::unique_ptr<GNSSBlockFactory> factory = std::make_unique<GNSSBlockFactory>();
|
||||
auto observables = factory->GetObservables(configuration.get());
|
||||
EXPECT_EQ(nullptr, observables);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateObservables)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("Observables.implementation", "Hybrid_Observables");
|
||||
@ -356,3 +461,25 @@ TEST(GNSSBlockFactoryTest, InstantiateWrongPvt)
|
||||
auto pvt = std::dynamic_pointer_cast<PvtInterface>(pvt_);
|
||||
EXPECT_EQ(nullptr, pvt);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongPvt2)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("PVT.implementation", "Pass_Through");
|
||||
auto factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> pvt_ = factory->GetPVT(configuration.get());
|
||||
auto pvt = std::dynamic_pointer_cast<PvtInterface>(pvt_);
|
||||
EXPECT_EQ(nullptr, pvt);
|
||||
}
|
||||
|
||||
|
||||
TEST(GNSSBlockFactoryTest, InstantiateWrongPvt3)
|
||||
{
|
||||
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
|
||||
configuration->set_property("PVT.implementation", "Quantum_Particle_PVT");
|
||||
auto factory = std::make_unique<GNSSBlockFactory>();
|
||||
std::shared_ptr<GNSSBlockInterface> pvt_ = factory->GetPVT(configuration.get());
|
||||
auto pvt = std::dynamic_pointer_cast<PvtInterface>(pvt_);
|
||||
EXPECT_EQ(nullptr, pvt);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user