rinex_met_test.cpp

来自「GPSTK:做gpS的人都应当知道这个东西」· C++ 代码 · 共 60 行

CPP
60
字号
#pragma ident "$Id$"#include "RinexMetBase.hpp"#include "RinexMetData.hpp"#include "RinexMetHeader.hpp"#include "RinexMetStream.hpp"/** * @file rinex_met_test.cpp * Tests gpslib::RinexMetStream, gpslib::RinexMetData, gpslib::RinexMetHeader. */using namespace std;/// returns 0 if successful.main(int argc, char *argv[]){   if (argc<2)   {      cout << "Gimme a rinex obs to chew on!  Exiting." << endl;      exit(-1);   }   try   {      cout << "Reading " << argv[1] << "." << endl;      gpstk::RinexMetStream roffs(argv[1]);         // reading the header data isn't necessary//      gpstk::RinexMetHeader roh;      gpstk::RinexMetData roe;      roffs.exceptions(fstream::failbit);//      roffs >> roh;//      roh.dump(cout);      while (roffs >> roe)      {}      cout << "done" << endl;      exit(0);   }   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 + =
减小字号Ctrl + -
显示快捷键?