00001 #pragma ident "$Id: EngAlmanac.hpp 2465 2010-09-10 15:29:36Z snelsen $"
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
00051 namespace gpstk
00052 {
00055
00063 class EngAlmanac : public EngNav
00064 {
00065 public:
00068 NEW_EXCEPTION_CLASS(SVNotPresentException, gpstk::InvalidRequest);
00069
00071 typedef std::map<short, unsigned char, std::less<short> > SVBitsMap;
00072
00074 EngAlmanac() throw();
00075
00077 virtual ~EngAlmanac() {}
00078
00087 bool addSubframe(const long subframe[10], const int gpsWeek)
00088 throw(gpstk::InvalidParameter);
00089
00093 bool isData(SatID sat) const throw();
00094
00100 double getEcc(SatID sat) const throw(SVNotPresentException);
00101
00107 double getIOffset(SatID sat) const throw(SVNotPresentException);
00108
00115 double getOmegadot(SatID sat) const throw(SVNotPresentException);
00116
00123 short get6bitHealth(SatID sat) const throw(SVNotPresentException);
00124
00131 short getSVHealth(SatID sat) const throw(SVNotPresentException);
00132
00133
00139 short getSVConfig(SatID sat) const throw(SVNotPresentException);
00140
00147 double getAhalf(SatID sat) const throw(SVNotPresentException);
00148
00154 double getA(SatID sat) const throw(SVNotPresentException);
00155
00161 double getOmega0(SatID sat) const throw(SVNotPresentException);
00162
00168 double getW(SatID sat) const throw(SVNotPresentException);
00169
00175 double getM0(SatID sat) const throw(SVNotPresentException);
00176
00182 double getAf0(SatID sat) const throw(SVNotPresentException);
00183
00189 double getAf1(SatID sat) const throw(SVNotPresentException);
00190
00196 double getToa() const throw();
00197
00203 double getToa(SatID sat) const throw(SVNotPresentException);
00204
00210 double getXmitTime(SatID sat) const throw(SVNotPresentException);
00211
00217 short getFullWeek(SatID sat) const throw(SVNotPresentException);
00218
00223 void getIon(double a[4], double b[4]) const
00224 throw(InvalidRequest);
00225
00230 void getUTC(double& a0, double& a1, double& deltaTLS, long& tot,
00231 int& WNt, int& WNLSF, int& DN, double& deltaTLSF) const
00232 throw(InvalidRequest);
00233
00242 short getAlmWeek() const throw();
00243
00249 AlmOrbit getAlmOrbElem(SatID sat) const
00250 throw(SVNotPresentException);
00251
00255 AlmOrbits getAlmOrbElems() const
00256 { return almPRN; }
00257
00264 Xvt svXvt(SatID sat, const DayTime& t) const
00265 throw(SVNotPresentException);
00266
00268 Xvt svXvt(short prn, const DayTime& t) const
00269 throw(SVNotPresentException)
00270 { SatID sat(prn,SatID::systemGPS); return svXvt(sat,t); }
00271
00272 void dump(std::ostream& s = std::cout, bool checkFlag=true) const;
00273
00274 bool check(std::ostream& s) const;
00275
00276 protected:
00280 void checkSVHere(SatID sat) const throw(SVNotPresentException);
00281
00282
00285 double alpha[4];
00286 double beta[4];
00288
00291 double A0;
00292 double A1;
00293 double dt_ls;
00294 double dt_lsf;
00296 long t_ot;
00297 long t_oa;
00299 int wn_t;
00301 int wn_lsf;
00303 short alm_wk;
00305 unsigned char dn;
00307 SVBitsMap health;
00308 std::string special_msg;
00310 SVBitsMap SV_config;
00312
00313 AlmOrbits almPRN;
00314 bool haveUTC;
00315
00316 private:
00317 bool operator==(const EngAlmanac&);
00318 bool operator!=(const EngAlmanac&);
00319 bool operator<(const EngAlmanac&);
00320 bool operator>(const EngAlmanac&);
00321 };
00322
00323
00324 std::ostream& operator<<(std::ostream& s, const EngAlmanac& alm);
00326
00327 }
00328
00329 #endif