EngAlmanac.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: EngAlmanac.hpp 2465 2010-09-10 15:29:36Z snelsen $"
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 
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    }; // class EngAlmanac
00322 
00323 
00324    std::ostream& operator<<(std::ostream& s, const EngAlmanac& alm);
00326 
00327 } // namespace
00328 
00329 #endif

Generated on Tue May 22 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1