GPSAlmanacStore.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: GPSAlmanacStore.hpp 2401 2010-04-20 15:18:44Z renfroba $"
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 
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 
00057 namespace gpstk
00058 {
00061 
00065    class GPSAlmanacStore : public XvtStore<SatID>
00066    {
00067    public:
00068 
00069       GPSAlmanacStore()
00070          throw()
00071          : initialTime(DayTime::END_OF_TIME), 
00072            finalTime(DayTime::BEGINNING_OF_TIME)
00073       {}
00074 
00075       virtual ~GPSAlmanacStore()
00076       {}
00077       
00086       virtual Xvt getXvt(const SatID id, const DayTime& t) 
00087          const throw(InvalidRequest);
00088       
00102       virtual Xvt getXvtMostRecentXmit(const SatID id, const DayTime& t) 
00103          const throw(InvalidRequest);
00104 
00109       virtual void dump(std::ostream& s = std::cout, short detail = 0) 
00110          const throw();
00111 
00112 
00116       virtual void edit(const DayTime& tmin, 
00117                         const DayTime& tmax = DayTime(DayTime::END_OF_TIME))
00118          throw();
00119 
00120 
00125       virtual DayTime getInitialTime()
00126          const throw(InvalidRequest)
00127       {return initialTime;}
00128 
00129       
00134       virtual DayTime getFinalTime()
00135          const throw(InvalidRequest)
00136       {return finalTime;}
00137 
00138       virtual bool velocityIsPresent()
00139          const throw()
00140       {return true;}
00141 
00142       
00143       virtual bool clockIsPresent()
00144          const throw()
00145       {return true;}
00146 
00147 
00148       //---------------------------------------------------------------
00149       // Below are interfaces that are unique to this class (i.e. not 
00150       // in the parent class)
00151       //---------------------------------------------------------------
00152 
00158       short getSatHealth(const SatID sat, const DayTime& t) 
00159          const throw(InvalidRequest);
00160 
00161       bool addAlmanac(const AlmOrbit& alm) throw();
00162       bool addAlmanac(const EngAlmanac& alm) throw();
00163 
00169       AlmOrbit findAlmanac(const SatID sat, const DayTime& t) 
00170          const throw(InvalidRequest);
00171 
00177       AlmOrbit findMostRecentAlmanac(const SatID sat, const DayTime& t) 
00178          const throw(InvalidRequest);
00179 
00181       AlmOrbits findAlmanacs(const DayTime& t) 
00182          const throw(InvalidRequest);
00183 
00184    protected:
00187       typedef std::map<DayTime, AlmOrbit> EngAlmMap;
00188 
00191       typedef std::map<SatID, EngAlmMap> UBAMap;
00192 
00194       UBAMap uba;
00195 
00196       DayTime initialTime; //< Earliest Toa minus a half week
00197       DayTime finalTime;   //< Last Toa plus a half week
00198       
00199    };
00200 
00202 }
00203 #endif

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