00001 #pragma ident "$Id: ModeledReferencePR.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002
00008 #ifndef GPSTK_MODELEDREFERENCEPR_HPP
00009 #define GPSTK_MODELEDREFERENCEPR_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "ModeledPseudorangeBase.hpp"
00036 #include "CommonTime.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 "Position.hpp"
00045 #include "GNSSconstants.hpp"
00046 #include "TypeID.hpp"
00047 #include "DataStructures.hpp"
00048
00049
00050 namespace gpstk
00051 {
00054
00119 class ModeledReferencePR : public ModeledPseudorangeBase
00120 {
00121 public:
00122
00124 ModeledReferencePR()
00125 : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00126 defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00127 { init(); };
00128
00129
00145 ModeledReferencePR( const double& aRx,
00146 const double& bRx,
00147 const double& cRx,
00148 Position::CoordinateSystem s = Position::Cartesian,
00149 EllipsoidModel *ell = NULL,
00150 ReferenceFrame frame = ReferenceFrame::Unknown )
00151 : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00152 defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00153 { init(); setInitialRxPosition(aRx, bRx, cRx, s, ell, frame); };
00154
00155
00158 ModeledReferencePR(const Position& RxCoordinates)
00159 : useTGD(true), pDefaultIonoModel(NULL), pDefaultTropoModel(NULL),
00160 defaultObservable(TypeID::C1), pDefaultEphemeris(NULL)
00161 { init(); setInitialRxPosition(RxCoordinates); };
00162
00163
00181 ModeledReferencePR( const Position& RxCoordinates,
00182 IonoModelStore& dIonoModel,
00183 TropModel& dTropoModel,
00184 XvtStore<SatID>& dEphemeris,
00185 const TypeID& dObservable,
00186 bool usetgd = true );
00187
00188
00207 ModeledReferencePR( const Position& RxCoordinates,
00208 IonoModelStore& dIonoModel,
00209 XvtStore<SatID>& dEphemeris,
00210 const TypeID& dObservable,
00211 bool usetgd = true );
00212
00213
00232 ModeledReferencePR( const Position& RxCoordinates,
00233 TropModel& dTropoModel,
00234 XvtStore<SatID>& dEphemeris,
00235 const TypeID& dObservable,
00236 bool usetgd = true );
00237
00238
00256 ModeledReferencePR( const Position& RxCoordinates,
00257 XvtStore<SatID>& dEphemeris,
00258 const TypeID& dObservable,
00259 bool usetgd = true );
00260
00261
00281 int Compute( const CommonTime& Tr,
00282 Vector<SatID>& Satellite,
00283 Vector<double>& Pseudorange,
00284 const XvtStore<SatID>& Eph,
00285 const Vector<double>& extraBiases,
00286 TropModel *pTropModel=NULL,
00287 IonoModelStore *pIonoModel=NULL )
00288 throw(Exception);
00289
00290
00293 int Compute( const CommonTime& Tr,
00294 Vector<SatID>& Satellite,
00295 Vector<double>& Pseudorange,
00296 const XvtStore<SatID>& Eph )
00297 throw(Exception);
00298
00299
00302 int Compute( const CommonTime& Tr,
00303 Vector<SatID>& Satellite,
00304 Vector<double>& Pseudorange,
00305 const XvtStore<SatID>& Eph,
00306 TropModel *pTropModel )
00307 throw(Exception);
00308
00309
00312 int Compute( const CommonTime& Tr,
00313 Vector<SatID>& Satellite,
00314 Vector<double>& Pseudorange,
00315 const XvtStore<SatID>& Eph,
00316 const Vector<double>& extraBiases,
00317 IonoModelStore *pIonoModel )
00318 throw(Exception);
00319
00320
00323 int Compute( const CommonTime& Tr,
00324 Vector<SatID>& Satellite,
00325 Vector<double>& Pseudorange,
00326 const XvtStore<SatID>& Eph,
00327 IonoModelStore *pIonoModel )
00328 throw(Exception);
00329
00330
00333 int Compute( const CommonTime& Tr,
00334 Vector<SatID>& Satellite,
00335 Vector<double>& Pseudorange,
00336 const XvtStore<SatID>& Eph,
00337 TropModel *pTropModel,
00338 IonoModelStore *pIonoModel )
00339 throw(Exception);
00340
00341
00361 int Compute( const CommonTime& Tr,
00362 SatID& Satellite,
00363 double& Pseudorange,
00364 const XvtStore<SatID>& Eph,
00365 const double& extraBiases,
00366 TropModel *pTropModel=NULL,
00367 IonoModelStore *pIonoModel=NULL )
00368 throw(Exception);
00369
00370
00377 virtual satTypeValueMap& processModel( const CommonTime& time,
00378 satTypeValueMap& gData )
00379 throw(Exception);
00380
00381
00387 virtual gnssSatTypeValue& processModel(gnssSatTypeValue& gData)
00388 throw(Exception)
00389 { processModel(gData.header.epoch, gData.body); return gData; };
00390
00391
00397 virtual gnssRinex& processModel(gnssRinex& gData)
00398 throw(Exception)
00399 { processModel(gData.header.epoch, gData.body); return gData; };
00400
00401
00404 bool useTGD;
00405
00406
00409 virtual double getMinElev() const
00410 { return minElev; };
00411
00412
00415 virtual ModeledReferencePR& setMinElev(double newElevation)
00416 { minElev = newElevation; return (*this); };
00417
00418
00420 virtual IonoModelStore* getDefaultIonoModel() const
00421 { return pDefaultIonoModel; };
00422
00423
00428 virtual ModeledReferencePR& setDefaultIonoModel(
00429 IonoModelStore& dIonoModel )
00430 { pDefaultIonoModel = &dIonoModel; return (*this); };
00431
00432
00434 virtual ModeledReferencePR& setNULLIonoModel()
00435 { pDefaultIonoModel = NULL; return (*this); };
00436
00437
00439 virtual TropModel* getDefaultTropoModel() const
00440 { return pDefaultTropoModel; };
00441
00442
00447 virtual ModeledReferencePR& setDefaultTropoModel(TropModel& dTropoModel)
00448 { pDefaultTropoModel = &dTropoModel; return (*this); };
00449
00450
00452 virtual ModeledReferencePR& setNULLTropoModel()
00453 { pDefaultTropoModel = NULL; return (*this); };
00454
00455
00460 virtual ModeledReferencePR& setDefaultExtraBiases(
00461 Vector<double>& eBiases )
00462 { extraBiases = eBiases; return (*this); };
00463
00464
00467 virtual TypeID getDefaultObservable() const
00468 { return defaultObservable; };
00469
00470
00476 virtual ModeledReferencePR& setDefaultObservable(const TypeID& type)
00477 { defaultObservable = type; return (*this); };
00478
00479
00482 virtual XvtStore<SatID>* getDefaultEphemeris() const
00483 { return pDefaultEphemeris; };
00484
00485
00491 virtual ModeledReferencePR& setDefaultEphemeris(XvtStore<SatID>& ephem)
00492 { pDefaultEphemeris = &ephem; return (*this); };
00493
00494
00496 virtual ~ModeledReferencePR() {};
00497
00498
00499 protected:
00500
00501
00503 IonoModelStore *pDefaultIonoModel;
00504
00506 TropModel *pDefaultTropoModel;
00507
00509 TypeID defaultObservable;
00510
00513 XvtStore<SatID>* pDefaultEphemeris;
00514
00516 virtual void init();
00517
00518
00524 virtual int setInitialRxPosition( const double& aRx,
00525 const double& bRx,
00526 const double& cRx,
00527 Position::CoordinateSystem s=Position::Cartesian,
00528 EllipsoidModel *ell = NULL,
00529 ReferenceFrame frame = ReferenceFrame::Unknown );
00530
00531
00533 virtual int setInitialRxPosition(const Position& RxCoordinates);
00534
00535
00537 virtual int setInitialRxPosition();
00538
00539
00541 virtual double getTropoCorrections( TropModel *pTropModel,
00542 double elevation );
00543
00544
00546 virtual double getIonoCorrections( IonoModelStore *pIonoModel,
00547 CommonTime Tr,
00548 Position rxGeo,
00549 double elevation,
00550 double azimuth,
00551 IonoModel::Frequency freq = IonoModel::L1 );
00552
00553
00555 virtual double getTGDCorrections( CommonTime Tr,
00556 const XvtStore<SatID>& Eph,
00557 SatID sat );
00558
00559
00560 };
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
00577
00578 }
00579
00580 #endif // GPSTK_MODELEDREFERENCEPR_HPP