diff --git a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h index aba363509..a06c54e3c 100644 --- a/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h +++ b/src/algorithms/signal_source/adapters/ad9361_fpga_signal_source.h @@ -51,14 +51,6 @@ public: void start() override; - /*! - * \brief Returns "Ad9361_Fpga_Signal_Source" - */ - inline std::string implementation() override - { - return ; - } - inline size_t item_size() override { return item_size_; diff --git a/src/algorithms/signal_source/adapters/file_source_base.cc b/src/algorithms/signal_source/adapters/file_source_base.cc index 6dfc796d5..68f35e0ba 100644 --- a/src/algorithms/signal_source/adapters/file_source_base.cc +++ b/src/algorithms/signal_source/adapters/file_source_base.cc @@ -175,8 +175,8 @@ uint64_t FileSourceBase::samples() const FileSourceBase::FileSourceBase(ConfigurationInterface const* configuration, std::string role, std::string impl, - Concurrent_Queue* queue, - std::string default_item_type) + Concurrent_Queue* queue, + std::string default_item_type) : SignalSourceBase(configuration, role, impl) , filename_(configuration->property(role + ".filename"s, "../data/example_capture.dat"s)) , file_source_() @@ -295,16 +295,16 @@ size_t FileSourceBase::samplesToSkip() const if (seconds_to_skip_ > 0) { - // sampling_frequency is in terms of actual samples (output packets). If this source is - // compressed, there may be multiple packets per file (read) sample. First compute the - // actual number of samples to skip (function of time and sample rate) + // sampling_frequency is in terms of actual samples (output packets). If this source is + // compressed, there may be multiple packets per file (read) sample. First compute the + // actual number of samples to skip (function of time and sample rate) samples_to_skip = static_cast(seconds_to_skip_ * sampling_frequency_); - // convert from sample to input items, scaling this value to input item space - // (rounding up) - samples_to_skip = std::ceil(samples_to_skip / packetsPerSample()); - - // complex inputs require two input items for one sample (arguably, packetsPerSample could be scaled by 0.5) + // convert from sample to input items, scaling this value to input item space + // (rounding up) + samples_to_skip = std::ceil(samples_to_skip / packetsPerSample()); + + // complex inputs require two input items for one sample (arguably, packetsPerSample could be scaled by 0.5) if (is_complex()) { samples_to_skip *= 2; @@ -330,7 +330,7 @@ size_t FileSourceBase::computeSamplesInFile() const // this could throw, but the existence of the file has been proven before we get here. auto size = fs::file_size(filename()); - // if there is some kind of compression/encoding, figure out the uncompressed number of samples + // if there is some kind of compression/encoding, figure out the uncompressed number of samples n_samples = std::floor(packetsPerSample() * size / item_size()); auto to_skip = samplesToSkip(); @@ -479,4 +479,3 @@ void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unuse 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]]) {} - diff --git a/src/algorithms/signal_source/adapters/file_source_base.h b/src/algorithms/signal_source/adapters/file_source_base.h index 51bb44c5d..61ae97dde 100644 --- a/src/algorithms/signal_source/adapters/file_source_base.h +++ b/src/algorithms/signal_source/adapters/file_source_base.h @@ -85,8 +85,8 @@ protected: // type supported. Rather than require the item type to be specified in the config file, allow // sub-classes to impose their will FileSourceBase(ConfigurationInterface const* configuration, std::string role, std::string impl, - Concurrent_Queue* queue, - std::string default_item_type="short"); + Concurrent_Queue* queue, + std::string default_item_type = "short"); //! perform post-construction initialization void init(); diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc index ae1cc9700..7223a8bf2 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc @@ -24,7 +24,7 @@ using namespace std::string_literals; NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, Concurrent_Queue* queue) - : FileSourceBase(configuration, role, "Nsr_File_Signal_Source"s, queue, "byte"s) + : FileSourceBase(configuration, role, "Nsr_File_Signal_Source"s, queue, "byte"s) { if (in_streams > 0) { @@ -39,7 +39,7 @@ NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configura std::tuple NsrFileSignalSource::itemTypeToSize() { auto is_complex = false; - auto item_size = size_t(sizeof(char)); // default + auto item_size = size_t(sizeof(char)); // default if (item_type() == "byte") { @@ -47,7 +47,7 @@ std::tuple NsrFileSignalSource::itemTypeToSize() } else { - LOG(WARNING) << item_type() << " unrecognized item type. Using byte."; + LOG(WARNING) << item_type() << " unrecognized item type. Using byte."; } return std::make_tuple(item_size, is_complex); diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 8496a963b..515fdbd9b 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -1101,8 +1101,8 @@ int GNSSFlowgraph::disconnect_signal_sources_from_signal_conditioners() { try { - auto& src = sig_source_.at(i); - + auto& src = sig_source_.at(i); + // TODO: Remove this array implementation and create generic multistream connector // (if a signal source has more than 1 stream, then connect it to the multistream signal conditioner) if (src->implementation() == "Raw_Array_Signal_Source") @@ -1115,7 +1115,7 @@ int GNSSFlowgraph::disconnect_signal_sources_from_signal_conditioners() } else { - auto RF_Channels = src->getRfChannels(); + auto RF_Channels = src->getRfChannels(); for (auto j = 0u; j < RF_Channels; ++j) {