1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
This commit is contained in:
Carles Fernandez 2018-12-03 12:52:17 +01:00
parent 8319c2d33a
commit 8eec75c8ae
34 changed files with 250 additions and 244 deletions

View File

@ -103,7 +103,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
code_ = new gr_complex[vector_length_];
if (item_type_.compare("cshort") == 0)
if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
}
@ -119,7 +119,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
acquisition_ = pcps_make_acquisition(acq_parameters);
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
if (item_type_.compare("cbyte") == 0)
if (item_type_ == "cbyte")
{
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();

View File

@ -48,7 +48,7 @@ BeamformerFilter::BeamformerFilter(
DLOG(INFO) << "dump_ is " << dump_;
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
beamformer_ = make_beamformer();

View File

@ -44,7 +44,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
{
size_t item_size;
(*this).init();
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps_);
@ -55,7 +55,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
{
item_size = sizeof(lv_16sc_t);
cshort_to_float_x2_ = make_cshort_to_float_x2();
@ -72,7 +72,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
cshort_to_float_x2_ = make_cshort_to_float_x2();
@ -88,7 +88,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
@ -106,7 +106,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
{
item_size = sizeof(lv_8sc_t);
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
@ -147,7 +147,7 @@ FirFilter::~FirFilter() = default;
void FirFilter::connect(gr::top_block_sptr top_block)
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
@ -158,7 +158,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
DLOG(INFO) << "Nothing to connect internally";
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
{
top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -171,7 +171,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
{
top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -182,7 +182,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(float_to_complex_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
{
top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -195,7 +195,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(char_x2_cbyte_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
{
top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -215,14 +215,14 @@ void FirFilter::connect(gr::top_block_sptr top_block)
void FirFilter::disconnect(gr::top_block_sptr top_block)
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->disconnect(fir_filter_ccf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
{
top_block->disconnect(fir_filter_fff_2_, 0, float_to_complex_, 1);
top_block->disconnect(fir_filter_fff_1_, 0, float_to_complex_, 0);
@ -233,7 +233,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(float_to_complex_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
{
top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -246,7 +246,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
{
top_block->disconnect(float_to_char_2_, 0, char_x2_cbyte_, 1);
top_block->disconnect(float_to_char_1_, 0, char_x2_cbyte_, 0);
@ -259,7 +259,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(char_x2_cbyte_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
{
top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -279,23 +279,23 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr FirFilter::get_left_block()
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
return fir_filter_ccf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
{
return cshort_to_float_x2_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
{
return cbyte_to_float_x2_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
{
return cbyte_to_float_x2_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
{
return cshort_to_float_x2_;
}
@ -309,23 +309,23 @@ gr::basic_block_sptr FirFilter::get_left_block()
gr::basic_block_sptr FirFilter::get_right_block()
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
return fir_filter_ccf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
{
return short_x2_to_cshort_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
{
return float_to_complex_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
{
return char_x2_cbyte_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
{
return float_to_complex_;
}

View File

@ -72,7 +72,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
std::string filter_type = config_->property(role_ + ".filter_type", default_filter_type);
decimation_factor_ = config_->property(role_ + ".decimation_factor", default_decimation_factor);
if (filter_type.compare("lowpass") != 0)
if (filter_type != "lowpass")
{
std::vector<double> taps_d;
std::vector<double> bands;
@ -123,28 +123,28 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
size_t item_size;
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex); //output
input_size_ = sizeof(gr_complex); //input
freq_xlating_fir_filter_ccf_ = gr::filter::freq_xlating_fir_filter_ccf::make(decimation_factor_, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_ccf_->unique_id() << ")";
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
input_size_ = sizeof(float); //input
freq_xlating_fir_filter_fcf_ = gr::filter::freq_xlating_fir_filter_fcf::make(decimation_factor_, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_fcf_->unique_id() << ")";
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
input_size_ = sizeof(int16_t); //input
freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor_, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")";
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
{
item_size = sizeof(lv_16sc_t);
input_size_ = sizeof(int16_t); //input
@ -155,7 +155,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
float_to_short_2_ = gr::blocks::float_to_short::make();
short_x2_to_cshort_ = make_short_x2_to_cshort();
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
{
item_size = sizeof(gr_complex);
input_size_ = sizeof(int8_t); //input
@ -163,7 +163,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor_, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")";
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
item_size = sizeof(lv_8sc_t);
input_size_ = sizeof(int8_t); //input
@ -201,28 +201,28 @@ FreqXlatingFirFilter::~FreqXlatingFirFilter() = default;
void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->connect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->connect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
{
top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0);
top_block->connect(complex_to_float_, 0, float_to_short_1_, 0);
@ -234,7 +234,7 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
{
top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
if (dump_)
@ -242,7 +242,7 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0);
@ -260,28 +260,28 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->disconnect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->disconnect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
{
if (dump_)
{
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
{
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0);
top_block->disconnect(complex_to_float_, 0, float_to_short_1_, 0);
@ -293,7 +293,7 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
{
top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
if (dump_)
@ -301,7 +301,7 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
}
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0);
@ -319,27 +319,27 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_ccf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_fcf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_scf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
{
return freq_xlating_fir_filter_scf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
{
return gr_char_to_short_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
return gr_char_to_short_;
}
@ -353,27 +353,27 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
{
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_ccf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "float") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_fcf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_scf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "short") && (output_item_type_ == "cshort"))
{
return short_x2_to_cshort_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "gr_complex"))
{
return freq_xlating_fir_filter_scf_;
}
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
{
return complex_to_complex_byte_;
}

View File

@ -63,7 +63,7 @@ NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role
length_ = configuration->property(role + ".length", default_length_);
n_segments_est = configuration->property(role + ".segments_est", default_n_segments_est);
n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
notch_filter_ = make_notch_filter(pfa, p_c_factor, length_, n_segments_est, n_segments_reset);

View File

@ -70,7 +70,7 @@ NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::str
n_segments_reset = configuration->property(role + ".segments_reset", default_n_segments_reset);
int n_segments_coeff = static_cast<int>((samp_freq / coeff_rate) / static_cast<float>(length_));
n_segments_coeff = std::max(1, n_segments_coeff);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
notch_filter_lite_ = make_notch_filter_lite(p_c_factor, pfa, length_, n_segments_est, n_segments_reset, n_segments_coeff);

View File

@ -61,7 +61,7 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
int n_segments_est = config_->property(role_ + ".segments_est", default_n_segments_est);
int default_n_segments_reset = 5000000;
int n_segments_reset = config_->property(role_ + ".segments_reset", default_n_segments_reset);
if (input_item_type_.compare("gr_complex") == 0)
if (input_item_type_ == "gr_complex")
{
item_size = sizeof(gr_complex); //output
input_size_ = sizeof(gr_complex); //input
@ -110,7 +110,7 @@ PulseBlankingFilter::~PulseBlankingFilter() = default;
void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
{
if (input_item_type_.compare("gr_complex") == 0)
if (input_item_type_ == "gr_complex")
{
if (dump_)
{
@ -131,7 +131,7 @@ void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
{
if (input_item_type_.compare("gr_complex") == 0)
if (input_item_type_ == "gr_complex")
{
if (dump_)
{
@ -151,7 +151,7 @@ void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr PulseBlankingFilter::get_left_block()
{
if (input_item_type_.compare("gr_complex") == 0)
if (input_item_type_ == "gr_complex")
{
if (xlat_)
{
@ -172,7 +172,7 @@ gr::basic_block_sptr PulseBlankingFilter::get_left_block()
gr::basic_block_sptr PulseBlankingFilter::get_right_block()
{
if (input_item_type_.compare("gr_complex") == 0)
if (input_item_type_ == "gr_complex")
{
return pulse_blanking_cc_;
}

View File

@ -47,7 +47,7 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
std::string default_item_type = "gr_complex";
std::string input_type = configuration->property(role + ".input_item_type", default_item_type);
std::string output_type = configuration->property(role + ".output_item_type", default_item_type);
if (input_type.compare(output_type) != 0)
if (input_type != output_type)
{
LOG(WARNING) << "input_item_type and output_item_type are different in a Pass_Through implementation! Taking "
<< input_type
@ -57,11 +57,11 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
item_type_ = configuration->property(role + ".item_type", input_type);
inverted_spectrum = configuration->property(role + ".inverted_spectrum", false);
if (item_type_.compare("float") == 0)
if (item_type_ == "float")
{
item_size_ = sizeof(float);
}
else if (item_type_.compare("gr_complex") == 0)
else if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
if (inverted_spectrum)
@ -69,15 +69,15 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
conjugate_cc_ = make_conjugate_cc();
}
}
else if (item_type_.compare("short") == 0)
else if (item_type_ == "short")
{
item_size_ = sizeof(int16_t);
}
else if (item_type_.compare("ishort") == 0)
else if (item_type_ == "ishort")
{
item_size_ = sizeof(int16_t);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
if (inverted_spectrum)
@ -85,15 +85,15 @@ Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string ro
conjugate_sc_ = make_conjugate_sc();
}
}
else if (item_type_.compare("byte") == 0)
else if (item_type_ == "byte")
{
item_size_ = sizeof(int8_t);
}
else if (item_type_.compare("ibyte") == 0)
else if (item_type_ == "ibyte")
{
item_size_ = sizeof(int8_t);
}
else if (item_type_.compare("cbyte") == 0)
else if (item_type_ == "cbyte")
{
item_size_ = sizeof(lv_8sc_t);
if (inverted_spectrum)
@ -145,15 +145,15 @@ gr::basic_block_sptr Pass_Through::get_left_block()
{
if (inverted_spectrum)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return conjugate_cc_;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return conjugate_sc_;
}
else if (item_type_.compare("cbyte") == 0)
else if (item_type_ == "cbyte")
{
return conjugate_ic_;
}
@ -172,15 +172,15 @@ gr::basic_block_sptr Pass_Through::get_right_block()
{
if (inverted_spectrum)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return conjugate_cc_;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return conjugate_sc_;
}
else if (item_type_.compare("cbyte") == 0)
else if (item_type_ == "cbyte")
{
return conjugate_ic_;
}

View File

@ -64,7 +64,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
DLOG(INFO) << "dump_ is " << dump_;
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
resampler_ = direct_resampler_make_conditioner_cc(sample_freq_in_, sample_freq_out_);
@ -73,7 +73,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "resampler(" << resampler_->unique_id() << ")";
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
resampler_ = direct_resampler_make_conditioner_cs(sample_freq_in_, sample_freq_out_);
@ -82,7 +82,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "resampler(" << resampler_->unique_id() << ")";
}
else if (item_type_.compare("cbyte") == 0)
else if (item_type_ == "cbyte")
{
item_size_ = sizeof(lv_8sc_t);
resampler_ = direct_resampler_make_conditioner_cb(sample_freq_in_, sample_freq_out_);

View File

@ -60,7 +60,7 @@ MmseResamplerConditioner::MmseResamplerConditioner(
DLOG(INFO) << "dump_ is " << dump_;
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);

View File

@ -110,7 +110,7 @@ SignalGenerator::SignalGenerator(ConfigurationInterface* configuration,
}
}
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
DLOG(INFO) << "Item size " << item_size_;
@ -154,7 +154,7 @@ SignalGenerator::~SignalGenerator() = default;
void SignalGenerator::connect(gr::top_block_sptr top_block)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
top_block->connect(gen_source_, 0, vector_to_stream_, 0);
DLOG(INFO) << "connected gen_source to vector_to_stream";
@ -170,7 +170,7 @@ void SignalGenerator::connect(gr::top_block_sptr top_block)
void SignalGenerator::disconnect(gr::top_block_sptr top_block)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
top_block->disconnect(gen_source_, 0, vector_to_stream_, 0);
if (dump_)

View File

@ -59,8 +59,8 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present
if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s;
if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source;
if (FLAGS_s != "-") filename_ = FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false);
@ -74,28 +74,28 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
bool is_complex = false;
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
}
else if (item_type_.compare("float") == 0)
else if (item_type_ == "float")
{
item_size_ = sizeof(float);
}
else if (item_type_.compare("short") == 0)
else if (item_type_ == "short")
{
item_size_ = sizeof(int16_t);
}
else if (item_type_.compare("ishort") == 0)
else if (item_type_ == "ishort")
{
item_size_ = sizeof(int16_t);
is_complex = true;
}
else if (item_type_.compare("byte") == 0)
else if (item_type_ == "byte")
{
item_size_ = sizeof(int8_t);
}
else if (item_type_.compare("ibyte") == 0)
else if (item_type_ == "ibyte")
{
item_size_ = sizeof(int8_t);
is_complex = true;
@ -135,7 +135,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
}
catch (const std::exception& e)
{
if (filename_.compare(default_filename) == 0)
if (filename_ == default_filename)
{
std::cerr
<< "The configuration file has not been found."

View File

@ -51,7 +51,7 @@ LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration,
samples_ = configuration->property(role + ".samples", 0);
filename_ = configuration->property(role + ".filename", default_filename);
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
labsat23_source_ = labsat23_make_source(filename_.c_str(), channel_selector);

View File

@ -57,8 +57,8 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present
if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s;
if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source;
if (FLAGS_s != "-") filename_ = FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false);
@ -66,7 +66,7 @@ NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false);
if (item_type_.compare("byte") == 0)
if (item_type_ == "byte")
{
item_size_ = sizeof(char);
}

View File

@ -69,11 +69,11 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
port_ = configuration->property(role + ".port", default_port);
flip_iq_ = configuration->property(role + ".flip_iq", false);
if (item_type_.compare("short") == 0)
if (item_type_ == "short")
{
item_size_ = sizeof(short);
}
else if (item_type_.compare("gr_complex") == 0)
else if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
// 1. Make the gr block

View File

@ -56,8 +56,8 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration
filename_ = configuration->property(role + ".filename", default_filename);
// override value with commandline flag, if present
if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source;
if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s;
if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source;
if (FLAGS_s != "-") filename_ = FLAGS_s;
item_type_ = configuration->property(role + ".item_type", default_item_type);
repeat_ = configuration->property(role + ".repeat", false);
@ -65,7 +65,7 @@ SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false);
if (item_type_.compare("int") == 0)
if (item_type_ == "int")
{
item_size_ = sizeof(int);
}

View File

@ -57,13 +57,13 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
// available transports on the system (ethernet, usb...).
// To narrow down the discovery process to a particular device,
// specify a transport key/value pair specific to your device.
if (empty.compare(device_address_) != 0) // if not empty
if (empty != device_address_) // if not empty
{
dev_addr["addr"] = device_address_;
}
//filter the device by serial number if required (useful for USB devices)
std::string device_serial = configuration->property(role + ".device_serial", empty);
if (empty.compare(device_serial) != 0) // if not empty
if (empty != device_serial) // if not empty
{
dev_addr["serial"] = device_serial;
}
@ -111,17 +111,17 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
// fc32: Complex floating point (32-bit floats) range [-1.0, +1.0].
// sc16: Complex signed integer (16-bit integers) range [-32768, +32767].
// sc8: Complex signed integer (8-bit integers) range [-128, 127].
if (item_type_.compare("cbyte") == 0)
if (item_type_ == "cbyte")
{
item_size_ = sizeof(lv_8sc_t);
uhd_stream_args_ = uhd::stream_args_t("sc8");
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
uhd_stream_args_ = uhd::stream_args_t("sc16");
}
else if (item_type_.compare("gr_complex") == 0)
else if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
uhd_stream_args_ = uhd::stream_args_t("fc32");

View File

@ -130,7 +130,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
trk_param.carrier_lock_th = carrier_lock_th;
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_param);

View File

@ -78,7 +78,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = galileo_e1_tcp_connector_make_tracking_cc(

View File

@ -128,7 +128,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
trk_param.carrier_lock_th = carrier_lock_th;
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_param);

View File

@ -83,7 +83,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_cc = glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(
@ -99,7 +99,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking(
early_late_space_chips);
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
tracking_sc = glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(
@ -142,11 +142,11 @@ void GlonassL1CaDllPllCAidTracking::stop_tracking()
void GlonassL1CaDllPllCAidTracking::start_tracking()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->start_tracking();
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->start_tracking();
}
@ -164,11 +164,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel)
{
channel_ = channel;
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_channel(channel);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_channel(channel);
}
@ -181,11 +181,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel)
void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_gnss_synchro(p_gnss_synchro);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_gnss_synchro(p_gnss_synchro);
}
@ -216,11 +216,11 @@ void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}
@ -234,11 +234,11 @@ gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block()
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}

View File

@ -75,7 +75,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking(
vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = glonass_l1_ca_dll_pll_make_tracking_cc(

View File

@ -81,7 +81,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_cc = glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(
@ -97,7 +97,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking(
early_late_space_chips);
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
tracking_sc = glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(
@ -140,11 +140,11 @@ void GlonassL2CaDllPllCAidTracking::stop_tracking()
void GlonassL2CaDllPllCAidTracking::start_tracking()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->start_tracking();
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->start_tracking();
}
@ -162,11 +162,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel)
{
channel_ = channel;
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_channel(channel);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_channel(channel);
}
@ -179,11 +179,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel)
void GlonassL2CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_gnss_synchro(p_gnss_synchro);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_gnss_synchro(p_gnss_synchro);
}
@ -214,11 +214,11 @@ void GlonassL2CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}
@ -232,11 +232,11 @@ gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block()
gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_right_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}

View File

@ -73,7 +73,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking(
vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = glonass_l2_ca_dll_pll_make_tracking_cc(

View File

@ -82,7 +82,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_cc = gps_l1_ca_dll_pll_c_aid_make_tracking_cc(
@ -98,7 +98,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking(
early_late_space_chips);
DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")";
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
item_size_ = sizeof(lv_16sc_t);
tracking_sc = gps_l1_ca_dll_pll_c_aid_make_tracking_sc(
@ -141,11 +141,11 @@ void GpsL1CaDllPllCAidTracking::stop_tracking()
void GpsL1CaDllPllCAidTracking::start_tracking()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->start_tracking();
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->start_tracking();
}
@ -162,11 +162,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel)
{
channel_ = channel;
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_channel(channel);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_channel(channel);
}
@ -178,11 +178,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel)
void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
tracking_cc->set_gnss_synchro(p_gnss_synchro);
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
tracking_sc->set_gnss_synchro(p_gnss_synchro);
}
@ -210,11 +210,11 @@ void GpsL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}
@ -227,11 +227,11 @@ gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block()
gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_right_block()
{
if (item_type_.compare("gr_complex") == 0)
if (item_type_ == "gr_complex")
{
return tracking_cc;
}
else if (item_type_.compare("cshort") == 0)
else if (item_type_ == "cshort")
{
return tracking_sc;
}

View File

@ -132,7 +132,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
trk_param.carrier_lock_th = carrier_lock_th;
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_param);

View File

@ -90,7 +90,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking(
bce_kappa = configuration->property(role + ".bce_kappa", 0);
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = gps_l1_ca_kf_make_tracking_cc(

View File

@ -70,7 +70,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking(
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = gps_l1_ca_tcp_connector_make_tracking_cc(

View File

@ -109,7 +109,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
trk_param.carrier_lock_th = carrier_lock_th;
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_param);

View File

@ -128,7 +128,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
trk_param.carrier_lock_th = carrier_lock_th;
//################# MAKE TRACKING GNURadio object ###################
if (item_type.compare("gr_complex") == 0)
if (item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_param);

View File

@ -113,7 +113,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
if (trk_parameters.system == 'G')
{
systemName = "GPS";
if (signal_type.compare("1C") == 0)
if (signal_type == "1C")
{
d_signal_carrier_freq = GPS_L1_FREQ_HZ;
d_code_period = GPS_L1_CA_CODE_PERIOD;
@ -151,7 +151,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_symbol_history.resize(GPS_CA_PREAMBLE_LENGTH_SYMBOLS); // Change fixed buffer size
d_symbol_history.clear(); // Clear all the elements in the buffer
}
else if (signal_type.compare("2S") == 0)
else if (signal_type == "2S")
{
d_signal_carrier_freq = GPS_L2_FREQ_HZ;
d_code_period = GPS_L2_M_PERIOD;
@ -165,7 +165,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
trk_parameters.track_pilot = false;
interchange_iq = false;
}
else if (signal_type.compare("L5") == 0)
else if (signal_type == "L5")
{
d_signal_carrier_freq = GPS_L5_FREQ_HZ;
d_code_period = GPS_L5i_PERIOD;
@ -207,7 +207,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else if (trk_parameters.system == 'E')
{
systemName = "Galileo";
if (signal_type.compare("1B") == 0)
if (signal_type == "1B")
{
d_signal_carrier_freq = Galileo_E1_FREQ_HZ;
d_code_period = Galileo_E1_CODE_PERIOD;
@ -231,7 +231,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
}
interchange_iq = false; // Note that E1-B and E1-C are in anti-phase, NOT IN QUADRATURE. See Galileo ICD.
}
else if (signal_type.compare("5X") == 0)
else if (signal_type == "5X")
{
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ;
d_code_period = GALILEO_E5a_CODE_PERIOD;
@ -472,15 +472,15 @@ void dll_pll_veml_tracking::start_tracking()
d_carrier_loop_filter.initialize(); // initialize the carrier filter
d_code_loop_filter.initialize(); // initialize the code filter
if (systemName.compare("GPS") == 0 and signal_type.compare("1C") == 0)
if (systemName == "GPS" and signal_type == "1C")
{
gps_l1_ca_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
}
else if (systemName.compare("GPS") == 0 and signal_type.compare("2S") == 0)
else if (systemName == "GPS" and signal_type == "2S")
{
gps_l2c_m_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN);
}
else if (systemName.compare("GPS") == 0 and signal_type.compare("L5") == 0)
else if (systemName == "GPS" and signal_type == "L5")
{
if (trk_parameters.track_pilot)
{
@ -494,7 +494,7 @@ void dll_pll_veml_tracking::start_tracking()
gps_l5i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN);
}
}
else if (systemName.compare("Galileo") == 0 and signal_type.compare("1B") == 0)
else if (systemName == "Galileo" and signal_type == "1B")
{
if (trk_parameters.track_pilot)
{
@ -509,7 +509,7 @@ void dll_pll_veml_tracking::start_tracking()
galileo_e1_code_gen_sinboc11_float(d_tracking_code, d_acquisition_gnss_synchro->Signal, d_acquisition_gnss_synchro->PRN);
}
}
else if (systemName.compare("Galileo") == 0 and signal_type.compare("5X") == 0)
else if (systemName == "Galileo" and signal_type == "5X")
{
gr_complex *aux_code = static_cast<gr_complex *>(volk_gnsssdr_malloc(sizeof(gr_complex) * d_code_length_chips, volk_gnsssdr_get_alignment()));
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
@ -578,7 +578,7 @@ void dll_pll_veml_tracking::start_tracking()
dll_pll_veml_tracking::~dll_pll_veml_tracking()
{
if (signal_type.compare("1C") == 0)
if (signal_type == "1C")
{
volk_gnsssdr_free(d_gps_l1ca_preambles_symbols);
}

View File

@ -329,7 +329,7 @@ int32_t Rtcm::bin_to_sint(const std::string& s) const
int32_t sign;
// Check for sign bit as defined RTCM doc
if (s.substr(0, 1).compare("0") == 0)
if (s.substr(0, 1) == "0")
{
sign = 1;
// Get the magnitude of the value
@ -2357,7 +2357,7 @@ std::string Rtcm::get_MSM_header(uint32_t msg_number,
std::string header = DF002.to_string() + DF003.to_string();
// GNSS Epoch Time Specific to each constellation
if ((sys.compare("R") == 0))
if ((sys == "R"))
{
// GLONASS Epoch Time
Rtcm::set_DF034(obs_time);
@ -3228,22 +3228,22 @@ std::vector<std::pair<int32_t, Gnss_Synchro> > Rtcm::sort_by_signal(const std::v
std::string sig_b_(b.second.Signal);
std::string sig_b = sig_b_.substr(0, 2);
if (system_a.compare("G") == 0)
if (system_a == "G")
{
value_a = gps_signal_map.at(sig_a);
}
if (system_a.compare("E") == 0)
if (system_a == "E")
{
value_a = galileo_signal_map.at(sig_a);
}
if (system_b.compare("G") == 0)
if (system_b == "G")
{
value_b = gps_signal_map.at(sig_b);
}
if (system_b.compare("E") == 0)
if (system_b == "E")
{
value_b = galileo_signal_map.at(sig_b);
}
@ -5166,23 +5166,23 @@ int32_t Rtcm::set_DF399(const Gnss_Synchro& gnss_synchro)
std::string sig_(gnss_synchro.Signal);
std::string sig = sig_.substr(0, 2);
if (sig.compare("1C") == 0)
if (sig == "1C")
{
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ;
}
if (sig.compare("2S") == 0)
if (sig == "2S")
{
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ;
}
if (sig.compare("5X") == 0)
if (sig == "5X")
{
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ;
}
if (sig.compare("1B") == 0)
if (sig == "1B")
{
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ;
}
if (sig.compare("7X") == 0)
if (sig == "7X")
{
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ;
}
@ -5235,31 +5235,31 @@ int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro)
std::string sig = sig_.substr(0, 2);
std::string sys(&gnss_synchro.System, 1);
if ((sig.compare("1C") == 0) && (sys.compare("G") == 0))
if ((sig == "1C") && (sys == "G"))
{
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ;
}
if ((sig.compare("2S")) == 0 && (sys.compare("G") == 0))
if ((sig.compare("2S")) == 0 && (sys == "G"))
{
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ;
}
if ((sig.compare("5X")) == 0 && (sys.compare("E") == 0))
if ((sig.compare("5X")) == 0 && (sys == "E"))
{
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ;
}
if ((sig.compare("1B")) == 0 && (sys.compare("E") == 0))
if ((sig.compare("1B")) == 0 && (sys == "E"))
{
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ;
}
if ((sig.compare("7X")) == 0 && (sys.compare("E") == 0))
if ((sig.compare("7X")) == 0 && (sys == "E"))
{
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ;
}
if ((sig.compare("1C") == 0) && (sys.compare("R") == 0))
if ((sig == "1C") && (sys == "R"))
{
lambda = GLONASS_C_m_s / ((GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN))));
}
if ((sig.compare("2C") == 0) && (sys.compare("R") == 0))
if ((sig == "2C") && (sys == "R"))
{
// TODO Need to add slot number and freq number to gnss_syncro
lambda = GLONASS_C_m_s / (GLONASS_L2_CA_FREQ_HZ);

View File

@ -854,7 +854,7 @@ private:
std::string message;
Rtcm_Message msg;
queue_->wait_and_pop(message); //message += '\n';
if (message.compare("Goodbye") == 0) break;
if (message == "Goodbye") break;
const char* char_msg = message.c_str();
msg.body_length(message.length());
std::memcpy(msg.body(), char_msg, msg.body_length());

View File

@ -80,65 +80,71 @@ int main(int argc, char** argv)
std::size_t found = rinex_filename.find_last_of(".");
if (found != std::string::npos)
{
if ((rinex_filename.substr(found + 1, found + 3).compare("gz") == 0))
if (rinex_filename.size() >= found + 3)
{
std::ifstream file(rinex_filename, std::ios_base::in | std::ios_base::binary);
if (file.fail())
if ((rinex_filename.substr(found + 1, found + 3) == "gz"))
{
std::cerr << "Could not open file " << rinex_filename << std::endl;
return 1;
}
boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
try
{
in.push(boost::iostreams::gzip_decompressor());
}
catch (const boost::exception& e)
{
std::cerr << "Could not decompress file " << rinex_filename << std::endl;
return 1;
}
in.push(file);
std::string rinex_filename_unzipped = rinex_filename.substr(0, found);
std::ofstream output_file(rinex_filename_unzipped.c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
if (file.fail())
{
std::cerr << "Could not create file " << rinex_filename_unzipped << std::endl;
return 1;
}
boost::iostreams::copy(in, output_file);
input_filename = rinex_filename_unzipped;
}
if ((rinex_filename.substr(found + 1, found + 2).compare("Z") == 0))
{
std::ifstream file(rinex_filename, std::ios_base::in | std::ios_base::binary);
if (file.fail())
{
std::cerr << "Could not open file" << rinex_filename << std::endl;
return 1;
}
file.close();
std::string uncompress_executable(UNCOMPRESS_EXECUTABLE);
if (!uncompress_executable.empty())
{
// option k is not always available, so we save a copy of the original file
std::string argum = std::string("/bin/cp " + rinex_filename + " " + rinex_filename + ".aux");
int s1 = std::system(argum.c_str());
std::string argum2 = std::string(uncompress_executable + " -f " + rinex_filename);
int s2 = std::system(argum2.c_str());
std::string argum3 = std::string("/bin/mv " + rinex_filename + +".aux" + " " + rinex_filename);
int s3 = std::system(argum3.c_str());
input_filename = rinex_filename.substr(0, found);
if ((s1 != 0) or (s2 != 0) or (s3 != 0))
std::ifstream file(rinex_filename, std::ios_base::in | std::ios_base::binary);
if (file.fail())
{
std::cerr << "Failure uncompressing file." << std::endl;
std::cerr << "Could not open file " << rinex_filename << std::endl;
return 1;
}
boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
try
{
in.push(boost::iostreams::gzip_decompressor());
}
catch (const boost::exception& e)
{
std::cerr << "Could not decompress file " << rinex_filename << std::endl;
return 1;
}
in.push(file);
std::string rinex_filename_unzipped = rinex_filename.substr(0, found);
std::ofstream output_file(rinex_filename_unzipped.c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
if (file.fail())
{
std::cerr << "Could not create file " << rinex_filename_unzipped << std::endl;
return 1;
}
boost::iostreams::copy(in, output_file);
input_filename = rinex_filename_unzipped;
}
else
}
if (rinex_filename.size() >= found + 2)
{
if ((rinex_filename.substr(found + 1, found + 2) == "Z"))
{
std::cerr << "uncompress program not found." << std::endl;
return 1;
std::ifstream file(rinex_filename, std::ios_base::in | std::ios_base::binary);
if (file.fail())
{
std::cerr << "Could not open file" << rinex_filename << std::endl;
return 1;
}
file.close();
std::string uncompress_executable(UNCOMPRESS_EXECUTABLE);
if (!uncompress_executable.empty())
{
// option k is not always available, so we save a copy of the original file
std::string argum = std::string("/bin/cp " + rinex_filename + " " + rinex_filename + ".aux");
int s1 = std::system(argum.c_str());
std::string argum2 = std::string(uncompress_executable + " -f " + rinex_filename);
int s2 = std::system(argum2.c_str());
std::string argum3 = std::string("/bin/mv " + rinex_filename + +".aux" + " " + rinex_filename);
int s3 = std::system(argum3.c_str());
input_filename = rinex_filename.substr(0, found);
if ((s1 != 0) or (s2 != 0) or (s3 != 0))
{
std::cerr << "Failure uncompressing file." << std::endl;
return 1;
}
}
else
{
std::cerr << "uncompress program not found." << std::endl;
return 1;
}
}
}
}
@ -164,7 +170,7 @@ int main(int argc, char** argv)
rnffs >> hdr;
// Check that it really is a RINEX navigation file
if (hdr.fileType.substr(0, 1).compare("N") != 0)
if (hdr.fileType.substr(0, 1) != "N")
{
std::cerr << "This is not a valid RINEX navigation file, or file not found." << std::endl;
std::cerr << "No XML file will be created." << std::endl;
@ -172,7 +178,7 @@ int main(int argc, char** argv)
}
// Collect UTC parameters from RINEX header
if (hdr.fileSys.compare("G: (GPS)") == 0 || hdr.fileSys.compare("MIXED") == 0)
if (hdr.fileSys == "G: (GPS)" || hdr.fileSys == "MIXED")
{
gps_utc_model.valid = (hdr.valid > 2147483648) ? true : false;
gps_utc_model.d_A1 = hdr.mapTimeCorr["GPUT"].A0;
@ -195,7 +201,7 @@ int main(int argc, char** argv)
gps_iono.d_beta2 = hdr.mapIonoCorr["GPSB"].param[2];
gps_iono.d_beta3 = hdr.mapIonoCorr["GPSB"].param[3];
}
if (hdr.fileSys.compare("E: (GAL)") == 0 || hdr.fileSys.compare("MIXED") == 0)
if (hdr.fileSys == "E: (GAL)" || hdr.fileSys == "MIXED")
{
gal_utc_model.A0_6 = hdr.mapTimeCorr["GAUT"].A0;
gal_utc_model.A1_6 = hdr.mapTimeCorr["GAUT"].A1;
@ -221,7 +227,7 @@ int main(int argc, char** argv)
// Read navigation data
while (rnffs >> rne)
{
if (rne.satSys.compare("G") == 0 or rne.satSys.empty())
if (rne.satSys == "G" or rne.satSys.empty())
{
// Fill GPS ephemeris object
Gps_Ephemeris eph;
@ -266,7 +272,7 @@ int main(int argc, char** argv)
eph_map[i] = eph;
i++;
}
if (rne.satSys.compare("E") == 0)
if (rne.satSys == "E")
{
// Fill Galileo ephemeris object
Galileo_Ephemeris eph;