00001 #pragma ident "$Id: rinex_met_test.cpp 1895 2009-05-12 19:34:29Z afarris $"
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "RinexMetBase.hpp"
00026 #include "RinexMetData.hpp"
00027 #include "RinexMetHeader.hpp"
00028 #include "RinexMetStream.hpp"
00029
00035 using namespace std;
00036
00038 main(int argc, char *argv[])
00039 {
00040 if (argc<2)
00041 {
00042 cout << "Gimme a rinex obs to chew on! Exiting." << endl;
00043 exit(-1);
00044 }
00045
00046 try
00047 {
00048 cout << "Reading " << argv[1] << "." << endl;
00049
00050 gpstk::RinexMetStream roffs(argv[1]);
00051
00052
00053
00054 gpstk::RinexMetData roe;
00055
00056 roffs.exceptions(fstream::failbit);
00057
00058
00059
00060
00061 while (roffs >> roe)
00062 {}
00063
00064 cout << "done" << endl;
00065 exit(0);
00066 }
00067 catch(gpstk::Exception& e)
00068 {
00069 cout << e;
00070 exit(1);
00071 }
00072 catch (...)
00073 {
00074 cout << "unknown error. Done." << endl;
00075 exit(1);
00076 }
00077
00078 exit(0);
00079 }