00001 #pragma ident "$Id: GPSAlmanacStore.hpp 3140 2012-06-18 15:03:02Z susancummins $"
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
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
00165
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;
00213 CommonTime finalTime;
00214
00215 };
00216
00218 }
00219 #endif