EngAlmanac.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: EngAlmanac.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002 
00003 //============================================================================
00004 //
00005 //  This file is part of GPSTk, the GPS Toolkit.
00006 //
00007 //  The GPSTk is free software; you can redistribute it and/or modify
00008 //  it under the terms of the GNU Lesser General Public License as published
00009 //  by the Free Software Foundation; either version 2.1 of the License, or
00010 //  any later version.
00011 //
00012 //  The GPSTk is distributed in the hope that it will be useful,
00013 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //  GNU Lesser General Public License for more details.
00016 //
00017 //  You should have received a copy of the GNU Lesser General Public
00018 //  License along with GPSTk; if not, write to the Free Software Foundation,
00019 //  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00020 //  
00021 //  Copyright 2004, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 //============================================================================
00025 //
00026 //This software developed by Applied Research Laboratories at the University of
00027 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00028 //Department of Defense. The U.S. Government retains all rights to use,
00029 //duplicate, distribute, disclose, or release this software. 
00030 //
00031 //Pursuant to DoD Directive 523024 
00032 //
00033 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00034 //                           release, distribution is unlimited.
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    }; // class EngAlmanac
00323 
00324 
00325    std::ostream& operator<<(std::ostream& s, const EngAlmanac& alm);
00327 
00328 } // namespace
00329 
00330 #endif

Generated on Sat May 18 03:31:03 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1