1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-09 12:16:46 +00:00

add a 0 before the PRN number if smaller than 10

This commit is contained in:
Carles Fernandez 2016-05-02 15:11:43 +02:00
parent d4793470a9
commit d24ea0e916

View File

@ -78,8 +78,10 @@ void Gnss_Satellite::reset()
std::ostream& operator<<(std::ostream &out, const Gnss_Satellite &sat) // output
{
std::string tag("");
std::string tag2("");
if(sat.get_system().compare("Galileo") == 0) tag = "E";
out << sat.get_system() << " PRN " << tag << sat.get_PRN() << " (Block " << sat.get_block() << ")";
if(sat.get_PRN() < 10) tag2 = "0";
out << sat.get_system() << " PRN " << tag << tag2 << sat.get_PRN() << " (Block " << sat.get_block() << ")";
return out;
}