ComputeMOPSWeights.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: ComputeMOPSWeights.hpp 2479 2010-10-26 08:02:55Z architest $"
00002 
00009 #ifndef COMPUTEMOPSWEIGHTS_HPP
00010 #define COMPUTEMOPSWEIGHTS_HPP
00011 
00012 //============================================================================
00013 //
00014 //  This file is part of GPSTk, the GPS Toolkit.
00015 //
00016 //  The GPSTk is free software; you can redistribute it and/or modify
00017 //  it under the terms of the GNU Lesser General Public License as published
00018 //  by the Free Software Foundation; either version 2.1 of the License, or
00019 //  any later version.
00020 //
00021 //  The GPSTk is distributed in the hope that it will be useful,
00022 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024 //  GNU Lesser General Public License for more details.
00025 //
00026 //  You should have received a copy of the GNU Lesser General Public
00027 //  License along with GPSTk; if not, write to the Free Software Foundation,
00028 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029 //
00030 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2006, 2007, 2008, 2010
00031 //
00032 //============================================================================
00033 
00034 
00035 
00036 #include "DayTime.hpp"
00037 #include "DataStructures.hpp"
00038 #include "WeightBase.hpp"
00039 #include "EngEphemeris.hpp"
00040 #include "TabularEphemerisStore.hpp"
00041 #include "GPSEphemerisStore.hpp"
00042 #include "ComputeIURAWeights.hpp"
00043 #include "TropModel.hpp"
00044 #include "geometry.hpp"             // DEG_TO_RAD
00045 
00046 
00047 namespace gpstk
00048 {
00049 
00052 
00053 
00121    class ComputeMOPSWeights : public ComputeIURAWeights
00122    {
00123    public:
00124 
00126       ComputeMOPSWeights() : receiverClass(2), defaultIono(TypeID::ionoL1)
00127       { pBCEphemeris = NULL; pTabEphemeris = NULL; setIndex(); }
00128 
00129 
00136       ComputeMOPSWeights( const Position& pos,
00137                           GPSEphemerisStore& bcephem,
00138                           int rxClass = 2 )
00139          : receiverClass(rxClass), nominalPos(pos), defaultIono(TypeID::ionoL1)
00140       { setDefaultEphemeris(bcephem); setIndex(); };
00141 
00142 
00150       ComputeMOPSWeights( const Position& pos,
00151                           TabularEphemerisStore& tabephem,
00152                           int rxClass = 2 )
00153          : receiverClass(rxClass), nominalPos(pos), defaultIono(TypeID::ionoL1)
00154       { setDefaultEphemeris(tabephem); setIndex(); };
00155 
00156 
00163       virtual satTypeValueMap& Process( const DayTime& time,
00164                                         satTypeValueMap& gData )
00165          throw(ProcessingException);
00166 
00167 
00173       virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)
00174          throw(ProcessingException);
00175 
00176 
00182       virtual gnssRinex& Process(gnssRinex& gData)
00183          throw(ProcessingException);
00184 
00185 
00191       virtual ComputeMOPSWeights& setPosition(const Position& pos)
00192       { nominalPos = pos; return (*this); };
00193 
00194 
00200       virtual ComputeMOPSWeights& setDefaultEphemeris(XvtStore<SatID>& ephem);
00201 
00202 
00208       virtual ComputeMOPSWeights& setDefaultEphemeris(GPSEphemerisStore& ephem)
00209       { pBCEphemeris = &ephem; pTabEphemeris = NULL; return (*this); };
00210 
00211 
00217       virtual ComputeMOPSWeights& setDefaultEphemeris(
00218                                              TabularEphemerisStore& ephem )
00219       { pBCEphemeris = NULL; pTabEphemeris = &ephem; return (*this); };
00220 
00221 
00223       virtual TypeID getDefaultIono() const
00224       { return defaultIono; };
00225 
00226 
00231       virtual ComputeMOPSWeights& setDefaultIono(const TypeID& type)
00232       { defaultIono = type; return (*this); };
00233 
00234 
00236       virtual int getIndex(void) const;
00237 
00238 
00240       virtual std::string getClassName(void) const;
00241 
00242 
00244       virtual ~ComputeMOPSWeights() {};
00245 
00246 
00247    private:
00248 
00249 
00251       int receiverClass;
00252 
00253 
00255       Position nominalPos;
00256 
00257 
00259       TypeID defaultIono;
00260 
00261 
00267       virtual double getWeight( const SatID& sat,
00268                                 typeValueMap& tvMap )
00269          throw(InvalidWeights);
00270 
00271 
00272          // Compute ionospheric sigma^2 according to Appendix J.2.3
00273          // and Appendix A.4.4.10.4 in MOPS-C
00274       double sigma2iono( const double& ionoCorrection,
00275                          const double& elevation,
00276                          const double& azimuth,
00277                          const Position& rxPosition )
00278          throw(InvalidWeights);
00279 
00280 
00282       static int classIndex;
00283 
00285       int index;
00286 
00288       void setIndex(void)
00289       { index = classIndex++; };
00290 
00291 
00292    }; // End of class 'ComputeMOPSWeights'
00293 
00295 
00296 }  // End of namespace gpstk
00297 #endif   // COMPUTEMOPSWEIGHTS_HPP

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