GPSAlmanacStore.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: GPSAlmanacStore.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 
00045 #ifndef GPSTK_GPSALMANACSTORE_HPP
00046 #define GPSTK_GPSALMANACSTORE_HPP
00047 
00048 #include <iostream>
00049 #include <string>
00050 #include <map>
00051 
00052 #include "XvtStore.hpp"
00053 #include "SatID.hpp"
00054 #include "AlmOrbit.hpp"
00055 #include "EngAlmanac.hpp"
00056 #include "OrbElemStore.hpp"
00057 
00058 namespace gpstk
00059 {
00062 
00066    class GPSAlmanacStore : public OrbElemStore
00067    {
00068    public:
00069 
00070       GPSAlmanacStore()
00071          throw()
00072          : initialTime(CommonTime::END_OF_TIME), 
00073            finalTime(CommonTime::BEGINNING_OF_TIME)
00074       {}
00075 
00076       virtual ~GPSAlmanacStore()
00077       {}
00078       
00087       virtual Xvt getXvt(const SatID& id, const CommonTime& t) 
00088          const throw( gpstk::InvalidRequest );
00089 
00090 
00104       virtual Xvt getXvtMostRecentXmit(const SatID id, const CommonTime& t)
00105          const throw( gpstk::InvalidRequest );
00106       
00107 
00112       virtual void dump(std::ostream& s = std::cout, short detail = 0) 
00113          const throw();
00114 
00115 
00119       virtual void edit(const CommonTime& tmin, 
00120                         const CommonTime& tmax = CommonTime::END_OF_TIME)
00121          throw();
00122 
00124       virtual void clear(void) throw()
00125       { uba.clear(); }
00126 
00128       virtual TimeSystem getTimeSystem(void) const throw()
00129          { return TimeSystem::GPS; }
00130 
00135       virtual CommonTime getInitialTime()
00136          const throw()
00137       {return initialTime;}
00138 
00139       
00144       virtual CommonTime getFinalTime()
00145          const throw()
00146       {return finalTime;}
00147 
00148       virtual bool velocityIsPresent()
00149          const throw()
00150       {return true;}
00151 
00153       virtual bool hasVelocity() const throw()
00154       { return true; }
00155 
00157       virtual bool isPresent(const SatID& sat) const throw()
00158       {
00159          if(uba.find(sat) == uba.end()) return false;
00160          return true;
00161       }
00162 
00163       //---------------------------------------------------------------
00164       // Below are interfaces that are unique to this class (i.e. not 
00165       // in the parent class)
00166       //---------------------------------------------------------------
00167 
00173       short getSatHealth(const SatID sat, const CommonTime& t) 
00174          const throw( gpstk::InvalidRequest);
00175 
00176       bool addAlmanac(const AlmOrbit& alm) throw();
00177 
00178       bool addAlmanac(const EngAlmanac& alm) throw();
00179 
00185       AlmOrbit findAlmanac(const SatID sat, const CommonTime& t) 
00186          const throw( gpstk::InvalidRequest );
00187 
00193       AlmOrbit findMostRecentAlmanac(const SatID sat, const CommonTime& t)
00194          const throw( gpstk::InvalidRequest );
00195 
00197       AlmOrbits findAlmanacs(const CommonTime& t) 
00198          const throw( gpstk::InvalidRequest );
00199 
00200    protected:
00203       typedef std::map<CommonTime, AlmOrbit> EngAlmMap;
00204 
00207       typedef std::map<SatID, EngAlmMap> UBAMap;
00208 
00210       UBAMap uba;
00211 
00212       CommonTime initialTime; //< Earliest Toa minus a half week
00213       CommonTime finalTime;   //< Last Toa plus a half week
00214       
00215    };
00216 
00218 }
00219 #endif

Generated on Mon May 20 03:31:06 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1