" 2" instead of "02" when reporting toe in RINEX nav file version 2.11

This commit is contained in:
Carles Fernandez 2015-02-26 01:56:11 +01:00
parent 3d49cdc862
commit f95344c32f
1 changed files with 45 additions and 5 deletions

View File

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