00001 #pragma ident "$Id: ComputeSatPCenter.hpp 1770 2009-03-04 13:10:43Z architest $"
00002
00008 #ifndef GPSTK_COMPUTESATPCENTER_HPP
00009 #define GPSTK_COMPUTESATPCENTER_HPP
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 #include <cmath>
00036 #include <string>
00037 #include <sstream>
00038 #include "ProcessingClass.hpp"
00039 #include "Triple.hpp"
00040 #include "Position.hpp"
00041 #include "SunPosition.hpp"
00042 #include "XvtStore.hpp"
00043 #include "SatDataReader.hpp"
00044 #include "AntexReader.hpp"
00045 #include "geometry.hpp"
00046 #include "StringUtils.hpp"
00047
00048
00049
00050 namespace gpstk
00051 {
00052
00055
00056
00100 class ComputeSatPCenter : public ProcessingClass
00101 {
00102 public:
00103
00105 ComputeSatPCenter()
00106 : pEphemeris(NULL), nominalPos(0.0, 0.0, 0.0),
00107 satData("PRN_GPS"), fileData("PRN_GPS"), pAntexReader(NULL)
00108 { setIndex(); };
00109
00110
00121 ComputeSatPCenter( XvtStore<SatID>& ephem,
00122 const Position& stapos,
00123 string filename="PRN_GPS" )
00124 : pEphemeris(&ephem), nominalPos(stapos), satData(filename),
00125 fileData(filename), pAntexReader(NULL)
00126 { setIndex(); };
00127
00128
00138 ComputeSatPCenter( const Position& stapos,
00139 string filename="PRN_GPS" )
00140 : pEphemeris(NULL), nominalPos(stapos), satData(filename),
00141 fileData(filename), pAntexReader(NULL)
00142 { setIndex(); };
00143
00144
00155 ComputeSatPCenter( XvtStore<SatID>& ephem,
00156 const Position& stapos,
00157 AntexReader& antexObj )
00158 : pEphemeris(&ephem), nominalPos(stapos), pAntexReader(&antexObj)
00159 { setIndex(); };
00160
00161
00171 ComputeSatPCenter( const Position& stapos,
00172 AntexReader& antexObj )
00173 : pEphemeris(NULL), nominalPos(stapos), pAntexReader(&antexObj)
00174 { setIndex(); };
00175
00176
00183 virtual satTypeValueMap& Process( const DayTime& time,
00184 satTypeValueMap& gData )
00185 throw(ProcessingException);
00186
00187
00193 virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00194 throw(ProcessingException)
00195 { Process(gData.header.epoch, gData.body); return gData; };
00196
00197
00203 virtual gnssRinex& Process(gnssRinex& gData)
00204 throw(ProcessingException)
00205 { Process(gData.header.epoch, gData.body); return gData; };
00206
00207
00209 virtual string getFilename(void) const
00210 { return fileData; };
00211
00212
00216 virtual ComputeSatPCenter& setFilename(const string& name);
00217
00218
00220 virtual Position getNominalPosition(void) const
00221 { return nominalPos; };
00222
00223
00227 virtual ComputeSatPCenter& setNominalPosition(const Position& stapos)
00228 { nominalPos = stapos; return (*this); };
00229
00230
00233 virtual XvtStore<SatID> *getEphemeris(void) const
00234 { return pEphemeris; };
00235
00236
00241 virtual ComputeSatPCenter& setEphemeris(XvtStore<SatID>& ephem)
00242 { pEphemeris = &ephem; return (*this); };
00243
00244
00246 virtual AntexReader *getAntexReader(void) const
00247 { return pAntexReader; };
00248
00249
00255 virtual ComputeSatPCenter& setAntexReader(AntexReader& antexObj)
00256 { pAntexReader = &antexObj; return (*this); };
00257
00258
00260 virtual int getIndex(void) const;
00261
00262
00264 virtual std::string getClassName(void) const;
00265
00266
00268 virtual ~ComputeSatPCenter() {};
00269
00270
00271 private:
00272
00273
00275 XvtStore<SatID> *pEphemeris;
00276
00277
00279 Position nominalPos;
00280
00281
00283 SatDataReader satData;
00284
00285
00287 string fileData;
00288
00289
00291 AntexReader* pAntexReader;
00292
00293
00302 virtual double getSatPCenter( const SatID& satid,
00303 const DayTime& time,
00304 const Triple& satpos,
00305 const Triple& sunPosition );
00306
00307
00309 static int classIndex;
00310
00312 int index;
00313
00315 void setIndex(void)
00316 { index = classIndex++; };
00317
00318
00319 };
00320
00322
00323 }
00324
00325 #endif // GPSTK_COMPUTESATPCENTER_HPP