ModeledPR Class Reference
[GPS solution algorithms and Tropospheric]

#include <ModeledPR.hpp>

Inheritance diagram for ModeledPR:

Inheritance graph
[legend]
Collaboration diagram for ModeledPR:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class compute modeled pseudoranges from satellites to a mobile receiver.

The main difference between this class and ModeledReferencePR is that for a mobile receiver we should "prepare" the computation giving an estimate of the mobile station position. This position may be the last known position or it may be estimated using a method such as Bancroft's.

Prepare() method is used for this.

This class may be used either in a Vector- and Matrix-oriented way, or with GNSS data structure objects from "DataStructures" class. In any case, it is intented to be used with stations where the position changes with time.

A typical way to use this class with GNSS data structures follows:

   RinexObsStream rin("ebre0300.02o");  // Data stream
   RinexNavStream rnavin("brdc0300.02n");   // Ephemeris data stream
   RinexNavData rNavData;
   GPSEphemerisStore bceStore;
   while (rnavin >> rNavData) bceStore.addEphemeris(rNavData);
   bceStore.SearchPast();  // This is the default

   RinexNavHeader rNavHeader;
   IonoModelStore ionoStore;
   IonoModel ioModel;
   rnavin >> rNavHeader;    // Read navigation RINEX header
   ioModel.setModel(rNavHeader.ionAlpha, rNavHeader.ionBeta);
   ionoStore.addIonoModel(CommonTime::BEGINNING_OF_TIME, ioModel);

      // EBRE station nominal position
   Position nominalPos(4833520.3800, 41536.8300, 4147461.2800);

      // Declare a tropospheric model object, setting the defaults
   MOPSTropModel mopsTM( nominalPos.getAltitude(),
                         nominalPos.getGeodeticLatitude(), 30);

      // Declare the modeler object, setting all the parameters in
      // one pass
      // As stated, it will compute the model using the C1 observable
   ModeledPR model( ionoStore,
                    mopsTM,
                    bceStore,
                    TypeID::C1 );

      // Set the initial apriori position using the Bancroft method
   model.Prepare();

   gnssRinex gRin;

   while(rin >> gRin)
   {
      gRin >> model;
   }

The "ModeledPR" object will visit every satellite in the GNSS data structure that is "gRin" and will try to compute its model: Prefit residual, geometric distance, relativity delay, ionospheric/tropospheric corrections, geometry matrix, etc.

When used with the ">>" operator, this class returns the same incoming data structure with the extra data inserted along their corresponding satellites. Be warned that if a given satellite does not have the observations required, it will be summarily deleted from the data structure.

See also:
ModeledPseudorangeBase.hpp and ModeledReferencePR.hpp for base classes.

Definition at line 121 of file ModeledPR.hpp.

