00001 #pragma ident "$Id: Rinex3NavData.hpp 3324 2012-10-11 18:22:22Z btolman $"
00002
00008 #ifndef GPSTK_RINEXNAVDATA_HPP
00009 #define GPSTK_RINEXNAVDATA_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #include <list>
00048 #include <string>
00049
00050 #include "StringUtils.hpp"
00051 #include "CommonTime.hpp"
00052 #include "FFStream.hpp"
00053 #include "Rinex3NavBase.hpp"
00054 #include "Rinex3NavStream.hpp"
00055 #include "EngEphemeris.hpp"
00056 #include "GalEphemeris.hpp"
00057 #include "GloEphemeris.hpp"
00058 #include "RinexSatID.hpp"
00059 #include "OrbElem.hpp"
00060
00061 namespace gpstk
00062 {
00065
00073 class Rinex3NavData : public Rinex3NavBase
00074 {
00075 public:
00076
00077
00083 Rinex3NavData(void)
00084 : time(CommonTime::BEGINNING_OF_TIME), PRNID(-1), fitint(4)
00085 {}
00086
00088 Rinex3NavData(const OrbElem* oeb);
00089
00091 Rinex3NavData(const EngEphemeris& ee);
00092
00093
00095 Rinex3NavData(const GalEphemeris& ge);
00096
00097
00099 Rinex3NavData(const GloEphemeris& gloe);
00100
00101
00103 virtual ~Rinex3NavData() {}
00104
00105
00106
00107
00109 virtual bool isData(void) const {return true;}
00110
00111
00114 virtual void dump(std::ostream& s) const;
00115
00116
00118 operator EngEphemeris() const throw();
00119
00120
00122 operator GalEphemeris() const throw();
00123
00124
00126 operator GloEphemeris() const throw();
00127
00128
00131 std::list<double> toList() const;
00132
00133
00135 bool operator<(const Rinex3NavData& right) const
00136 {
00137 if(time == right.time) return (sat < right.sat);
00138 return (time < right.time);
00139 }
00140
00141
00144 CommonTime time;
00145 std::string satSys;
00146 short PRNID;
00147 RinexSatID sat;
00148 long HOWtime;
00149 short weeknum;
00150
00151
00152 double accuracy;
00153 short health;
00154
00155
00158 short codeflgs;
00159 short L2Pdata;
00160 double IODC;
00161 double IODE;
00162
00163
00166 double TauN;
00167 double GammaN;
00168 double MFTraw;
00169 int MFtime;
00170 short freqNum;
00171 double ageOfInfo;
00172
00173
00176 short datasources;
00177 double IODnav;
00178
00179
00182 double accCode;
00183 double IODN;
00184
00185
00186
00189 double Toc;
00190 double af0;
00191 double af1;
00192 double af2;
00193 double Tgd;
00194 double BGDa, BGDb;
00195
00196
00199 double Cuc;
00200 double Cus;
00201 double Crc;
00202 double Crs;
00203 double Cic;
00204 double Cis;
00205
00206
00209 double Toe;
00210 double M0;
00211 double dn;
00212 double ecc;
00213 double Ahalf;
00214 double OMEGA0;
00215 double i0;
00216 double w;
00217 double OMEGAdot;
00218 double idot;
00219 double fitint;
00220
00221
00224 double px, py, pz;
00225 double vx, vy, vz;
00226 double ax, ay, az;
00227
00228
00229
00230 private:
00231
00232
00236 void getPRNEpoch(Rinex3NavStream& strm)
00237 throw(StringUtils::StringException, FFStreamError);
00238
00239
00248 void getRecord(const int& n, Rinex3NavStream& strm)
00249 throw(StringUtils::StringException, FFStreamError);
00251
00255 void putPRNEpoch(Rinex3NavStream& strm) const
00256 throw(StringUtils::StringException);
00257
00258
00261
00262
00267 void putRecord(const int& n, Rinex3NavStream& strm) const
00268 throw(StringUtils::StringException, FFStreamError);
00270
00271
00272 protected:
00273
00274
00284 virtual void reallyGetRecord(FFStream& s)
00285 throw(std::exception, FFStreamError, StringUtils::StringException);
00286
00287
00289 virtual void reallyPutRecord(FFStream& s) const
00290 throw(std::exception, FFStreamError, StringUtils::StringException);
00291
00292
00293 };
00294
00296
00297 }
00298
00299 #endif // GPSTK_RINEXNAVDATA_HPP