TabularEphemerisStore.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: TabularEphemerisStore.hpp 2329 2010-02-24 06:54:10Z yanweignss $"
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 //
00027 //This software developed by Applied Research Laboratories at the University of
00028 //Texas at Austin, under contract to an agency or agencies within the U.S.
00029 //Department of Defense. The U.S. Government retains all rights to use,
00030 //duplicate, distribute, disclose, or release this software.
00031 //
00032 //Pursuant to DoD Directive 523024
00033 //
00034 // DISTRIBUTION STATEMENT A: This software has been approved for public
00035 //                           release, distribution is unlimited.
00036 //
00037 //=============================================================================
00038 
00047 #ifndef GPSTK_TABULAR_EPHEMERIS_STORE_HPP
00048 #define GPSTK_TABULAR_EPHEMERIS_STORE_HPP
00049 
00050 #include <iostream>
00051 
00052 #include "SatID.hpp"
00053 #include "DayTime.hpp"
00054 #include "XvtStore.hpp"
00055 #include "SP3Data.hpp"
00056 
00057 namespace gpstk
00058 {
00059 
00062 
00067    class TabularEphemerisStore : public XvtStore<SatID>
00068    {
00069    public:
00070 
00072       TabularEphemerisStore()
00073          throw()
00074          : haveVelocity(true), initialTime(DayTime::END_OF_TIME),
00075            finalTime(DayTime::BEGINNING_OF_TIME), checkDataGap(false),
00076            gapInterval(901.0), checkInterval(false), maxInterval(8105.0)
00077       {};
00078 
00079 
00081       virtual ~TabularEphemerisStore() {};
00082 
00083 
00096       virtual Xvt getXvt( const SatID id,
00097                           const DayTime& t )
00098          const throw(InvalidRequest);
00099 
00100 
00114       virtual Triple getAccel( const SatID id,
00115                                const DayTime& t )
00116          const throw(InvalidRequest);
00117 
00118 
00125       virtual void dump( std::ostream& s = std::cout,
00126                          short detail = 0 )
00127          const throw();
00128 
00129 
00136       virtual void edit( const DayTime& tmin,
00137                          const DayTime& tmax = DayTime(DayTime::END_OF_TIME) )
00138          throw();
00139 
00140 
00148       virtual DayTime getInitialTime()
00149          const throw(InvalidRequest)
00150       { return initialTime; };
00151 
00152 
00160       virtual DayTime getFinalTime()
00161          const throw(InvalidRequest)
00162       { return finalTime; };
00163 
00164 
00167       virtual bool velocityIsPresent()
00168          const throw()
00169       { return haveVelocity; }
00170 
00171 
00173       virtual bool clockIsPresent()
00174          const throw()
00175       { return true; };
00176 
00178       int nsats(void) throw() { return pe.size(); }
00179 
00181       int neph(void) throw() {
00182          int n(0);
00183          std::map<SatID, SvEphMap>::const_iterator it(pe.begin());
00184          while(it != pe.end()) {
00185             n += it->second.size();
00186             ++it; 
00187          }
00188          return n;
00189       }
00190 
00191       //---------------------------------------------------------------
00192       // Below are interfaces that are unique to this class (i.e. not
00193       // in the parent class)
00194       //---------------------------------------------------------------
00195 
00197       void addEphemeris(const SP3Data& data)
00198          throw();
00199 
00200 
00202       void clear() throw();
00203 
00204 
00206       void enableDataGapCheck(void)
00207       { checkDataGap = true; };
00208 
00209 
00211       void disableDataGapCheck(void)
00212       { checkDataGap = false; };
00213 
00214 
00216       double getGapInterval(void)
00217       { return gapInterval; };
00218 
00219 
00221       void setGapInterval(double interval)
00222       { gapInterval = interval; return; };
00223 
00224 
00226       void enableIntervalCheck(void)
00227       { checkInterval = true; };
00228 
00229 
00231       void disableIntervalCheck(void)
00232       { checkInterval = false; };
00233 
00234 
00236       double getMaxInterval(void)
00237       { return maxInterval; };
00238 
00239 
00241       void setMaxInterval(double interval)
00242       { maxInterval = interval; return; };
00243 
00244 
00245    protected:
00246 
00247 
00249       bool haveVelocity;
00250 
00251 
00252    protected:
00253 
00254 
00256       typedef std::map<DayTime, Xvt> SvEphMap;
00257 
00258 
00260       typedef std::map<SatID, SvEphMap> EphMap;
00261 
00262 
00264       EphMap pe;
00265 
00272       DayTime initialTime, finalTime;
00273 
00274 
00282       bool checkDataGap;
00283 
00284 
00294       double gapInterval;
00295 
00296 
00305       bool checkInterval;
00306 
00307 
00319       double maxInterval;
00320 
00321    };
00322 
00323 
00325 
00326 }  // End of namespace gpstk
00327 
00328 #endif   // GPSTK_TABULAR_EPHEMERIS_STORE_HPP

Generated on Thu Feb 9 03:31:01 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1