mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14:51 +00:00
Use const container calls when result is immediately converted to a
const iterator
This commit is contained in:
parent
73b6613a3d
commit
b0cd2ee015
@ -3710,15 +3710,15 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
//Number of satellites observed in current epoch
|
||||
int numSatellitesObserved = 0;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
numSatellitesObserved++;
|
||||
}
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
line += satelliteSystem["GPS"];
|
||||
@ -3732,8 +3732,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
out << line << std::endl;
|
||||
|
||||
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string lineObs;
|
||||
@ -3816,8 +3816,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
//Number of satellites observed in current epoch
|
||||
int numSatellitesObserved = 0;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
numSatellitesObserved++;
|
||||
@ -3832,8 +3832,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string lineObs;
|
||||
@ -3938,8 +3938,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
||||
//Number of satellites observed in current epoch
|
||||
int numSatellitesObserved = 0;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
numSatellitesObserved++;
|
||||
@ -3953,8 +3953,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
out << line << std::endl;
|
||||
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string lineObs;
|
||||
@ -4063,12 +4063,11 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
||||
std::map<int, Gnss_Synchro> observablesL1;
|
||||
std::map<int, Gnss_Synchro> observablesL2;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter2;
|
||||
|
||||
std::multimap<unsigned int, Gnss_Synchro> total_mmap;
|
||||
std::multimap<unsigned int, Gnss_Synchro>::iterator mmap_iter;
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string system_(&observables_iter->second.System, 1);
|
||||
@ -4112,8 +4111,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
||||
|
||||
std::set<unsigned int> available_prns;
|
||||
std::set<unsigned int>::iterator it;
|
||||
for(observables_iter = observablesL1.begin();
|
||||
observables_iter != observablesL1.end();
|
||||
for(observables_iter = observablesL1.cbegin();
|
||||
observables_iter != observablesL1.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4124,8 +4123,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
|
||||
}
|
||||
}
|
||||
|
||||
for(observables_iter = observablesL2.begin();
|
||||
observables_iter != observablesL2.end();
|
||||
for(observables_iter = observablesL2.cbegin();
|
||||
observables_iter != observablesL2.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4258,8 +4257,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
std::map<int, Gnss_Synchro> observablesE5B;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string system_(&observables_iter->second.System, 1);
|
||||
@ -4301,8 +4300,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
}
|
||||
if(found_E5a != std::string::npos)
|
||||
{
|
||||
for(observables_iter = observablesE5A.begin();
|
||||
observables_iter != observablesE5A.end();
|
||||
for(observables_iter = observablesE5A.cbegin();
|
||||
observables_iter != observablesE5A.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4326,8 +4325,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
}
|
||||
if(found_E5b != std::string::npos)
|
||||
{
|
||||
for(observables_iter = observablesE5B.begin();
|
||||
observables_iter != observablesE5B.end();
|
||||
for(observables_iter = observablesE5B.cbegin();
|
||||
observables_iter != observablesE5B.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4336,25 +4335,25 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
{
|
||||
available_prns.insert(prn_);
|
||||
if(found_1B != std::string::npos)
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "1B";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "1B";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
if(found_E5a != std::string::npos)
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "5X";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "5X";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4362,15 +4361,15 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
|
||||
if(found_E5a != std::string::npos)
|
||||
{
|
||||
if( (total_map.count(prn_)) == 1)
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "5X";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
{
|
||||
Gnss_Synchro gs = Gnss_Synchro();
|
||||
std::string sys = "E";
|
||||
gs.System = *sys.c_str();
|
||||
std::string sig = "5X";
|
||||
std::memcpy((void*)gs.Signal, sig.c_str(), 3);
|
||||
gs.PRN = prn_;
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, gs));
|
||||
}
|
||||
}
|
||||
}
|
||||
total_map.insert(std::pair<unsigned int, Gnss_Synchro>(prn_, observables_iter->second));
|
||||
@ -4498,8 +4497,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
std::map<int, Gnss_Synchro> observablesE5B;
|
||||
std::map<int, Gnss_Synchro>::const_iterator observables_iter;
|
||||
|
||||
for(observables_iter = observables.begin();
|
||||
observables_iter != observables.end();
|
||||
for(observables_iter = observables.cbegin();
|
||||
observables_iter != observables.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
std::string system_(&observables_iter->second.System, 1);
|
||||
@ -4525,8 +4524,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
std::multimap<unsigned int, Gnss_Synchro> total_gal_map;
|
||||
std::set<unsigned int> available_gal_prns;
|
||||
std::set<unsigned int>::iterator it;
|
||||
for(observables_iter = observablesE1B.begin();
|
||||
observables_iter != observablesE1B.end();
|
||||
for(observables_iter = observablesE1B.cbegin();
|
||||
observables_iter != observablesE1B.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4538,8 +4537,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
}
|
||||
}
|
||||
|
||||
for(observables_iter = observablesE5A.begin();
|
||||
observables_iter != observablesE5A.end();
|
||||
for(observables_iter = observablesE5A.cbegin();
|
||||
observables_iter != observablesE5A.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4551,8 +4550,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
}
|
||||
}
|
||||
|
||||
for(observables_iter = observablesE5B.begin();
|
||||
observables_iter != observablesE5B.end();
|
||||
for(observables_iter = observablesE5B.cbegin();
|
||||
observables_iter != observablesE5B.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
unsigned int prn_ = observables_iter->second.PRN;
|
||||
@ -4578,8 +4577,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
|
||||
std::string s;
|
||||
std::string lineObs;
|
||||
for(observables_iter = observablesG1C.begin();
|
||||
observables_iter != observablesG1C.end();
|
||||
for(observables_iter = observablesG1C.cbegin();
|
||||
observables_iter != observablesG1C.cend();
|
||||
observables_iter++)
|
||||
{
|
||||
lineObs.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user