1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-07 06:30:11 +00:00

Fix low-impact performance inefficiency defects detected by Coverity Scan 2024.6

Reduce defect noise so other defects are easier spotted
This commit is contained in:
Carles Fernandez 2025-01-23 22:32:35 +01:00
parent 274fdfd6b7
commit bd0d19a24b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
55 changed files with 173 additions and 148 deletions

View File

@ -27,6 +27,7 @@
#include "pvt_conf.h" // for Pvt_Conf
#include "rtklib_rtkpos.h" // for rtkfree, rtkinit
#include <iostream> // for std::cout
#include <utility> // for std::move
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
#else
@ -62,7 +63,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
const std::string default_rtcm_dump_devname("/dev/pts/1");
DLOG(INFO) << "role " << role;
pvt_output_parameters.dump = configuration->property(role + ".dump", false);
pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
pvt_output_parameters.dump_filename = configuration->property(role + ".dump_filename", std::move(default_dump_filename));
pvt_output_parameters.dump_mat = configuration->property(role + ".dump_mat", true);
pvt_output_parameters.rtk_trace_level = configuration->property(role + ".rtk_trace_level"s, 0);
@ -87,7 +88,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
// NMEA Printer settings
pvt_output_parameters.flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false);
pvt_output_parameters.nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename);
pvt_output_parameters.nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", std::move(default_nmea_dump_filename));
pvt_output_parameters.nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname);
// RINEX version
@ -126,7 +127,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
#endif
// RTCM Printer settings
pvt_output_parameters.flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
pvt_output_parameters.rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
pvt_output_parameters.rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", std::move(default_rtcm_dump_devname));
pvt_output_parameters.flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
pvt_output_parameters.rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
pvt_output_parameters.rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
@ -157,7 +158,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
// Advanced Nativation Protocol Printer settings
pvt_output_parameters.an_output_enabled = configuration->property(role + ".an_output_enabled", pvt_output_parameters.an_output_enabled);
pvt_output_parameters.an_dump_devname = configuration->property(role + ".an_dump_devname", default_nmea_dump_devname);
pvt_output_parameters.an_dump_devname = configuration->property(role + ".an_dump_devname", std::move(default_nmea_dump_devname));
if (pvt_output_parameters.an_output_enabled && pvt_output_parameters.flag_nmea_tty_port)
{
if (pvt_output_parameters.nmea_dump_devname == pvt_output_parameters.an_dump_devname)
@ -496,7 +497,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
// Settings 1
int positioning_mode = -1;
const std::string default_pos_mode("Single");
const std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h
const std::string positioning_mode_str = configuration->property(role + ".positioning_mode", std::move(default_pos_mode)); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h
if (positioning_mode_str == "Single")
{
positioning_mode = PMODE_SINGLE;
@ -581,7 +582,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
}
const std::string default_iono_model("OFF");
const std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /* (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
const std::string iono_model_str = configuration->property(role + ".iono_model", std::move(default_iono_model)); /* (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
int iono_model = -1;
if (iono_model_str == "OFF")
{
@ -620,7 +621,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
const std::string default_trop_model("OFF");
int trop_model = -1;
const std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /* (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
const std::string trop_model_str = configuration->property(role + ".trop_model", std::move(default_trop_model)); /* (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
if (trop_model_str == "OFF")
{
trop_model = TROPOPT_OFF;
@ -698,7 +699,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
// Settings 2
const std::string default_gps_ar("Continuous");
const std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
const std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", std::move(default_gps_ar)); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
int integer_ambiguity_resolution_gps = -1;
if (integer_ambiguity_resolution_gps_str == "OFF")
{
@ -882,7 +883,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
pvt_output_parameters.xml_output_path = configuration->property(role + ".xml_output_path", default_output_path);
pvt_output_parameters.nmea_output_file_path = configuration->property(role + ".nmea_output_file_path", default_output_path);
pvt_output_parameters.rtcm_output_file_path = configuration->property(role + ".rtcm_output_file_path", default_output_path);
pvt_output_parameters.has_output_file_path = configuration->property(role + ".has_output_file_path", default_output_path);
pvt_output_parameters.has_output_file_path = configuration->property(role + ".has_output_file_path", std::move(default_output_path));
// Read PVT MONITOR Configuration
pvt_output_parameters.monitor_enabled = configuration->property(role + ".enable_monitor", false);

View File

@ -3342,7 +3342,7 @@ std::vector<std::string> Rtcm::print_IGM01(const Galileo_HAS_data& has_data)
{
rtcm_message_queue->push(message);
}
msgs.push_back(message);
msgs.push_back(std::move(message));
}
return msgs;
}
@ -3366,7 +3366,7 @@ std::vector<std::string> Rtcm::print_IGM02(const Galileo_HAS_data& has_data)
{
rtcm_message_queue->push(message);
}
msgs.push_back(message);
msgs.push_back(std::move(message));
}
return msgs;
}
@ -3390,7 +3390,7 @@ std::vector<std::string> Rtcm::print_IGM03(const Galileo_HAS_data& has_data)
{
rtcm_message_queue->push(message);
}
msgs.push_back(message);
msgs.push_back(std::move(message));
}
return msgs;
}
@ -3416,7 +3416,7 @@ std::vector<std::string> Rtcm::print_IGM05(const Galileo_HAS_data& has_data)
{
rtcm_message_queue->push(message);
}
msgs.push_back(message);
msgs.push_back(std::move(message));
}
}
return msgs;

View File

@ -311,7 +311,7 @@ bool Rtklib_Solver::save_matfile() const
// WRITE MAT FILE
mat_t *matfp;
matvar_t *matvar;
std::string filename = dump_filename;
std::string filename = std::move(dump_filename);
filename.erase(filename.length() - 4, 4);
filename.append(".mat");
matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);

View File

@ -58,10 +58,10 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
{
const std::string default_item_type("gr_complex");
const std::string default_dump_filename("./acquisition.dat");
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
#if USE_GLOG_AND_GFLAGS
if (FLAGS_doppler_max != 0)

View File

@ -49,10 +49,10 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
{
const std::string default_item_type("gr_complex");
const std::string default_dump_filename("./acquisition.dat");
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
#if USE_GLOG_AND_GFLAGS
if (FLAGS_doppler_max != 0)

View File

@ -58,10 +58,10 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
{
const std::string default_item_type("gr_complex");
const std::string default_dump_filename("./acquisition.dat");
item_type_ = configuration_->property(role + ".item_type", default_item_type);
item_type_ = configuration_->property(role + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role + ".dump_filename", std::move(default_dump_filename));
#if USE_GLOG_AND_GFLAGS
if (FLAGS_doppler_max != 0)

View File

@ -63,10 +63,10 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
DLOG(INFO) << "role " << role_;
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
if (sampled_ms_ % 4 != 0)
{

View File

@ -67,8 +67,8 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
{
const std::string default_item_type("gr_complex");
const std::string default_dump_filename("./acquisition.dat");
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
dump_filename_ = configuration_->property(role_ + ".dump_filename", default_dump_filename);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);

View File

@ -53,7 +53,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
std::string default_dump_filename = "./acquisition.mat";
Acq_Conf acq_parameters = Acq_Conf();
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
item_type_ = configuration->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
acq_parameters.fs_in = fs_in_;

View File

@ -51,7 +51,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
const std::string default_item_type("gr_complex");
std::string default_dump_filename = "./data/acquisition.dat";
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
item_type_ = configuration->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);

View File

@ -59,7 +59,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
{
const std::string default_item_type("gr_complex");
std::string default_dump_filename = "./data/acquisition.dat";
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);

View File

@ -63,7 +63,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
DLOG(INFO) << "role " << role_;
item_type_ = configuration_->property(role_ + ".item_type", default_item_type);
item_type_ = configuration_->property(role_ + ".item_type", std::move(default_item_type));
int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000);
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
dump_filename_ = configuration_->property(role_ + ".dump_filename", std::move(default_dump_filename));

View File

@ -145,7 +145,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_)
{
const std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_;
d_dump_filename = std::move(dump_filename_);
}
else
{

View File

@ -39,8 +39,8 @@ ByteToShort::ByteToShort(const ConfigurationInterface* configuration,
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
gr_char_to_short_ = gr::blocks::char_to_short::make();

View File

@ -36,7 +36,7 @@ CshortToGrComplex::CshortToGrComplex(const ConfigurationInterface* configuration
DLOG(INFO) << "role " << role_;
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
cshort_to_gr_complex_ = make_cshort_to_gr_complex();
DLOG(INFO) << "data_type_adapter_(" << cshort_to_gr_complex_->unique_id() << ")";

View File

@ -18,6 +18,7 @@
#include "ibyte_to_cbyte.h"
#include "configuration_interface.h"
#include <volk/volk.h>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -41,8 +42,8 @@ IbyteToCbyte::IbyteToCbyte(const ConfigurationInterface* configuration,
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
ibyte_to_cbyte_ = make_interleaved_byte_to_complex_byte();

View File

@ -16,6 +16,7 @@
#include "ibyte_to_complex.h"
#include "configuration_interface.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -38,8 +39,8 @@ IbyteToComplex::IbyteToComplex(const ConfigurationInterface* configuration, cons
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
gr_interleaved_char_to_complex_ = gr::blocks::interleaved_char_to_complex::make();

View File

@ -18,6 +18,7 @@
#include "ibyte_to_cshort.h"
#include "configuration_interface.h"
#include <volk/volk.h>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -40,8 +41,8 @@ IbyteToCshort::IbyteToCshort(const ConfigurationInterface* configuration,
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
interleaved_byte_to_complex_short_ = make_interleaved_byte_to_complex_short();

View File

@ -16,6 +16,7 @@
#include "ishort_to_complex.h"
#include "configuration_interface.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -38,8 +39,8 @@ IshortToComplex::IshortToComplex(const ConfigurationInterface* configuration,
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();

View File

@ -18,6 +18,7 @@
#include "ishort_to_cshort.h"
#include "configuration_interface.h"
#include <volk/volk.h>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -40,8 +41,8 @@ IshortToCshort::IshortToCshort(const ConfigurationInterface* configuration,
DLOG(INFO) << "role " << role_;
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
interleaved_short_to_complex_short_ = make_interleaved_short_to_complex_short();

View File

@ -18,6 +18,7 @@
#include "beamformer.h"
#include "configuration_interface.h"
#include <gnuradio/blocks/file_sink.h>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -35,8 +36,8 @@ BeamformerFilter::BeamformerFilter(
{
const std::string default_item_type("gr_complex");
const std::string default_dump_file("./input_filter.dat");
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
DLOG(INFO) << "role " << role_;
if (item_type_ == "gr_complex")
{

View File

@ -153,14 +153,14 @@ void FirFilter::init()
const int number_of_taps = config_->property(role_ + ".number_of_taps", default_number_of_taps);
const unsigned int number_of_bands = config_->property(role_ + ".number_of_bands", default_number_of_bands);
const std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type);
const std::string filter_type = config_->property(role_ + ".filter_type", std::move(default_filter_type));
const int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
input_item_type_ = config_->property(role_ + ".input_item_type", default_input_item_type);
output_item_type_ = config_->property(role_ + ".output_item_type", default_output_item_type);
taps_item_type_ = config_->property(role_ + ".taps_item_type", default_taps_item_type);
input_item_type_ = config_->property(role_ + ".input_item_type", std::move(default_input_item_type));
output_item_type_ = config_->property(role_ + ".output_item_type", std::move(default_output_item_type));
taps_item_type_ = config_->property(role_ + ".taps_item_type", std::move(default_taps_item_type));
dump_ = config_->property(role_ + ".dump", false);
dump_filename_ = config_->property(role_ + ".dump_filename", default_dump_filename);
dump_filename_ = config_->property(role_ + ".dump_filename", std::move(default_dump_filename));
std::vector<double> bands;
std::vector<double> ampl;
@ -194,7 +194,7 @@ void FirFilter::init()
// It calculates the optimal (in the Chebyshev/minimax sense) FIR filter
// impulse response given a set of band edges, the desired response on
// those bands, and the weight given to the error in those bands.
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, std::move(filter_type), grid_density);
taps_ = std::vector<float>(taps_d.begin(), taps_d.end());
}

View File

@ -55,12 +55,12 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
const int number_of_taps = configuration->property(role_ + ".number_of_taps", default_number_of_taps);
const unsigned int number_of_bands = configuration->property(role_ + ".number_of_bands", default_number_of_bands);
const std::string filter_type = configuration->property(role_ + ".filter_type", default_filter_type);
const std::string filter_type = configuration->property(role_ + ".filter_type", std::move(default_filter_type));
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
input_item_type_ = configuration->property(role_ + ".input_item_type", default_input_item_type);
output_item_type_ = configuration->property(role_ + ".output_item_type", default_output_item_type);
taps_item_type_ = configuration->property(role_ + ".taps_item_type", default_taps_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
input_item_type_ = configuration->property(role_ + ".input_item_type", std::move(default_input_item_type));
output_item_type_ = configuration->property(role_ + ".output_item_type", std::move(default_output_item_type));
taps_item_type_ = configuration->property(role_ + ".taps_item_type", std::move(default_taps_item_type));
intermediate_freq_ = configuration->property(role_ + ".IF", default_intermediate_freq);
sampling_freq_ = configuration->property(role_ + ".sampling_frequency", default_sampling_freq);
decimation_factor_ = configuration->property(role_ + ".decimation_factor", default_decimation_factor);
@ -97,7 +97,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
}
const int grid_density = configuration->property(role_ + ".grid_density", default_grid_density);
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
const std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, std::move(filter_type), grid_density);
taps_ = std::vector<float>(taps_d.begin(), taps_d.end());
}
else

View File

@ -19,6 +19,7 @@
#include "configuration_interface.h"
#include "notch_cc.h"
#include <boost/lexical_cast.hpp>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -49,8 +50,8 @@ NotchFilter::NotchFilter(const ConfigurationInterface* configuration,
const int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
const int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
DLOG(INFO) << "role " << role_;
if (item_type_ == "gr_complex")

View File

@ -20,6 +20,7 @@
#include "notch_lite_cc.h"
#include <boost/lexical_cast.hpp>
#include <algorithm> // for max
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -53,8 +54,8 @@ NotchFilterLite::NotchFilterLite(const ConfigurationInterface* configuration,
const int n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
const int n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
int n_segments_coeff = static_cast<int>((samp_freq / coeff_rate) / static_cast<float>(length_));
n_segments_coeff = std::max(1, n_segments_coeff);

View File

@ -52,8 +52,8 @@ PulseBlankingFilter::PulseBlankingFilter(const ConfigurationInterface* configura
const double if_aux = configuration->property(role_ + ".if", default_if);
const double if_ = configuration->property(role_ + ".IF", if_aux);
dump_filename_ = configuration->property(role_ + ".dump_filename", default_dump_filename);
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
dump_filename_ = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
item_type_ = configuration->property(role_ + ".item_type", std::move(default_item_type));
dump_ = configuration->property(role_ + ".dump", false);
DLOG(INFO) << "role " << role_;

View File

@ -22,6 +22,7 @@
#include <volk/volk_complex.h>
#include <cstdint> // for int8_t
#include <ostream> // for operator<<
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -39,7 +40,7 @@ Pass_Through::Pass_Through(const ConfigurationInterface* configuration,
inverted_spectrum(configuration->property(role + ".inverted_spectrum", false))
{
const std::string default_item_type("gr_complex");
item_type_ = configuration->property(role + ".item_type", default_item_type);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
if (item_type_ == "float")
{

View File

@ -236,7 +236,7 @@ void read_results(std::vector<volk_gnsssdr_test_results_t> *results, std::string
kernel_result.config_name = std::string(single_kernel_result[0]);
kernel_result.best_arch_u = std::string(single_kernel_result[1]);
kernel_result.best_arch_a = std::string(single_kernel_result[2]);
results->push_back(kernel_result);
results->push_back(std::move(kernel_result));
}
}
}

View File

@ -237,7 +237,7 @@ std::vector<std::string> split_signature(const std::string &protokernel_signatur
}
}
// Get the last one to the end of the string
signature_tokens.push_back(token);
signature_tokens.push_back(std::move(token));
return signature_tokens;
}
@ -262,7 +262,7 @@ static void get_signatures_from_name(std::vector<volk_gnsssdr_type_t> &inputsig,
std::string token = toked[token_index];
try
{
type = volk_gnsssdr_type_from_string(token);
type = volk_gnsssdr_type_from_string(std::move(token));
if (side == SIDE_NAME) side = SIDE_OUTPUT; // if this is the first one after the name...
if (side == SIDE_INPUT)
@ -627,7 +627,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
memcpy(arch_inbuff, inbuffs[j], vlen * inputsig[j].size * (inputsig[j].is_complex ? 2 : 1));
arch_buffs.push_back(arch_inbuff);
}
test_data.push_back(arch_buffs);
test_data.push_back(std::move(arch_buffs));
}
std::vector<volk_gnsssdr_type_t> both_sigs;

View File

@ -20,6 +20,7 @@
#include "gnss_sdr_flags.h"
#include "obs_conf.h"
#include <ostream> // for operator<<
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -37,7 +38,7 @@ HybridObservables::HybridObservables(const ConfigurationInterface* configuration
dump_mat_(configuration->property(role + ".dump_mat", true))
{
const std::string default_dump_filename("./observables.dat");
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_filename));
Obs_Conf conf{};
conf.dump = dump_;

View File

@ -25,6 +25,7 @@
#include <cmath>
#include <cstdint>
#include <limits>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -46,8 +47,8 @@ DirectResamplerConditioner::DirectResamplerConditioner(
const std::string default_dump_file("./resampler.dat");
const double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0);
const double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
sample_freq_in_ = configuration->property(role_ + ".sample_freq_in", 4000000.0);
sample_freq_out_ = configuration->property(role_ + ".sample_freq_out", fs_in);

View File

@ -20,6 +20,7 @@
#include <gnuradio/blocks/file_sink.h>
#include <cmath>
#include <limits>
#include <utility>
#include <vector>
#if USE_GLOG_AND_GFLAGS
@ -42,8 +43,8 @@ MmseResamplerConditioner::MmseResamplerConditioner(
const std::string default_dump_file("./resampler.dat");
const double fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000.0);
const double fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
sample_freq_in_ = configuration->property(role_ + ".sample_freq_in", 4000000.0);
sample_freq_out_ = configuration->property(role_ + ".sample_freq_out", fs_in);

View File

@ -47,8 +47,8 @@ SignalGenerator::SignalGenerator(const ConfigurationInterface* configuration,
const std::string default_system("G");
const std::string default_signal("1C");
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
const unsigned int fs_in = configuration->property("SignalSource.fs_hz", static_cast<unsigned>(4e6));
const bool data_flag = configuration->property("SignalSource.data_flag", false);

View File

@ -19,6 +19,7 @@
#include "configuration_interface.h"
#include "gnss_sdr_string_literals.h"
#include <iostream>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -45,20 +46,20 @@ CustomUDPSignalSource::CustomUDPSignalSource(const ConfigurationInterface* confi
// DUMP PARAMETERS
const std::string default_dump_file("./data/signal_source.dat");
const std::string default_item_type("gr_complex");
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
// network PARAMETERS
const std::string default_capture_device("eth0");
const std::string default_address("127.0.0.1");
const int default_port = 1234;
const std::string address = configuration->property(role + ".origin_address", default_address);
std::string capture_device = configuration->property(role + ".capture_device", default_capture_device);
const std::string address = configuration->property(role + ".origin_address", std::move(default_address));
std::string capture_device = configuration->property(role + ".capture_device", std::move(default_capture_device));
int port = configuration->property(role + ".port", default_port);
int payload_bytes = configuration->property(role + ".payload_bytes", 1024);
const std::string default_sample_type("cbyte");
const std::string sample_type = configuration->property(role + ".sample_type", default_sample_type);
item_type_ = configuration->property(role + ".item_type", default_item_type);
const std::string sample_type = configuration->property(role + ".sample_type", std::move(default_sample_type));
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
udp_gnss_rx_source_ = Gr_Complex_Ip_Packet_Source::make(capture_device,
address,

View File

@ -20,6 +20,7 @@
#include "labsat23_source.h"
#include <iostream>
#include <sstream>
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -43,12 +44,12 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
const std::string default_item_type("gr_complex");
const std::string default_dump_file("./labsat_output.dat");
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
const int64_t sampling_frequency_deprecated = configuration->property(role + ".sampling_frequency", static_cast<int64_t>(16368000));
const int64_t throttle_frequency_sps = configuration->property(role + ".throttle_frequency_sps", static_cast<int64_t>(sampling_frequency_deprecated));
std::string channels_to_read = configuration->property(role + ".selected_channel", default_item_type);
std::string channels_to_read = configuration->property(role + ".selected_channel", std::move(default_item_type));
std::stringstream ss(channels_to_read);
int found;
while (ss.good())
@ -69,7 +70,7 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
}
const std::string default_filename("./example_capture.LS3");
filename_ = configuration->property(role + ".filename", default_filename);
filename_ = configuration->property(role + ".filename", std::move(default_filename));
const bool digital_io_enabled = configuration->property(role + ".digital_io_enabled", false);

View File

@ -54,7 +54,7 @@ MultichannelFileSignalSource::MultichannelFileSignalSource(const ConfigurationIn
filename_vec_.push_back(configuration->property(role + ".filename" + std::to_string(n), default_filename));
}
item_type_ = configuration->property(role + ".item_type", default_item_type);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
repeat_ = configuration->property(role + ".repeat", false);
enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false);

View File

@ -55,13 +55,13 @@ RtlTcpSignalSource::RtlTcpSignalSource(const ConfigurationInterface* configurati
// DUMP PARAMETERS
const std::string default_dump_file("./data/signal_source.dat");
const std::string default_item_type("gr_complex");
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_file));
// rtl_tcp PARAMETERS
const std::string default_address("127.0.0.1");
const int16_t default_port = 1234;
item_type_ = configuration->property(role + ".item_type", default_item_type);
address_ = configuration->property(role + ".address", default_address);
item_type_ = configuration->property(role + ".item_type", std::move(default_item_type));
address_ = configuration->property(role + ".address", std::move(default_address));
port_ = configuration->property(role + ".port", default_port);
if (item_type_ == "short")

View File

@ -56,8 +56,8 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(const ConfigurationInte
{
const std::string default_filename("./my_capture.dat");
const std::string default_dump_filename("./my_capture_dump.dat");
filename_ = configuration->property(role + ".filename", default_filename);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
filename_ = configuration->property(role + ".filename", std::move(default_filename));
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_filename));
const int64_t bytes_seek = configuration->property(role + ".bytes_to_skip", static_cast<int64_t>(65536));
const double sample_size_byte = static_cast<double>(adc_bits_) / 4.0;

View File

@ -18,6 +18,7 @@
#include "sbas_l1_telemetry_decoder.h"
#include "configuration_interface.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -35,7 +36,7 @@ SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(
dump_(configuration->property(role + ".dump", false))
{
const std::string default_dump_filename("./navigation.dat");
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
dump_filename_ = configuration->property(role + ".dump_filename", std::move(default_dump_filename));
// make telemetry decoder object
telemetry_decoder_ = sbas_l1_make_telemetry_decoder_gs(satellite_, dump_); // TODO fix me
DLOG(INFO) << "role " << role;

View File

@ -16,19 +16,20 @@
*/
#include "tlm_conf.h"
#include <utility>
void Tlm_Conf::SetFromConfiguration(const ConfigurationInterface *configuration,
const std::string &role)
{
const std::string default_dumpname("telemetry");
dump_filename = configuration->property(role + ".dump_filename", default_dumpname);
dump_filename = configuration->property(role + ".dump_filename", std::move(default_dumpname));
dump = configuration->property(role + ".dump", false);
dump_mat = configuration->property(role + ".dump_mat", dump);
remove_dat = configuration->property(role + ".remove_dat", false);
dump_crc_stats = configuration->property(role + ".dump_crc_stats", false);
const std::string default_crc_stats_dumpname("telemetry_crc_stats");
dump_crc_stats_filename = configuration->property(role + ".dump_crc_stats_filename", default_crc_stats_dumpname);
dump_crc_stats_filename = configuration->property(role + ".dump_crc_stats_filename", std::move(default_crc_stats_dumpname));
enable_navdata_monitor = configuration->property("NavDataMonitor.enable_monitor", false);
if (configuration->property("Channels_1B.count", 0) > 0)
{

View File

@ -46,7 +46,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
std::string item_type = configuration->property(role_ + ".item_type", default_item_type);
std::string item_type = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
@ -79,7 +79,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
float very_early_late_space_chips = configuration->property(role_ + ".very_early_late_space_chips", static_cast<float>(0.5));
size_t port_ch0 = configuration->property(role_ + ".port_ch0", 2060);
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -27,6 +27,7 @@
#include "GLONASS_L1_L2_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -48,7 +49,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
item_type_ = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
@ -83,7 +84,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -26,6 +26,7 @@
#include "GLONASS_L1_L2_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -47,7 +48,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
std::string item_type = configuration->property(role_ + ".item_type", default_item_type);
std::string item_type = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
@ -78,7 +79,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
#endif
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -25,6 +25,7 @@
#include "GLONASS_L1_L2_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -46,7 +47,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
item_type_ = configuration->property(role_ + ".item_type", default_item_type);
item_type_ = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
@ -81,7 +82,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -24,6 +24,7 @@
#include "GLONASS_L1_L2_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -45,7 +46,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
std::string item_type = configuration->property(role_ + ".item_type", default_item_type);
std::string item_type = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
@ -75,7 +76,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
#endif
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -28,6 +28,7 @@
#include "GPS_L1_CA.h"
#include "configuration_interface.h"
#include "gnss_sdr_flags.h"
#include <utility>
#if USE_GLOG_AND_GFLAGS
#include <glog/logging.h>
@ -49,7 +50,7 @@ GpsL1CaGaussianTracking::GpsL1CaGaussianTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
std::string item_type = configuration->property(role_ + ".item_type", default_item_type);
std::string item_type = configuration->property(role_ + ".item_type", std::move(default_item_type));
int order = configuration->property(role_ + ".order", 2);
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
@ -68,7 +69,7 @@ GpsL1CaGaussianTracking::GpsL1CaGaussianTracking(
#endif
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
bool bce_run = configuration->property(role_ + ".bce_run", false);

View File

@ -46,14 +46,14 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
{
// ################# CONFIGURATION PARAMETERS ########################
const std::string default_item_type("gr_complex");
std::string item_type = configuration->property(role_ + ".item_type", default_item_type);
std::string item_type = configuration->property(role_ + ".item_type", std::move(default_item_type));
int fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000);
int fs_in = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
bool dump = configuration->property(role_ + ".dump", false);
float early_late_space_chips = configuration->property(role_ + ".early_late_space_chips", static_cast<float>(0.5));
size_t port_ch0 = configuration->property(role_ + ".port_ch0", 2060);
const std::string default_dump_filename("./track_ch");
std::string dump_filename = configuration->property(role_ + ".dump_filename", default_dump_filename);
std::string dump_filename = configuration->property(role_ + ".dump_filename", std::move(default_dump_filename));
const auto vector_length = static_cast<int>(std::round(fs_in / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
// ################# MAKE TRACKING GNURadio object ###################

View File

@ -142,7 +142,7 @@ ControlThread::ControlThread()
std::string pvt_impl = configuration_->property("PVT.implementation", empty_implementation);
conf_has_pvt_ = !pvt_impl.empty();
std::string obs_impl = configuration_->property("Observables.implementation", empty_implementation);
std::string obs_impl = configuration_->property("Observables.implementation", std::move(empty_implementation));
conf_has_observables_ = !obs_impl.empty();
well_formatted_configuration_ = conf_file_has_section_ && conf_file_has_mandatory_globals_ && conf_has_signal_sources_ && conf_has_observables_ && conf_has_pvt_;
@ -747,8 +747,8 @@ void ControlThread::assist_GNSS()
std::cout << "SUPL RRLP GPS assistance enabled!\n";
const std::string default_acq_server("supl.google.com");
const std::string default_eph_server("supl.google.com");
supl_client_ephemeris_.server_name = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_server", default_acq_server);
supl_client_acquisition_.server_name = configuration_->property("GNSS-SDR.SUPL_gps_acquisition_server", default_eph_server);
supl_client_ephemeris_.server_name = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_server", std::move(default_acq_server));
supl_client_acquisition_.server_name = configuration_->property("GNSS-SDR.SUPL_gps_acquisition_server", std::move(default_eph_server));
supl_client_ephemeris_.server_port = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_port", 7275);
supl_client_acquisition_.server_port = configuration_->property("GNSS-SDR.SUPL_gps_acquisition_port", 7275);
supl_mcc_ = configuration_->property("GNSS-SDR.SUPL_MCC", 244);
@ -756,8 +756,8 @@ void ControlThread::assist_GNSS()
const std::string default_lac("0x59e2");
const std::string default_ci("0x31b0");
const std::string supl_lac_s = configuration_->property("GNSS-SDR.SUPL_LAC", default_lac);
const std::string supl_ci_s = configuration_->property("GNSS-SDR.SUPL_CI", default_ci);
const std::string supl_lac_s = configuration_->property("GNSS-SDR.SUPL_LAC", std::move(default_lac));
const std::string supl_ci_s = configuration_->property("GNSS-SDR.SUPL_CI", std::move(default_ci));
try
{
supl_lac_ = std::stoi(supl_lac_s, nullptr, 0);

View File

@ -75,7 +75,7 @@ std::string FileConfiguration::property(std::string property_name, std::string d
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), std::move(default_value));
}
return ini_reader_->Get("GNSS-SDR", property_name, default_value);
}
@ -85,10 +85,10 @@ bool FileConfiguration::property(std::string property_name, bool default_value)
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -96,10 +96,10 @@ int64_t FileConfiguration::property(std::string property_name, int64_t default_v
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -107,10 +107,10 @@ uint64_t FileConfiguration::property(std::string property_name, uint64_t default
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -118,10 +118,10 @@ int FileConfiguration::property(std::string property_name, int default_value) co
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -129,10 +129,10 @@ unsigned int FileConfiguration::property(std::string property_name, unsigned int
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -140,10 +140,10 @@ uint16_t FileConfiguration::property(std::string property_name, uint16_t default
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -151,10 +151,10 @@ int16_t FileConfiguration::property(std::string property_name, int16_t default_v
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -162,10 +162,10 @@ float FileConfiguration::property(std::string property_name, float default_value
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
@ -173,10 +173,10 @@ double FileConfiguration::property(std::string property_name, double default_val
{
if (overrided_->is_present(property_name))
{
return overrided_->property(property_name, default_value);
return overrided_->property(std::move(property_name), default_value);
}
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}

View File

@ -337,7 +337,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(const ConfigurationInterface* configuration)
{
const std::string empty_implementation;
std::string implementation = configuration->property("Observables.implementation", empty_implementation);
std::string implementation = configuration->property("Observables.implementation", std::move(empty_implementation));
LOG(INFO) << "Getting Observables with implementation " << implementation;
if (implementation.find("_Observables") == std::string::npos)
{
@ -372,7 +372,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetObservables(const Confi
std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetPVT(const ConfigurationInterface* configuration)
{
const std::string empty_implementation;
std::string implementation = configuration->property("PVT.implementation", empty_implementation);
std::string implementation = configuration->property("PVT.implementation", std::move(empty_implementation));
LOG(INFO) << "Getting PVT with implementation " << implementation;
if (implementation.find("_PVT") == std::string::npos)
{
@ -428,7 +428,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel(
// Automatically detect input data type
const std::string default_item_type("gr_complex");
std::string acq_item_type = configuration->property("Acquisition_" + signal + appendix1 + item_prop, default_item_type);
std::string trk_item_type = configuration->property("Tracking_" + signal + appendix2 + item_prop, default_item_type);
std::string trk_item_type = configuration->property("Tracking_" + signal + appendix2 + item_prop, std::move(default_item_type));
if (acq_item_type != trk_item_type)
{
std::cerr << "Configuration error: Acquisition and Tracking blocks must have the same input data type!\n";

View File

@ -47,63 +47,63 @@ std::string InMemoryConfiguration::property(std::string property_name, std::stri
bool InMemoryConfiguration::property(std::string property_name, bool default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
int64_t InMemoryConfiguration::property(std::string property_name, int64_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
uint64_t InMemoryConfiguration::property(std::string property_name, uint64_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
int32_t InMemoryConfiguration::property(std::string property_name, int32_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
uint32_t InMemoryConfiguration::property(std::string property_name, uint32_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
uint16_t InMemoryConfiguration::property(std::string property_name, uint16_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
int16_t InMemoryConfiguration::property(std::string property_name, int16_t default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
float InMemoryConfiguration::property(std::string property_name, float default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}
double InMemoryConfiguration::property(std::string property_name, double default_value) const
{
const std::string empty;
return converter_->convert(property(std::move(property_name), empty), default_value);
return converter_->convert(property(std::move(property_name), std::move(empty)), default_value);
}

View File

@ -21,6 +21,7 @@
#include <cmath>
#include <functional>
#include <numeric>
#include <utility>
#include <vector>
double Gnss_Almanac::check_t(double time) const
@ -72,12 +73,12 @@ double Gnss_Almanac::predicted_doppler(double rx_time_s,
const std::vector<double> pos_sat = {sat_pos_vel[0], sat_pos_vel[1], sat_pos_vel[2]};
const std::vector<double> vel_sat = {sat_pos_vel[3], sat_pos_vel[4], sat_pos_vel[5]};
std::vector<double> x_sr = pos_sat;
std::vector<double> x_sr = std::move(pos_sat);
std::transform(x_sr.begin(), x_sr.end(), pos_rx.begin(), x_sr.begin(), std::minus<double>()); // pos_sat - pos_rx
const double norm_x_sr = std::sqrt(std::inner_product(x_sr.begin(), x_sr.end(), x_sr.begin(), 0.0)); // Euclidean norm
std::vector<double> v_sr = vel_sat;
std::vector<double> v_sr = std::move(vel_sat);
std::transform(v_sr.begin(), v_sr.end(), vel_rx.begin(), v_sr.begin(), std::minus<double>()); // vel_sat - vel_rx
const double radial_vel = std::inner_product(v_sr.begin(), v_sr.end(), x_sr.begin(), 0.0) / norm_x_sr;

View File

@ -22,6 +22,7 @@
#include <cmath>
#include <functional>
#include <numeric>
#include <utility>
#include <vector>
@ -68,12 +69,12 @@ double Gnss_Ephemeris::predicted_doppler(double rx_time_s,
const std::vector<double> pos_sat = {sat_pos_vel[0], sat_pos_vel[1], sat_pos_vel[2]};
const std::vector<double> vel_sat = {sat_pos_vel[3], sat_pos_vel[4], sat_pos_vel[5]};
std::vector<double> x_sr = pos_sat;
std::vector<double> x_sr = std::move(pos_sat);
std::transform(x_sr.begin(), x_sr.end(), pos_rx.begin(), x_sr.begin(), std::minus<double>()); // pos_sat - pos_rx
const double norm_x_sr = std::sqrt(std::inner_product(x_sr.begin(), x_sr.end(), x_sr.begin(), 0.0)); // Euclidean norm
std::vector<double> v_sr = vel_sat;
std::vector<double> v_sr = std::move(vel_sat);
std::transform(v_sr.begin(), v_sr.end(), vel_rx.begin(), v_sr.begin(), std::minus<double>()); // vel_sat - vel_rx
const double radial_vel = std::inner_product(v_sr.begin(), v_sr.end(), x_sr.begin(), 0.0) / norm_x_sr;

View File

@ -202,7 +202,7 @@ private:
int32_t i_Toa{}; // Almanac reference time [s]
int32_t i_WN_A{}; // Modulo 256 of the GPS week number to which the almanac reference time (i_Toa) is referenced
int32_t SV_Health{}; // Almanac SV healt
uint32_t a_PRN; // Almanac PRN
uint32_t a_PRN{}; // Almanac PRN
double a_delta_i{}; // Inclination Angle at Reference Time (relative to i_0 = 0.30 semi-circles)
double a_M_0{}; // Mean Anomaly at Reference Time [semi-circles]
double a_ecc{}; // Eccentricity [dimensionless]

View File

@ -31,6 +31,7 @@
#include <fstream>
#include <iterator>
#include <system_error>
#include <utility>
#include <vector>
@ -59,10 +60,10 @@ DataTypeAdapter::DataTypeAdapter()
std::array<int16_t, 8> input_shorts{2, 23, -1, 127, -127, 0, 255, 255};
const std::vector<int8_t> input_data_bytes_(input_bytes.data(), input_bytes.data() + input_bytes.size() / sizeof(int8_t));
input_data_bytes = input_data_bytes_;
input_data_bytes = std::move(input_data_bytes_);
const std::vector<int16_t> input_data_shorts_(input_shorts.data(), input_shorts.data() + input_shorts.size() / sizeof(int16_t));
input_data_shorts = input_data_shorts_;
input_data_shorts = std::move(input_data_shorts_);
}