From 504e96b5361fe1e4a5f7763c241cd7b933d95efb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 3 Mar 2015 20:07:35 +0100 Subject: [PATCH] Fixing bug in updating RINEX obs headers --- src/algorithms/PVT/libs/rinex_printer.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index 0391765c4..f80eba4df 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -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 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); }