Public Member Functions

 ModeledPR ()
 Implicit constructor.
 ModeledPR (const Position &RxCoordinates, IonoModelStore &dIonoModel, TropModel &dTropoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input initial receiver coordinates, default ionospheric and tropospheric models, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (const Position &RxCoordinates, IonoModelStore &dIonoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input initial receiver coordinates, default ionospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (const Position &RxCoordinates, TropModel &dTropoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input initial receiver coordinates, default tropospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (const Position &RxCoordinates, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input initial receiver coordinates, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (IonoModelStore &dIonoModel, TropModel &dTropoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input default ionospheric and tropospheric models, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (IonoModelStore &dIonoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input default ionospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.
 ModeledPR (TropModel &dTropoModel, XvtStore< SatID > &dEphemeris, const TypeID &dObservable, bool usetgd=true)
 Explicit constructor, taking as input default tropospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.
virtual int Prepare (const CommonTime &Tr, std::vector< SatID > &Satellite, std::vector< double > &Pseudorange, const XvtStore< SatID > &Eph)
 Method to set an a priori position of receiver using Bancroft's method.
virtual int Prepare (const CommonTime &Tr, const Vector< SatID > &Satellite, const Vector< double > &Pseudorange, const XvtStore< SatID > &Eph)
 Method to set an a priori position of receiver using Bancroft's method.
virtual int Prepare (const CommonTime &time, const satTypeValueMap &data)
 Method to set an a priori position of receiver using Bancroft's method.
virtual int Prepare (const gnssSatTypeValue &gData)
 Method to set an a priori position of receiver using Bancroft method.
virtual int Prepare (const double &aRx, const double &bRx, const double &cRx, Position::CoordinateSystem s=Position::Cartesian, EllipsoidModel *ell=NULL, ReferenceFrame frame=ReferenceFrame::Unknown)
 Method to set the initial (a priori) position of receiver before Compute() method.
virtual int Prepare (const Position &RxCoordinates)
 Method to set the initial (a priori) position of receiver before Compute() method.
virtual satTypeValueMapprocessModel (const CommonTime &time, satTypeValueMap &gData) throw (Exception)
 Returns a satTypeValueMap object, adding the new data generated when calling a modeling object.
bool getModelPrepared () const
 Method to get if the model has been prepared.
ModeledPRsetModelPrepared (const bool &prepare)
 Method to forcefully set whether the model has been prepared.
virtual ~ModeledPR ()
 Destructor.

Protected Attributes

bool modelPrepared


Constructor & Destructor Documentation

ModeledPR  )  [inline]
 

Implicit constructor.

Definition at line 126 of file ModeledPR.hpp.

ModeledPR const Position RxCoordinates,
IonoModelStore dIonoModel,
TropModel dTropoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input initial receiver coordinates, default ionospheric and tropospheric models, ephemeris to be used, default observable and whether TGD will be computed or not.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
RxCoordinates Initial receiver coordinates.
dIonoModel Ionospheric model to be used by default.
dTropoModel Tropospheric model to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
dObservable Observable type to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 57 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledPR::Prepare(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultIonoModel(), ModeledReferencePR::setDefaultObservable(), and ModeledReferencePR::setDefaultTropoModel().

ModeledPR const Position RxCoordinates,
IonoModelStore dIonoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input initial receiver coordinates, default ionospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.

The default tropospheric model will be set to NULL.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
RxCoordinates Initial receiver coordinates.
dIonoModel Ionospheric model to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
dObservable Observable type to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 95 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledPR::Prepare(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultIonoModel(), and ModeledReferencePR::setDefaultObservable().

ModeledPR const Position RxCoordinates,
TropModel dTropoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input initial receiver coordinates, default tropospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.

The default ionospheric model will be set to NULL.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
RxCoordinates Initial receiver coordinates.
dTropoModel Tropospheric model to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
dObservable Observable type to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 132 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledPR::Prepare(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultObservable(), and ModeledReferencePR::setDefaultTropoModel().

ModeledPR const Position RxCoordinates,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input initial receiver coordinates, ephemeris to be used, default observable and whether TGD will be computed or not.

Both the tropospheric and ionospheric models will be set to NULL.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
RxCoordinates Initial receiver coordinates.
dEphemeris XvtStore<SatID> object to be used by default.
dObservable Observable type to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 168 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledPR::Prepare(), ModeledReferencePR::setDefaultEphemeris(), and ModeledReferencePR::setDefaultObservable().

ModeledPR IonoModelStore dIonoModel,
TropModel dTropoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input default ionospheric and tropospheric models, ephemeris to be used, default observable and whether TGD will be computed or not.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
dIonoModel Ionospheric model to be used by default.
dTropoModel Tropospheric model to be used by default.
dObservable Observable type to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 202 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultIonoModel(), ModeledReferencePR::setDefaultObservable(), and ModeledReferencePR::setDefaultTropoModel().

ModeledPR IonoModelStore dIonoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input default ionospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
dIonoModel Ionospheric model to be used by default.
dObservable Observable type to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 235 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultIonoModel(), and ModeledReferencePR::setDefaultObservable().

ModeledPR TropModel dTropoModel,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable,
bool  usetgd = true
 

Explicit constructor, taking as input default tropospheric model, ephemeris to be used, default observable and whether TGD will be computed or not.

This constructor is meant to be used when working with GNSS data structures in order to set the basic parameters from the beginning.

Parameters:
dTropoModel Tropospheric model to be used by default.
dObservable Observable type to be used by default.
dEphemeris XvtStore<SatID> object to be used by default.
usetgd Whether TGD will be used by default or not.
See also:
DataStructures.hpp.

Definition at line 267 of file ModeledPR.cpp.

References ModeledReferencePR::init(), ModeledReferencePR::setDefaultEphemeris(), ModeledReferencePR::setDefaultObservable(), and ModeledReferencePR::setDefaultTropoModel().

virtual ~ModeledPR  )  [inline, virtual]
 

Destructor.

Definition at line 408 of file ModeledPR.hpp.


Member Function Documentation

bool getModelPrepared  )  const [inline]
 

Method to get if the model has been prepared.

Definition at line 394 of file ModeledPR.hpp.

int Prepare const Position RxCoordinates  )  [virtual]
 

Method to set the initial (a priori) position of receiver before Compute() method.

Returns:
0 if OK -1 if problems arose

Definition at line 449 of file ModeledPR.cpp.

References ModeledPR::modelPrepared, and ModeledReferencePR::setInitialRxPosition().

int Prepare const double &  aRx,
const double &  bRx,
const double &  cRx,
Position::CoordinateSystem  s = Position::Cartesian,
EllipsoidModel ell = NULL,
ReferenceFrame  frame = ReferenceFrame::Unknown
[virtual]
 

Method to set the initial (a priori) position of receiver before Compute() method.

Returns:
0 if OK -1 if problems arose

Definition at line 417 of file ModeledPR.cpp.

References ModeledPR::modelPrepared, and ModeledReferencePR::setInitialRxPosition().

virtual int Prepare const gnssSatTypeValue gData  )  [inline, virtual]
 

Method to set an a priori position of receiver using Bancroft method.

Intended to be used with GNSS data structures.

Parameters:
gData GNSS data structure to be used
Returns:
0 if OK -1 if problems arose

Definition at line 355 of file ModeledPR.hpp.

References gnssData::body, sourceEpochHeader::epoch, and gnssData::header.

int Prepare const CommonTime time,
const satTypeValueMap data
[virtual]
 

Method to set an a priori position of receiver using Bancroft's method.

Intended to be used with GNSS data structures.

Parameters:
time CommonTime object for this epoch
data satTypeValueMap data structure holding the data.
Returns:
0 if OK -1 if problems arose

Definition at line 383 of file ModeledPR.cpp.

References ModeledReferencePR::getDefaultEphemeris(), satTypeValueMap::getVectorOfSatID(), satTypeValueMap::getVectorOfTypeID(), and ModeledPR::Prepare().

int Prepare const CommonTime Tr,
const Vector< SatID > &  Satellite,
const Vector< double > &  Pseudorange,
const XvtStore< SatID > &  Eph
[virtual]
 

Method to set an a priori position of receiver using Bancroft's method.

Parameters:
Tr Time of observation
Satellite Vector of satellites in view
Pseudorange Pseudoranges measured from rover station to satellites
Eph Satellites Ephemeris
Returns:
0 if OK -1 if problems arose

Definition at line 345 of file ModeledPR.cpp.

References ModeledPR::Prepare(), and Vector::size().

int Prepare const CommonTime Tr,
std::vector< SatID > &  Satellite,
std::vector< double > &  Pseudorange,
const XvtStore< SatID > &  Eph
[virtual]
 

Method to set an a priori position of receiver using Bancroft's method.

Parameters:
Tr Time of observation
Satellite std::vector of satellites in view
Pseudorange std::vector of pseudoranges measured from rover station to satellites
Eph Satellites Ephemeris
Returns:
0 if OK -1 if problems arose

Definition at line 297 of file ModeledPR.cpp.

References Bancroft::Compute(), and PRSolution2::PrepareAutonomousSolution().

Referenced by ModeledPR::ModeledPR(), and ModeledPR::Prepare().

satTypeValueMap & processModel const CommonTime time,
satTypeValueMap gData
throw (Exception) [virtual]
 

Returns a satTypeValueMap object, adding the new data generated when calling a modeling object.

Parameters:
time Epoch.
gData Data object holding the data.

Reimplemented from ModeledReferencePR.

Definition at line 476 of file ModeledPR.cpp.

ModeledPR& setModelPrepared const bool &  prepare  )  [inline]
 

Method to forcefully set whether the model has been prepared.

Parameters:
prepare Boolean indicating whether the model has been prepared.

Definition at line 403 of file ModeledPR.hpp.


Member Data Documentation

bool modelPrepared [protected]
 

Definition at line 414 of file ModeledPR.hpp.

Referenced by ModeledPR::Prepare().


The documentation for this class was generated from the following files:
Generated on Tue May 21 03:31:45 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1