IonexStore.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: IonexStore.hpp 2741 2011-06-22 16:37:02Z nwu $"
00002 
00010 #ifndef GPSTK_IONEXSTORE_HPP
00011 #define GPSTK_IONEXSTORE_HPP
00012 
00013 //============================================================================
00014 //
00015 //  This file is part of GPSTk, the GPS Toolkit.
00016 //
00017 //  The GPSTk is free software; you can redistribute it and/or modify
00018 //  it under the terms of the GNU Lesser General Public License as published
00019 //  by the Free Software Foundation; either version 2.1 of the License, or
00020 //  any later version.
00021 //
00022 //  The GPSTk is distributed in the hope that it will be useful,
00023 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00024 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025 //  GNU Lesser General Public License for more details.
00026 //
00027 //  You should have received a copy of the GNU Lesser General Public
00028 //  License along with GPSTk; if not, write to the Free Software Foundation,
00029 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00030 //
00031 //  Octavian Andrei - FGI ( http://www.fgi.fi ). 2008, 2009
00032 //
00033 //============================================================================
00034 
00035 
00036 #include <map>
00037 
00038 #include "FileStore.hpp"
00039 #include "IonexData.hpp"
00040 
00041 #include "geometry.hpp"                   // DEG_TO_RAD
00042 #include "icd_200_constants.hpp"          // LX_FREQ, with X = 1,2,5,6,7,8
00043 #include "Triple.hpp"
00044 
00045 namespace gpstk
00046 {
00047 
00050 
00066    class IonexStore : public FileStore<IonexHeader>
00067    {
00068    public:
00069 
00070 
00072       IonexStore()
00073          throw()
00074          : initialTime(DayTime::END_OF_TIME),
00075            finalTime(DayTime::BEGINNING_OF_TIME)
00076       {};
00077 
00078 
00080       virtual ~IonexStore() {};
00081 
00082 
00084       virtual void loadFile(const std::string& filename)
00085          throw(FileMissingException);
00086 
00087 
00089       void addMap(const IonexData& iod)
00090          throw();
00091 
00092 
00101       void dump( std::ostream& s = std::cout,
00102                  short detail = 0 ) const
00103          throw();
00104 
00105 
00107       void clear() throw();
00108 
00109 
00133       Triple getIonexValue( const DayTime& t,
00134                             const Position& RX,
00135                             int strategy = 3 ) const
00136          throw(InvalidRequest);
00137 
00138 
00139 
00149    double getSTEC( const double& elevation,
00150                    const double& tecval,
00151                    const std::string& ionoMapType ) const
00152       throw (InvalidParameter);
00153 
00154 
00155 
00166       double getIono( const double& elevation,
00167                       const double& tecval,
00168                       const double& freq,
00169                       const std::string& ionoMapType ) const
00170          throw (InvalidParameter);
00171 
00172 
00173          // The next 6 functions define the interface for calculating
00174          // the ionospheric slant delay for a specific frequency
00175 
00185       double getIonoL1( const double& elevation,
00186                         const double& tecval,
00187                         const std::string& ionoMapType ) const
00188          throw (InvalidParameter)
00189       { return getIono(elevation, tecval, L1_FREQ, ionoMapType); };
00190 
00191 
00201       double getIonoL2( const double& elevation,
00202                         const double& tecval,
00203                         const std::string& ionoMapType ) const
00204          throw (InvalidParameter)
00205       { return getIono(elevation, tecval, L2_FREQ, ionoMapType); };
00206 
00207 
00217       double getIonoL5( const double& elevation,
00218                         const double& tecval,
00219                         const std::string& ionoMapType ) const
00220          throw (InvalidParameter)
00221       { return getIono(elevation, tecval, L5_FREQ, ionoMapType); };
00222 
00223 
00233       double getIonoL6( const double& elevation,
00234                         const double& tecval,
00235                         const std::string& ionoMapType ) const
00236          throw (InvalidParameter)
00237       { return getIono(elevation, tecval, L6_FREQ, ionoMapType); };
00238 
00239 
00249       double getIonoL7( const double& elevation,
00250                         const double& tecval,
00251                         const std::string& ionoMapType ) const
00252          throw (InvalidParameter)
00253       { return getIono(elevation, tecval, L7_FREQ, ionoMapType); };
00254 
00255 
00265       double getIonoL8( const double& elevation,
00266                         const double& tecval,
00267                         const std::string& ionoMapType ) const
00268          throw (InvalidParameter)
00269       { return getIono(elevation, tecval, L8_FREQ, ionoMapType); };
00270 
00271 
00286       double iono_mapping_function( const double& elevation,
00287                                     const std::string& ionoMapType ) const;
00288 
00289 
00298       DayTime getInitialTime() const
00299          throw(InvalidRequest)
00300       { return initialTime; }
00301 
00302 
00311       DayTime getFinalTime() const
00312          throw(InvalidRequest)
00313       { return finalTime; }
00314 
00315 
00325       double findDCB( const SatID sat,
00326                       const DayTime& time ) const
00327          throw(InvalidRequest);
00328 
00329 
00330    private:
00331 
00332 
00339       DayTime initialTime, finalTime;
00340 
00341 
00343       typedef std::map<IonexData::IonexValType, IonexData> IonexValTypeMap;
00344 
00345 
00347       typedef std::map<DayTime, IonexValTypeMap> IonexMap;
00348 
00349 
00351       IonexMap inxMaps;
00352 
00353 
00355       typedef std::map<DayTime, IonexHeader::SatDCBMap> IonexDCBMap;
00356 
00357 
00359       IonexDCBMap inxDCBMap;
00360 
00361 
00362    }; // End of class 'IonexStore'
00363 
00365 
00366 }  // End of namespace gpstk
00367 #endif   // GPSTK_IONEXSTORE_HPP

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