mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
clang-tidy: apply modernize-use-auto fix (see https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html)
This commit is contained in:
parent
395f93aeff
commit
0d408a6024
@ -1021,7 +1021,7 @@ int rtklib_pvt_cc::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
if (gnss_observables_map.empty() == false)
|
||||
{
|
||||
double current_RX_time = gnss_observables_map.begin()->second.RX_time;
|
||||
uint32_t current_RX_time_ms = static_cast<uint32_t>(current_RX_time * 1000.0);
|
||||
auto current_RX_time_ms = static_cast<uint32_t>(current_RX_time * 1000.0);
|
||||
if (current_RX_time_ms % d_output_rate_ms == 0)
|
||||
{
|
||||
flag_compute_pvt_output = true;
|
||||
|
@ -2878,7 +2878,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps
|
||||
line += std::string(1, ' ');
|
||||
line += Rinex_Printer::doub2for(static_cast<double>(gps_ephemeris_iter->second.i_code_on_L2), 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
double GPS_week_continuous_number = static_cast<double>(gps_ephemeris_iter->second.i_GPS_week + 1024); // valid until April 7, 2019 (check http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm)
|
||||
auto GPS_week_continuous_number = static_cast<double>(gps_ephemeris_iter->second.i_GPS_week + 1024); // valid until April 7, 2019 (check http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm)
|
||||
line += Rinex_Printer::doub2for(GPS_week_continuous_number, 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
line += Rinex_Printer::doub2for(static_cast<double>(gps_ephemeris_iter->second.i_code_on_L2), 18, 2);
|
||||
@ -3082,7 +3082,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps
|
||||
double my_zero = 0.0;
|
||||
line += Rinex_Printer::doub2for(my_zero, 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
double GPS_week_continuous_number = static_cast<double>(gps_ephemeris_iter->second.i_GPS_week + 1024); // valid until April 7, 2019 (check http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm)
|
||||
auto GPS_week_continuous_number = static_cast<double>(gps_ephemeris_iter->second.i_GPS_week + 1024); // valid until April 7, 2019 (check http://www.colorado.edu/geography/gcraft/notes/gps/gpseow.htm)
|
||||
line += Rinex_Printer::doub2for(GPS_week_continuous_number, 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
line += Rinex_Printer::doub2for(my_zero, 18, 2);
|
||||
@ -3227,7 +3227,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Gal
|
||||
int32_t data_source_INAV = Rinex_Printer::toInt(iNAVE1B, 10);
|
||||
line += Rinex_Printer::doub2for(static_cast<double>(data_source_INAV), 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
double GST_week = static_cast<double>(galileo_ephemeris_iter->second.WN_5);
|
||||
auto GST_week = static_cast<double>(galileo_ephemeris_iter->second.WN_5);
|
||||
double num_GST_rollovers = floor((GST_week + 1024.0) / 4096.0);
|
||||
double Galileo_week_continuous_number = GST_week + 1024.0 + num_GST_rollovers * 4096.0;
|
||||
line += Rinex_Printer::doub2for(Galileo_week_continuous_number, 18, 2);
|
||||
@ -7558,7 +7558,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
}
|
||||
ret = total_glo_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
/// \todo Need to account for pseudorange correction for glonass
|
||||
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
|
||||
@ -7798,7 +7798,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
|
||||
ret = total_glo_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
/// \todo Need to account for pseudorange correction for glonass
|
||||
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
|
||||
@ -8035,7 +8035,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_glo_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -8616,7 +8616,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_mmap.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -8856,7 +8856,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -9110,7 +9110,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_gal_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -9339,7 +9339,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_gps_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -9398,7 +9398,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_gal_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -9648,7 +9648,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_gps_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
@ -9707,7 +9707,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_gal_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
|
@ -137,34 +137,34 @@ bool rtklib_solver::save_matfile()
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t *TOW_at_current_symbol_ms = new uint32_t[num_epoch];
|
||||
uint32_t *week = new uint32_t[num_epoch];
|
||||
double *RX_time = new double[num_epoch];
|
||||
double *user_clk_offset = new double[num_epoch];
|
||||
double *pos_x = new double[num_epoch];
|
||||
double *pos_y = new double[num_epoch];
|
||||
double *pos_z = new double[num_epoch];
|
||||
double *vel_x = new double[num_epoch];
|
||||
double *vel_y = new double[num_epoch];
|
||||
double *vel_z = new double[num_epoch];
|
||||
double *cov_xx = new double[num_epoch];
|
||||
double *cov_yy = new double[num_epoch];
|
||||
double *cov_zz = new double[num_epoch];
|
||||
double *cov_xy = new double[num_epoch];
|
||||
double *cov_yz = new double[num_epoch];
|
||||
double *cov_zx = new double[num_epoch];
|
||||
double *latitude = new double[num_epoch];
|
||||
double *longitude = new double[num_epoch];
|
||||
double *height = new double[num_epoch];
|
||||
uint8_t *valid_sats = new uint8_t[num_epoch];
|
||||
uint8_t *solution_status = new uint8_t[num_epoch];
|
||||
uint8_t *solution_type = new uint8_t[num_epoch];
|
||||
float *AR_ratio_factor = new float[num_epoch];
|
||||
float *AR_ratio_threshold = new float[num_epoch];
|
||||
double *gdop = new double[num_epoch];
|
||||
double *pdop = new double[num_epoch];
|
||||
double *hdop = new double[num_epoch];
|
||||
double *vdop = new double[num_epoch];
|
||||
auto *TOW_at_current_symbol_ms = new uint32_t[num_epoch];
|
||||
auto *week = new uint32_t[num_epoch];
|
||||
auto *RX_time = new double[num_epoch];
|
||||
auto *user_clk_offset = new double[num_epoch];
|
||||
auto *pos_x = new double[num_epoch];
|
||||
auto *pos_y = new double[num_epoch];
|
||||
auto *pos_z = new double[num_epoch];
|
||||
auto *vel_x = new double[num_epoch];
|
||||
auto *vel_y = new double[num_epoch];
|
||||
auto *vel_z = new double[num_epoch];
|
||||
auto *cov_xx = new double[num_epoch];
|
||||
auto *cov_yy = new double[num_epoch];
|
||||
auto *cov_zz = new double[num_epoch];
|
||||
auto *cov_xy = new double[num_epoch];
|
||||
auto *cov_yz = new double[num_epoch];
|
||||
auto *cov_zx = new double[num_epoch];
|
||||
auto *latitude = new double[num_epoch];
|
||||
auto *longitude = new double[num_epoch];
|
||||
auto *height = new double[num_epoch];
|
||||
auto *valid_sats = new uint8_t[num_epoch];
|
||||
auto *solution_status = new uint8_t[num_epoch];
|
||||
auto *solution_type = new uint8_t[num_epoch];
|
||||
auto *AR_ratio_factor = new float[num_epoch];
|
||||
auto *AR_ratio_threshold = new float[num_epoch];
|
||||
auto *gdop = new double[num_epoch];
|
||||
auto *pdop = new double[num_epoch];
|
||||
auto *hdop = new double[num_epoch];
|
||||
auto *vdop = new double[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -548,7 +548,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
{}, {0.0, 0.0, 0.0}, {}};
|
||||
@ -624,7 +624,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
{}, {0.0, 0.0, 0.0}, {}};
|
||||
@ -671,7 +671,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
||||
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||
unsigned char default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||
{default_code_, default_code_, default_code_},
|
||||
{}, {0.0, 0.0, 0.0}, {}};
|
||||
|
@ -224,7 +224,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(code, gnss_synchro_->Signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
@ -263,9 +263,9 @@ float GalileoE1Pcps8msAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
if (acquire_pilot_ == true)
|
||||
{
|
||||
@ -272,9 +272,9 @@ float GalileoE1PcpsAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(code, gnss_synchro_->Signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
@ -311,7 +311,7 @@ float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = static_cast<double>(code_length_) / static_cast<double>(folding_factor_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code()
|
||||
bool cboc = configuration_->property(
|
||||
"Acquisition" + std::to_string(channel_) + ".cboc", false);
|
||||
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
galileo_e1_code_gen_complex_sampled(code, gnss_synchro_->Signal,
|
||||
cboc, gnss_synchro_->PRN, fs_in_, 0, false);
|
||||
@ -273,9 +273,9 @@ float GalileoE1PcpsTongAmbiguousAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::complex<float>* codeI = new std::complex<float>[code_length_];
|
||||
std::complex<float>* codeQ = new std::complex<float>[code_length_];
|
||||
auto* codeI = new std::complex<float>[code_length_];
|
||||
auto* codeQ = new std::complex<float>[code_length_];
|
||||
|
||||
if (gnss_synchro_->Signal[0] == '5' && gnss_synchro_->Signal[1] == 'X')
|
||||
{
|
||||
@ -305,9 +305,9 @@ float GalileoE5aNoncoherentIQAcquisitionCaf::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ void GalileoE5aPcpsAcquisition::init()
|
||||
|
||||
void GalileoE5aPcpsAcquisition::set_local_code()
|
||||
{
|
||||
gr_complex* code = new gr_complex[code_length_];
|
||||
auto* code = new gr_complex[code_length_];
|
||||
char signal_[3];
|
||||
|
||||
if (acq_iq_)
|
||||
@ -253,9 +253,9 @@ float GalileoE5aPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ void GlonassL1CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
glonass_l1_ca_code_gen_complex_sampled(code, /* gnss_synchro_->PRN,*/ fs_in_, 0);
|
||||
|
||||
@ -257,9 +257,9 @@ float GlonassL1CaPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = static_cast<double>(vector_length_);
|
||||
auto lambda = static_cast<double>(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ void GlonassL2CaPcpsAcquisition::init()
|
||||
|
||||
void GlonassL2CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
glonass_l2_ca_code_gen_complex_sampled(code, /* gnss_synchro_->PRN,*/ fs_in_, 0);
|
||||
|
||||
@ -256,9 +256,9 @@ float GlonassL2CaPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = static_cast<double>(vector_length_);
|
||||
auto lambda = static_cast<double>(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ void GpsL1CaPcpsAcquisition::init()
|
||||
|
||||
void GpsL1CaPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
@ -245,9 +245,9 @@ float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
|
||||
code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
|
||||
/*Calculate the folding factor value based on the calculations*/
|
||||
unsigned int temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
auto temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
|
||||
folding_factor_ = configuration_->property(role + ".folding_factor", temp);
|
||||
|
||||
if (sampled_ms_ % folding_factor_ != 0)
|
||||
@ -249,7 +249,7 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_]();
|
||||
auto* code = new std::complex<float>[code_length_]();
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
@ -299,7 +299,7 @@ float GpsL1CaPcpsQuickSyncAcquisition::calculate_threshold(float pfa)
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = static_cast<double>(code_length_) / static_cast<double>(folding_factor_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ void GpsL1CaPcpsTongAcquisition::set_local_code()
|
||||
{
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_, 0);
|
||||
|
||||
@ -259,9 +259,9 @@ float GpsL1CaPcpsTongAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ void GpsL2MPcpsAcquisition::init()
|
||||
|
||||
void GpsL2MPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
gps_l2c_m_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_);
|
||||
|
||||
@ -259,9 +259,9 @@ float GpsL2MPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1.0 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ void GpsL5iPcpsAcquisition::init()
|
||||
|
||||
void GpsL5iPcpsAcquisition::set_local_code()
|
||||
{
|
||||
std::complex<float>* code = new std::complex<float>[code_length_];
|
||||
auto* code = new std::complex<float>[code_length_];
|
||||
|
||||
gps_l5i_code_gen_complex_sampled(code, gnss_synchro_->PRN, fs_in_);
|
||||
|
||||
@ -247,9 +247,9 @@ float GpsL5iPcpsAcquisition::calculate_threshold(float pfa)
|
||||
unsigned int ncells = vector_length_ * frequency_bins;
|
||||
double exponent = 1.0 / static_cast<double>(ncells);
|
||||
double val = pow(1.0 - pfa, exponent);
|
||||
double lambda = double(vector_length_);
|
||||
auto lambda = double(vector_length_);
|
||||
boost::math::exponential_distribution<double> mydist(lambda);
|
||||
float threshold = static_cast<float>(quantile(mydist, val));
|
||||
auto threshold = static_cast<float>(quantile(mydist, val));
|
||||
|
||||
return threshold;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
unsigned int buff_increment;
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_fft_size)
|
||||
{
|
||||
@ -417,7 +417,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
case 2:
|
||||
{
|
||||
// Fill last part of the buffer and reset counter
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
if (d_buffer_count < d_fft_size)
|
||||
{
|
||||
memcpy(&d_inbuffer[d_buffer_count], in, sizeof(gr_complex) * (d_fft_size - d_buffer_count));
|
||||
@ -674,7 +674,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
if (d_CAF_window_hz > 0)
|
||||
{
|
||||
int CAF_bins_half;
|
||||
float *accum = static_cast<float *>(volk_gnsssdr_malloc(sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *accum = static_cast<float *>(volk_gnsssdr_malloc(sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
CAF_bins_half = d_CAF_window_hz / (2 * d_doppler_step);
|
||||
float weighting_factor;
|
||||
weighting_factor = 0.5 / static_cast<float>(CAF_bins_half);
|
||||
|
@ -246,7 +246,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
float magt = 0.0;
|
||||
float magt_A = 0.0;
|
||||
float magt_B = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
@ -472,7 +472,7 @@ void pcps_acquisition::dump_results(int32_t effective_fft_size)
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
float aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
auto aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
@ -927,7 +927,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
uint32_t buff_increment;
|
||||
if (d_cshort)
|
||||
{
|
||||
const lv_16sc_t* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // Get the input samples pointer
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||
{
|
||||
buff_increment = ninput_items[0];
|
||||
@ -940,7 +940,7 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
|
||||
}
|
||||
else
|
||||
{
|
||||
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); // Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); // Get the input samples pointer
|
||||
if ((ninput_items[0] + d_buffer_count) <= d_consumed_samples)
|
||||
{
|
||||
buff_increment = ninput_items[0];
|
||||
|
@ -337,7 +337,7 @@ double pcps_acquisition_fine_doppler_cc::compute_CAF()
|
||||
|
||||
float pcps_acquisition_fine_doppler_cc::estimate_input_power(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
// Compute the input signal power estimation
|
||||
float power = 0;
|
||||
volk_32fc_magnitude_squared_32f(d_magnitude, in, d_fft_size);
|
||||
@ -350,7 +350,7 @@ float pcps_acquisition_fine_doppler_cc::estimate_input_power(gr_vector_const_voi
|
||||
int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " " << d_gnss_synchro->PRN
|
||||
@ -359,7 +359,7 @@ int pcps_acquisition_fine_doppler_cc::compute_and_accumulate_grid(gr_vector_cons
|
||||
<< ", doppler_step: " << d_doppler_step;
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
@ -405,12 +405,12 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
int signal_samples = prn_replicas * d_fft_size;
|
||||
//int fft_size_extended = nextPowerOf2(signal_samples * zero_padding_factor);
|
||||
int fft_size_extended = signal_samples * zero_padding_factor;
|
||||
gr::fft::fft_complex *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
auto *fft_operator = new gr::fft::fft_complex(fft_size_extended, true);
|
||||
//zero padding the entire vector
|
||||
std::fill_n(fft_operator->get_inbuf(), fft_size_extended, gr_complex(0.0, 0.0));
|
||||
|
||||
//1. generate local code aligned with the acquisition code phase estimation
|
||||
gr_complex *code_replica = static_cast<gr_complex *>(volk_gnsssdr_malloc(signal_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto *code_replica = static_cast<gr_complex *>(volk_gnsssdr_malloc(signal_samples * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
gps_l1_ca_code_gen_complex_sampled(code_replica, d_gnss_synchro->PRN, d_fs_in, 0);
|
||||
|
||||
@ -433,7 +433,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
fft_operator->execute();
|
||||
|
||||
// 4. Compute the magnitude and find the maximum
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(fft_size_extended * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(fft_size_extended * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
volk_32fc_magnitude_squared_32f(p_tmp_vector, fft_operator->get_outbuf(), fft_size_extended);
|
||||
|
||||
@ -442,7 +442,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
|
||||
|
||||
//case even
|
||||
int counter = 0;
|
||||
float *fftFreqBins = new float[fft_size_extended];
|
||||
auto *fftFreqBins = new float[fft_size_extended];
|
||||
|
||||
std::fill_n(fftFreqBins, fft_size_extended, 0.0);
|
||||
|
||||
@ -699,7 +699,7 @@ void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size)
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
||||
float aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
auto aux = static_cast<float>(d_gnss_synchro->Acq_doppler_hz);
|
||||
matvar = Mat_VarCreate("acq_doppler_hz", MAT_C_SINGLE, MAT_T_SINGLE, 1, dims, &aux, 0);
|
||||
Mat_VarWrite(matfp, matvar, MAT_COMPRESSION_ZLIB); // or MAT_COMPRESSION_NONE
|
||||
Mat_VarFree(matvar);
|
||||
|
@ -301,9 +301,9 @@ double pcps_assisted_acquisition_cc::search_maximum()
|
||||
|
||||
float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
// 1- Compute the input signal power estimation
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
volk_32fc_magnitude_squared_32f(p_tmp_vector, in, d_fft_size);
|
||||
|
||||
@ -318,7 +318,7 @@ float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_st
|
||||
int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
DLOG(INFO) << "Channel: " << d_channel
|
||||
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " "
|
||||
@ -328,7 +328,7 @@ int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_vo
|
||||
<< ", doppler_step: " << d_doppler_step;
|
||||
|
||||
// 2- Doppler frequency search loop
|
||||
float *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto *p_tmp_vector = static_cast<float *>(volk_gnsssdr_malloc(d_fft_size * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
for (int doppler_index = 0; doppler_index < d_num_doppler_points; doppler_index++)
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
float magt = 0.0;
|
||||
float magt_plus = 0.0;
|
||||
float magt_minus = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
||||
d_sample_counter += static_cast<uint64_t>(d_fft_size); // sample counter
|
||||
|
@ -304,18 +304,18 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
int doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
const auto* in = reinterpret_cast<const gr_complex*>(input_items[0]); //Get the input samples pointer
|
||||
|
||||
gr_complex* in_temp = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
gr_complex* in_temp_folded = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_temp = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * d_folding_factor * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_temp_folded = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_fft_size * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Create a signal to store a signal of size 1ms, to perform correlation
|
||||
in time. No folding on this data is required*/
|
||||
gr_complex* in_1code = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* in_1code = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Stores the values of the correlation output between the local code
|
||||
and the signal with doppler shift corrected */
|
||||
gr_complex* corr_output = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
auto* corr_output = static_cast<gr_complex*>(volk_gnsssdr_malloc(d_samples_per_code * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
|
||||
|
||||
/*Stores a copy of the folded version of the signal.This is used for
|
||||
the FFT operations in future steps of execution*/
|
||||
|
@ -282,7 +282,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
int doppler;
|
||||
uint32_t indext = 0;
|
||||
float magt = 0.0;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
d_input_power = 0.0;
|
||||
d_mag = 0.0;
|
||||
|
@ -54,8 +54,8 @@ int interleaved_byte_to_complex_byte::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const int8_t *in = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
lv_8sc_t *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
// This could be put into a Volk kernel
|
||||
int8_t real_part;
|
||||
int8_t imag_part;
|
||||
|
@ -54,8 +54,8 @@ int interleaved_byte_to_complex_short::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const int8_t *in = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
lv_16sc_t *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
// This could be put into a Volk kernel
|
||||
int8_t real_part;
|
||||
int8_t imag_part;
|
||||
|
@ -54,8 +54,8 @@ int interleaved_short_to_complex_short::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const int16_t *in = reinterpret_cast<const int16_t *>(input_items[0]);
|
||||
lv_16sc_t *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const int16_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
// This could be put into a Volk kernel
|
||||
int16_t real_part;
|
||||
int16_t imag_part;
|
||||
|
@ -399,7 +399,7 @@ void FirFilter::init()
|
||||
// those bands, and the weight given to the error in those bands.
|
||||
std::vector<double> taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (std::vector<double>::iterator it = taps_d.begin(); it != taps_d.end(); it++)
|
||||
for (auto it = taps_d.begin(); it != taps_d.end(); it++)
|
||||
{
|
||||
taps_.push_back(float(*it));
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
|
||||
int grid_density = config_->property(role_ + ".grid_density", default_grid_density);
|
||||
taps_d = gr::filter::pm_remez(number_of_taps - 1, bands, ampl, error_w, filter_type, grid_density);
|
||||
taps_.reserve(taps_d.size());
|
||||
for (std::vector<double>::iterator it = taps_d.begin(); it != taps_d.end(); it++)
|
||||
for (auto it = taps_d.begin(); it != taps_d.end(); it++)
|
||||
{
|
||||
taps_.push_back(static_cast<float>(*it));
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ beamformer::~beamformer()
|
||||
int beamformer::work(int noutput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
// channel output buffers
|
||||
// gr_complex *ch1 = (gr_complex *) input_items[0];
|
||||
// gr_complex *ch2 = (gr_complex *) input_items[1];
|
||||
|
@ -100,8 +100,8 @@ int Notch::general_work(int noutput_items, gr_vector_int &ninput_items __attribu
|
||||
float sig2dB = 0.0;
|
||||
float sig2lin = 0.0;
|
||||
lv_32fc_t dot_prod_;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
in++;
|
||||
while ((index_out + length_) < noutput_items)
|
||||
{
|
||||
|
@ -103,8 +103,8 @@ int NotchLite::general_work(int noutput_items, gr_vector_int &ninput_items __att
|
||||
float sig2dB = 0.0;
|
||||
float sig2lin = 0.0;
|
||||
lv_32fc_t dot_prod_;
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
in++;
|
||||
while ((index_out + length_) < noutput_items)
|
||||
{
|
||||
|
@ -89,9 +89,9 @@ void pulse_blanking_cc::forecast(int noutput_items __attribute__((unused)), gr_v
|
||||
int pulse_blanking_cc::general_work(int noutput_items, gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
float *magnitude = static_cast<float *>(volk_malloc(noutput_items * sizeof(float), volk_get_alignment()));
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
auto *magnitude = static_cast<float *>(volk_malloc(noutput_items * sizeof(float), volk_get_alignment()));
|
||||
volk_32fc_magnitude_squared_32f(magnitude, in, noutput_items);
|
||||
int32_t sample_index = 0;
|
||||
float segment_energy;
|
||||
|
@ -53,9 +53,9 @@ int byte_x2_to_complex_byte::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const int8_t *in0 = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
const int8_t *in1 = reinterpret_cast<const int8_t *>(input_items[1]);
|
||||
lv_8sc_t *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
const auto *in0 = reinterpret_cast<const int8_t *>(input_items[0]);
|
||||
const auto *in1 = reinterpret_cast<const int8_t *>(input_items[1]);
|
||||
auto *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
// This could be put into a volk kernel
|
||||
int8_t real_part;
|
||||
int8_t imag_part;
|
||||
|
@ -53,9 +53,9 @@ int complex_byte_to_float_x2::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_8sc_t *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
float *out0 = reinterpret_cast<float *>(output_items[0]);
|
||||
float *out1 = reinterpret_cast<float *>(output_items[1]);
|
||||
const auto *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
auto *out0 = reinterpret_cast<float *>(output_items[0]);
|
||||
auto *out1 = reinterpret_cast<float *>(output_items[1]);
|
||||
const float scalar = 1;
|
||||
volk_8ic_s32f_deinterleave_32f_x2(out0, out1, in, scalar, noutput_items);
|
||||
return noutput_items;
|
||||
|
@ -53,8 +53,8 @@ int complex_float_to_complex_byte::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
lv_8sc_t *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
volk_gnsssdr_32fc_convert_8ic(out, in, noutput_items);
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ int conjugate_cc::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
volk_32fc_conjugate_32fc(out, in, noutput_items);
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ int conjugate_ic::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_8sc_t *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
lv_8sc_t *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
volk_gnsssdr_8ic_conjugate_8ic(out, in, noutput_items);
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ int conjugate_sc::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
lv_16sc_t *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
volk_gnsssdr_16ic_conjugate_16ic(out, in, noutput_items);
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -53,9 +53,9 @@ int cshort_to_float_x2::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
float *out0 = reinterpret_cast<float *>(output_items[0]);
|
||||
float *out1 = reinterpret_cast<float *>(output_items[1]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
auto *out0 = reinterpret_cast<float *>(output_items[0]);
|
||||
auto *out1 = reinterpret_cast<float *>(output_items[1]);
|
||||
const float scalar = 1;
|
||||
volk_16ic_s32f_deinterleave_32f_x2(out0, out1, in, scalar, noutput_items);
|
||||
return noutput_items;
|
||||
|
@ -71,7 +71,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
|
||||
void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
uint32_t _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
for (uint32_t i = 0; i < _length_in; i++)
|
||||
{
|
||||
for (uint32_t j = 0; j < (_period / 2); j++)
|
||||
@ -89,7 +89,7 @@ void galileo_e1_sinboc_11_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
{
|
||||
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS;
|
||||
uint32_t _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
auto _period = static_cast<uint32_t>(_length_out / _length_in);
|
||||
|
||||
for (uint32_t i = 0; i < _length_in; i++)
|
||||
{
|
||||
@ -108,7 +108,7 @@ void galileo_e1_sinboc_61_gen_int(int* _dest, int* _prn, uint32_t _length_out)
|
||||
void galileo_e1_code_gen_sinboc11_float(float* _dest, char _Signal[3], uint32_t _prn)
|
||||
{
|
||||
std::string _galileo_signal = _Signal;
|
||||
const uint32_t _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
const auto _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
int32_t primary_code_E1_chips[4092]; // _codeLength not accepted by Clang
|
||||
galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); //generate Galileo E1 code, 1 sample per chip
|
||||
for (uint32_t i = 0; i < _codeLength; i++)
|
||||
@ -159,8 +159,8 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
|
||||
std::string _galileo_signal = _Signal;
|
||||
uint32_t _samplesPerCode;
|
||||
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
uint32_t _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
int32_t* primary_code_E1_chips = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS);
|
||||
auto* primary_code_E1_chips = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
|
||||
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
|
||||
const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2;
|
||||
@ -180,7 +180,7 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
|
||||
}
|
||||
else
|
||||
{
|
||||
int32_t* _signal_E1_int = static_cast<int32_t*>(volk_gnsssdr_malloc(_codeLength * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto* _signal_E1_int = static_cast<int32_t*>(volk_gnsssdr_malloc(_codeLength * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
galileo_e1_sinboc_11_gen_int(_signal_E1_int, primary_code_E1_chips, _codeLength); // generate sinboc(1,1) 2 samples per chip
|
||||
|
||||
for (uint32_t ii = 0; ii < _codeLength; ++ii)
|
||||
@ -192,7 +192,7 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
|
||||
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
{
|
||||
float* _resampled_signal = new float[_samplesPerCode];
|
||||
auto* _resampled_signal = new float[_samplesPerCode];
|
||||
|
||||
resampler(_signal_E1, _resampled_signal, _samplesPerChip * _codeFreqBasis, _fs,
|
||||
_codeLength, _samplesPerCode); // resamples code to fs
|
||||
@ -203,7 +203,7 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
float* _signal_E1C_secondary = new float[static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode];
|
||||
auto* _signal_E1C_secondary = new float[static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode];
|
||||
|
||||
for (uint32_t i = 0; i < static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); i++)
|
||||
{
|
||||
@ -235,7 +235,7 @@ void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signa
|
||||
{
|
||||
std::string _galileo_signal = _Signal;
|
||||
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz
|
||||
uint32_t _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
|
||||
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS)));
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
@ -243,7 +243,7 @@ void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signa
|
||||
_samplesPerCode *= static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH);
|
||||
}
|
||||
|
||||
float* real_code = static_cast<float*>(volk_gnsssdr_malloc(_samplesPerCode * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
auto* real_code = static_cast<float*>(volk_gnsssdr_malloc(_samplesPerCode * sizeof(float), volk_gnsssdr_get_alignment()));
|
||||
|
||||
galileo_e1_code_gen_float_sampled(real_code, _Signal, _cboc, _prn, _fs, _chip_shift, _secondary_flag);
|
||||
|
||||
|
@ -108,7 +108,7 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
|
||||
const uint32_t _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS;
|
||||
const int32_t _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ;
|
||||
|
||||
std::complex<float>* _code = new std::complex<float>[_codeLength]();
|
||||
auto* _code = new std::complex<float>[_codeLength]();
|
||||
|
||||
galileo_e5_a_code_gen_complex_primary(_code, _prn, _Signal);
|
||||
|
||||
|
@ -71,7 +71,7 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)),
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]);
|
||||
out[0] = Gnss_Synchro();
|
||||
out[0].Flag_valid_symbol_output = false;
|
||||
out[0].Flag_valid_word = false;
|
||||
|
@ -82,7 +82,7 @@ int gnss_sdr_valve::work(int noutput_items,
|
||||
{
|
||||
if (d_ncopied_items >= d_nitems)
|
||||
{
|
||||
ControlMessageFactory *cmf = new ControlMessageFactory();
|
||||
auto *cmf = new ControlMessageFactory();
|
||||
d_queue->handle(cmf->GetQueueMessage(200, 0));
|
||||
LOG(INFO) << "Stopping receiver, " << d_ncopied_items << " samples processed";
|
||||
delete cmf;
|
||||
|
@ -55,7 +55,7 @@ void gps_l2c_m_code(int32_t* _dest, uint32_t _prn)
|
||||
|
||||
void gps_l2c_m_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -73,7 +73,7 @@ void gps_l2c_m_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
|
||||
void gps_l2c_m_code_gen_float(float* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -94,7 +94,7 @@ void gps_l2c_m_code_gen_float(float* _dest, uint32_t _prn)
|
||||
*/
|
||||
void gps_l2c_m_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L2_M_CODE_LENGTH_CHIPS];
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
gps_l2c_m_code(_code, _prn);
|
||||
|
@ -182,7 +182,7 @@ void make_l5q(int32_t* _dest, int32_t prn)
|
||||
|
||||
void gps_l5i_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -200,7 +200,7 @@ void gps_l5i_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
|
||||
void gps_l5i_code_gen_float(float* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -221,7 +221,7 @@ void gps_l5i_code_gen_float(float* _dest, uint32_t _prn)
|
||||
*/
|
||||
void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS];
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
make_l5i(_code, _prn - 1);
|
||||
@ -267,7 +267,7 @@ void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
|
||||
|
||||
void gps_l5q_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -285,7 +285,7 @@ void gps_l5q_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
|
||||
|
||||
void gps_l5q_code_gen_float(float* _dest, uint32_t _prn)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
@ -306,7 +306,7 @@ void gps_l5q_code_gen_float(float* _dest, uint32_t _prn)
|
||||
*/
|
||||
void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs)
|
||||
{
|
||||
int32_t* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS];
|
||||
if (_prn > 0 and _prn < 51)
|
||||
{
|
||||
make_l5q(_code, _prn - 1);
|
||||
|
@ -51,7 +51,7 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
||||
double CN0_dB_Hz_est = gnss_synchro.CN0_dB_hz;
|
||||
if (CN0_dB_Hz_est > 63.75) CN0_dB_Hz_est = 63.75;
|
||||
if (CN0_dB_Hz_est < 0.0) CN0_dB_Hz_est = 0.0;
|
||||
unsigned char CN0_dB_Hz = static_cast<unsigned char>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
auto CN0_dB_Hz = static_cast<unsigned char>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
rtklib_obs.SNR[band] = CN0_dB_Hz;
|
||||
//Galileo is the third satellite system for RTKLIB, so, add the required offset to discriminate Galileo ephemeris
|
||||
switch (gnss_synchro.System)
|
||||
|
@ -250,7 +250,7 @@ void readsp3b(FILE *fp, char type, int *sats __attribute__((unused)), int ns, do
|
||||
/* compare precise ephemeris -------------------------------------------------*/
|
||||
int cmppeph(const void *p1, const void *p2)
|
||||
{
|
||||
peph_t *q1 = (peph_t *)p1, *q2 = (peph_t *)p2;
|
||||
auto *q1 = (peph_t *)p1, *q2 = (peph_t *)p2;
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -1e-9 ? -1 : (tt > 1e-9 ? 1 : q1->index - q2->index);
|
||||
}
|
||||
@ -556,7 +556,7 @@ int readfcbf(const char *file, nav_t *nav)
|
||||
/* compare satellite fcb -----------------------------------------------------*/
|
||||
int cmpfcb(const void *p1, const void *p2)
|
||||
{
|
||||
fcbd_t *q1 = (fcbd_t *)p1, *q2 = (fcbd_t *)p2;
|
||||
auto *q1 = (fcbd_t *)p1, *q2 = (fcbd_t *)p2;
|
||||
double tt = timediff(q1->ts, q2->ts);
|
||||
return tt < -1e-3 ? -1 : (tt > 1e-3 ? 1 : 0);
|
||||
}
|
||||
|
@ -2731,7 +2731,7 @@ int geterp(const erp_t *erp, gtime_t time, double *erpv)
|
||||
/* compare ephemeris ---------------------------------------------------------*/
|
||||
int cmpeph(const void *p1, const void *p2)
|
||||
{
|
||||
eph_t *q1 = (eph_t *)p1, *q2 = (eph_t *)p2;
|
||||
auto *q1 = (eph_t *)p1, *q2 = (eph_t *)p2;
|
||||
return q1->ttr.time != q2->ttr.time ? (int)(q1->ttr.time - q2->ttr.time) : (q1->toe.time != q2->toe.time ? (int)(q1->toe.time - q2->toe.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -2776,7 +2776,7 @@ void uniqeph(nav_t *nav)
|
||||
/* compare glonass ephemeris -------------------------------------------------*/
|
||||
int cmpgeph(const void *p1, const void *p2)
|
||||
{
|
||||
geph_t *q1 = (geph_t *)p1, *q2 = (geph_t *)p2;
|
||||
auto *q1 = (geph_t *)p1, *q2 = (geph_t *)p2;
|
||||
return q1->tof.time != q2->tof.time ? (int)(q1->tof.time - q2->tof.time) : (q1->toe.time != q2->toe.time ? (int)(q1->toe.time - q2->toe.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -2822,7 +2822,7 @@ void uniqgeph(nav_t *nav)
|
||||
/* compare sbas ephemeris ----------------------------------------------------*/
|
||||
int cmpseph(const void *p1, const void *p2)
|
||||
{
|
||||
seph_t *q1 = (seph_t *)p1, *q2 = (seph_t *)p2;
|
||||
auto *q1 = (seph_t *)p1, *q2 = (seph_t *)p2;
|
||||
return q1->tof.time != q2->tof.time ? (int)(q1->tof.time - q2->tof.time) : (q1->t0.time != q2->t0.time ? (int)(q1->t0.time - q2->t0.time) : q1->sat - q2->sat);
|
||||
}
|
||||
|
||||
@ -2892,7 +2892,7 @@ void uniqnav(nav_t *nav)
|
||||
/* compare observation data -------------------------------------------------*/
|
||||
int cmpobs(const void *p1, const void *p2)
|
||||
{
|
||||
obsd_t *q1 = (obsd_t *)p1, *q2 = (obsd_t *)p2;
|
||||
auto *q1 = (obsd_t *)p1, *q2 = (obsd_t *)p2;
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
if (fabs(tt) > DTTOL) return tt < 0 ? -1 : 1;
|
||||
if (q1->rcv != q2->rcv) return (int)q1->rcv - (int)q2->rcv;
|
||||
|
@ -446,7 +446,7 @@ void decodefile(rtksvr_t *svr, int index)
|
||||
/* rtk server thread ---------------------------------------------------------*/
|
||||
void *rtksvrthread(void *arg)
|
||||
{
|
||||
rtksvr_t *svr = (rtksvr_t *)arg;
|
||||
auto *svr = (rtksvr_t *)arg;
|
||||
obs_t obs;
|
||||
obsd_t data[MAXOBS * 2];
|
||||
double tt;
|
||||
|
@ -603,7 +603,7 @@ void readmsgs(const char *file, int sel, gtime_t ts, gtime_t te,
|
||||
/* compare sbas messages -----------------------------------------------------*/
|
||||
int cmpmsgs(const void *p1, const void *p2)
|
||||
{
|
||||
sbsmsg_t *q1 = (sbsmsg_t *)p1, *q2 = (sbsmsg_t *)p2;
|
||||
auto *q1 = (sbsmsg_t *)p1, *q2 = (sbsmsg_t *)p2;
|
||||
return q1->week != q2->week ? q1->week - q2->week : (q1->tow < q2->tow ? -1 : (q1->tow > q2->tow ? 1 : q1->prn - q2->prn));
|
||||
}
|
||||
|
||||
|
@ -815,7 +815,7 @@ int readsoldata(FILE *fp, gtime_t ts, gtime_t te, double tint, int qflag,
|
||||
/* compare solution data -----------------------------------------------------*/
|
||||
int cmpsol(const void *p1, const void *p2)
|
||||
{
|
||||
sol_t *q1 = (sol_t *)p1, *q2 = (sol_t *)p2;
|
||||
auto *q1 = (sol_t *)p1, *q2 = (sol_t *)p2;
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -0.0 ? -1 : (tt > 0.0 ? 1 : 0);
|
||||
}
|
||||
@ -1023,7 +1023,7 @@ void freesolstatbuf(solstatbuf_t *solstatbuf)
|
||||
/* compare solution status ---------------------------------------------------*/
|
||||
int cmpsolstat(const void *p1, const void *p2)
|
||||
{
|
||||
solstat_t *q1 = (solstat_t *)p1, *q2 = (solstat_t *)p2;
|
||||
auto *q1 = (solstat_t *)p1, *q2 = (solstat_t *)p2;
|
||||
double tt = timediff(q1->time, q2->time);
|
||||
return tt < -0.0 ? -1 : (tt > 0.0 ? 1 : 0);
|
||||
}
|
||||
|
@ -1534,7 +1534,7 @@ gtime_t nextdltime(const int *topts, int stat)
|
||||
/* ftp thread ----------------------------------------------------------------*/
|
||||
void *ftpthread(void *arg)
|
||||
{
|
||||
ftp_t *ftp = (ftp_t *)arg;
|
||||
auto *ftp = (ftp_t *)arg;
|
||||
FILE *fp;
|
||||
gtime_t time;
|
||||
char remote[1024], local[1024], tmpfile[1024], errfile[1024], *p;
|
||||
|
@ -53,9 +53,9 @@ int short_x2_to_cshort::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const short *in0 = reinterpret_cast<const short *>(input_items[0]);
|
||||
const short *in1 = reinterpret_cast<const short *>(input_items[1]);
|
||||
lv_16sc_t *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
const auto *in0 = reinterpret_cast<const short *>(input_items[0]);
|
||||
const auto *in1 = reinterpret_cast<const short *>(input_items[1]);
|
||||
auto *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
// This could be put into a volk kernel
|
||||
short real_part;
|
||||
short imag_part;
|
||||
|
@ -175,13 +175,13 @@ int32_t hybrid_observables_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
double **RX_time = new double *[d_nchannels_out];
|
||||
double **TOW_at_current_symbol_s = new double *[d_nchannels_out];
|
||||
double **Carrier_Doppler_hz = new double *[d_nchannels_out];
|
||||
double **Carrier_phase_cycles = new double *[d_nchannels_out];
|
||||
double **Pseudorange_m = new double *[d_nchannels_out];
|
||||
double **PRN = new double *[d_nchannels_out];
|
||||
double **Flag_valid_pseudorange = new double *[d_nchannels_out];
|
||||
auto **RX_time = new double *[d_nchannels_out];
|
||||
auto **TOW_at_current_symbol_s = new double *[d_nchannels_out];
|
||||
auto **Carrier_Doppler_hz = new double *[d_nchannels_out];
|
||||
auto **Carrier_phase_cycles = new double *[d_nchannels_out];
|
||||
auto **Pseudorange_m = new double *[d_nchannels_out];
|
||||
auto **PRN = new double *[d_nchannels_out];
|
||||
auto **Flag_valid_pseudorange = new double *[d_nchannels_out];
|
||||
|
||||
for (uint32_t i = 0; i < d_nchannels_out; i++)
|
||||
{
|
||||
@ -238,13 +238,13 @@ int32_t hybrid_observables_cc::save_matfile()
|
||||
return 1;
|
||||
}
|
||||
|
||||
double *RX_time_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *TOW_at_current_symbol_s_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *Carrier_Doppler_hz_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *Carrier_phase_cycles_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *Pseudorange_m_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *PRN_aux = new double[d_nchannels_out * num_epoch];
|
||||
double *Flag_valid_pseudorange_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *RX_time_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *TOW_at_current_symbol_s_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *Carrier_Doppler_hz_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *Carrier_phase_cycles_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *Pseudorange_m_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *PRN_aux = new double[d_nchannels_out * num_epoch];
|
||||
auto *Flag_valid_pseudorange_aux = new double[d_nchannels_out * num_epoch];
|
||||
uint32_t k = 0U;
|
||||
for (int64_t j = 0; j < num_epoch; j++)
|
||||
{
|
||||
@ -503,8 +503,8 @@ int hybrid_observables_cc::general_work(int noutput_items __attribute__((unused)
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// Push receiver clock into history buffer (connected to the last of the input channels)
|
||||
// The clock buffer gives time to the channels to compute the tracking observables
|
||||
|
@ -93,8 +93,8 @@ int direct_resampler_conditioner_cb::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_8sc_t *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
lv_8sc_t *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_8sc_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_8sc_t *>(output_items[0]);
|
||||
|
||||
int lcv = 0;
|
||||
int count = 0;
|
||||
|
@ -90,8 +90,8 @@ int direct_resampler_conditioner_cc::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
|
||||
int lcv = 0;
|
||||
int count = 0;
|
||||
|
@ -91,8 +91,8 @@ int direct_resampler_conditioner_cs::general_work(int noutput_items,
|
||||
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
lv_16sc_t *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<lv_16sc_t *>(output_items[0]);
|
||||
|
||||
int lcv = 0;
|
||||
int count = 0;
|
||||
|
@ -289,7 +289,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items __attribute__((unused)),
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
|
||||
work_counter_++;
|
||||
|
||||
|
@ -172,7 +172,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
__attribute__((unused)) gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
gr_complex *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
auto *out = reinterpret_cast<gr_complex *>(output_items[0]);
|
||||
|
||||
if (d_header_parsed == false)
|
||||
{
|
||||
@ -314,7 +314,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
return -1;
|
||||
}
|
||||
byte_counter++;
|
||||
uint8_t quantization = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
auto quantization = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
switch (quantization)
|
||||
{
|
||||
case 1:
|
||||
@ -327,7 +327,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
std::cout << "Unknown quantization ID " << static_cast<int>(quantization) << std::endl;
|
||||
}
|
||||
byte_counter++;
|
||||
uint8_t channel_a_constellation = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
auto channel_a_constellation = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
switch (channel_a_constellation)
|
||||
{
|
||||
case 0:
|
||||
@ -343,7 +343,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
std::cout << "Unknown channel A constellation ID " << static_cast<int>(channel_a_constellation) << std::endl;
|
||||
}
|
||||
byte_counter++;
|
||||
uint8_t channel_b_constellation = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
auto channel_b_constellation = static_cast<uint8_t>(memblock[byte_counter]);
|
||||
switch (channel_b_constellation)
|
||||
{
|
||||
case 0:
|
||||
|
@ -205,7 +205,7 @@ void rtl_tcp_signal_source_c::set_agc_mode(bool agc)
|
||||
|
||||
void rtl_tcp_signal_source_c::set_gain(int gain)
|
||||
{
|
||||
unsigned clipped = static_cast<unsigned>(info_.clip_gain(gain) * 10.0);
|
||||
auto clipped = static_cast<unsigned>(info_.clip_gain(gain) * 10.0);
|
||||
boost::system::error_code ec = rtl_tcp_command(RTL_TCP_SET_GAIN, clipped, socket_);
|
||||
if (ec)
|
||||
{
|
||||
|
@ -138,8 +138,8 @@ int unpack_2bit_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
signed char const *in = reinterpret_cast<signed char const *>(input_items[0]);
|
||||
int8_t *out = reinterpret_cast<int8_t *>(output_items[0]);
|
||||
auto const *in = reinterpret_cast<signed char const *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<int8_t *>(output_items[0]);
|
||||
|
||||
size_t ninput_bytes = noutput_items / 4;
|
||||
size_t ninput_items = ninput_bytes / item_size_;
|
||||
|
@ -63,8 +63,8 @@ int unpack_byte_2bit_cpx_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const signed char *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
short *out = reinterpret_cast<short *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<short *>(output_items[0]);
|
||||
|
||||
byte_2bit_struct sample;
|
||||
int n = 0;
|
||||
|
@ -59,8 +59,8 @@ int unpack_byte_2bit_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const signed char *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
float *out = reinterpret_cast<float *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<float *>(output_items[0]);
|
||||
|
||||
byte_2bit_struct sample;
|
||||
int n = 0;
|
||||
|
@ -54,8 +54,8 @@ int unpack_byte_4bit_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const signed char *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
signed char *out = reinterpret_cast<signed char *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const signed char *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<signed char *>(output_items[0]);
|
||||
int n = 0;
|
||||
unsigned char tmp_char2;
|
||||
for (int i = 0; i < noutput_items / 2; i++)
|
||||
|
@ -54,8 +54,8 @@ int unpack_intspir_1bit_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
const signed int *in = reinterpret_cast<const signed int *>(input_items[0]);
|
||||
float *out = reinterpret_cast<float *>(output_items[0]);
|
||||
const auto *in = reinterpret_cast<const signed int *>(input_items[0]);
|
||||
auto *out = reinterpret_cast<float *>(output_items[0]);
|
||||
|
||||
int n = 0;
|
||||
int channel = 1;
|
||||
|
@ -123,8 +123,8 @@ void unpack_spir_gss6450_samples::decode_4bits_word(uint32_t input_uint32, gr_co
|
||||
int unpack_spir_gss6450_samples::work(int noutput_items,
|
||||
gr_vector_const_void_star& input_items, gr_vector_void_star& output_items)
|
||||
{
|
||||
const int32_t* in = reinterpret_cast<const int32_t*>(input_items[0]);
|
||||
gr_complex* out = reinterpret_cast<gr_complex*>(output_items[0]);
|
||||
const auto* in = reinterpret_cast<const int32_t*>(input_items[0]);
|
||||
auto* out = reinterpret_cast<gr_complex*>(output_items[0]);
|
||||
int n_sample = 0;
|
||||
int in_counter = 0;
|
||||
do
|
||||
|
@ -260,7 +260,7 @@ galileo_telemetry_decoder_cc::~galileo_telemetry_decoder_cc()
|
||||
void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, int32_t frame_length)
|
||||
{
|
||||
// 1. De-interleave
|
||||
double *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
auto *page_part_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
deinterleaver(GALILEO_INAV_INTERLEAVER_ROWS, GALILEO_INAV_INTERLEAVER_COLS, page_part_symbols, page_part_symbols_deint);
|
||||
|
||||
// 2. Viterbi decoder
|
||||
@ -274,7 +274,7 @@ void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, i
|
||||
}
|
||||
}
|
||||
|
||||
int32_t *page_part_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto *page_part_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
viterbi_decoder(page_part_symbols_deint, page_part_bits);
|
||||
volk_gnsssdr_free(page_part_symbols_deint);
|
||||
|
||||
@ -354,7 +354,7 @@ void galileo_telemetry_decoder_cc::decode_INAV_word(double *page_part_symbols, i
|
||||
void galileo_telemetry_decoder_cc::decode_FNAV_word(double *page_symbols, int32_t frame_length)
|
||||
{
|
||||
// 1. De-interleave
|
||||
double *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
auto *page_symbols_deint = static_cast<double *>(volk_gnsssdr_malloc(frame_length * sizeof(double), volk_gnsssdr_get_alignment()));
|
||||
deinterleaver(GALILEO_FNAV_INTERLEAVER_ROWS, GALILEO_FNAV_INTERLEAVER_COLS, page_symbols, page_symbols_deint);
|
||||
|
||||
// 2. Viterbi decoder
|
||||
@ -367,7 +367,7 @@ void galileo_telemetry_decoder_cc::decode_FNAV_word(double *page_symbols, int32_
|
||||
page_symbols_deint[i] = -page_symbols_deint[i];
|
||||
}
|
||||
}
|
||||
int32_t *page_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
auto *page_bits = static_cast<int32_t *>(volk_gnsssdr_malloc((frame_length / 2) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
|
||||
viterbi_decoder(page_symbols_deint, page_bits);
|
||||
volk_gnsssdr_free(page_symbols_deint);
|
||||
|
||||
@ -460,8 +460,8 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
int32_t corr_value = 0;
|
||||
int32_t preamble_diff = 0;
|
||||
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization information and send the output object to the next block
|
||||
// 1. Copy the current tracking output
|
||||
|
@ -265,8 +265,8 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
int32_t corr_value = 0;
|
||||
int32_t preamble_diff = 0;
|
||||
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization information and send the output object to the next block
|
||||
// 1. Copy the current tracking output
|
||||
|
@ -265,8 +265,8 @@ int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
int32_t corr_value = 0;
|
||||
int32_t preamble_diff = 0;
|
||||
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization information and send the output object to the next block
|
||||
// 1. Copy the current tracking output
|
||||
|
@ -311,8 +311,8 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
|
||||
{
|
||||
int32_t preamble_diff_ms = 0;
|
||||
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization information and send the output object to the next block
|
||||
// 1. Copy the current tracking output
|
||||
|
@ -129,8 +129,8 @@ int gps_l2c_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// get pointers on in- and output gnss-synchro objects
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const auto *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
|
||||
bool flag_new_cnav_frame = false;
|
||||
cnav_msg_t msg;
|
||||
|
@ -141,8 +141,8 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// get pointers on in- and output gnss-synchro objects
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const auto *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
|
||||
// UPDATE GNSS SYNCHRO DATA
|
||||
Gnss_Synchro current_synchro_data; //structure to save the synchronization information and send the output object to the next block
|
||||
|
@ -222,13 +222,13 @@ bool sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const st
|
||||
std::vector<double> symbols_vd1(symbols); // aligned symbol vector -> copy input symbol vector
|
||||
std::vector<double> symbols_vd2; // shifted symbol vector -> add past sample in front of input vector
|
||||
symbols_vd2.push_back(d_past_symbol);
|
||||
for (std::vector<double>::const_iterator symbol_it = symbols.cbegin(); symbol_it != symbols.cend() - 1; ++symbol_it)
|
||||
for (auto symbol_it = symbols.cbegin(); symbol_it != symbols.cend() - 1; ++symbol_it)
|
||||
{
|
||||
symbols_vd2.push_back(*symbol_it);
|
||||
}
|
||||
// arrays for decoded bits
|
||||
int32_t *bits_vd1 = new int32_t[nbits_requested];
|
||||
int32_t *bits_vd2 = new int32_t[nbits_requested];
|
||||
auto *bits_vd1 = new int32_t[nbits_requested];
|
||||
auto *bits_vd2 = new int32_t[nbits_requested];
|
||||
// decode
|
||||
float metric_vd1 = d_vd1->decode_continuous(symbols_vd1.data(), traceback_depth, bits_vd1, nbits_requested, nbits_decoded);
|
||||
float metric_vd2 = d_vd2->decode_continuous(symbols_vd2.data(), traceback_depth, bits_vd2, nbits_requested, nbits_decoded);
|
||||
@ -270,7 +270,7 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st
|
||||
ss << "copy bits ";
|
||||
int32_t count = 0;
|
||||
// copy new bits into the working buffer
|
||||
for (std::vector<int32_t>::const_iterator bit_it = bits.cbegin(); bit_it < bits.cend(); ++bit_it)
|
||||
for (auto bit_it = bits.cbegin(); bit_it < bits.cend(); ++bit_it)
|
||||
{
|
||||
d_buffer.push_back(*bit_it);
|
||||
ss << *bit_it;
|
||||
@ -281,12 +281,12 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st
|
||||
while (d_buffer.size() >= sbas_msg_length)
|
||||
{
|
||||
// compare with all preambles
|
||||
for (std::vector<std::vector<int32_t>>::iterator preample_it = preambles.begin(); preample_it < preambles.end(); ++preample_it)
|
||||
for (auto preample_it = preambles.begin(); preample_it < preambles.end(); ++preample_it)
|
||||
{
|
||||
bool preamble_detected = true;
|
||||
bool inv_preamble_detected = true;
|
||||
// compare the buffer bits with the preamble bits
|
||||
for (std::vector<int32_t>::iterator preample_bit_it = preample_it->begin(); preample_bit_it < preample_it->end(); ++preample_bit_it)
|
||||
for (auto preample_bit_it = preample_it->begin(); preample_bit_it < preample_it->end(); ++preample_bit_it)
|
||||
{
|
||||
preamble_detected = *preample_bit_it == d_buffer[preample_bit_it - preample_it->begin()] ? preamble_detected : false;
|
||||
inv_preamble_detected = *preample_bit_it != d_buffer[preample_bit_it - preample_it->begin()] ? inv_preamble_detected : false;
|
||||
@ -299,13 +299,13 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st
|
||||
if (inv_preamble_detected)
|
||||
{
|
||||
// invert bits
|
||||
for (std::vector<int32_t>::iterator candidate_bit_it = candidate.begin(); candidate_bit_it != candidate.end(); candidate_bit_it++)
|
||||
for (auto candidate_bit_it = candidate.begin(); candidate_bit_it != candidate.end(); candidate_bit_it++)
|
||||
*candidate_bit_it = *candidate_bit_it == 0 ? 1 : 0;
|
||||
}
|
||||
msg_candidates.push_back(std::pair<int32_t, std::vector<int32_t>>(relative_preamble_start, candidate));
|
||||
ss.str("");
|
||||
ss << "preamble " << preample_it - preambles.begin() << (inv_preamble_detected ? " inverted" : " normal") << " detected! candidate=";
|
||||
for (std::vector<int32_t>::iterator bit_it = candidate.begin(); bit_it < candidate.end(); ++bit_it)
|
||||
for (auto bit_it = candidate.begin(); bit_it < candidate.end(); ++bit_it)
|
||||
ss << *bit_it;
|
||||
VLOG(EVENT) << ss.str();
|
||||
}
|
||||
@ -329,7 +329,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec
|
||||
VLOG(FLOW) << "get_valid_frames(): "
|
||||
<< "msg_candidates.size()=" << msg_candidates.size();
|
||||
// for each candidate
|
||||
for (std::vector<msg_candiate_int_t>::const_iterator candidate_it = msg_candidates.cbegin(); candidate_it < msg_candidates.cend(); ++candidate_it)
|
||||
for (auto candidate_it = msg_candidates.cbegin(); candidate_it < msg_candidates.cend(); ++candidate_it)
|
||||
{
|
||||
// convert to bytes
|
||||
std::vector<uint8_t> candidate_bytes;
|
||||
@ -352,7 +352,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec
|
||||
ss << "Not a valid message.";
|
||||
}
|
||||
ss << " Relbitoffset=" << candidate_it->first << " content=";
|
||||
for (std::vector<uint8_t>::iterator byte_it = candidate_bytes.begin(); byte_it < candidate_bytes.end(); ++byte_it)
|
||||
for (auto byte_it = candidate_bytes.begin(); byte_it < candidate_bytes.end(); ++byte_it)
|
||||
{
|
||||
ss << std::setw(2) << std::setfill('0') << std::hex << static_cast<uint32_t>((*byte_it));
|
||||
}
|
||||
@ -367,7 +367,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_by
|
||||
const size_t bits_per_byte = 8;
|
||||
uint8_t byte = 0;
|
||||
VLOG(LMORE) << "zerropad_back_and_convert_to_bytes():" << byte;
|
||||
for (std::vector<int>::const_iterator candidate_bit_it = msg_candidate.cbegin(); candidate_bit_it < msg_candidate.cend(); ++candidate_bit_it)
|
||||
for (auto candidate_bit_it = msg_candidate.cbegin(); candidate_bit_it < msg_candidate.cend(); ++candidate_bit_it)
|
||||
{
|
||||
int32_t idx_bit = candidate_bit_it - msg_candidate.begin();
|
||||
int32_t bit_pos_in_current_byte = (bits_per_byte - 1) - (idx_bit % bits_per_byte);
|
||||
@ -395,7 +395,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_b
|
||||
uint8_t byte = 0;
|
||||
int32_t idx_bit = 6; // insert 6 zeros at the front to fit the 250bits into a multiple of bytes
|
||||
VLOG(LMORE) << "zerropad_front_and_convert_to_bytes():" << byte;
|
||||
for (std::vector<int32_t>::const_iterator candidate_bit_it = msg_candidate.cbegin(); candidate_bit_it < msg_candidate.cend(); ++candidate_bit_it)
|
||||
for (auto candidate_bit_it = msg_candidate.cbegin(); candidate_bit_it < msg_candidate.cend(); ++candidate_bit_it)
|
||||
{
|
||||
int32_t bit_pos_in_current_byte = (bits_per_byte - 1) - (idx_bit % bits_per_byte);
|
||||
byte |= static_cast<uint8_t>(*candidate_bit_it) << bit_pos_in_current_byte;
|
||||
@ -422,8 +422,8 @@ int sbas_l1_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
VLOG(FLOW) << "general_work(): "
|
||||
<< "noutput_items=" << noutput_items << "\toutput_items real size=" << output_items.size() << "\tninput_items size=" << ninput_items.size() << "\tinput_items real size=" << input_items.size() << "\tninput_items[0]=" << ninput_items[0];
|
||||
// get pointers on in- and output gnss-synchro objects
|
||||
Gnss_Synchro *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
auto *out = reinterpret_cast<Gnss_Synchro *>(output_items[0]); // Get the output buffer pointer
|
||||
const auto *in = reinterpret_cast<const Gnss_Synchro *>(input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; // structure to save the synchronization information and send the output object to the next block
|
||||
// 1. Copy the current tracking output
|
||||
@ -460,7 +460,7 @@ int sbas_l1_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
// compute message sample stamp
|
||||
// and fill messages in SBAS raw message objects
|
||||
//std::vector<Sbas_Raw_Msg> sbas_raw_msgs;
|
||||
for (std::vector<msg_candiate_char_t>::const_iterator it = valid_msgs.cbegin();
|
||||
for (auto it = valid_msgs.cbegin();
|
||||
it != valid_msgs.cend(); ++it)
|
||||
{
|
||||
int32_t message_sample_offset =
|
||||
|
@ -180,7 +180,7 @@ int Viterbi_Decoder::do_acs(const double sym[], int nbits)
|
||||
int t, i, state_at_t;
|
||||
float metric;
|
||||
float max_val;
|
||||
float* pm_t_next = new float[d_states];
|
||||
auto* pm_t_next = new float[d_states];
|
||||
|
||||
/* t:
|
||||
* - state: state at t
|
||||
|
@ -511,7 +511,7 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
}
|
||||
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()));
|
||||
auto *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()));
|
||||
if (trk_parameters.track_pilot)
|
||||
{
|
||||
@ -1082,28 +1082,28 @@ int32_t dll_pll_veml_tracking::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_VE = new float[num_epoch];
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *carrier_doppler_rate_hz = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
float *code_freq_rate_chips = new float[num_epoch];
|
||||
float *carr_error_hz = new float[num_epoch];
|
||||
float *carr_error_filt_hz = new float[num_epoch];
|
||||
float *code_error_chips = new float[num_epoch];
|
||||
float *code_error_filt_chips = new float[num_epoch];
|
||||
float *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
float *carrier_lock_test = new float[num_epoch];
|
||||
float *aux1 = new float[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_VE = new float[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *abs_VL = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new float[num_epoch];
|
||||
auto *carrier_doppler_hz = new float[num_epoch];
|
||||
auto *carrier_doppler_rate_hz = new float[num_epoch];
|
||||
auto *code_freq_chips = new float[num_epoch];
|
||||
auto *code_freq_rate_chips = new float[num_epoch];
|
||||
auto *carr_error_hz = new float[num_epoch];
|
||||
auto *carr_error_filt_hz = new float[num_epoch];
|
||||
auto *code_error_chips = new float[num_epoch];
|
||||
auto *code_error_filt_chips = new float[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
auto *carrier_lock_test = new float[num_epoch];
|
||||
auto *aux1 = new float[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -1340,8 +1340,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
gr::thread::scoped_lock l(d_setlock);
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
||||
switch (d_state)
|
||||
|
@ -525,7 +525,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = 0.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -379,24 +379,24 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -591,8 +591,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -907,7 +907,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -333,24 +333,24 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -582,8 +582,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -896,7 +896,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -331,24 +331,24 @@ int32_t Glonass_L1_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -549,8 +549,8 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -749,7 +749,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_rem_code_phase_samples;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -376,24 +376,24 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -588,8 +588,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -904,7 +904,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -332,24 +332,24 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -581,8 +581,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -895,7 +895,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -331,24 +331,24 @@ int32_t Glonass_L2_Ca_Dll_Pll_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -549,8 +549,8 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]); // PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -749,7 +749,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_rem_code_phase_samples;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_current_prn_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -358,24 +358,24 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -570,8 +570,8 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -885,7 +885,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -360,24 +360,24 @@ int32_t gps_l1_ca_dll_pll_c_aid_tracking_sc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
double *acc_carrier_phase_rad = new double[num_epoch];
|
||||
double *carrier_doppler_hz = new double[num_epoch];
|
||||
double *code_freq_chips = new double[num_epoch];
|
||||
double *carr_error_hz = new double[num_epoch];
|
||||
double *carr_error_filt_hz = new double[num_epoch];
|
||||
double *code_error_chips = new double[num_epoch];
|
||||
double *code_error_filt_chips = new double[num_epoch];
|
||||
double *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
double *carrier_lock_test = new double[num_epoch];
|
||||
double *aux1 = new double[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new double[num_epoch];
|
||||
auto *carrier_doppler_hz = new double[num_epoch];
|
||||
auto *code_freq_chips = new double[num_epoch];
|
||||
auto *carr_error_hz = new double[num_epoch];
|
||||
auto *carr_error_filt_hz = new double[num_epoch];
|
||||
auto *code_error_chips = new double[num_epoch];
|
||||
auto *code_error_filt_chips = new double[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new double[num_epoch];
|
||||
auto *carrier_lock_test = new double[num_epoch];
|
||||
auto *aux1 = new double[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -572,8 +572,8 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
|
||||
{
|
||||
// Block input data and block output stream pointers
|
||||
const lv_16sc_t *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); //PRN start block alignment
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const lv_16sc_t *>(input_items[0]); //PRN start block alignment
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
@ -886,7 +886,7 @@ int gps_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = d_code_error_chips_Ti * CURRENT_INTEGRATION_TIME_S;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -427,28 +427,28 @@ int32_t Gps_L1_Ca_Kf_Tracking_cc::save_matfile()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
float *abs_VE = new float[num_epoch];
|
||||
float *abs_E = new float[num_epoch];
|
||||
float *abs_P = new float[num_epoch];
|
||||
float *abs_L = new float[num_epoch];
|
||||
float *abs_VL = new float[num_epoch];
|
||||
float *Prompt_I = new float[num_epoch];
|
||||
float *Prompt_Q = new float[num_epoch];
|
||||
uint64_t *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
float *acc_carrier_phase_rad = new float[num_epoch];
|
||||
float *carrier_doppler_hz = new float[num_epoch];
|
||||
float *carrier_dopplerrate_hz2 = new float[num_epoch];
|
||||
float *code_freq_chips = new float[num_epoch];
|
||||
float *carr_error_hz = new float[num_epoch];
|
||||
float *carr_noise_sigma2 = new float[num_epoch];
|
||||
float *carr_error_filt_hz = new float[num_epoch];
|
||||
float *code_error_chips = new float[num_epoch];
|
||||
float *code_error_filt_chips = new float[num_epoch];
|
||||
float *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
float *carrier_lock_test = new float[num_epoch];
|
||||
float *aux1 = new float[num_epoch];
|
||||
double *aux2 = new double[num_epoch];
|
||||
uint32_t *PRN = new uint32_t[num_epoch];
|
||||
auto *abs_VE = new float[num_epoch];
|
||||
auto *abs_E = new float[num_epoch];
|
||||
auto *abs_P = new float[num_epoch];
|
||||
auto *abs_L = new float[num_epoch];
|
||||
auto *abs_VL = new float[num_epoch];
|
||||
auto *Prompt_I = new float[num_epoch];
|
||||
auto *Prompt_Q = new float[num_epoch];
|
||||
auto *PRN_start_sample_count = new uint64_t[num_epoch];
|
||||
auto *acc_carrier_phase_rad = new float[num_epoch];
|
||||
auto *carrier_doppler_hz = new float[num_epoch];
|
||||
auto *carrier_dopplerrate_hz2 = new float[num_epoch];
|
||||
auto *code_freq_chips = new float[num_epoch];
|
||||
auto *carr_error_hz = new float[num_epoch];
|
||||
auto *carr_noise_sigma2 = new float[num_epoch];
|
||||
auto *carr_error_filt_hz = new float[num_epoch];
|
||||
auto *code_error_chips = new float[num_epoch];
|
||||
auto *code_error_filt_chips = new float[num_epoch];
|
||||
auto *CN0_SNV_dB_Hz = new float[num_epoch];
|
||||
auto *carrier_lock_test = new float[num_epoch];
|
||||
auto *aux1 = new float[num_epoch];
|
||||
auto *aux2 = new double[num_epoch];
|
||||
auto *PRN = new uint32_t[num_epoch];
|
||||
|
||||
try
|
||||
{
|
||||
@ -677,8 +677,8 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
|
||||
double code_error_filt_chips = 0.0;
|
||||
|
||||
// Block input data and block output stream pointers
|
||||
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
const auto *in = reinterpret_cast<const gr_complex *>(input_items[0]);
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
|
||||
|
||||
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
|
||||
Gnss_Synchro current_synchro_data = Gnss_Synchro();
|
||||
|
@ -562,7 +562,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
// AUX vars (for debug purposes)
|
||||
tmp_float = 0.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_float), sizeof(float));
|
||||
double tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
auto tmp_double = static_cast<double>(d_sample_counter + d_correlation_length_samples);
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
// PRN
|
||||
uint32_t prn_ = d_acquisition_gnss_synchro->PRN;
|
||||
|
@ -94,7 +94,7 @@ std::string INIReader::MakeKey(std::string section, std::string name)
|
||||
int INIReader::ValueHandler(void* user, const char* section, const char* name,
|
||||
const char* value)
|
||||
{
|
||||
INIReader* reader = static_cast<INIReader*>(user);
|
||||
auto* reader = static_cast<INIReader*>(user);
|
||||
reader->_values[MakeKey(section, name)] = value;
|
||||
return 1;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ InMemoryConfiguration::~InMemoryConfiguration()
|
||||
|
||||
std::string InMemoryConfiguration::property(std::string property_name, std::string default_value)
|
||||
{
|
||||
std::map<std::string, std::string>::iterator iter = properties_.find(property_name);
|
||||
auto iter = properties_.find(property_name);
|
||||
if (iter != properties_.end())
|
||||
{
|
||||
return iter->second;
|
||||
|
@ -111,7 +111,7 @@ Gnss_Satellite& Gnss_Satellite::operator=(const Gnss_Satellite &rhs) {
|
||||
void Gnss_Satellite::set_system(const std::string& system_)
|
||||
{
|
||||
// Set the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Compass"}
|
||||
std::set<std::string>::iterator it = system_set.find(system_);
|
||||
auto it = system_set.find(system_);
|
||||
|
||||
if (it != system_set.cend())
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ std::string Rtcm::binary_data_to_bin(const std::string& s) const
|
||||
|
||||
for (uint32_t i = 0; i < s.length(); i++)
|
||||
{
|
||||
uint8_t val = static_cast<uint8_t>(s.at(i));
|
||||
auto val = static_cast<uint8_t>(s.at(i));
|
||||
std::bitset<8> bs(val);
|
||||
ss << bs;
|
||||
}
|
||||
@ -488,7 +488,7 @@ std::bitset<58> Rtcm::get_MT1001_sat_content(const Gps_Ephemeris& eph, double ob
|
||||
|
||||
std::string Rtcm::print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -537,7 +537,7 @@ std::string Rtcm::print_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, co
|
||||
|
||||
std::string Rtcm::print_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -608,7 +608,7 @@ std::bitset<74> Rtcm::get_MT1002_sat_content(const Gps_Ephemeris& eph, double ob
|
||||
|
||||
std::string Rtcm::print_MT1003(const Gps_Ephemeris& ephL1, const Gps_CNAV_Ephemeris& ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -717,7 +717,7 @@ std::bitset<101> Rtcm::get_MT1003_sat_content(const Gps_Ephemeris& ephL1, const
|
||||
|
||||
std::string Rtcm::print_MT1004(const Gps_Ephemeris& ephL1, const Gps_CNAV_Ephemeris& ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -1169,7 +1169,7 @@ std::bitset<64> Rtcm::get_MT1009_sat_content(const Glonass_Gnav_Ephemeris& eph,
|
||||
|
||||
std::string Rtcm::print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -1218,7 +1218,7 @@ std::string Rtcm::print_MT1009(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, d
|
||||
|
||||
std::string Rtcm::print_MT1010(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -1293,7 +1293,7 @@ std::bitset<79> Rtcm::get_MT1010_sat_content(const Glonass_Gnav_Ephemeris& eph,
|
||||
|
||||
std::string Rtcm::print_MT1011(const Glonass_Gnav_Ephemeris& ephL1, const Glonass_Gnav_Ephemeris& ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -1404,7 +1404,7 @@ std::bitset<107> Rtcm::get_MT1011_sat_content(const Glonass_Gnav_Ephemeris& ephL
|
||||
|
||||
std::string Rtcm::print_MT1012(const Glonass_Gnav_Ephemeris& ephL1, const Glonass_Gnav_Ephemeris& ephL2, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, uint16_t station_id)
|
||||
{
|
||||
uint32_t ref_id = static_cast<uint32_t>(station_id);
|
||||
auto ref_id = static_cast<uint32_t>(station_id);
|
||||
uint32_t smooth_int = 0;
|
||||
bool sync_flag = false;
|
||||
bool divergence_free = false;
|
||||
@ -3562,7 +3562,7 @@ int32_t Rtcm::set_DF003(uint32_t ref_station_ID)
|
||||
int32_t Rtcm::set_DF004(double obs_time)
|
||||
{
|
||||
// TOW in milliseconds from the beginning of the GPS week, measured in GPS time
|
||||
uint64_t tow = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
auto tow = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
if (tow > 604799999)
|
||||
{
|
||||
LOG(WARNING) << "To large TOW! Set to the last millisecond of the week";
|
||||
@ -3653,7 +3653,7 @@ int32_t Rtcm::set_DF010(bool code_indicator)
|
||||
int32_t Rtcm::set_DF011(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 299792.458);
|
||||
uint64_t gps_L1_pseudorange = static_cast<uint64_t>(std::round((gnss_synchro.Pseudorange_m - ambiguity * 299792.458) / 0.02));
|
||||
auto gps_L1_pseudorange = static_cast<uint64_t>(std::round((gnss_synchro.Pseudorange_m - ambiguity * 299792.458) / 0.02));
|
||||
DF011 = std::bitset<24>(gps_L1_pseudorange);
|
||||
return 0;
|
||||
}
|
||||
@ -3667,7 +3667,7 @@ int32_t Rtcm::set_DF012(const Gnss_Synchro& gnss_synchro)
|
||||
double gps_L1_pseudorange_c = gps_L1_pseudorange * 0.02 + ambiguity * 299792.458;
|
||||
double L1_phaserange_c = gnss_synchro.Carrier_phase_rads / GPS_TWO_PI;
|
||||
double L1_phaserange_c_r = std::fmod(L1_phaserange_c - gps_L1_pseudorange_c / lambda + 1500.0, 3000.0) - 1500.0;
|
||||
int64_t gps_L1_phaserange_minus_L1_pseudorange = static_cast<int64_t>(std::round(L1_phaserange_c_r * lambda / 0.0005));
|
||||
auto gps_L1_phaserange_minus_L1_pseudorange = static_cast<int64_t>(std::round(L1_phaserange_c_r * lambda / 0.0005));
|
||||
DF012 = std::bitset<20>(gps_L1_phaserange_minus_L1_pseudorange);
|
||||
return 0;
|
||||
}
|
||||
@ -3685,7 +3685,7 @@ int32_t Rtcm::set_DF013(const Gps_Ephemeris& eph, double obs_time, const Gnss_Sy
|
||||
|
||||
int32_t Rtcm::set_DF014(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
uint32_t gps_L1_pseudorange_ambiguity = static_cast<uint32_t>(std::floor(gnss_synchro.Pseudorange_m / 299792.458));
|
||||
auto gps_L1_pseudorange_ambiguity = static_cast<uint32_t>(std::floor(gnss_synchro.Pseudorange_m / 299792.458));
|
||||
DF014 = std::bitset<8>(gps_L1_pseudorange_ambiguity);
|
||||
return 0;
|
||||
}
|
||||
@ -3698,7 +3698,7 @@ int32_t Rtcm::set_DF015(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
CN0_dB_Hz_est = 63.75;
|
||||
}
|
||||
uint32_t CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
auto CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
DF015 = std::bitset<8>(CN0_dB_Hz);
|
||||
return 0;
|
||||
}
|
||||
@ -3758,7 +3758,7 @@ int32_t Rtcm::set_DF020(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
CN0_dB_Hz_est = 63.75;
|
||||
}
|
||||
uint32_t CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
auto CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
DF020 = std::bitset<8>(CN0_dB_Hz);
|
||||
return 0;
|
||||
}
|
||||
@ -3794,7 +3794,7 @@ int32_t Rtcm::set_DF024(bool galileo_indicator)
|
||||
|
||||
int32_t Rtcm::set_DF025(double antenna_ECEF_X_m)
|
||||
{
|
||||
int64_t ant_ref_x = static_cast<int64_t>(std::round(antenna_ECEF_X_m * 10000));
|
||||
auto ant_ref_x = static_cast<int64_t>(std::round(antenna_ECEF_X_m * 10000));
|
||||
DF025 = std::bitset<38>(ant_ref_x);
|
||||
return 0;
|
||||
}
|
||||
@ -3802,7 +3802,7 @@ int32_t Rtcm::set_DF025(double antenna_ECEF_X_m)
|
||||
|
||||
int32_t Rtcm::set_DF026(double antenna_ECEF_Y_m)
|
||||
{
|
||||
int64_t ant_ref_y = static_cast<int64_t>(std::round(antenna_ECEF_Y_m * 10000));
|
||||
auto ant_ref_y = static_cast<int64_t>(std::round(antenna_ECEF_Y_m * 10000));
|
||||
DF026 = std::bitset<38>(ant_ref_y);
|
||||
return 0;
|
||||
}
|
||||
@ -3810,7 +3810,7 @@ int32_t Rtcm::set_DF026(double antenna_ECEF_Y_m)
|
||||
|
||||
int32_t Rtcm::set_DF027(double antenna_ECEF_Z_m)
|
||||
{
|
||||
int64_t ant_ref_z = static_cast<int64_t>(std::round(antenna_ECEF_Z_m * 10000));
|
||||
auto ant_ref_z = static_cast<int64_t>(std::round(antenna_ECEF_Z_m * 10000));
|
||||
DF027 = std::bitset<38>(ant_ref_z);
|
||||
return 0;
|
||||
}
|
||||
@ -3818,7 +3818,7 @@ int32_t Rtcm::set_DF027(double antenna_ECEF_Z_m)
|
||||
|
||||
int32_t Rtcm::set_DF028(double height)
|
||||
{
|
||||
uint32_t h_ = static_cast<uint32_t>(std::round(height * 10000));
|
||||
auto h_ = static_cast<uint32_t>(std::round(height * 10000));
|
||||
DF028 = std::bitset<16>(h_);
|
||||
return 0;
|
||||
}
|
||||
@ -3834,7 +3834,7 @@ int32_t Rtcm::set_DF031(uint32_t antenna_setup_id)
|
||||
int32_t Rtcm::set_DF034(double obs_time)
|
||||
{
|
||||
// TOW in milliseconds from the beginning of the GLONASS day, measured in GLONASS time
|
||||
uint64_t tk = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
auto tk = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
if (tk > 86400999)
|
||||
{
|
||||
LOG(WARNING) << "To large GLONASS Epoch Time (tk)! Set to the last millisecond of the day";
|
||||
@ -3945,7 +3945,7 @@ int32_t Rtcm::set_DF040(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
int32_t Rtcm::set_DF041(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 599584.92);
|
||||
uint64_t glonass_L1_pseudorange = static_cast<uint64_t>(std::round((gnss_synchro.Pseudorange_m - ambiguity * 599584.92) / 0.02));
|
||||
auto glonass_L1_pseudorange = static_cast<uint64_t>(std::round((gnss_synchro.Pseudorange_m - ambiguity * 599584.92) / 0.02));
|
||||
DF041 = std::bitset<25>(glonass_L1_pseudorange);
|
||||
return 0;
|
||||
}
|
||||
@ -3959,7 +3959,7 @@ int32_t Rtcm::set_DF042(const Gnss_Synchro& gnss_synchro)
|
||||
double glonass_L1_pseudorange_c = glonass_L1_pseudorange * 0.02 + ambiguity * 299792.458;
|
||||
double L1_phaserange_c = gnss_synchro.Carrier_phase_rads / GLONASS_TWO_PI;
|
||||
double L1_phaserange_c_r = std::fmod(L1_phaserange_c - glonass_L1_pseudorange_c / lambda + 1500.0, 3000.0) - 1500.0;
|
||||
int64_t glonass_L1_phaserange_minus_L1_pseudorange = static_cast<int64_t>(std::round(L1_phaserange_c_r * lambda / 0.0005));
|
||||
auto glonass_L1_phaserange_minus_L1_pseudorange = static_cast<int64_t>(std::round(L1_phaserange_c_r * lambda / 0.0005));
|
||||
DF042 = std::bitset<20>(glonass_L1_phaserange_minus_L1_pseudorange);
|
||||
return 0;
|
||||
}
|
||||
@ -3977,7 +3977,7 @@ int32_t Rtcm::set_DF043(const Glonass_Gnav_Ephemeris& eph, double obs_time, cons
|
||||
|
||||
int32_t Rtcm::set_DF044(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
uint32_t glonass_L1_pseudorange_ambiguity = static_cast<uint32_t>(std::floor(gnss_synchro.Pseudorange_m / 599584.916));
|
||||
auto glonass_L1_pseudorange_ambiguity = static_cast<uint32_t>(std::floor(gnss_synchro.Pseudorange_m / 599584.916));
|
||||
DF044 = std::bitset<7>(glonass_L1_pseudorange_ambiguity);
|
||||
return 0;
|
||||
}
|
||||
@ -3991,7 +3991,7 @@ int32_t Rtcm::set_DF045(const Gnss_Synchro& gnss_synchro)
|
||||
LOG(WARNING) << "GLONASS L1 CNR must be between 0 and 63.75, but CNR " << CN0_dB_Hz_est << " was found. Setting to 63.75 dB-Hz";
|
||||
CN0_dB_Hz_est = 63.75;
|
||||
}
|
||||
uint32_t CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
auto CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
DF045 = std::bitset<8>(CN0_dB_Hz);
|
||||
return 0;
|
||||
}
|
||||
@ -4051,7 +4051,7 @@ int32_t Rtcm::set_DF050(const Gnss_Synchro& gnss_synchro)
|
||||
{
|
||||
CN0_dB_Hz_est = 63.75;
|
||||
}
|
||||
uint32_t CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
auto CN0_dB_Hz = static_cast<uint32_t>(std::round(CN0_dB_Hz_est / 0.25));
|
||||
DF050 = std::bitset<8>(CN0_dB_Hz);
|
||||
return 0;
|
||||
}
|
||||
@ -4089,7 +4089,7 @@ int32_t Rtcm::set_DF052(const Gps_Ephemeris& gps_eph, double obs_time)
|
||||
|
||||
int32_t Rtcm::set_DF071(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t iode = static_cast<uint32_t>(gps_eph.d_IODE_SF2);
|
||||
auto iode = static_cast<uint32_t>(gps_eph.d_IODE_SF2);
|
||||
DF071 = std::bitset<8>(iode);
|
||||
return 0;
|
||||
}
|
||||
@ -4097,7 +4097,7 @@ int32_t Rtcm::set_DF071(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF076(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t week_number = static_cast<uint32_t>(gps_eph.i_GPS_week);
|
||||
auto week_number = static_cast<uint32_t>(gps_eph.i_GPS_week);
|
||||
DF076 = std::bitset<10>(week_number);
|
||||
return 0;
|
||||
}
|
||||
@ -4105,7 +4105,7 @@ int32_t Rtcm::set_DF076(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF077(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint16_t ura = static_cast<uint16_t>(gps_eph.i_SV_accuracy);
|
||||
auto ura = static_cast<uint16_t>(gps_eph.i_SV_accuracy);
|
||||
DF077 = std::bitset<4>(ura);
|
||||
return 0;
|
||||
}
|
||||
@ -4113,7 +4113,7 @@ int32_t Rtcm::set_DF077(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF078(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint16_t code_on_L2 = static_cast<uint16_t>(gps_eph.i_code_on_L2);
|
||||
auto code_on_L2 = static_cast<uint16_t>(gps_eph.i_code_on_L2);
|
||||
DF078 = std::bitset<2>(code_on_L2);
|
||||
return 0;
|
||||
}
|
||||
@ -4121,7 +4121,7 @@ int32_t Rtcm::set_DF078(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF079(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t idot = static_cast<uint32_t>(std::round(gps_eph.d_IDOT / I_DOT_LSB));
|
||||
auto idot = static_cast<uint32_t>(std::round(gps_eph.d_IDOT / I_DOT_LSB));
|
||||
DF079 = std::bitset<14>(idot);
|
||||
return 0;
|
||||
}
|
||||
@ -4129,7 +4129,7 @@ int32_t Rtcm::set_DF079(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF080(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint16_t iode = static_cast<uint16_t>(gps_eph.d_IODE_SF2);
|
||||
auto iode = static_cast<uint16_t>(gps_eph.d_IODE_SF2);
|
||||
DF080 = std::bitset<8>(iode);
|
||||
return 0;
|
||||
}
|
||||
@ -4137,7 +4137,7 @@ int32_t Rtcm::set_DF080(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF081(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t toc = static_cast<uint32_t>(std::round(gps_eph.d_Toc / T_OC_LSB));
|
||||
auto toc = static_cast<uint32_t>(std::round(gps_eph.d_Toc / T_OC_LSB));
|
||||
DF081 = std::bitset<16>(toc);
|
||||
return 0;
|
||||
}
|
||||
@ -4145,7 +4145,7 @@ int32_t Rtcm::set_DF081(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF082(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int16_t af2 = static_cast<int16_t>(std::round(gps_eph.d_A_f2 / A_F2_LSB));
|
||||
auto af2 = static_cast<int16_t>(std::round(gps_eph.d_A_f2 / A_F2_LSB));
|
||||
DF082 = std::bitset<8>(af2);
|
||||
return 0;
|
||||
}
|
||||
@ -4153,7 +4153,7 @@ int32_t Rtcm::set_DF082(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF083(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t af1 = static_cast<int32_t>(std::round(gps_eph.d_A_f1 / A_F1_LSB));
|
||||
auto af1 = static_cast<int32_t>(std::round(gps_eph.d_A_f1 / A_F1_LSB));
|
||||
DF083 = std::bitset<16>(af1);
|
||||
return 0;
|
||||
}
|
||||
@ -4161,7 +4161,7 @@ int32_t Rtcm::set_DF083(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF084(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t af0 = static_cast<int64_t>(std::round(gps_eph.d_A_f0 / A_F0_LSB));
|
||||
auto af0 = static_cast<int64_t>(std::round(gps_eph.d_A_f0 / A_F0_LSB));
|
||||
DF084 = std::bitset<22>(af0);
|
||||
return 0;
|
||||
}
|
||||
@ -4169,7 +4169,7 @@ int32_t Rtcm::set_DF084(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF085(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t iodc = static_cast<uint32_t>(gps_eph.d_IODC);
|
||||
auto iodc = static_cast<uint32_t>(gps_eph.d_IODC);
|
||||
DF085 = std::bitset<10>(iodc);
|
||||
return 0;
|
||||
}
|
||||
@ -4177,7 +4177,7 @@ int32_t Rtcm::set_DF085(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF086(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t crs = static_cast<int32_t>(std::round(gps_eph.d_Crs / C_RS_LSB));
|
||||
auto crs = static_cast<int32_t>(std::round(gps_eph.d_Crs / C_RS_LSB));
|
||||
DF086 = std::bitset<16>(crs);
|
||||
return 0;
|
||||
}
|
||||
@ -4185,7 +4185,7 @@ int32_t Rtcm::set_DF086(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF087(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t delta_n = static_cast<int32_t>(std::round(gps_eph.d_Delta_n / DELTA_N_LSB));
|
||||
auto delta_n = static_cast<int32_t>(std::round(gps_eph.d_Delta_n / DELTA_N_LSB));
|
||||
DF087 = std::bitset<16>(delta_n);
|
||||
return 0;
|
||||
}
|
||||
@ -4193,7 +4193,7 @@ int32_t Rtcm::set_DF087(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF088(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t m0 = static_cast<int64_t>(std::round(gps_eph.d_M_0 / M_0_LSB));
|
||||
auto m0 = static_cast<int64_t>(std::round(gps_eph.d_M_0 / M_0_LSB));
|
||||
DF088 = std::bitset<32>(m0);
|
||||
return 0;
|
||||
}
|
||||
@ -4201,14 +4201,14 @@ int32_t Rtcm::set_DF088(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF089(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t cuc = static_cast<int32_t>(std::round(gps_eph.d_Cuc / C_UC_LSB));
|
||||
auto cuc = static_cast<int32_t>(std::round(gps_eph.d_Cuc / C_UC_LSB));
|
||||
DF089 = std::bitset<16>(cuc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t Rtcm::set_DF090(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint64_t ecc = static_cast<uint64_t>(std::round(gps_eph.d_e_eccentricity / E_LSB));
|
||||
auto ecc = static_cast<uint64_t>(std::round(gps_eph.d_e_eccentricity / E_LSB));
|
||||
DF090 = std::bitset<32>(ecc);
|
||||
return 0;
|
||||
}
|
||||
@ -4216,7 +4216,7 @@ int32_t Rtcm::set_DF090(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF091(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t cus = static_cast<int32_t>(std::round(gps_eph.d_Cus / C_US_LSB));
|
||||
auto cus = static_cast<int32_t>(std::round(gps_eph.d_Cus / C_US_LSB));
|
||||
DF091 = std::bitset<16>(cus);
|
||||
return 0;
|
||||
}
|
||||
@ -4224,7 +4224,7 @@ int32_t Rtcm::set_DF091(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF092(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint64_t sqr_a = static_cast<uint64_t>(std::round(gps_eph.d_sqrt_A / SQRT_A_LSB));
|
||||
auto sqr_a = static_cast<uint64_t>(std::round(gps_eph.d_sqrt_A / SQRT_A_LSB));
|
||||
DF092 = std::bitset<32>(sqr_a);
|
||||
return 0;
|
||||
}
|
||||
@ -4232,7 +4232,7 @@ int32_t Rtcm::set_DF092(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF093(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint32_t toe = static_cast<uint32_t>(std::round(gps_eph.d_Toe / T_OE_LSB));
|
||||
auto toe = static_cast<uint32_t>(std::round(gps_eph.d_Toe / T_OE_LSB));
|
||||
DF093 = std::bitset<16>(toe);
|
||||
return 0;
|
||||
}
|
||||
@ -4240,7 +4240,7 @@ int32_t Rtcm::set_DF093(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF094(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t cic = static_cast<int32_t>(std::round(gps_eph.d_Cic / C_IC_LSB));
|
||||
auto cic = static_cast<int32_t>(std::round(gps_eph.d_Cic / C_IC_LSB));
|
||||
DF094 = std::bitset<16>(cic);
|
||||
return 0;
|
||||
}
|
||||
@ -4248,7 +4248,7 @@ int32_t Rtcm::set_DF094(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF095(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t Omega0 = static_cast<int64_t>(std::round(gps_eph.d_OMEGA0 / OMEGA_0_LSB));
|
||||
auto Omega0 = static_cast<int64_t>(std::round(gps_eph.d_OMEGA0 / OMEGA_0_LSB));
|
||||
DF095 = std::bitset<32>(Omega0);
|
||||
return 0;
|
||||
}
|
||||
@ -4256,7 +4256,7 @@ int32_t Rtcm::set_DF095(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF096(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t cis = static_cast<int32_t>(std::round(gps_eph.d_Cis / C_IS_LSB));
|
||||
auto cis = static_cast<int32_t>(std::round(gps_eph.d_Cis / C_IS_LSB));
|
||||
DF096 = std::bitset<16>(cis);
|
||||
return 0;
|
||||
}
|
||||
@ -4264,7 +4264,7 @@ int32_t Rtcm::set_DF096(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF097(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t i0 = static_cast<int64_t>(std::round(gps_eph.d_i_0 / I_0_LSB));
|
||||
auto i0 = static_cast<int64_t>(std::round(gps_eph.d_i_0 / I_0_LSB));
|
||||
DF097 = std::bitset<32>(i0);
|
||||
return 0;
|
||||
}
|
||||
@ -4272,7 +4272,7 @@ int32_t Rtcm::set_DF097(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF098(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int32_t crc = static_cast<int32_t>(std::round(gps_eph.d_Crc / C_RC_LSB));
|
||||
auto crc = static_cast<int32_t>(std::round(gps_eph.d_Crc / C_RC_LSB));
|
||||
DF098 = std::bitset<16>(crc);
|
||||
return 0;
|
||||
}
|
||||
@ -4280,7 +4280,7 @@ int32_t Rtcm::set_DF098(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF099(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t omega = static_cast<int64_t>(std::round(gps_eph.d_OMEGA / OMEGA_LSB));
|
||||
auto omega = static_cast<int64_t>(std::round(gps_eph.d_OMEGA / OMEGA_LSB));
|
||||
DF099 = std::bitset<32>(omega);
|
||||
return 0;
|
||||
}
|
||||
@ -4288,7 +4288,7 @@ int32_t Rtcm::set_DF099(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF100(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int64_t omegadot = static_cast<int64_t>(std::round(gps_eph.d_OMEGA_DOT / OMEGA_DOT_LSB));
|
||||
auto omegadot = static_cast<int64_t>(std::round(gps_eph.d_OMEGA_DOT / OMEGA_DOT_LSB));
|
||||
DF100 = std::bitset<24>(omegadot);
|
||||
return 0;
|
||||
}
|
||||
@ -4296,7 +4296,7 @@ int32_t Rtcm::set_DF100(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF101(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
int16_t tgd = static_cast<int16_t>(std::round(gps_eph.d_TGD / T_GD_LSB));
|
||||
auto tgd = static_cast<int16_t>(std::round(gps_eph.d_TGD / T_GD_LSB));
|
||||
DF101 = std::bitset<8>(tgd);
|
||||
return 0;
|
||||
}
|
||||
@ -4304,7 +4304,7 @@ int32_t Rtcm::set_DF101(const Gps_Ephemeris& gps_eph)
|
||||
|
||||
int32_t Rtcm::set_DF102(const Gps_Ephemeris& gps_eph)
|
||||
{
|
||||
uint16_t sv_heath = static_cast<uint16_t>(gps_eph.i_SV_health);
|
||||
auto sv_heath = static_cast<uint16_t>(gps_eph.i_SV_health);
|
||||
DF102 = std::bitset<6>(sv_heath);
|
||||
return 0;
|
||||
}
|
||||
@ -4334,7 +4334,7 @@ int32_t Rtcm::set_DF105(uint32_t glonass_gnav_alm_health_ind)
|
||||
int32_t Rtcm::set_DF106(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
// Convert the value from (15, 30, 45, 60) to (00, 01, 10, 11)
|
||||
uint32_t P_1 = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_P_1 / 15.0 - 1.0));
|
||||
auto P_1 = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_P_1 / 15.0 - 1.0));
|
||||
DF106 = std::bitset<2>(P_1);
|
||||
return 0;
|
||||
}
|
||||
@ -4378,7 +4378,7 @@ int32_t Rtcm::set_DF109(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF110(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t t_b = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_t_b / (15 * 60)));
|
||||
auto t_b = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_t_b / (15 * 60)));
|
||||
DF110 = std::bitset<7>(t_b);
|
||||
return 0;
|
||||
}
|
||||
@ -4386,7 +4386,7 @@ int32_t Rtcm::set_DF110(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF111(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t VXn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VXn / TWO_N20)));
|
||||
auto VXn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VXn / TWO_N20)));
|
||||
uint32_t VXn_sgn = glo_sgn(glonass_gnav_eph.d_VXn);
|
||||
|
||||
DF111 = std::bitset<24>(VXn_mag);
|
||||
@ -4397,7 +4397,7 @@ int32_t Rtcm::set_DF111(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF112(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t Xn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Xn / TWO_N11)));
|
||||
auto Xn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Xn / TWO_N11)));
|
||||
uint32_t Xn_sgn = glo_sgn(glonass_gnav_eph.d_Xn);
|
||||
|
||||
DF112 = std::bitset<27>(Xn_mag);
|
||||
@ -4408,7 +4408,7 @@ int32_t Rtcm::set_DF112(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF113(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t AXn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AXn / TWO_N30)));
|
||||
auto AXn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AXn / TWO_N30)));
|
||||
uint32_t AXn_sgn = glo_sgn(glonass_gnav_eph.d_AXn);
|
||||
|
||||
DF113 = std::bitset<5>(AXn_mag);
|
||||
@ -4419,7 +4419,7 @@ int32_t Rtcm::set_DF113(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF114(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t VYn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VYn / TWO_N20)));
|
||||
auto VYn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VYn / TWO_N20)));
|
||||
uint32_t VYn_sgn = glo_sgn(glonass_gnav_eph.d_VYn);
|
||||
|
||||
DF114 = std::bitset<24>(VYn_mag);
|
||||
@ -4430,7 +4430,7 @@ int32_t Rtcm::set_DF114(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF115(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t Yn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Yn / TWO_N11)));
|
||||
auto Yn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Yn / TWO_N11)));
|
||||
uint32_t Yn_sgn = glo_sgn(glonass_gnav_eph.d_Yn);
|
||||
|
||||
DF115 = std::bitset<27>(Yn_mag);
|
||||
@ -4441,7 +4441,7 @@ int32_t Rtcm::set_DF115(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF116(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t AYn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AYn / TWO_N30)));
|
||||
auto AYn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AYn / TWO_N30)));
|
||||
uint32_t AYn_sgn = glo_sgn(glonass_gnav_eph.d_AYn);
|
||||
|
||||
DF116 = std::bitset<5>(AYn_mag);
|
||||
@ -4452,7 +4452,7 @@ int32_t Rtcm::set_DF116(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF117(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t VZn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VZn / TWO_N20)));
|
||||
auto VZn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_VZn / TWO_N20)));
|
||||
uint32_t VZn_sgn = glo_sgn(glonass_gnav_eph.d_VZn);
|
||||
|
||||
DF117 = std::bitset<24>(VZn_mag);
|
||||
@ -4463,7 +4463,7 @@ int32_t Rtcm::set_DF117(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF118(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t Zn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Zn / TWO_N11)));
|
||||
auto Zn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Zn / TWO_N11)));
|
||||
uint32_t Zn_sgn = glo_sgn(glonass_gnav_eph.d_Zn);
|
||||
|
||||
DF118 = std::bitset<27>(Zn_mag);
|
||||
@ -4474,7 +4474,7 @@ int32_t Rtcm::set_DF118(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF119(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t AZn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AZn / TWO_N30)));
|
||||
auto AZn_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_AZn / TWO_N30)));
|
||||
uint32_t AZn_sgn = glo_sgn(glonass_gnav_eph.d_AZn);
|
||||
|
||||
DF119 = std::bitset<5>(AZn_mag);
|
||||
@ -4493,7 +4493,7 @@ int32_t Rtcm::set_DF120(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF121(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t gamma_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_gamma_n / TWO_N40)));
|
||||
auto gamma_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_gamma_n / TWO_N40)));
|
||||
uint32_t gamma_sgn = glo_sgn(glonass_gnav_eph.d_gamma_n);
|
||||
|
||||
DF121 = std::bitset<11>(gamma_mag);
|
||||
@ -4504,7 +4504,7 @@ int32_t Rtcm::set_DF121(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF122(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t P = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_P));
|
||||
auto P = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_P));
|
||||
DF122 = std::bitset<2>(P);
|
||||
return 0;
|
||||
}
|
||||
@ -4512,7 +4512,7 @@ int32_t Rtcm::set_DF122(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF123(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t ln = static_cast<uint32_t>((glonass_gnav_eph.d_l3rd_n));
|
||||
auto ln = static_cast<uint32_t>((glonass_gnav_eph.d_l3rd_n));
|
||||
DF123 = std::bitset<1>(ln);
|
||||
return 0;
|
||||
}
|
||||
@ -4520,7 +4520,7 @@ int32_t Rtcm::set_DF123(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF124(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t tau_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_tau_n / TWO_N30)));
|
||||
auto tau_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_tau_n / TWO_N30)));
|
||||
uint32_t tau_sgn = glo_sgn(glonass_gnav_eph.d_tau_n);
|
||||
|
||||
DF124 = std::bitset<22>(tau_mag);
|
||||
@ -4531,7 +4531,7 @@ int32_t Rtcm::set_DF124(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF125(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
int32_t delta_tau_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Delta_tau_n / TWO_N30)));
|
||||
auto delta_tau_mag = static_cast<int32_t>(std::round(fabs(glonass_gnav_eph.d_Delta_tau_n / TWO_N30)));
|
||||
uint32_t delta_tau_sgn = glo_sgn(glonass_gnav_eph.d_Delta_tau_n);
|
||||
|
||||
DF125 = std::bitset<5>(delta_tau_mag);
|
||||
@ -4542,7 +4542,7 @@ int32_t Rtcm::set_DF125(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF126(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t ecc = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_E_n));
|
||||
auto ecc = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_E_n));
|
||||
DF126 = std::bitset<5>(ecc);
|
||||
return 0;
|
||||
}
|
||||
@ -4558,7 +4558,7 @@ int32_t Rtcm::set_DF127(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF128(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t F_t = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_F_T));
|
||||
auto F_t = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_F_T));
|
||||
DF128 = std::bitset<4>(F_t);
|
||||
return 0;
|
||||
}
|
||||
@ -4566,7 +4566,7 @@ int32_t Rtcm::set_DF128(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF129(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t N_t = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_N_T));
|
||||
auto N_t = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_N_T));
|
||||
DF129 = std::bitset<11>(N_t);
|
||||
return 0;
|
||||
}
|
||||
@ -4574,7 +4574,7 @@ int32_t Rtcm::set_DF129(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF130(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
{
|
||||
uint32_t M = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_M));
|
||||
auto M = static_cast<uint32_t>(std::round(glonass_gnav_eph.d_M));
|
||||
DF130 = std::bitset<2>(M);
|
||||
return 0;
|
||||
}
|
||||
@ -4582,7 +4582,7 @@ int32_t Rtcm::set_DF130(const Glonass_Gnav_Ephemeris& glonass_gnav_eph)
|
||||
|
||||
int32_t Rtcm::set_DF131(uint32_t fifth_str_additional_data_ind)
|
||||
{
|
||||
uint32_t fith_str_data = static_cast<uint32_t>(fifth_str_additional_data_ind);
|
||||
auto fith_str_data = static_cast<uint32_t>(fifth_str_additional_data_ind);
|
||||
DF131 = std::bitset<1>(fith_str_data);
|
||||
return 0;
|
||||
}
|
||||
@ -4590,7 +4590,7 @@ int32_t Rtcm::set_DF131(uint32_t fifth_str_additional_data_ind)
|
||||
|
||||
int32_t Rtcm::set_DF132(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
{
|
||||
uint32_t N_A = static_cast<uint32_t>(std::round(glonass_gnav_utc_model.d_N_A));
|
||||
auto N_A = static_cast<uint32_t>(std::round(glonass_gnav_utc_model.d_N_A));
|
||||
DF132 = std::bitset<11>(N_A);
|
||||
return 0;
|
||||
}
|
||||
@ -4598,7 +4598,7 @@ int32_t Rtcm::set_DF132(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
|
||||
int32_t Rtcm::set_DF133(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
{
|
||||
int32_t tau_c = static_cast<int32_t>(std::round(glonass_gnav_utc_model.d_tau_c / TWO_N31));
|
||||
auto tau_c = static_cast<int32_t>(std::round(glonass_gnav_utc_model.d_tau_c / TWO_N31));
|
||||
DF133 = std::bitset<32>(tau_c);
|
||||
return 0;
|
||||
}
|
||||
@ -4606,7 +4606,7 @@ int32_t Rtcm::set_DF133(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
|
||||
int32_t Rtcm::set_DF134(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
{
|
||||
uint32_t N_4 = static_cast<uint32_t>(std::round(glonass_gnav_utc_model.d_N_4));
|
||||
auto N_4 = static_cast<uint32_t>(std::round(glonass_gnav_utc_model.d_N_4));
|
||||
DF134 = std::bitset<5>(N_4);
|
||||
return 0;
|
||||
}
|
||||
@ -4614,7 +4614,7 @@ int32_t Rtcm::set_DF134(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
|
||||
int32_t Rtcm::set_DF135(const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model)
|
||||
{
|
||||
int32_t tau_gps = static_cast<int32_t>(std::round(glonass_gnav_utc_model.d_tau_gps) / TWO_N30);
|
||||
auto tau_gps = static_cast<int32_t>(std::round(glonass_gnav_utc_model.d_tau_gps) / TWO_N30);
|
||||
DF135 = std::bitset<22>(tau_gps);
|
||||
return 0;
|
||||
}
|
||||
@ -4638,7 +4638,7 @@ int32_t Rtcm::set_DF137(const Gps_Ephemeris& gps_eph)
|
||||
int32_t Rtcm::set_DF248(double obs_time)
|
||||
{
|
||||
// TOW in milliseconds from the beginning of the Galileo week, measured in Galileo time
|
||||
uint64_t tow = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
auto tow = static_cast<uint64_t>(std::round(obs_time * 1000));
|
||||
if (tow > 604799999)
|
||||
{
|
||||
LOG(WARNING) << "To large TOW! Set to the last millisecond of the week";
|
||||
@ -4663,7 +4663,7 @@ int32_t Rtcm::set_DF252(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF289(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint32_t galileo_week_number = static_cast<uint32_t>(gal_eph.WN_5);
|
||||
auto galileo_week_number = static_cast<uint32_t>(gal_eph.WN_5);
|
||||
if (galileo_week_number > 4095)
|
||||
{
|
||||
LOG(WARNING) << "Error decoding Galileo week number (it has a 4096 roll-off, but " << galileo_week_number << " was detected)";
|
||||
@ -4675,7 +4675,7 @@ int32_t Rtcm::set_DF289(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint32_t iod_nav = static_cast<uint32_t>(gal_eph.IOD_nav_1);
|
||||
auto iod_nav = static_cast<uint32_t>(gal_eph.IOD_nav_1);
|
||||
if (iod_nav > 1023)
|
||||
{
|
||||
LOG(WARNING) << "Error decoding Galileo IODnav (it has a max of 1023, but " << iod_nav << " was detected)";
|
||||
@ -4687,7 +4687,7 @@ int32_t Rtcm::set_DF290(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint16_t SISA = static_cast<uint16_t>(gal_eph.SISA_3);
|
||||
auto SISA = static_cast<uint16_t>(gal_eph.SISA_3);
|
||||
//SISA = 0; // SIS Accuracy, data content definition not given in Galileo OS SIS ICD, Issue 1.1, Sept 2010
|
||||
DF291 = std::bitset<8>(SISA);
|
||||
return 0;
|
||||
@ -4696,7 +4696,7 @@ int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t idot = static_cast<int32_t>(std::round(gal_eph.iDot_2 / FNAV_idot_2_LSB));
|
||||
auto idot = static_cast<int32_t>(std::round(gal_eph.iDot_2 / FNAV_idot_2_LSB));
|
||||
DF292 = std::bitset<14>(idot);
|
||||
return 0;
|
||||
}
|
||||
@ -4704,7 +4704,7 @@ int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF293(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint32_t toc = static_cast<uint32_t>(gal_eph.t0c_4);
|
||||
auto toc = static_cast<uint32_t>(gal_eph.t0c_4);
|
||||
if (toc > 604740)
|
||||
{
|
||||
LOG(WARNING) << "Error decoding Galileo ephemeris time (max of 604740, but " << toc << " was detected)";
|
||||
@ -4716,7 +4716,7 @@ int32_t Rtcm::set_DF293(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int16_t af2 = static_cast<int16_t>(std::round(gal_eph.af2_4 / FNAV_af2_1_LSB));
|
||||
auto af2 = static_cast<int16_t>(std::round(gal_eph.af2_4 / FNAV_af2_1_LSB));
|
||||
DF294 = std::bitset<6>(af2);
|
||||
return 0;
|
||||
}
|
||||
@ -4724,7 +4724,7 @@ int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int64_t af1 = static_cast<int64_t>(std::round(gal_eph.af1_4 / FNAV_af1_1_LSB));
|
||||
auto af1 = static_cast<int64_t>(std::round(gal_eph.af1_4 / FNAV_af1_1_LSB));
|
||||
DF295 = std::bitset<21>(af1);
|
||||
return 0;
|
||||
}
|
||||
@ -4740,7 +4740,7 @@ int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t crs = static_cast<int32_t>(std::round(gal_eph.C_rs_3 / FNAV_Crs_3_LSB));
|
||||
auto crs = static_cast<int32_t>(std::round(gal_eph.C_rs_3 / FNAV_Crs_3_LSB));
|
||||
DF297 = std::bitset<16>(crs);
|
||||
return 0;
|
||||
}
|
||||
@ -4748,7 +4748,7 @@ int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n_3 / FNAV_deltan_3_LSB));
|
||||
auto delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n_3 / FNAV_deltan_3_LSB));
|
||||
DF298 = std::bitset<16>(delta_n);
|
||||
return 0;
|
||||
}
|
||||
@ -4756,7 +4756,7 @@ int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF299(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int64_t m0 = static_cast<int64_t>(std::round(gal_eph.M0_1 / FNAV_M0_2_LSB));
|
||||
auto m0 = static_cast<int64_t>(std::round(gal_eph.M0_1 / FNAV_M0_2_LSB));
|
||||
DF299 = std::bitset<32>(m0);
|
||||
return 0;
|
||||
}
|
||||
@ -4772,7 +4772,7 @@ int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint64_t ecc = static_cast<uint64_t>(std::round(gal_eph.e_1 / FNAV_e_2_LSB));
|
||||
auto ecc = static_cast<uint64_t>(std::round(gal_eph.e_1 / FNAV_e_2_LSB));
|
||||
DF301 = std::bitset<32>(ecc);
|
||||
return 0;
|
||||
}
|
||||
@ -4780,7 +4780,7 @@ int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t cus = static_cast<int32_t>(std::round(gal_eph.C_us_3 / FNAV_Cus_3_LSB));
|
||||
auto cus = static_cast<int32_t>(std::round(gal_eph.C_us_3 / FNAV_Cus_3_LSB));
|
||||
DF302 = std::bitset<16>(cus);
|
||||
return 0;
|
||||
}
|
||||
@ -4788,7 +4788,7 @@ int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint64_t sqr_a = static_cast<uint64_t>(std::round(gal_eph.A_1 / FNAV_a12_2_LSB));
|
||||
auto sqr_a = static_cast<uint64_t>(std::round(gal_eph.A_1 / FNAV_a12_2_LSB));
|
||||
DF303 = std::bitset<32>(sqr_a);
|
||||
return 0;
|
||||
}
|
||||
@ -4796,7 +4796,7 @@ int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint32_t toe = static_cast<uint32_t>(std::round(gal_eph.t0e_1 / FNAV_t0e_3_LSB));
|
||||
auto toe = static_cast<uint32_t>(std::round(gal_eph.t0e_1 / FNAV_t0e_3_LSB));
|
||||
DF304 = std::bitset<14>(toe);
|
||||
return 0;
|
||||
}
|
||||
@ -4804,7 +4804,7 @@ int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t cic = static_cast<int32_t>(std::round(gal_eph.C_ic_4 / FNAV_Cic_4_LSB));
|
||||
auto cic = static_cast<int32_t>(std::round(gal_eph.C_ic_4 / FNAV_Cic_4_LSB));
|
||||
DF305 = std::bitset<16>(cic);
|
||||
return 0;
|
||||
}
|
||||
@ -4812,7 +4812,7 @@ int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int64_t Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0_2 / FNAV_omega0_2_LSB));
|
||||
auto Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0_2 / FNAV_omega0_2_LSB));
|
||||
DF306 = std::bitset<32>(Omega0);
|
||||
return 0;
|
||||
}
|
||||
@ -4820,7 +4820,7 @@ int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t cis = static_cast<int32_t>(std::round(gal_eph.C_is_4 / FNAV_Cis_4_LSB));
|
||||
auto cis = static_cast<int32_t>(std::round(gal_eph.C_is_4 / FNAV_Cis_4_LSB));
|
||||
DF307 = std::bitset<16>(cis);
|
||||
return 0;
|
||||
}
|
||||
@ -4828,7 +4828,7 @@ int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int64_t i0 = static_cast<int64_t>(std::round(gal_eph.i_0_2 / FNAV_i0_3_LSB));
|
||||
auto i0 = static_cast<int64_t>(std::round(gal_eph.i_0_2 / FNAV_i0_3_LSB));
|
||||
DF308 = std::bitset<32>(i0);
|
||||
return 0;
|
||||
}
|
||||
@ -4844,7 +4844,7 @@ int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t omega = static_cast<int32_t>(std::round(gal_eph.omega_2 / FNAV_omega0_2_LSB));
|
||||
auto omega = static_cast<int32_t>(std::round(gal_eph.omega_2 / FNAV_omega0_2_LSB));
|
||||
DF310 = std::bitset<32>(omega);
|
||||
return 0;
|
||||
}
|
||||
@ -4852,7 +4852,7 @@ int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int64_t Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGA_dot_3 / FNAV_omegadot_2_LSB));
|
||||
auto Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGA_dot_3 / FNAV_omegadot_2_LSB));
|
||||
DF311 = std::bitset<24>(Omegadot);
|
||||
return 0;
|
||||
}
|
||||
@ -4860,7 +4860,7 @@ int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
int32_t bdg_E1_E5a = static_cast<int32_t>(std::round(gal_eph.BGD_E1E5a_5 / FNAV_BGD_1_LSB));
|
||||
auto bdg_E1_E5a = static_cast<int32_t>(std::round(gal_eph.BGD_E1E5a_5 / FNAV_BGD_1_LSB));
|
||||
DF312 = std::bitset<10>(bdg_E1_E5a);
|
||||
return 0;
|
||||
}
|
||||
@ -4868,7 +4868,7 @@ int32_t Rtcm::set_DF312(const Galileo_Ephemeris& gal_eph)
|
||||
|
||||
int32_t Rtcm::set_DF313(const Galileo_Ephemeris& gal_eph)
|
||||
{
|
||||
uint32_t bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b_5));
|
||||
auto bdg_E5b_E1 = static_cast<uint32_t>(std::round(gal_eph.BGD_E1E5b_5));
|
||||
//bdg_E5b_E1 = 0; //reserved
|
||||
DF313 = std::bitset<10>(bdg_E5b_E1);
|
||||
return 0;
|
||||
|
@ -65,7 +65,7 @@ TEST(MatioTest, WriteAndReadDoubles)
|
||||
ASSERT_FALSE(reinterpret_cast<long *>(matvar_read) == nullptr) << "Error reading variable in .mat file";
|
||||
|
||||
matvar_read = Mat_VarRead(matfp_read, "x");
|
||||
double *x_read = reinterpret_cast<double *>(matvar_read->data);
|
||||
auto *x_read = reinterpret_cast<double *>(matvar_read->data);
|
||||
Mat_Close(matfp_read);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
@ -91,7 +91,7 @@ TEST(MatioTest, WriteAndReadGrComplex)
|
||||
float x_real[size];
|
||||
float x_imag[size];
|
||||
unsigned int i = 0;
|
||||
for (std::vector<gr_complex>::const_iterator it = x_v.cbegin(); it != x_v.cend(); it++)
|
||||
for (auto it = x_v.cbegin(); it != x_v.cend(); it++)
|
||||
{
|
||||
x_real[i] = it->real();
|
||||
x_imag[i] = it->imag();
|
||||
@ -108,7 +108,7 @@ TEST(MatioTest, WriteAndReadGrComplex)
|
||||
float y_real[size_y];
|
||||
float y_imag[size_y];
|
||||
i = 0;
|
||||
for (std::vector<gr_complex>::const_iterator it = x2.cbegin(); it != x2.cend(); it++)
|
||||
for (auto it = x2.cbegin(); it != x2.cend(); it++)
|
||||
{
|
||||
y_real[i] = it->real();
|
||||
y_imag[i] = it->imag();
|
||||
@ -139,9 +139,9 @@ TEST(MatioTest, WriteAndReadGrComplex)
|
||||
ASSERT_FALSE(reinterpret_cast<long *>(matvar_read) == nullptr) << "Error reading variable in .mat file";
|
||||
|
||||
matvar_read = Mat_VarRead(matfp_read, "x");
|
||||
mat_complex_split_t *x_read_st = reinterpret_cast<mat_complex_split_t *>(matvar_read->data);
|
||||
float *x_read_real = reinterpret_cast<float *>(x_read_st->Re);
|
||||
float *x_read_imag = reinterpret_cast<float *>(x_read_st->Im);
|
||||
auto *x_read_st = reinterpret_cast<mat_complex_split_t *>(matvar_read->data);
|
||||
auto *x_read_real = reinterpret_cast<float *>(x_read_st->Re);
|
||||
auto *x_read_imag = reinterpret_cast<float *>(x_read_st->Im);
|
||||
std::vector<gr_complex> x_v_read;
|
||||
for (unsigned int i = 0; i < size; i++)
|
||||
{
|
||||
|
@ -173,9 +173,9 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid()
|
||||
{
|
||||
//load the measured values
|
||||
std::string basename = "./tmp-acq-gps1/acquisition_G_1C";
|
||||
unsigned int sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
auto sat = static_cast<unsigned int>(gnss_synchro.PRN);
|
||||
|
||||
unsigned int samples_per_code = static_cast<unsigned int>(round(4000000 / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); // !!
|
||||
auto samples_per_code = static_cast<unsigned int>(round(4000000 / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); // !!
|
||||
acquisition_dump_reader acq_dump(basename, sat, doppler_max, doppler_step, samples_per_code, 1);
|
||||
|
||||
if (!acq_dump.read_binary_acq()) std::cout << "Error reading files" << std::endl;
|
||||
@ -345,7 +345,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ValidationOfResults)
|
||||
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
|
||||
|
||||
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
|
||||
float delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
|
||||
auto delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
|
||||
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
|
||||
|
||||
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";
|
||||
|
@ -92,7 +92,7 @@ int DataTypeAdapter::run_ishort_to_cshort_block()
|
||||
EXPECT_EQ(expected_implementation, ishort_to_cshort->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str(), std::ofstream::binary);
|
||||
for (std::vector<short>::const_iterator i = input_data_shorts.cbegin(); i != input_data_shorts.cend(); ++i)
|
||||
for (auto i = input_data_shorts.cbegin(); i != input_data_shorts.cend(); ++i)
|
||||
{
|
||||
short aux = *i;
|
||||
ofs.write(reinterpret_cast<const char*>(&aux), sizeof(short));
|
||||
@ -121,7 +121,7 @@ int DataTypeAdapter::run_ishort_to_complex_block()
|
||||
EXPECT_EQ(expected_implementation, ishort_to_complex->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str(), std::ofstream::binary);
|
||||
for (std::vector<short>::const_iterator i = input_data_shorts.cbegin(); i != input_data_shorts.cend(); ++i)
|
||||
for (auto i = input_data_shorts.cbegin(); i != input_data_shorts.cend(); ++i)
|
||||
{
|
||||
short aux = *i;
|
||||
ofs.write(reinterpret_cast<const char*>(&aux), sizeof(short));
|
||||
@ -150,7 +150,7 @@ int DataTypeAdapter::run_ibyte_to_cshort_block()
|
||||
EXPECT_EQ(expected_implementation, ibyte_to_cshort->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str());
|
||||
for (std::vector<int8_t>::const_iterator i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
for (auto i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
{
|
||||
ofs << *i;
|
||||
}
|
||||
@ -178,7 +178,7 @@ int DataTypeAdapter::run_ibyte_to_complex_block()
|
||||
EXPECT_EQ(expected_implementation, ibyte_to_complex->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str());
|
||||
for (std::vector<int8_t>::const_iterator i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
for (auto i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
{
|
||||
ofs << *i;
|
||||
}
|
||||
@ -206,7 +206,7 @@ int DataTypeAdapter::run_ibyte_to_cbyte_block()
|
||||
EXPECT_EQ(expected_implementation, ibyte_to_cbyte->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str());
|
||||
for (std::vector<int8_t>::const_iterator i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
for (auto i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
{
|
||||
ofs << *i;
|
||||
}
|
||||
@ -234,7 +234,7 @@ int DataTypeAdapter::run_byte_to_short_block()
|
||||
EXPECT_EQ(expected_implementation, byte_to_short->implementation());
|
||||
|
||||
std::ofstream ofs(file_name_input.c_str());
|
||||
for (std::vector<int8_t>::const_iterator i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
for (auto i = input_data_bytes.cbegin(); i != input_data_bytes.cend(); ++i)
|
||||
{
|
||||
ofs << *i;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ bool acquisition_dump_reader::read_binary_acq()
|
||||
|
||||
std::vector<std::vector<float> >::iterator it1;
|
||||
std::vector<float>::iterator it2;
|
||||
float* aux = static_cast<float*>(var_->data);
|
||||
auto* aux = static_cast<float*>(var_->data);
|
||||
int k = 0;
|
||||
float normalization_factor = std::pow(d_samples_per_code, 4) * input_power;
|
||||
for (it1 = mag.begin(); it1 != mag.end(); it1++)
|
||||
|
@ -54,7 +54,7 @@ std::vector<uint8_t> packData(std::vector<int8_t> const &raw_data,
|
||||
|
||||
for (unsigned int i = 0; i < raw_data.size(); ++i)
|
||||
{
|
||||
unsigned val = static_cast<unsigned>((raw_data[i] - 1) / 2 & 0x03);
|
||||
auto val = static_cast<unsigned>((raw_data[i] - 1) / 2 & 0x03);
|
||||
|
||||
packed_data[j] |= val << shift;
|
||||
|
||||
|
@ -433,7 +433,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
std::cout << " " << PRN << " ";
|
||||
double doppler_measurement_hz = 0;
|
||||
for (std::vector<Gnss_Synchro>::iterator it = gnss_sync_vector.begin(); it != gnss_sync_vector.end(); ++it)
|
||||
for (auto it = gnss_sync_vector.begin(); it != gnss_sync_vector.end(); ++it)
|
||||
{
|
||||
doppler_measurement_hz += (*it).Acq_doppler_hz;
|
||||
}
|
||||
@ -540,7 +540,7 @@ int main(int argc, char** argv)
|
||||
|
||||
std::cout << "SV ID Measured [Hz] Predicted [Hz]" << std::endl;
|
||||
|
||||
for (std::map<int, double>::iterator it = doppler_measurements_map.begin(); it != doppler_measurements_map.end(); ++it)
|
||||
for (auto it = doppler_measurements_map.begin(); it != doppler_measurements_map.end(); ++it)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -576,7 +576,7 @@ int main(int argc, char** argv)
|
||||
double mean_osc_err_ppm = 0;
|
||||
int n_elements = f_if_estimation_Hz_map.size();
|
||||
|
||||
for (std::map<int, double>::iterator it = f_if_estimation_Hz_map.begin(); it != f_if_estimation_Hz_map.end(); ++it)
|
||||
for (auto it = f_if_estimation_Hz_map.begin(); it != f_if_estimation_Hz_map.end(); ++it)
|
||||
{
|
||||
mean_f_if_Hz += (*it).second;
|
||||
mean_fs_Hz += f_fs_estimation_Hz_map.find((*it).first)->second;
|
||||
@ -597,7 +597,7 @@ int main(int argc, char** argv)
|
||||
<< "Corrected Doppler vs. Predicted" << std::endl;
|
||||
std::cout << "SV ID Corrected [Hz] Predicted [Hz]" << std::endl;
|
||||
|
||||
for (std::map<int, double>::iterator it = doppler_measurements_map.begin(); it != doppler_measurements_map.end(); ++it)
|
||||
for (auto it = doppler_measurements_map.begin(); it != doppler_measurements_map.end(); ++it)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user