1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-29 02:14:51 +00:00

Fixing bug in updating RINEX obs headers

This commit is contained in:
Carles Fernandez 2015-03-03 20:07:35 +01:00
parent 8b84847a5a
commit 504e96b536

View File

@ -1895,17 +1895,18 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Gps_Utc_Model& ut
}
out.close();
out.open(navfilename, std::ios::out | std::ios::trunc);
out.open(obsfilename, std::ios::out | std::ios::trunc);
out.seekp(0);
for (int i = 0; i < (int) data.size() - 1; i++)
{
out << data[i] << std::endl;
}
out.close();
out.open(navfilename, std::ios::out | std::ios::app);
out.open(obsfilename, std::ios::out | std::ios::app);
out.seekp(pos);
}
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation)
{
std::string line;
@ -2166,6 +2167,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
out << line << std::endl;
}
void Rinex_Printer::update_obs_header(std::fstream& out, const Galileo_Utc_Model& galileo_utc_model)
{
std::vector<std::string> data;
@ -2215,14 +2217,14 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Galileo_Utc_Model
}
out.close();
out.open(navfilename, std::ios::out | std::ios::trunc);
out.open(obsfilename, std::ios::out | std::ios::trunc);
out.seekp(0);
for (int i = 0; i < (int) data.size() - 1; i++)
{
out << data[i] << std::endl;
}
out.close();
out.open(navfilename, std::ios::out | std::ios::app);
out.open(obsfilename, std::ios::out | std::ios::app);
out.seekp(pos);
}