00001 #pragma ident "$Id: ComputeWindUp.hpp 1662 2009-02-04 09:00:34Z architest $"
00002
00008 #ifndef GPSTK_COMPUTEWINDUP_HPP
00009 #define GPSTK_COMPUTEWINDUP_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 <string>
00036 #include "ProcessingClass.hpp"
00037 #include "Triple.hpp"
00038 #include "Position.hpp"
00039 #include "SunPosition.hpp"
00040 #include "XvtStore.hpp"
00041 #include "SatDataReader.hpp"
00042 #include "geometry.hpp"
00043
00044
00045
00046 namespace gpstk
00047 {
00048
00051
00052
00100 class ComputeWindUp : public ProcessingClass
00101 {
00102 public:
00103
00105 ComputeWindUp()
00106 : pEphemeris(NULL), nominalPos(0.0, 0.0, 0.0),
00107 satData("PRN_GPS"), fileData("PRN_GPS")
00108 { setIndex(); };
00109
00110
00121 ComputeWindUp( XvtStore<SatID>& ephem,
00122 const Position& stapos,
00123 string filename="PRN_GPS" )
00124 : pEphemeris(&ephem), nominalPos(stapos), satData(filename),
00125 fileData(filename)
00126 { setIndex(); };
00127
00128
00135 virtual satTypeValueMap& Process( const DayTime& time,
00136 satTypeValueMap& gData )
00137 throw(ProcessingException);
00138
00139
00145 virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00146 throw(ProcessingException)
00147 { Process(gData.header.epoch, gData.body); return gData; };
00148
00149
00155 virtual gnssRinex& Process(gnssRinex& gData)
00156 throw(ProcessingException)
00157 { Process(gData.header.epoch, gData.body); return gData; };
00158
00159
00161 virtual string getFilename(void) const
00162 { return fileData; };
00163
00164
00168 virtual ComputeWindUp& setFilename(const string& name);
00169
00170
00172 virtual Position getNominalPosition(void) const
00173 { return nominalPos; };
00174
00175
00179 virtual ComputeWindUp& setNominalPosition(const Position& stapos)
00180 { nominalPos = stapos; return (*this); };
00181
00182
00185 virtual XvtStore<SatID> *getEphemeris(void) const
00186 { return pEphemeris; };
00187
00188
00192 virtual ComputeWindUp& setEphemeris(XvtStore<SatID>& ephem)
00193 { pEphemeris = &ephem; return (*this); };
00194
00195
00197 virtual int getIndex(void) const;
00198
00199
00201 virtual std::string getClassName(void) const;
00202
00203
00205 virtual ~ComputeWindUp() {};
00206
00207
00208 private:
00209
00210
00212 XvtStore<SatID> *pEphemeris;
00213
00214
00216 Position nominalPos;
00217
00218
00220 SatDataReader satData;
00221
00222
00224 string fileData;
00225
00226
00228 struct phaseData
00229 {
00230
00231 phaseData() : previousPhase(0.0) {};
00232
00233 double previousPhase;
00234 };
00235
00236
00238 map<SatID, phaseData> phase_station;
00239
00240
00242 map<SatID, phaseData> phase_satellite;
00243
00244
00246 map<SatID, double> satArcMap;
00247
00248
00257 virtual double getWindUp( const SatID& sat,
00258 const DayTime& time,
00259 const Triple& satpos,
00260 const Triple& sunpos );
00261
00262
00264 static int classIndex;
00265
00267 int index;
00268
00270 void setIndex(void)
00271 { index = classIndex++; };
00272
00273
00274 };
00275
00276
00278
00279
00280 }
00281
00282 #endif // GPSTK_COMPUTEWINDUP_HPP