00001 #pragma ident "$Id: EngAlmanac.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002
00003
00004
00005
00006
00007
00008
00009
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
00043 #ifndef GPSTK_ENGALMANAC_HPP
00044 #define GPSTK_ENGALMANAC_HPP
00045
00046 #include "Exception.hpp"
00047 #include "EngNav.hpp"
00048 #include "AlmOrbit.hpp"
00049 #include "Xvt.hpp"
00050 #include "StringUtils.hpp"
00051
00052 namespace gpstk
00053 {
00056
00064 class EngAlmanac : public EngNav
00065 {
00066 public:
00069 NEW_EXCEPTION_CLASS(SVNotPresentException, gpstk::InvalidRequest);
00070
00072 typedef std::map<short, unsigned char, std::less<short> > SVBitsMap;
00073
00075 EngAlmanac() throw();
00076
00078 virtual ~EngAlmanac() {}
00079
00088 bool addSubframe(const long subframe[10], const int gpsWeek)
00089 throw(gpstk::InvalidParameter);
00090
00094 bool isData(SatID sat) const throw();
00095
00101 double getEcc(SatID sat) const throw(SVNotPresentException);
00102
00108 double getIOffset(SatID sat) const throw(SVNotPresentException);
00109
00116 double getOmegadot(SatID sat) const throw(SVNotPresentException);
00117
00124 short get6bitHealth(SatID sat) const throw(SVNotPresentException);
00125
00132 short getSVHealth(SatID sat) const throw(SVNotPresentException);
00133
00134
00140 short getSVConfig(SatID sat) const throw(SVNotPresentException);
00141
00148 double getAhalf(SatID sat) const throw(SVNotPresentException);
00149
00155 double getA(SatID sat) const throw(SVNotPresentException);
00156
00162 double getOmega0(SatID sat) const throw(SVNotPresentException);
00163
00169 double getW(SatID sat) const throw(SVNotPresentException);
00170
00176 double getM0(SatID sat) const throw(SVNotPresentException);
00177
00183 double getAf0(SatID sat) const throw(SVNotPresentException);
00184
00190 double getAf1(SatID sat) const throw(SVNotPresentException);
00191
00197 double getToa() const throw();
00198
00204 double getToa(SatID sat) const throw(SVNotPresentException);
00205
00211 double getXmitTime(SatID sat) const throw(SVNotPresentException);
00212
00218 short getFullWeek(SatID sat) const throw(SVNotPresentException);
00219
00224 void getIon(double a[4], double b[4]) const
00225 throw(InvalidRequest);
00226
00231 void getUTC(double& a0, double& a1, double& deltaTLS, long& tot,
00232 int& WNt, int& WNLSF, int& DN, double& deltaTLSF) const
00233 throw(InvalidRequest);
00234
00243 short getAlmWeek() const throw();
00244
00250 AlmOrbit getAlmOrbElem(SatID sat) const
00251 throw(SVNotPresentException);
00252
00256 AlmOrbits getAlmOrbElems() const
00257 { return almPRN; }
00258
00265 Xvt svXvt(SatID sat, const CommonTime& t) const
00266 throw(SVNotPresentException);
00267
00269 Xvt svXvt(short prn, const CommonTime& t) const
00270 throw(SVNotPresentException)
00271 { SatID sat(prn,SatID::systemGPS); return svXvt(sat,t); }
00272
00273 void dump(std::ostream& s = std::cout, bool checkFlag=true) const;
00274
00275 bool check(std::ostream& s) const;
00276
00277 protected:
00281 void checkSVHere(SatID sat) const throw(SVNotPresentException);
00282
00283
00286 double alpha[4];
00287 double beta[4];
00289
00292 double A0;
00293 double A1;
00294 double dt_ls;
00295 double dt_lsf;
00297 long t_ot;
00298 long t_oa;
00300 int wn_t;
00302 int wn_lsf;
00304 short alm_wk;
00306 unsigned char dn;
00308 SVBitsMap health;
00309 std::string special_msg;
00311 SVBitsMap SV_config;
00313
00314 AlmOrbits almPRN;
00315 bool haveUTC;
00316
00317 private:
00318 bool operator==(const EngAlmanac&);
00319 bool operator!=(const EngAlmanac&);
00320 bool operator<(const EngAlmanac&);
00321 bool operator>(const EngAlmanac&);
00322 };
00323
00324
00325 std::ostream& operator<<(std::ostream& s, const EngAlmanac& alm);
00327
00328 }
00329
00330 #endif