mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 19:55:47 +00:00
Replace C style casts by C++ casts
This commit is contained in:
parent
eea6dc29f8
commit
4dd8aa12b4
@ -300,7 +300,7 @@ char Nmea_Printer::checkSum(const std::string& sentence)
|
|||||||
// iterate over the string, XOR each byte with the total sum:
|
// iterate over the string, XOR each byte with the total sum:
|
||||||
for (char c : sentence)
|
for (char c : sentence)
|
||||||
{
|
{
|
||||||
check = char(check ^ c);
|
check = static_cast<char>(check ^ c);
|
||||||
}
|
}
|
||||||
// return the result
|
// return the result
|
||||||
return check;
|
return check;
|
||||||
|
@ -11769,7 +11769,7 @@ void Rinex_Printer::to_date_time(int32_t gps_week, int32_t gps_tow, int& year, i
|
|||||||
int32_t Rinex_Printer::signalStrength(const double snr)
|
int32_t Rinex_Printer::signalStrength(const double snr)
|
||||||
{
|
{
|
||||||
int32_t ss;
|
int32_t ss;
|
||||||
ss = int(std::min(std::max(int(floor(snr / 6)), 1), 9));
|
ss = static_cast<int>(std::min(std::max(static_cast<int>(floor(snr / 6)), 1), 9));
|
||||||
return ss;
|
return ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ float BeidouB3iPcpsAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1.0 / static_cast<double>(ncells);
|
double exponent = 1.0 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ GalileoE1PcpsAmbiguousAcquisitionFpga::GalileoE1PcpsAmbiguousAcquisitionFpga(
|
|||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
|
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length * 2));
|
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||||
uint32_t nsamples_total = pow(2, nbits);
|
uint32_t nsamples_total = pow(2, nbits);
|
||||||
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ float GalileoE5aPcpsAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ GalileoE5aPcpsAcquisitionFpga::GalileoE5aPcpsAcquisitionFpga(ConfigurationInterf
|
|||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
|
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length * 2));
|
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||||
uint32_t nsamples_total = pow(2, nbits);
|
uint32_t nsamples_total = pow(2, nbits);
|
||||||
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 1);
|
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 1);
|
||||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||||
|
@ -276,7 +276,7 @@ float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
|
|||||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
|
||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length * 2));
|
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||||
uint32_t nsamples_total = pow(2, nbits);
|
uint32_t nsamples_total = pow(2, nbits);
|
||||||
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
||||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||||
|
@ -243,7 +243,7 @@ float GpsL1CaPcpsOpenClAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1 / static_cast<double>(ncells);
|
double exponent = 1 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ float GpsL2MPcpsAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1.0 / static_cast<double>(ncells);
|
double exponent = 1.0 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ GpsL2MPcpsAcquisitionFpga::GpsL2MPcpsAcquisitionFpga(
|
|||||||
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
unsigned int code_length = std::round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
|
||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length));
|
float nbits = ceilf(log2f(static_cast<float>(code_length)));
|
||||||
unsigned int nsamples_total = pow(2, nbits);
|
unsigned int nsamples_total = pow(2, nbits);
|
||||||
unsigned int select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
unsigned int select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 0);
|
||||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||||
|
@ -282,7 +282,7 @@ float GpsL5iPcpsAcquisition::calculate_threshold(float pfa)
|
|||||||
unsigned int ncells = vector_length_ * frequency_bins;
|
unsigned int ncells = vector_length_ * frequency_bins;
|
||||||
double exponent = 1.0 / static_cast<double>(ncells);
|
double exponent = 1.0 / static_cast<double>(ncells);
|
||||||
double val = pow(1.0 - pfa, exponent);
|
double val = pow(1.0 - pfa, exponent);
|
||||||
auto lambda = double(vector_length_);
|
auto lambda = static_cast<double>(vector_length_);
|
||||||
boost::math::exponential_distribution<double> mydist(lambda);
|
boost::math::exponential_distribution<double> mydist(lambda);
|
||||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ GpsL5iPcpsAcquisitionFpga::GpsL5iPcpsAcquisitionFpga(
|
|||||||
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
auto code_length = static_cast<uint32_t>(std::round(static_cast<double>(fs_in) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||||
acq_parameters.code_length = code_length;
|
acq_parameters.code_length = code_length;
|
||||||
// The FPGA can only use FFT lengths that are a power of two.
|
// The FPGA can only use FFT lengths that are a power of two.
|
||||||
float nbits = ceilf(log2f((float)code_length * 2));
|
float nbits = ceilf(log2f(static_cast<float>(code_length) * 2.0));
|
||||||
uint32_t nsamples_total = pow(2, nbits);
|
uint32_t nsamples_total = pow(2, nbits);
|
||||||
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 1);
|
uint32_t select_queue_Fpga = configuration_->property(role + ".select_queue_Fpga", 1);
|
||||||
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
acq_parameters.select_queue_Fpga = select_queue_Fpga;
|
||||||
|
@ -389,6 +389,6 @@ void FirFilter::init()
|
|||||||
taps_.reserve(taps_d.size());
|
taps_.reserve(taps_d.size());
|
||||||
for (double& it : taps_d)
|
for (double& it : taps_d)
|
||||||
{
|
{
|
||||||
taps_.push_back(float(it));
|
taps_.push_back(static_cast<float>(it));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,32 +53,32 @@ void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest,
|
|||||||
for (size_t i = 0; i < GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1; i++)
|
for (size_t i = 0; i < GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1; i++)
|
||||||
{
|
{
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
|
hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
|
||||||
_dest[index] = std::complex<float>(0.0, float(a[0]));
|
_dest[index] = std::complex<float>(0.0, static_cast<float>(a[0]));
|
||||||
_dest[index + 1] = std::complex<float>(0.0, float(a[1]));
|
_dest[index + 1] = std::complex<float>(0.0, static_cast<float>(a[1]));
|
||||||
_dest[index + 2] = std::complex<float>(0.0, float(a[2]));
|
_dest[index + 2] = std::complex<float>(0.0, static_cast<float>(a[2]));
|
||||||
_dest[index + 3] = std::complex<float>(0.0, float(a[3]));
|
_dest[index + 3] = std::complex<float>(0.0, static_cast<float>(a[3]));
|
||||||
index = index + 4;
|
index = index + 4;
|
||||||
}
|
}
|
||||||
// last 2 bits are filled up zeros
|
// last 2 bits are filled up zeros
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
|
hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
|
||||||
_dest[index] = std::complex<float>(float(0.0), a[0]);
|
_dest[index] = std::complex<float>(0.0, static_cast<float>(a[0]));
|
||||||
_dest[index + 1] = std::complex<float>(float(0.0), a[1]);
|
_dest[index + 1] = std::complex<float>(0.0, static_cast<float>(a[1]));
|
||||||
}
|
}
|
||||||
else if (_Signal[0] == '5' && _Signal[1] == 'I')
|
else if (_Signal[0] == '5' && _Signal[1] == 'I')
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1; i++)
|
for (size_t i = 0; i < GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1; i++)
|
||||||
{
|
{
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
|
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
|
||||||
_dest[index] = std::complex<float>(float(a[0]), 0.0);
|
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
|
||||||
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
|
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
|
||||||
_dest[index + 2] = std::complex<float>(float(a[2]), 0.0);
|
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
|
||||||
_dest[index + 3] = std::complex<float>(float(a[3]), 0.0);
|
_dest[index + 3] = std::complex<float>(static_cast<float>(a[3]), 0.0);
|
||||||
index = index + 4;
|
index = index + 4;
|
||||||
}
|
}
|
||||||
// last 2 bits are filled up zeros
|
// last 2 bits are filled up zeros
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
|
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
|
||||||
_dest[index] = std::complex<float>(float(a[0]), 0.0);
|
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
|
||||||
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
|
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
|
||||||
}
|
}
|
||||||
else if (_Signal[0] == '5' && _Signal[1] == 'X')
|
else if (_Signal[0] == '5' && _Signal[1] == 'X')
|
||||||
{
|
{
|
||||||
@ -87,17 +87,17 @@ void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest,
|
|||||||
{
|
{
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
|
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
|
||||||
hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
|
hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
|
||||||
_dest[index] = std::complex<float>(float(a[0]), float(b[0]));
|
_dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0]));
|
||||||
_dest[index + 1] = std::complex<float>(float(a[1]), float(b[1]));
|
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1]));
|
||||||
_dest[index + 2] = std::complex<float>(float(a[2]), float(b[2]));
|
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), static_cast<float>(b[2]));
|
||||||
_dest[index + 3] = std::complex<float>(float(a[3]), float(b[3]));
|
_dest[index + 3] = std::complex<float>(static_cast<float>(a[3]), static_cast<float>(b[3]));
|
||||||
index = index + 4;
|
index = index + 4;
|
||||||
}
|
}
|
||||||
// last 2 bits are filled up zeros
|
// last 2 bits are filled up zeros
|
||||||
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
|
hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
|
||||||
hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
|
hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
|
||||||
_dest[index] = std::complex<float>(float(a[0]), float(b[0]));
|
_dest[index] = std::complex<float>(static_cast<float>(a[0]), static_cast<float>(b[0]));
|
||||||
_dest[index + 1] = std::complex<float>(float(a[1]), float(b[1]));
|
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), static_cast<float>(b[1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define MIN_PPP(x, y) ((x) <= (y) ? (x) : (y))
|
#define MIN_PPP(x, y) ((x) <= (y) ? (x) : (y))
|
||||||
#define ROUND_PPP(x) (int)floor((x) + 0.5)
|
#define ROUND_PPP(x) static_cast<int>(floor((x) + 0.5))
|
||||||
|
|
||||||
#define SWAP_I(x, y) \
|
#define SWAP_I(x, y) \
|
||||||
do \
|
do \
|
||||||
|
@ -360,9 +360,9 @@ void tidedisp(gtime_t tutc, const double *rr, int opt, const erp_t *erp,
|
|||||||
|
|
||||||
#ifdef IERS_MODEL
|
#ifdef IERS_MODEL
|
||||||
time2epoch(tutc, ep);
|
time2epoch(tutc, ep);
|
||||||
year = (int)ep[0];
|
year = static_cast<int>(ep[0]);
|
||||||
mon = (int)ep[1];
|
mon = static_cast<int>(ep[1]);
|
||||||
day = (int)ep[2];
|
day = static_cast<int>(ep[2]);
|
||||||
fhr = ep[3] + ep[4] / 60.0 + ep[5] / 3600.0;
|
fhr = ep[3] + ep[4] / 60.0 + ep[5] / 3600.0;
|
||||||
|
|
||||||
/* call DEHANTTIDEINEL */
|
/* call DEHANTTIDEINEL */
|
||||||
|
@ -103,12 +103,12 @@ Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc(
|
|||||||
//pinned memory mode - use special function to get OS-pinned memory
|
//pinned memory mode - use special function to get OS-pinned memory
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
cudaHostAlloc((void **)&d_ca_code, (static_cast<int32_t>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex)), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void **>(&d_ca_code), (static_cast<int32_t>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex)), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
||||||
// Get space for the resampled early / prompt / late local replicas
|
// Get space for the resampled early / prompt / late local replicas
|
||||||
cudaHostAlloc((void **)&d_local_code_shift_chips, d_n_correlator_taps * sizeof(float), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void **>(&d_local_code_shift_chips), d_n_correlator_taps * sizeof(float), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
||||||
cudaHostAlloc((void **)&in_gpu, 2 * d_vector_length * sizeof(gr_complex), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void **>(&in_gpu), 2 * d_vector_length * sizeof(gr_complex), cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
cudaHostAlloc((void **)&d_correlator_outs, sizeof(gr_complex) * d_n_correlator_taps, cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void **>(&d_correlator_outs), sizeof(gr_complex) * d_n_correlator_taps, cudaHostAllocMapped || cudaHostAllocWriteCombined);
|
||||||
|
|
||||||
// Set TAPs delay values [chips]
|
// Set TAPs delay values [chips]
|
||||||
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
d_local_code_shift_chips[0] = -d_early_late_spc_chips;
|
||||||
|
@ -522,7 +522,7 @@ void Fpga_Multicorrelator_8sc::initialize_secondary_code(uint32_t secondary_code
|
|||||||
|
|
||||||
void Fpga_Multicorrelator_8sc::write_secondary_code(uint32_t secondary_code_length, std::string *secondary_code_string, uint32_t reg_addr)
|
void Fpga_Multicorrelator_8sc::write_secondary_code(uint32_t secondary_code_length, std::string *secondary_code_string, uint32_t reg_addr)
|
||||||
{
|
{
|
||||||
uint32_t num_words = ceil(((float)secondary_code_length) / secondary_code_word_size);
|
uint32_t num_words = ceil(static_cast<float>(secondary_code_length) / secondary_code_word_size);
|
||||||
uint32_t last_word_size = secondary_code_length % secondary_code_word_size;
|
uint32_t last_word_size = secondary_code_length % secondary_code_word_size;
|
||||||
|
|
||||||
if (last_word_size == 0)
|
if (last_word_size == 0)
|
||||||
|
@ -79,7 +79,7 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block,
|
|||||||
|
|
||||||
char *buffer_float; // temporary buffer to convert from binary char to float and from float to char
|
char *buffer_float; // temporary buffer to convert from binary char to float and from float to char
|
||||||
signed char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA
|
signed char *buffer_DMA; // temporary buffer to store the samples to be sent to the DMA
|
||||||
buffer_float = (char *)malloc(FLOAT_SIZE); // allocate space for the temporary buffer
|
buffer_float = reinterpret_cast<char *>(malloc(FLOAT_SIZE)); // allocate space for the temporary buffer
|
||||||
if (!buffer_float)
|
if (!buffer_float)
|
||||||
{
|
{
|
||||||
std::cerr << "Memory error!" << std::endl;
|
std::cerr << "Memory error!" << std::endl;
|
||||||
@ -102,7 +102,7 @@ void thread_acquisition_send_rx_samples(gr::top_block_sptr top_block,
|
|||||||
// first step: check for the maximum value of the received signal
|
// first step: check for the maximum value of the received signal
|
||||||
float max = 0;
|
float max = 0;
|
||||||
float *pointer_float;
|
float *pointer_float;
|
||||||
pointer_float = (float *)&buffer_float[0];
|
pointer_float = reinterpret_cast<float *>(&buffer_float[0]);
|
||||||
for (int k = 0; k < file_length; k = k + FLOAT_SIZE)
|
for (int k = 0; k < file_length; k = k + FLOAT_SIZE)
|
||||||
{
|
{
|
||||||
size_t result = fread(buffer_float, FLOAT_SIZE, 1, rx_signal_file);
|
size_t result = fread(buffer_float, FLOAT_SIZE, 1, rx_signal_file);
|
||||||
|
@ -402,7 +402,7 @@ void* handler_DMA_obs_test(void* arguments)
|
|||||||
while (send_samples_start_obs_test == 0)
|
while (send_samples_start_obs_test == 0)
|
||||||
; // wait until acquisition starts
|
; // wait until acquisition starts
|
||||||
// skip initial samples
|
// skip initial samples
|
||||||
int skip_samples = (int)FLAGS_skip_samples;
|
int skip_samples = static_cast<int>(FLAGS_skip_samples);
|
||||||
|
|
||||||
fseek(rx_signal_file_id, (skip_samples + skip_used_samples) * 2, SEEK_SET);
|
fseek(rx_signal_file_id, (skip_samples + skip_used_samples) * 2, SEEK_SET);
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ bool HybridObservablesTestFpga::acquire_signal()
|
|||||||
|
|
||||||
args.nsamples_tx = TEST_OBS_DOWNAMPLING_FILTER_INIT_SAMPLES + TEST_OBS_DOWNSAMPLING_FILTER_DELAY;
|
args.nsamples_tx = TEST_OBS_DOWNAMPLING_FILTER_INIT_SAMPLES + TEST_OBS_DOWNSAMPLING_FILTER_DELAY;
|
||||||
|
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
@ -656,7 +656,7 @@ bool HybridObservablesTestFpga::acquire_signal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create DMA child process
|
// create DMA child process
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
@ -1672,7 +1672,7 @@ TEST_F(HybridObservablesTestFpga, ValidationOfResults)
|
|||||||
|
|
||||||
args.skip_used_samples = 0;
|
args.skip_used_samples = 0;
|
||||||
|
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA_obs_test, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -317,10 +317,10 @@ TEST(RinexPrinterTest, GlonassObsLog)
|
|||||||
gs4.System = *sys.c_str();
|
gs4.System = *sys.c_str();
|
||||||
|
|
||||||
std::string sig = "1C";
|
std::string sig = "1C";
|
||||||
std::memcpy((void*)gs1.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs1.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs2.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs2.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs3.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs3.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs4.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs4.Signal), sig.c_str(), 3);
|
||||||
|
|
||||||
gs1.PRN = 3;
|
gs1.PRN = 3;
|
||||||
gs2.PRN = 8;
|
gs2.PRN = 8;
|
||||||
@ -680,16 +680,16 @@ TEST(RinexPrinterTest, MixedObsLogGpsGlo)
|
|||||||
gs8.System = *sys.c_str();
|
gs8.System = *sys.c_str();
|
||||||
|
|
||||||
std::string sig = "1C";
|
std::string sig = "1C";
|
||||||
std::memcpy((void*)gs1.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs1.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs2.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs2.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs3.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs3.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs4.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs4.Signal), sig.c_str(), 3);
|
||||||
|
|
||||||
sig = "1G";
|
sig = "1G";
|
||||||
std::memcpy((void*)gs5.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs5.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs6.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs6.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs7.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs7.Signal), sig.c_str(), 3);
|
||||||
std::memcpy((void*)gs8.Signal, sig.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gs8.Signal), sig.c_str(), 3);
|
||||||
|
|
||||||
gs1.PRN = 3;
|
gs1.PRN = 3;
|
||||||
gs2.PRN = 8;
|
gs2.PRN = 8;
|
||||||
|
@ -386,12 +386,12 @@ TEST(RtcmTest, MSMCell)
|
|||||||
gnss_synchro5.System = *gps.c_str();
|
gnss_synchro5.System = *gps.c_str();
|
||||||
gnss_synchro6.System = *glo.c_str();
|
gnss_synchro6.System = *glo.c_str();
|
||||||
|
|
||||||
std::memcpy((void*)gnss_synchro.Signal, x5.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro.Signal), x5.c_str(), 3);
|
||||||
std::memcpy((void*)gnss_synchro2.Signal, s2.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro2.Signal), s2.c_str(), 3);
|
||||||
std::memcpy((void*)gnss_synchro3.Signal, c1.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro3.Signal), c1.c_str(), 3);
|
||||||
std::memcpy((void*)gnss_synchro4.Signal, x5.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro4.Signal), x5.c_str(), 3);
|
||||||
std::memcpy((void*)gnss_synchro5.Signal, c1.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro5.Signal), c1.c_str(), 3);
|
||||||
std::memcpy((void*)gnss_synchro6.Signal, c1.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro6.Signal), c1.c_str(), 3);
|
||||||
|
|
||||||
gnss_synchro.Pseudorange_m = 20000000.0;
|
gnss_synchro.Pseudorange_m = 20000000.0;
|
||||||
gnss_synchro2.Pseudorange_m = 20001010.0;
|
gnss_synchro2.Pseudorange_m = 20001010.0;
|
||||||
@ -465,7 +465,7 @@ TEST(RtcmTest, MSMCell)
|
|||||||
Gnss_Synchro gnss_synchro7;
|
Gnss_Synchro gnss_synchro7;
|
||||||
gnss_synchro7.PRN = 10;
|
gnss_synchro7.PRN = 10;
|
||||||
gnss_synchro7.System = *gps.c_str();
|
gnss_synchro7.System = *gps.c_str();
|
||||||
std::memcpy((void*)gnss_synchro7.Signal, s2.c_str(), 3);
|
std::memcpy(reinterpret_cast<void*>(gnss_synchro7.Signal), s2.c_str(), 3);
|
||||||
gnss_synchro7.Pseudorange_m = 24000000.0;
|
gnss_synchro7.Pseudorange_m = 24000000.0;
|
||||||
|
|
||||||
std::map<int, Gnss_Synchro> pseudoranges3;
|
std::map<int, Gnss_Synchro> pseudoranges3;
|
||||||
|
@ -83,7 +83,7 @@ void send_tracking_gps_input_samples(FILE *rx_signal_file,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_DMA = (char *)malloc(DMA_TRACK_TRANSFER_SIZE);
|
buffer_DMA = reinterpret_cast<char *>(malloc(DMA_TRACK_TRANSFER_SIZE));
|
||||||
if (!buffer_DMA)
|
if (!buffer_DMA)
|
||||||
{
|
{
|
||||||
std::cerr << "Memory error!" << std::endl;
|
std::cerr << "Memory error!" << std::endl;
|
||||||
|
@ -86,12 +86,12 @@ TEST(GpuMulticorrelatorTest, MeasureExecutionTime)
|
|||||||
//pinned memory mode - use special function to get OS-pinned memory
|
//pinned memory mode - use special function to get OS-pinned memory
|
||||||
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
d_n_correlator_taps = 3; // Early, Prompt, and Late
|
||||||
// Get space for a vector with the C/A code replica sampled 1x/chip
|
// Get space for a vector with the C/A code replica sampled 1x/chip
|
||||||
cudaHostAlloc((void**)&d_ca_code, (static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex)), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void**>(&d_ca_code), (static_cast<int>(GPS_L1_CA_CODE_LENGTH_CHIPS) * sizeof(gr_complex)), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
||||||
// Get space for the resampled early / prompt / late local replicas
|
// Get space for the resampled early / prompt / late local replicas
|
||||||
cudaHostAlloc((void**)&d_local_code_shift_chips, d_n_correlator_taps * sizeof(float), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void**>(&d_local_code_shift_chips), d_n_correlator_taps * sizeof(float), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
||||||
cudaHostAlloc((void**)&in_gpu, 2 * d_vector_length * sizeof(gr_complex), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void**>(&in_gpu), 2 * d_vector_length * sizeof(gr_complex), cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
||||||
// correlator outputs (scalar)
|
// correlator outputs (scalar)
|
||||||
cudaHostAlloc((void**)&d_correlator_outs, sizeof(gr_complex) * d_n_correlator_taps, cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
cudaHostAlloc(reinterpret_cast<void**>(&d_correlator_outs), sizeof(gr_complex) * d_n_correlator_taps, cudaHostAllocMapped | cudaHostAllocWriteCombined);
|
||||||
|
|
||||||
//--- Perform initializations ------------------------------
|
//--- Perform initializations ------------------------------
|
||||||
//local code resampler on GPU
|
//local code resampler on GPU
|
||||||
|
@ -485,7 +485,7 @@ void* handler_DMA(void* arguments)
|
|||||||
; // wait until main thread tells the DMA to start
|
; // wait until main thread tells the DMA to start
|
||||||
|
|
||||||
// skip initial samples
|
// skip initial samples
|
||||||
int skip_samples = (int)FLAGS_skip_samples;
|
int skip_samples = static_cast<int>(FLAGS_skip_samples);
|
||||||
|
|
||||||
fseek(rx_signal_file_id, (skip_samples + skip_used_samples) * 2, SEEK_SET);
|
fseek(rx_signal_file_id, (skip_samples + skip_used_samples) * 2, SEEK_SET);
|
||||||
|
|
||||||
@ -723,7 +723,7 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
|
|||||||
|
|
||||||
args.nsamples_tx = DOWNAMPLING_FILTER_INIT_SAMPLES + DOWNSAMPLING_FILTER_DELAY;
|
args.nsamples_tx = DOWNAMPLING_FILTER_INIT_SAMPLES + DOWNSAMPLING_FILTER_DELAY;
|
||||||
|
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
@ -744,7 +744,7 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
|
|||||||
args.skip_used_samples = 0;
|
args.skip_used_samples = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
@ -954,7 +954,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
|||||||
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
code_length = static_cast<unsigned int>(std::round(static_cast<double>(baseband_sampling_freq) / (GPS_L5I_CODE_RATE_HZ / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS))));
|
||||||
}
|
}
|
||||||
|
|
||||||
float nbits = ceilf(log2f((float)code_length));
|
float nbits = ceilf(log2f(static_cast<float>(code_length)));
|
||||||
unsigned int fft_size = pow(2, nbits);
|
unsigned int fft_size = pow(2, nbits);
|
||||||
|
|
||||||
// The HW has been reset after the acquisition phase when the acquisition class was destroyed.
|
// The HW has been reset after the acquisition phase when the acquisition class was destroyed.
|
||||||
@ -1053,7 +1053,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
|
|||||||
//********************************************************************
|
//********************************************************************
|
||||||
args.nsamples_tx = baseband_sampling_freq * FLAGS_duration;
|
args.nsamples_tx = baseband_sampling_freq * FLAGS_duration;
|
||||||
|
|
||||||
if (pthread_create(&thread_DMA, nullptr, handler_DMA, (void*)&args) < 0)
|
if (pthread_create(&thread_DMA, nullptr, handler_DMA, reinterpret_cast<void*>(&args)) < 0)
|
||||||
{
|
{
|
||||||
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
std::cout << "ERROR cannot create DMA Process" << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user