1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
This commit is contained in:
Carles Fernandez 2018-12-03 18:17:21 +01:00
parent b994f466a7
commit 2709dc5ec7
5 changed files with 21 additions and 21 deletions

View File

@ -158,10 +158,10 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
{ {
std::string dump_path; std::string dump_path;
// Get path // Get path
if (d_dump_filename.find_last_of("/") != std::string::npos) if (d_dump_filename.find_last_of('/') != std::string::npos)
{ {
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_; d_dump_filename = dump_filename_;
} }
else else
@ -173,9 +173,9 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
d_dump_filename = "acquisition"; d_dump_filename = "acquisition";
} }
// remove extension if any // remove extension if any
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
{ {
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
} }
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;
// create directory // create directory

View File

@ -91,10 +91,10 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
{ {
std::string dump_path; std::string dump_path;
// Get path // Get path
if (d_dump_filename.find_last_of("/") != std::string::npos) if (d_dump_filename.find_last_of('/') != std::string::npos)
{ {
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_; d_dump_filename = dump_filename_;
} }
else else
@ -106,9 +106,9 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
d_dump_filename = "acquisition"; d_dump_filename = "acquisition";
} }
// remove extension if any // remove extension if any
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
{ {
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
} }
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;
// create directory // create directory

View File

@ -74,10 +74,10 @@ hybrid_observables_cc::hybrid_observables_cc(uint32_t nchannels_in,
{ {
std::string dump_path; std::string dump_path;
// Get path // Get path
if (d_dump_filename.find_last_of("/") != std::string::npos) if (d_dump_filename.find_last_of('/') != std::string::npos)
{ {
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_; d_dump_filename = dump_filename_;
} }
else else
@ -89,9 +89,9 @@ hybrid_observables_cc::hybrid_observables_cc(uint32_t nchannels_in,
d_dump_filename = "observables.dat"; d_dump_filename = "observables.dat";
} }
// remove extension if any // remove extension if any
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
{ {
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
} }
d_dump_filename.append(".dat"); d_dump_filename.append(".dat");
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;

View File

@ -423,10 +423,10 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_dump_filename = trk_parameters.dump_filename; d_dump_filename = trk_parameters.dump_filename;
std::string dump_path; std::string dump_path;
// Get path // Get path
if (d_dump_filename.find_last_of("/") != std::string::npos) if (d_dump_filename.find_last_of('/') != std::string::npos)
{ {
std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1);
dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/'));
d_dump_filename = dump_filename_; d_dump_filename = dump_filename_;
} }
else else
@ -438,9 +438,9 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_dump_filename = "trk_channel_"; d_dump_filename = "trk_channel_";
} }
// remove extension if any // remove extension if any
if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos)
{ {
d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.'));
} }
d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename;

View File

@ -77,7 +77,7 @@ int main(int argc, char** argv)
// Uncompress if RINEX file is gzipped // Uncompress if RINEX file is gzipped
std::string rinex_filename(argv[1]); std::string rinex_filename(argv[1]);
std::string input_filename = rinex_filename; std::string input_filename = rinex_filename;
std::size_t found = rinex_filename.find_last_of("."); std::size_t found = rinex_filename.find_last_of('.');
if (found != std::string::npos) if (found != std::string::npos)
{ {
if (rinex_filename.size() >= found + 3) if (rinex_filename.size() >= found + 3)