From f95344c32f61a93607d74327f84c8722f71449dc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 26 Feb 2015 01:56:11 +0100 Subject: [PATCH] " 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 36f4d9e31..0bccdd268 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(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(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(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(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(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)