mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-25 04:27:39 +00:00
Reduce number of warnings raised by bugprone-* clang-tidy checks
This commit is contained in:
@@ -64,7 +64,7 @@ BeidouB1iPcpsAcquisition::BeidouB1iPcpsAcquisition(
|
||||
|
||||
num_codes_ = acq_parameters_.sampled_ms;
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B1I_CODE_RATE_CPS / BEIDOU_B1I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
@@ -172,11 +172,7 @@ void BeidouB1iPcpsAcquisition::set_state(int state)
|
||||
|
||||
void BeidouB1iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -197,11 +193,7 @@ void BeidouB1iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void BeidouB1iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -220,11 +212,7 @@ void BeidouB1iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr BeidouB1iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ BeidouB3iPcpsAcquisition::BeidouB3iPcpsAcquisition(
|
||||
|
||||
num_codes_ = acq_parameters_.sampled_ms;
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (BEIDOU_B3I_CODE_RATE_CPS / BEIDOU_B3I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
@@ -169,11 +169,7 @@ void BeidouB3iPcpsAcquisition::set_state(int state)
|
||||
|
||||
void BeidouB3iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -194,11 +190,7 @@ void BeidouB3iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void BeidouB3iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -217,11 +209,7 @@ void BeidouB3iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr BeidouB3iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
@@ -76,12 +76,12 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
|
||||
default_dump_filename);
|
||||
|
||||
// -- Find number of samples per spreading code (4 ms) -----------------
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
int samples_per_ms = code_length_ / 4;
|
||||
auto samples_per_ms = static_cast<int>(code_length_) / 4;
|
||||
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
@@ -127,11 +127,11 @@ void GalileoE1Pcps8msAmbiguousAcquisition::stop_acquisition()
|
||||
|
||||
void GalileoE1Pcps8msAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
|
||||
@@ -62,7 +62,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
|
||||
acquire_pilot_ = configuration->property(role + ".acquire_pilot", false);
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
@@ -214,11 +214,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_state(int state)
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -239,11 +235,7 @@ void GalileoE1PcpsAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -262,11 +254,7 @@ void GalileoE1PcpsAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
||||
acq_parameters.all_fft_codes = d_all_fft_codes_.data();
|
||||
|
||||
acq_parameters.num_doppler_bins_step2 = configuration->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", static_cast<float>(125.0));
|
||||
acq_parameters.make_2_steps = configuration->property(role + ".make_two_steps", false);
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
// reference for the FPGA FFT-IFFT attenuation factor
|
||||
|
||||
@@ -36,8 +36,8 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
@@ -68,12 +68,12 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
|
||||
|
||||
// -- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
int samples_per_ms = code_length_ / 4;
|
||||
auto samples_per_ms = static_cast<int>(code_length_) / 4;
|
||||
|
||||
code_data_ = std::vector<std::complex<float>>(vector_length_);
|
||||
code_pilot_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
@@ -44,8 +44,8 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
@@ -63,10 +63,10 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 8);
|
||||
|
||||
/* --- Find number of samples per spreading code (4 ms) -----------------*/
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
int samples_per_ms = round(code_length_ / 4.0);
|
||||
auto samples_per_ms = static_cast<int>(round(code_length_ / 4.0));
|
||||
|
||||
/*Calculate the folding factor value based on the formula described in the paper.
|
||||
This may be a bug, but acquisition also work by variying the folding factor at va-
|
||||
@@ -162,11 +162,11 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::stop_acquisition()
|
||||
|
||||
void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
|
||||
@@ -44,8 +44,8 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
@@ -79,12 +79,12 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
|
||||
|
||||
// -- Find number of samples per spreading code (4 ms) -----------------
|
||||
|
||||
code_length_ = round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(
|
||||
fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
|
||||
|
||||
int samples_per_ms = code_length_ / 4;
|
||||
auto samples_per_ms = static_cast<int>(code_length_) / 4;
|
||||
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
@@ -132,11 +132,11 @@ void GalileoE1PcpsTongAmbiguousAcquisition::stop_acquisition()
|
||||
|
||||
void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
|
||||
@@ -50,8 +50,8 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_item_type("gr_complex");
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
|
||||
@@ -86,7 +86,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
|
||||
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
|
||||
|
||||
// -- Find number of samples per spreading code (1ms)-------------------------
|
||||
code_length_ = round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_CPS * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@@ -137,11 +137,11 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::stop_acquisition()
|
||||
|
||||
void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
|
||||
if (pfa == 0.0)
|
||||
|
||||
@@ -66,7 +66,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(
|
||||
}
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_CPS / GALILEO_E5A_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
@@ -198,11 +198,7 @@ void GalileoE5aPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute__((unused)))
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -215,11 +211,7 @@ void GalileoE5aPcpsAcquisition::connect(gr::top_block_sptr top_block __attribute
|
||||
|
||||
void GalileoE5aPcpsAcquisition::disconnect(gr::top_block_sptr top_block __attribute__((unused)))
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
pcpsconf_fpga_t acq_parameters;
|
||||
std::string default_dump_filename = "../data/acquisition.dat";
|
||||
const std::string default_dump_filename("../data/acquisition.dat");
|
||||
|
||||
DLOG(INFO) << "Role " << role;
|
||||
|
||||
@@ -166,7 +166,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration->property(role + ".total_block_exp", 13);
|
||||
|
||||
acq_parameters.num_doppler_bins_step2 = configuration->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", static_cast<float>(125.0));
|
||||
acq_parameters.make_2_steps = configuration->property(role + ".make_two_steps", false);
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
@@ -61,7 +61,7 @@ GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
|
||||
fs_in_ = acq_parameters_.fs_in;
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GLONASS_L1_CA_CODE_RATE_CPS / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
@@ -173,11 +173,7 @@ void GlonassL1CaPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -196,11 +192,7 @@ void GlonassL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -221,11 +213,7 @@ void GlonassL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GlonassL1CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ GlonassL2CaPcpsAcquisition::GlonassL2CaPcpsAcquisition(
|
||||
fs_in_ = acq_parameters_.fs_in;
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GLONASS_L2_CA_CODE_RATE_CPS / GLONASS_L2_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
@@ -172,11 +172,7 @@ void GlonassL2CaPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -197,11 +193,7 @@ void GlonassL2CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -220,11 +212,7 @@ void GlonassL2CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GlonassL2CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
|
||||
item_size_ = acq_parameters_.it_size;
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
sampled_ms_ = acq_parameters_.sampled_ms;
|
||||
@@ -187,11 +187,7 @@ void GpsL1CaPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -212,11 +208,7 @@ void GpsL1CaPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -235,11 +227,7 @@ void GpsL1CaPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./acquisition.mat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -67,7 +67,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
|
||||
acq_parameters.blocking_on_standby = configuration->property(role + ".blocking_on_standby", false);
|
||||
|
||||
// -- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
acq_parameters.samples_per_ms = vector_length_;
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration->property(role + ".total_block_exp", 10);
|
||||
|
||||
acq_parameters.num_doppler_bins_step2 = configuration->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", static_cast<float>(125.0));
|
||||
acq_parameters.make_2_steps = configuration->property(role + ".make_two_steps", false);
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
@@ -37,7 +37,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -57,7 +57,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
// --- Find number of samples per spreading code -------------------------
|
||||
vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
vector_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
code_.reserve(vector_length_);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -77,7 +77,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
|
||||
default_dump_filename);
|
||||
|
||||
// -- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@@ -126,11 +126,11 @@ void GpsL1CaPcpsOpenClAcquisition::stop_acquisition()
|
||||
|
||||
void GpsL1CaPcpsOpenClAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -62,7 +62,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
|
||||
|
||||
// -- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
/* Calculate the folding factor value based on the calculations */
|
||||
auto temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
@@ -155,11 +155,11 @@ void GpsL1CaPcpsQuickSyncAcquisition::stop_acquisition()
|
||||
|
||||
void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
configuration_ = configuration;
|
||||
std::string default_item_type = "gr_complex";
|
||||
const std::string default_item_type("gr_complex");
|
||||
std::string default_dump_filename = "./data/acquisition.dat";
|
||||
|
||||
DLOG(INFO) << "role " << role;
|
||||
@@ -68,7 +68,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
|
||||
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
// -- Find number of samples per spreading code -------------------------
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
code_length_ = static_cast<unsigned int>(round(fs_in_ / (GPS_L1_CA_CODE_RATE_CPS / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||
|
||||
vector_length_ = code_length_ * sampled_ms_;
|
||||
|
||||
@@ -117,11 +117,11 @@ void GpsL1CaPcpsTongAcquisition::stop_acquisition()
|
||||
|
||||
void GpsL1CaPcpsTongAcquisition::set_threshold(float threshold)
|
||||
{
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", 0.0);
|
||||
float pfa = configuration_->property(role_ + std::to_string(channel_) + ".pfa", static_cast<float>(0.0));
|
||||
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
pfa = configuration_->property(role_ + ".pfa", 0.0);
|
||||
pfa = configuration_->property(role_ + ".pfa", static_cast<float>(0.0));
|
||||
}
|
||||
if (pfa == 0.0)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
|
||||
fs_in_ = acq_parameters_.fs_in;
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L2_M_CODE_RATE_CPS / GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
|
||||
acquisition_ = pcps_make_acquisition(acq_parameters_);
|
||||
@@ -187,11 +187,7 @@ void GpsL2MPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -212,11 +208,7 @@ void GpsL2MPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -235,11 +227,7 @@ void GpsL2MPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GpsL2MPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
||||
}
|
||||
acq_parameters.doppler_max = doppler_max_;
|
||||
|
||||
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||
auto code_length = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_CPS / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS))));
|
||||
acq_parameters.code_length = code_length;
|
||||
// The FPGA can only use FFT lengths that are a power of two.
|
||||
float nbits = ceilf(log2f(static_cast<float>(code_length)));
|
||||
|
||||
@@ -60,7 +60,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
|
||||
item_size_ = acq_parameters_.it_size;
|
||||
|
||||
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_CPS / GPS_L5I_CODE_LENGTH_CHIPS)));
|
||||
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
|
||||
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
|
||||
code_ = std::vector<std::complex<float>>(vector_length_);
|
||||
fs_in_ = acq_parameters_.fs_in;
|
||||
|
||||
@@ -188,11 +188,7 @@ void GpsL5iPcpsAcquisition::set_state(int state)
|
||||
|
||||
void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to connect
|
||||
}
|
||||
@@ -213,11 +209,7 @@ void GpsL5iPcpsAcquisition::connect(gr::top_block_sptr top_block)
|
||||
|
||||
void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
// nothing to disconnect
|
||||
}
|
||||
@@ -236,11 +228,7 @@ void GpsL5iPcpsAcquisition::disconnect(gr::top_block_sptr top_block)
|
||||
|
||||
gr::basic_block_sptr GpsL5iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
if (item_type_ == "cshort")
|
||||
if (item_type_ == "gr_complex" || item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
||||
acq_parameters.total_block_exp = configuration->property(role + ".total_block_exp", 13);
|
||||
|
||||
acq_parameters.num_doppler_bins_step2 = configuration->property(role + ".second_nbins", 4);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", 125.0);
|
||||
acq_parameters.doppler_step2 = configuration->property(role + ".second_doppler_step", static_cast<float>(125.0));
|
||||
acq_parameters.make_2_steps = configuration->property(role + ".make_two_steps", false);
|
||||
acq_parameters.max_num_acqs = configuration->property(role + ".max_num_acqs", 2);
|
||||
acquisition_fpga_ = pcps_make_acquisition_fpga(acq_parameters);
|
||||
|
||||
@@ -240,7 +240,7 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
|
||||
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
int doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
std::array<float, 1> _phase{};
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index].data(), -phase_step_rad, _phase.data(), d_fft_size);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
|
||||
d_state = 0;
|
||||
d_doppler_bias = 0;
|
||||
d_num_noncoherent_integrations_counter = 0U;
|
||||
d_consumed_samples = d_acq_parameters.sampled_ms * d_acq_parameters.samples_per_ms * (d_acq_parameters.bit_transition_flag ? 2 : 1);
|
||||
d_consumed_samples = d_acq_parameters.sampled_ms * d_acq_parameters.samples_per_ms * (d_acq_parameters.bit_transition_flag ? 2.0 : 1.0);
|
||||
if (d_acq_parameters.sampled_ms == d_acq_parameters.ms_per_code)
|
||||
{
|
||||
d_fft_size = d_consumed_samples;
|
||||
@@ -258,11 +258,11 @@ void pcps_acquisition::update_local_carrier(own::span<gr_complex> carrier_vector
|
||||
float phase_step_rad;
|
||||
if (d_acq_parameters.use_automatic_resampler)
|
||||
{
|
||||
phase_step_rad = TWO_PI * freq / static_cast<float>(d_acq_parameters.resampled_fs);
|
||||
phase_step_rad = static_cast<float>(TWO_PI) * freq / static_cast<float>(d_acq_parameters.resampled_fs);
|
||||
}
|
||||
else
|
||||
{
|
||||
phase_step_rad = TWO_PI * freq / static_cast<float>(d_acq_parameters.fs_in);
|
||||
phase_step_rad = static_cast<float>(TWO_PI) * freq / static_cast<float>(d_acq_parameters.fs_in);
|
||||
}
|
||||
std::array<float, 1> _phase{};
|
||||
volk_gnsssdr_s32f_sincos_32fc(carrier_vector.data(), -phase_step_rad, _phase.data(), carrier_vector.size());
|
||||
@@ -531,8 +531,8 @@ float pcps_acquisition::max_to_input_power_statistic(uint32_t& indext, int32_t&
|
||||
indext = index_time;
|
||||
if (!d_step_two)
|
||||
{
|
||||
int index_opp = (index_doppler + d_num_doppler_bins / 2) % d_num_doppler_bins;
|
||||
d_input_power = std::accumulate(d_magnitude_grid[index_opp].data(), d_magnitude_grid[index_opp].data() + effective_fft_size, 0.0) / effective_fft_size / 2.0 / d_num_noncoherent_integrations_counter;
|
||||
auto index_opp = (index_doppler + d_num_doppler_bins / 2) % d_num_doppler_bins;
|
||||
d_input_power = std::accumulate(d_magnitude_grid[index_opp].data(), d_magnitude_grid[index_opp].data() + effective_fft_size, static_cast<float>(0.0)) / static_cast<float>(effective_fft_size / 2.0 / d_num_noncoherent_integrations_counter);
|
||||
doppler = -static_cast<int32_t>(doppler_max) + d_doppler_center + doppler_step * static_cast<int32_t>(index_doppler);
|
||||
}
|
||||
else
|
||||
@@ -891,12 +891,12 @@ void pcps_acquisition::calculate_threshold()
|
||||
return;
|
||||
}
|
||||
|
||||
int effective_fft_size = (d_acq_parameters.bit_transition_flag ? (d_fft_size / 2) : d_fft_size);
|
||||
auto effective_fft_size = static_cast<int>(d_acq_parameters.bit_transition_flag ? (d_fft_size / 2) : d_fft_size);
|
||||
int num_doppler_bins = (d_step_two ? d_num_doppler_bins_step2 : d_num_doppler_bins);
|
||||
|
||||
int num_bins = effective_fft_size * num_doppler_bins;
|
||||
|
||||
d_threshold = 2.0 * boost::math::gamma_p_inv(2.0 * d_acq_parameters.max_dwells, std::pow(1.0 - pfa, 1.0 / static_cast<float>(num_bins)));
|
||||
d_threshold = static_cast<float>(2.0 * boost::math::gamma_p_inv(2.0 * d_acq_parameters.max_dwells, std::pow(1.0 - pfa, 1.0 / static_cast<float>(num_bins))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void pcps_cccwsr_acquisition_cc::init()
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
std::array<float, 1> _phase{};
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index].data(), -phase_step_rad, _phase.data(), d_fft_size);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ void pcps_quicksync_acquisition_cc::init()
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
std::array<float, 1> _phase{};
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index].data(), -phase_step_rad, _phase.data(), d_samples_per_code * d_folding_factor);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ void pcps_tong_acquisition_cc::init()
|
||||
for (uint32_t doppler_index = 0; doppler_index < d_num_doppler_bins; doppler_index++)
|
||||
{
|
||||
int32_t doppler = -static_cast<int32_t>(d_doppler_max) + d_doppler_step * doppler_index;
|
||||
float phase_step_rad = TWO_PI * doppler / static_cast<float>(d_fs_in);
|
||||
float phase_step_rad = static_cast<float>(TWO_PI) * doppler / static_cast<float>(d_fs_in);
|
||||
std::array<float, 1> _phase{};
|
||||
volk_gnsssdr_s32f_sincos_32fc(d_grid_doppler_wipeoffs[doppler_index].data(), -phase_step_rad, _phase.data(), d_fft_size);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ void Acq_Conf::ConfigureAutomaticResampler(double opt_freq)
|
||||
|
||||
void Acq_Conf::SetDerivedParams()
|
||||
{
|
||||
samples_per_ms = static_cast<float>(resampled_fs) * 0.001;
|
||||
samples_per_ms = static_cast<float>(resampled_fs) * 0.001F;
|
||||
samples_per_chip = static_cast<unsigned int>(std::ceil(static_cast<float>(resampled_fs) / chips_per_second));
|
||||
samples_per_code = samples_per_ms * ms_per_code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user