ObsRngDev.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: ObsRngDev.hpp 3342 2013-01-30 02:21:06Z ocibu $"
00002 
00003 //============================================================================
00004 //
00005 //  This file is part of GPSTk, the GPS Toolkit.
00006 //
00007 //  The GPSTk is free software; you can redistribute it and/or modify
00008 //  it under the terms of the GNU Lesser General Public License as published
00009 //  by the Free Software Foundation; either version 2.1 of the License, or
00010 //  any later version.
00011 //
00012 //  The GPSTk is distributed in the hope that it will be useful,
00013 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //  GNU Lesser General Public License for more details.
00016 //
00017 //  You should have received a copy of the GNU Lesser General Public
00018 //  License along with GPSTk; if not, write to the Free Software Foundation,
00019 //  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00020 //  
00021 //  Copyright 2004, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 
00025 //============================================================================
00026 //
00027 //This software developed by Applied Research Laboratories at the University of
00028 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00029 //Department of Defense. The U.S. Government retains all rights to use,
00030 //duplicate, distribute, disclose, or release this software. 
00031 //
00032 //Pursuant to DoD Directive 523024 
00033 //
00034 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00035 //                           release, distribution is unlimited.
00036 //
00037 //=============================================================================
00038 
00045 #ifndef OBSRNGDEV_HPP
00046 #define OBSRNGDEV_HPP
00047 
00048 #include <ostream>
00049 
00050 #include "CommonTime.hpp"
00051 #include "XvtStore.hpp"
00052 #include "Exception.hpp"
00053 #include "GPSEllipsoid.hpp"
00054 #include "IonoModelStore.hpp"
00055 #include "TropModel.hpp"
00056 #include "ValidType.hpp"
00057 #include "SatID.hpp"
00058 #include "GNSSconstants.hpp"
00059 
00060 namespace gpstk
00061 {
00062 
00068    class ObsRngDev
00069    {
00070    public:
00071 
00077       ObsRngDev() throw() : wonky(false), obstime(CommonTime::END_OF_TIME) {};
00078 
00093       ObsRngDev(const double prange,
00094                 const SatID& svid,
00095                 const CommonTime& time,
00096                 const Position& rxpos,
00097                 const XvtStore<SatID>& eph,
00098                 EllipsoidModel& em,
00099                 bool svTime = false);
00114       ObsRngDev(const double prange,
00115                 const SatID& svid,
00116                 const CommonTime& time,
00117                 const Position& rxpos,
00118                 const XvtStore<SatID>& eph,
00119                 EllipsoidModel& em,
00120                 const IonoModelStore& ion,
00121                 IonoModel::Frequency fq,
00122                 bool svTime = false);
00138       ObsRngDev(const double prange,
00139                 const SatID& svid,
00140                 const CommonTime& time,
00141                 const Position& rxpos,
00142                 const XvtStore<SatID>& eph,
00143                 EllipsoidModel& em,
00144                 const TropModel& tm,
00145                 bool svTime = false);
00146    
00162       ObsRngDev(const double prange,
00163                 const SatID& svid,
00164                 const CommonTime& time,
00165                 const Position& rxpos,
00166                 const XvtStore<SatID>& eph,
00167                 EllipsoidModel& em,
00168                 const TropModel& tm,
00169                 const IonoModelStore& ion,
00170                 IonoModel::Frequency fq,
00171                 bool svTime = false);
00172    
00185       ObsRngDev(const double prange1,
00186                 const double prange2,
00187                 const SatID& svid,
00188                 const CommonTime& time,
00189                 const Position& rxpos,
00190                 const XvtStore<SatID>& eph,
00191                 EllipsoidModel& em,
00192                 bool svTime = false,
00193                 double gamma = GAMMA_GPS);
00194    
00208       ObsRngDev(const double prange1,
00209                 const double prange2,
00210                 const SatID& svid,
00211                 const CommonTime& time,
00212                 const Position& rxpos,
00213                 const XvtStore<SatID>& eph,
00214                 const EllipsoidModel& em,
00215                 const TropModel& tm,
00216                 bool svTime = false,
00217                 double gamma = GAMMA_GPS);
00218    
00220       virtual ~ObsRngDev() throw() {}
00221 
00222       // get accessor methods ----------------------------------------------
00227       const CommonTime& getTime() const throw() { return obstime; }
00228 
00233       SatID getSvID() const throw() { return svid; }
00234 
00239       vfloat getAzimuth() const throw() { return azimuth; }
00240 
00245       vfloat getElevation() const throw() { return elevation; }
00246 
00251       vshort getHealth() const throw() { return health; }
00252 
00257       vshort getIODC() const throw() { return iodc; }
00258 
00263       double getORD() const throw() { return ord; }
00264 
00269       vdouble getIono() const throw() { return iono; }
00270 
00275       vdouble getTrop() const throw() { return trop; }
00276 
00277       friend std::ostream& operator<<(std::ostream& s, 
00278                                       const ObsRngDev& r) throw();
00279 
00280       void applyClockOffset(double clockOffset)
00281       {ord -= clockOffset;}
00282 
00283    static bool debug;
00284 
00285    private:
00286       void computeOrd(double obs,
00287                       const Position& rxpos,
00288                       const XvtStore<SatID>& eph,
00289                       const EllipsoidModel& em,
00290                       bool svTime)
00291       {
00292          if (svTime) 
00293             computeOrdTx(obs, rxpos, eph, em);
00294          else 
00295             computeOrdRx(obs, rxpos, eph, em);
00296          return;
00297       }
00298 
00299 
00300 
00301       void computeOrdTx(double obs,
00302                         const Position& rxpos,
00303                         const XvtStore<SatID>& eph,
00304                         const EllipsoidModel& em);
00305    
00306       void computeOrdRx(double obs,
00307                         const Position& rxpos,
00308                         const XvtStore<SatID>& eph,
00309                         const EllipsoidModel& em);
00310 
00311       void computeTrop(const TropModel& tm);
00312 
00313    public:
00314       CommonTime obstime;           
00315       SatID svid;                
00316       double ord;                
00317       unsigned wonky;            
00318 
00319       vfloat azimuth;            
00320       vfloat elevation;          
00321       vshort health;             
00322       vshort iodc;               
00323       vdouble rho;               
00324       vdouble iono;              
00325       vdouble trop;              
00326    };
00327 }
00328 #endif

Generated on Thu May 23 03:31:10 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1