[hamradio-commits] [gnss-sdr] 05/60: " 2" instead of "02" when reporting toe in RINEX nav file version 2.11

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sun Mar 22 11:15:38 UTC 2015


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

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

commit f95344c32f61a93607d74327f84c8722f71449dc
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Thu Feb 26 01:56:11 2015 +0100

    " 2" instead of "02" when reporting toe in RINEX nav file version 2.11
---
 src/algorithms/PVT/libs/rinex_printer.cc | 50 ++++++++++++++++++++++++++++----
 1 file changed, 45 insertions(+), 5 deletions(-)

diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc
index 36f4d9e..0bccdd2 100644
--- a/src/algorithms/PVT/libs/rinex_printer.cc
+++ b/src/algorithms/PVT/libs/rinex_printer.cc
@@ -946,15 +946,55 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, const std::map<int,Gps_Eph
                     std::string year (timestring, 2, 2);
                     line += year;
                     line += std::string(1, ' ');
-                    line += month;
+                    if(boost::lexical_cast<int>(month) < 10)
+                        {
+                            line += std::string(1, ' ');
+                            line += std::string(month, 1, 1);
+                        }
+                    else
+                        {
+                            line += month;
+                        }
                     line += std::string(1, ' ');
-                    line += day;
+                    if(boost::lexical_cast<int>(day) < 10)
+                        {
+                            line += std::string(1, ' ');
+                            line += std::string(day, 1, 1);
+                        }
+                    else
+                        {
+                            line += day;
+                        }
                     line += std::string(1, ' ');
-                    line += hour;
+                    if(boost::lexical_cast<int>(hour) < 10)
+                        {
+                            line += std::string(1, ' ');
+                            line += std::string(hour, 1, 1);
+                        }
+                    else
+                        {
+                            line += hour;
+                        }
                     line += std::string(1, ' ');
-                    line += minutes;
+                    if(boost::lexical_cast<int>(minutes) < 10)
+                        {
+                            line += std::string(1, ' ');
+                            line += std::string(minutes, 1, 1);
+                        }
+                    else
+                        {
+                            line += minutes;
+                        }
                     line += std::string(1, ' ');
-                    line += seconds;
+                    if(boost::lexical_cast<int>(seconds) < 10)
+                        {
+                            line += std::string(1, ' ');
+                            line += std::string(seconds, 1, 1);
+                        }
+                    else
+                        {
+                            line += seconds;
+                        }
                     line += std::string(1, '.');
                     std::string decimal = std::string("0");
                     if (timestring.size() > 16)

-- 
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