⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rinex_obs_read_write.cpp

📁 GPSTK:做gpS的人都应当知道这个东西
💻 CPP
字号:
#pragma ident "$Id$"/** * @file rinex_obs_read_write.cpp * tests gpslib::RinexObsData, gpslib::RinexObsStream, gpslib::RinexObsHeader. */#include "RinexObsBase.hpp"#include "RinexObsData.hpp"#include "RinexObsHeader.hpp"#include "RinexObsStream.hpp"using namespace std;/// Returns 0 on success.  Input and output files should diff wihtout error.main(int argc, char *argv[]){   if (argc<2)   {      cout << "rinex_obs_read_write inputfile outputfile" << endl;      exit(-1);   }   try   {      cout << "Reading " << argv[1] << endl;      gpstk::RinexObsStream roffs(argv[1]);      cout << "Writing " << argv[2] << endl;      gpstk::RinexObsStream out(argv[2], ios::out);      roffs.exceptions(ios::failbit);      gpstk::RinexObsHeader roh;      gpstk::RinexObsData roe;            roffs >> roh;      out << roh;      roh.dump(cout);      while (roffs >> roe)      {         out << roe;      }      cout << "Read " << roffs.recordNumber << " epochs.  Done."  << endl;      exit(0);   }   catch(gpstk::FFStreamError& e)   {      cout << e;      exit(1);   }   catch(gpstk::Exception& e)   {      cout << e;      exit(1);   }   catch (...)   {      cout << "unknown error.  Done." << endl;      exit(1);   }   exit(0);} // main()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -