ModeledReferencePR.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: ModeledReferencePR.hpp 2741 2011-06-22 16:37:02Z nwu $"
00002 
00008 #ifndef MODELEDREFERENCEPR_HPP
00009 #define MODELEDREFERENCEPR_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 ). 2006, 2007, 2008
00030 //
00031 //============================================================================
00032 
00033 
00034 
00035 #include "ModeledPseudorangeBase.hpp"
00036 #include "DayTime.hpp"
00037 #include "EngEphemeris.hpp"
00038 #include "XvtStore.hpp"
00039 #include "GPSEphemerisStore.hpp"
00040 #include "EphemerisRange.hpp"
00041 #include "TropModel.hpp"
00042 #include "IonoModel.hpp"
00043 #include "IonoModelStore.hpp"
00044 #include "Geodetic.hpp"
00045 #include "Position.hpp"
00046 #include "icd_200_constants.hpp"
00047 #include "TypeID.hpp"
00048 #include "DataStructures.hpp"
00049 
00050 
00051 namespace gpstk
00052 {
00055 
00120    class ModeledReferencePR : public ModeledPseudorangeBase
00121    {
00122    public:
00123 
00125       ModeledReferencePR()
00126          : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00127            defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00128       { init(); };
00129 
00130 
00148       ModeledReferencePR( const double& aRx,
00149                           const double& bRx,
00150                           const double& cRx,
00151                           Position::CoordinateSystem s = Position::Cartesian,
00152                           GeoidModel *geoid = NULL )
00153          : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00154            defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00155       { init(); setInitialRxPosition(aRx, bRx, cRx, s, geoid); };
00156 
00157 
00160       ModeledReferencePR(const Position& RxCoordinates)
00161          : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00162            defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00163       { init(); setInitialRxPosition(RxCoordinates); };
00164 
00165 
00183       ModeledReferencePR( const Position& RxCoordinates,
00184                           IonoModelStore& dIonoModel,
00185                           TropModel& dTropoModel,
00186                           XvtStore<SatID>& dEphemeris,
00187                           const TypeID& dObservable,
00188                           bool usetgd = true );
00189 
00190 
00209       ModeledReferencePR( const Position& RxCoordinates,
00210                           IonoModelStore& dIonoModel,
00211                           XvtStore<SatID>& dEphemeris,
00212                           const TypeID& dObservable,
00213                           bool usetgd = true );
00214 
00215 
00234       ModeledReferencePR( const Position& RxCoordinates,
00235                           TropModel& dTropoModel,
00236                           XvtStore<SatID>& dEphemeris,
00237                           const TypeID& dObservable,
00238                           bool usetgd = true );
00239 
00240 
00258       ModeledReferencePR( const Position& RxCoordinates,
00259                           XvtStore<SatID>& dEphemeris,
00260                           const TypeID& dObservable,
00261                           bool usetgd = true );
00262 
00263 
00283       int Compute( const DayTime& Tr,
00284                    Vector<SatID>& Satellite,
00285                    Vector<double>& Pseudorange,
00286                    const XvtStore<SatID>& Eph,
00287                    const Vector<double>& extraBiases,
00288                    TropModel *pTropModel=NULL,
00289                    IonoModelStore *pIonoModel=NULL )
00290          throw(Exception);
00291 
00292 
00295       int Compute( const DayTime& Tr,
00296                    Vector<SatID>& Satellite,
00297                    Vector<double>& Pseudorange,
00298                    const XvtStore<SatID>& Eph )
00299          throw(Exception);
00300 
00301 
00304       int Compute( const DayTime& Tr,
00305                    Vector<SatID>& Satellite,
00306                    Vector<double>& Pseudorange,
00307                    const XvtStore<SatID>& Eph,
00308                    TropModel *pTropModel )
00309          throw(Exception);
00310 
00311 
00314       int Compute( const DayTime& Tr,
00315                    Vector<SatID>& Satellite,
00316                    Vector<double>& Pseudorange,
00317                    const XvtStore<SatID>& Eph,
00318                    const Vector<double>& extraBiases,
00319                    IonoModelStore *pIonoModel )
00320          throw(Exception);
00321 
00322 
00325       int Compute( const DayTime& Tr,
00326                    Vector<SatID>& Satellite,
00327                    Vector<double>& Pseudorange,
00328                    const XvtStore<SatID>& Eph,
00329                    IonoModelStore *pIonoModel )
00330          throw(Exception);
00331 
00332 
00335       int Compute( const DayTime& Tr,
00336                    Vector<SatID>& Satellite,
00337                    Vector<double>& Pseudorange,
00338                    const XvtStore<SatID>& Eph,
00339                    TropModel *pTropModel,
00340                    IonoModelStore *pIonoModel )
00341          throw(Exception);
00342 
00343 
00363       int Compute( const DayTime& Tr,
00364                    SatID& Satellite,
00365                    double& Pseudorange,
00366                    const XvtStore<SatID>& Eph,
00367                    const double& extraBiases,
00368                    TropModel *pTropModel=NULL,
00369                    IonoModelStore *pIonoModel=NULL )
00370          throw(Exception);
00371 
00372 
00379       virtual satTypeValueMap& processModel( const DayTime& time,
00380                                              satTypeValueMap& gData )
00381          throw(Exception);
00382 
00383 
00389       virtual gnssSatTypeValue& processModel(gnssSatTypeValue& gData)
00390          throw(Exception)
00391       { processModel(gData.header.epoch, gData.body); return gData; };
00392 
00393 
00399       virtual gnssRinex& processModel(gnssRinex& gData)
00400          throw(Exception)
00401       { processModel(gData.header.epoch, gData.body); return gData; };
00402 
00403 
00406       bool useTGD;
00407 
00408 
00411       virtual double getMinElev() const
00412       { return minElev; };
00413 
00414 
00417       virtual ModeledReferencePR& setMinElev(double newElevation)
00418       { minElev = newElevation; return (*this); };
00419 
00420 
00422       virtual IonoModelStore* getDefaultIonoModel() const
00423       { return pDefaultIonoModel; };
00424 
00425 
00430       virtual ModeledReferencePR& setDefaultIonoModel(
00431                                                 IonoModelStore& dIonoModel )
00432       { pDefaultIonoModel = &dIonoModel; return (*this); };
00433 
00434 
00436       virtual ModeledReferencePR& setNULLIonoModel()
00437       { pDefaultIonoModel = NULL; return (*this); };
00438 
00439 
00441       virtual TropModel* getDefaultTropoModel() const
00442       { return pDefaultTropoModel; };
00443 
00444 
00449       virtual ModeledReferencePR& setDefaultTropoModel(TropModel& dTropoModel)
00450       { pDefaultTropoModel = &dTropoModel; return (*this); };
00451 
00452 
00454       virtual ModeledReferencePR& setNULLTropoModel()
00455       { pDefaultTropoModel = NULL; return (*this); };
00456 
00457 
00462       virtual ModeledReferencePR& setDefaultExtraBiases(
00463                                                    Vector<double>& eBiases )
00464       { extraBiases = eBiases; return (*this); };
00465 
00466 
00469       virtual TypeID getDefaultObservable() const
00470       { return defaultObservable; };
00471 
00472 
00478       virtual ModeledReferencePR& setDefaultObservable(const TypeID& type)
00479       { defaultObservable = type; return (*this); };
00480 
00481 
00484       virtual XvtStore<SatID>* getDefaultEphemeris() const
00485       { return pDefaultEphemeris; };
00486 
00487 
00493       virtual ModeledReferencePR& setDefaultEphemeris(XvtStore<SatID>& ephem)
00494       { pDefaultEphemeris = &ephem; return (*this); };
00495 
00496 
00498       virtual ~ModeledReferencePR() {};
00499 
00500 
00501    protected:
00502 
00503 
00505       IonoModelStore *pDefaultIonoModel;
00506 
00508       TropModel *pDefaultTropoModel;
00509 
00511       TypeID defaultObservable;
00512 
00515       XvtStore<SatID>* pDefaultEphemeris;
00516 
00518       virtual void init();
00519 
00520 
00526       virtual int setInitialRxPosition( const double& aRx,
00527                                         const double& bRx,
00528                                         const double& cRx,
00529                            Position::CoordinateSystem s=Position::Cartesian,
00530                                         GeoidModel *geoid = NULL );
00531 
00532 
00534       virtual int setInitialRxPosition(const Position& RxCoordinates);
00535 
00536 
00538       virtual int setInitialRxPosition();
00539 
00540 
00542       virtual double getTropoCorrections( TropModel *pTropModel,
00543                                           double elevation );
00544 
00545 
00547       virtual double getIonoCorrections( IonoModelStore *pIonoModel,
00548                                          DayTime Tr,
00549                                          Geodetic rxGeo,
00550                                          double elevation,
00551                                          double azimuth );
00552 
00553 
00555       virtual double getTGDCorrections( DayTime Tr,
00556                                         const XvtStore<SatID>& Eph,
00557                                         SatID sat );
00558 
00559 
00560    }; // End of class 'ModeledReferencePR'
00561 
00562 
00564    inline gnssSatTypeValue& operator>>( gnssSatTypeValue& gData,
00565                                         ModeledReferencePR& modRefPR )
00566       throw(Exception)
00567    { modRefPR.processModel(gData); return gData; }
00568 
00569 
00571    inline gnssRinex& operator>>( gnssRinex& gData,
00572                                  ModeledReferencePR& modRefPR )
00573       throw(Exception)
00574    { modRefPR.processModel(gData); return gData; }
00575 
00576 
00578 
00579 }  // End of namespace gpstk
00580 #endif   // MODELEDREFERENCEPR_HPP

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