ComputeWindUp.hpp

Go to the documentation of this file.
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 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2007, 2008, 2009
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             // Default constructor initializing the data in the structure
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    }; // End of class 'ComputeWindUp'
00275 
00276 
00278 
00279 
00280 }  // End of namespace gpstk
00281 
00282 #endif // GPSTK_COMPUTEWINDUP_HPP

Generated on Tue May 22 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1