[hamradio-commits] [gnss-sdr] 14/80: add a 0 before the PRN number if smaller than 10

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sun May 15 20:11:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch upstream
in repository gnss-sdr.

commit d24ea0e916623f93136c9545a7f43418ca1b86ac
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Mon May 2 15:11:43 2016 +0200

    add a 0 before the PRN number if smaller than 10
---
 src/core/system_parameters/gnss_satellite.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/system_parameters/gnss_satellite.cc b/src/core/system_parameters/gnss_satellite.cc
index ea1598e..ddf2ef9 100644
--- a/src/core/system_parameters/gnss_satellite.cc
+++ b/src/core/system_parameters/gnss_satellite.cc
@@ -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;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list