mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Prefer initialization to assignment in constructors
This commit is contained in:
parent
2c7bead089
commit
ccbfc2a8ef
@ -36,11 +36,16 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
@ -53,6 +58,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
@ -102,11 +108,6 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -28,11 +28,16 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
role_(role),
|
||||
gnss_synchro_(nullptr),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
@ -44,6 +49,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
@ -64,7 +70,6 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
default_dump_filename);
|
||||
|
||||
// -- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
@ -95,11 +100,6 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -36,11 +36,16 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
role_(role),
|
||||
gnss_synchro_(nullptr),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
@ -53,6 +58,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
|
||||
dump_ = configuration_->property(role + ".dump", false);
|
||||
doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
|
||||
|
||||
if (FLAGS_doppler_max != 0)
|
||||
{
|
||||
doppler_max_ = FLAGS_doppler_max;
|
||||
@ -136,11 +142,6 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -36,11 +36,16 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
@ -106,11 +111,6 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -42,11 +42,16 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
role_(role),
|
||||
gnss_synchro_(nullptr),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
@ -111,11 +116,6 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -37,11 +37,16 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
role_(role),
|
||||
gnss_synchro_(nullptr),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
@ -129,11 +134,6 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
@ -36,11 +36,16 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
const ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
unsigned int out_streams)
|
||||
: configuration_(configuration),
|
||||
gnss_synchro_(nullptr),
|
||||
role_(role),
|
||||
threshold_(0.0),
|
||||
channel_(0),
|
||||
doppler_step_(0),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
@ -91,11 +96,6 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
LOG(WARNING) << item_type_ << " unknown acquisition item type";
|
||||
}
|
||||
|
||||
channel_ = 0;
|
||||
threshold_ = 0.0;
|
||||
doppler_step_ = 0;
|
||||
gnss_synchro_ = nullptr;
|
||||
|
||||
if (in_streams_ > 1)
|
||||
{
|
||||
LOG(ERROR) << "This implementation only supports one input stream";
|
||||
|
Loading…
Reference in New Issue
Block a user