00001 #pragma ident "$Id: TabularEphemerisStore.hpp 2329 2010-02-24 06:54:10Z yanweignss $"
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
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
00193
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 }
00327
00328 #endif // GPSTK_TABULAR_EPHEMERIS_STORE_HPP