1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00
This commit is contained in:
Carles Fernandez 2018-12-03 15:43:43 +01:00
parent 8eec75c8ae
commit 395f93aeff
22 changed files with 69 additions and 41 deletions

View File

@ -32,6 +32,8 @@
#include "array_signal_conditioner.h" #include "array_signal_conditioner.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -41,11 +43,11 @@ ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configura
std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> in_filt,
std::shared_ptr<GNSSBlockInterface> res, std::shared_ptr<GNSSBlockInterface> res,
std::string role, std::string role,
std::string implementation) : data_type_adapt_(data_type_adapt), std::string implementation) : data_type_adapt_(std::move(data_type_adapt)),
in_filt_(in_filt), in_filt_(std::move(in_filt)),
res_(res), res_(std::move(res)),
role_(role), role_(std::move(role)),
implementation_(implementation) implementation_(std::move(implementation))
{ {
connected_ = false; connected_ = false;
if (configuration) if (configuration)

View File

@ -32,6 +32,8 @@
#include "signal_conditioner.h" #include "signal_conditioner.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -41,11 +43,11 @@ SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> in_filt,
std::shared_ptr<GNSSBlockInterface> res, std::shared_ptr<GNSSBlockInterface> res,
std::string role, std::string role,
std::string implementation) : data_type_adapt_(data_type_adapt), std::string implementation) : data_type_adapt_(std::move(data_type_adapt)),
in_filt_(in_filt), in_filt_(std::move(in_filt)),
res_(res), res_(std::move(res)),
role_(role), role_(std::move(role)),
implementation_(implementation) implementation_(std::move(implementation))
{ {
connected_ = false; connected_ = false;
if (configuration) if (configuration)

View File

@ -32,11 +32,13 @@
#include "configuration_interface.h" #include "configuration_interface.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role, ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
std::string default_input_item_type = "byte"; std::string default_input_item_type = "byte";
std::string default_output_item_type = "short"; std::string default_output_item_type = "short";

View File

@ -32,6 +32,7 @@
#include "fir_filter.h" #include "fir_filter.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <utility>
#include <gnuradio/filter/pm_remez.h> #include <gnuradio/filter/pm_remez.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <volk/volk.h> #include <volk/volk.h>
@ -40,7 +41,7 @@
using google::LogMessage; using google::LogMessage;
FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role, FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
(*this).init(); (*this).init();

View File

@ -32,6 +32,7 @@
#include "freq_xlating_fir_filter.h" #include "freq_xlating_fir_filter.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <utility>
#include <gnuradio/blocks/file_sink.h> #include <gnuradio/blocks/file_sink.h>
#include <gnuradio/filter/pm_remez.h> #include <gnuradio/filter/pm_remez.h>
#include <gnuradio/filter/firdes.h> #include <gnuradio/filter/firdes.h>
@ -41,7 +42,7 @@
using google::LogMessage; using google::LogMessage;
FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role, FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
std::string default_input_item_type = "gr_complex"; std::string default_input_item_type = "gr_complex";
std::string default_output_item_type = "gr_complex"; std::string default_output_item_type = "gr_complex";

View File

@ -33,13 +33,14 @@
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/filter/firdes.h> #include <gnuradio/filter/firdes.h>
#include <utility>
#include <vector> #include <vector>
#include <cmath> #include <cmath>
using google::LogMessage; using google::LogMessage;
PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role, PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
xlat_ = false; xlat_ = false;

View File

@ -37,6 +37,7 @@
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <algorithm> // for min #include <algorithm> // for min
#include <cstring> // for memcpy #include <cstring> // for memcpy
#include <utility>
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item, gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
unsigned long long nitems, unsigned long long nitems,
@ -46,7 +47,7 @@ gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
gr::io_signature::make(1, 1, sizeof_stream_item)), gr::io_signature::make(1, 1, sizeof_stream_item)),
d_nitems(nitems), d_nitems(nitems),
d_ncopied_items(0), d_ncopied_items(0),
d_queue(queue), d_queue(std::move(queue)),
d_stop_flowgraph(stop_flowgraph) d_stop_flowgraph(stop_flowgraph)
{ {
d_open_valve = false; d_open_valve = false;

View File

@ -38,12 +38,14 @@
#include "GLONASS_L1_L2_CA.h" #include "GLONASS_L1_L2_CA.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
SignalGenerator::SignalGenerator(ConfigurationInterface* configuration, SignalGenerator::SignalGenerator(ConfigurationInterface* configuration,
std::string role, unsigned int in_stream, std::string role, unsigned int in_stream,
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_file = "./data/gen_source.dat"; std::string default_dump_file = "./data/gen_source.dat";

View File

@ -40,6 +40,7 @@
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <fstream> #include <fstream>
#include <utility>
/* /*
@ -63,22 +64,22 @@ signal_make_generator_c(std::vector<std::string> signal1, std::vector<std::strin
signal_generator_c::signal_generator_c(std::vector<std::string> signal1, signal_generator_c::signal_generator_c(std::vector<std::string> signal1,
std::vector<std::string> system, std::vector<std::string> system,
const std::vector<unsigned int> &PRN, const std::vector<unsigned int> &PRN,
const std::vector<float> &CN0_dB, std::vector<float> CN0_dB,
const std::vector<float> &doppler_Hz, std::vector<float> doppler_Hz,
const std::vector<unsigned int> &delay_chips, std::vector<unsigned int> delay_chips,
const std::vector<unsigned int> &delay_sec, std::vector<unsigned int> delay_sec,
bool data_flag, bool data_flag,
bool noise_flag, bool noise_flag,
unsigned int fs_in, unsigned int fs_in,
unsigned int vector_length, unsigned int vector_length,
float BW_BB) : gr::block("signal_gen_cc", gr::io_signature::make(0, 0, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex) * vector_length)), float BW_BB) : gr::block("signal_gen_cc", gr::io_signature::make(0, 0, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex) * vector_length)),
signal_(signal1), signal_(std::move(signal1)),
system_(system), system_(std::move(system)),
PRN_(PRN), PRN_(PRN),
CN0_dB_(CN0_dB), CN0_dB_(std::move(CN0_dB)),
doppler_Hz_(doppler_Hz), doppler_Hz_(std::move(doppler_Hz)),
delay_chips_(delay_chips), delay_chips_(std::move(delay_chips)),
delay_sec_(delay_sec), delay_sec_(std::move(delay_sec)),
data_flag_(data_flag), data_flag_(data_flag),
noise_flag_(noise_flag), noise_flag_(noise_flag),
fs_in_(fs_in), fs_in_(fs_in),

View File

@ -87,8 +87,8 @@ private:
unsigned int fs_in, unsigned int vector_length, float BW_BB); unsigned int fs_in, unsigned int vector_length, float BW_BB);
signal_generator_c(std::vector<std::string> signal1, std::vector<std::string> system, const std::vector<unsigned int> &PRN, signal_generator_c(std::vector<std::string> signal1, std::vector<std::string> system, const std::vector<unsigned int> &PRN,
const std::vector<float> &CN0_dB, const std::vector<float> &doppler_Hz, std::vector<float> CN0_dB, std::vector<float> doppler_Hz,
const std::vector<unsigned int> &delay_chips, const std::vector<unsigned int> &delay_sec, bool data_flag, bool noise_flag, std::vector<unsigned int> delay_chips, std::vector<unsigned int> delay_sec, bool data_flag, bool noise_flag,
unsigned int fs_in, unsigned int vector_length, float BW_BB); unsigned int fs_in, unsigned int vector_length, float BW_BB);
void init(); void init();

View File

@ -39,6 +39,7 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <exception> #include <exception>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -46,7 +47,7 @@ using google::LogMessage;
FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
{ {
std::string default_filename = "./example_capture.dat"; std::string default_filename = "./example_capture.dat";
std::string default_item_type = "short"; std::string default_item_type = "short";

View File

@ -37,6 +37,7 @@
#include <gnuradio/message.h> #include <gnuradio/message.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <sstream> #include <sstream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -44,8 +45,8 @@ using google::LogMessage;
GenSignalSource::GenSignalSource(GNSSBlockInterface *signal_generator, GNSSBlockInterface *filter, GenSignalSource::GenSignalSource(GNSSBlockInterface *signal_generator, GNSSBlockInterface *filter,
std::string role, boost::shared_ptr<gr::msg_queue> queue) : signal_generator_(signal_generator), std::string role, boost::shared_ptr<gr::msg_queue> queue) : signal_generator_(signal_generator),
filter_(filter), filter_(filter),
role_(role), role_(std::move(role)),
queue_(queue) queue_(std::move(queue))
{ {
connected_ = false; connected_ = false;
} }

View File

@ -33,11 +33,13 @@
#include "labsat23_source.h" #include "labsat23_source.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
using google::LogMessage; using google::LogMessage;
LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration, LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_file = "./data/source.bin"; std::string default_dump_file = "./data/source.bin";

View File

@ -39,6 +39,7 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -46,7 +47,7 @@ using google::LogMessage;
NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
{ {
std::string default_filename = "../data/my_capture.dat"; std::string default_filename = "../data/my_capture.dat";
std::string default_item_type = "byte"; std::string default_item_type = "byte";

View File

@ -37,6 +37,7 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#include <glog/logging.h> #include <glog/logging.h>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -44,7 +45,7 @@ using google::LogMessage;
RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration, RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_stream, unsigned int out_stream, std::string role, unsigned int in_stream, unsigned int out_stream,
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) boost::shared_ptr<gr::msg_queue> queue) : role_(std::move(role)), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
{ {
// DUMP PARAMETERS // DUMP PARAMETERS
std::string empty = ""; std::string empty = "";

View File

@ -38,6 +38,7 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -45,7 +46,7 @@ using google::LogMessage;
SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration, SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams, std::string role, unsigned int in_streams, unsigned int out_streams,
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
{ {
std::string default_filename = "../data/my_capture.dat"; std::string default_filename = "../data/my_capture.dat";
std::string default_item_type = "int"; std::string default_item_type = "int";

View File

@ -36,13 +36,14 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface* configuration, SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface* configuration,
std::string role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) std::string role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
{ {
std::string default_filename = "../data/my_capture.dat"; std::string default_filename = "../data/my_capture.dat";
std::string default_dump_filename = "../data/my_capture_dump.dat"; std::string default_dump_filename = "../data/my_capture_dump.dat";

View File

@ -38,6 +38,7 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -50,7 +51,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con
boost::shared_ptr<gr::msg_queue> queue) : role_(role), boost::shared_ptr<gr::msg_queue> queue) : role_(role),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams), out_streams_(out_streams),
queue_(queue) queue_(std::move(queue))
{ {
std::string default_filename = "../data/my_capture.dat"; std::string default_filename = "../data/my_capture.dat";
std::string default_item_type = "byte"; std::string default_item_type = "byte";

View File

@ -40,6 +40,7 @@
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
@ -52,7 +53,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
boost::shared_ptr<gr::msg_queue> queue) : role_(role), boost::shared_ptr<gr::msg_queue> queue) : role_(role),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams), out_streams_(out_streams),
queue_(queue) queue_(std::move(queue))
{ {
std::string default_filename = "../data/my_capture.dat"; std::string default_filename = "../data/my_capture.dat";
std::string default_item_type = "byte"; std::string default_item_type = "byte";

View File

@ -37,13 +37,14 @@
#include <uhd/exception.hpp> #include <uhd/exception.hpp>
#include <volk/volk.h> #include <volk/volk.h>
#include <iostream> #include <iostream>
#include <utility>
using google::LogMessage; using google::LogMessage;
UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration, UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
std::string role, unsigned int in_stream, unsigned int out_stream, std::string role, unsigned int in_stream, unsigned int out_stream,
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
{ {
// DUMP PARAMETERS // DUMP PARAMETERS
std::string empty = ""; std::string empty = "";

View File

@ -37,6 +37,8 @@
#include "galileo_e1_tcp_connector_tracking.h" #include "galileo_e1_tcp_connector_tracking.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
#include "Galileo_E1.h" #include "Galileo_E1.h"
#include "configuration_interface.h" #include "configuration_interface.h"
#include "gnss_sdr_flags.h" #include "gnss_sdr_flags.h"
@ -47,7 +49,7 @@ using google::LogMessage;
GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ######################## //################# CONFIGURATION PARAMETERS ########################

View File

@ -37,6 +37,8 @@
#include "gps_l1_ca_tcp_connector_tracking.h" #include "gps_l1_ca_tcp_connector_tracking.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <utility>
#include "GPS_L1_CA.h" #include "GPS_L1_CA.h"
#include "configuration_interface.h" #include "configuration_interface.h"
@ -46,7 +48,7 @@ using google::LogMessage;
GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
{ {
DLOG(INFO) << "role " << role; DLOG(INFO) << "role " << role;
//################# CONFIGURATION PARAMETERS ######################## //################# CONFIGURATION PARAMETERS ########################