BasicModel Class Reference
[GPS solution algorithms and Tropospheric]

#include <BasicModel.hpp>

Inheritance diagram for BasicModel:

Inheritance graph
[legend]
Collaboration diagram for BasicModel:

Collaboration graph
[legend]
List of all members.

Detailed Description

This is a class to compute the basic parts of a GNSS model, like geometric distance, relativity correction, satellite position and velocity at transmission time, satellite elevation and azimuth, etc.

This class is intended to be used with GNSS Data Structures (GDS). It is a more modular alternative to classes such as ModelObs and ModelObsFixedStation.

A typical way to use this class follows:

      // Input observation file stream
   RinexObsStream rin("ebre0300.02o");

      // Load the precise ephemeris file
   SP3EphemerisStore sp3Eph;
   sp3Eph.loadFile("igs11513.sp3");

      // Reference position of receiver station
   Position nominalPos(4833520.2269, 41537.00768, 4147461.489);

      // Some more code and definitions here...

   gnssRinex gRin;  // GNSS data structure for fixed station data

      // Set defaults of models. A typical C1-based modeling is used
   BasicModel model( nominalPos, sp3Eph );

   while(rin >> gRin)
   {

         // Apply the model on the GDS
      gRin >> model;
   }

The "BasicModel" object will visit every satellite in the GNSS data structure that is "gRin" and will try to compute its model: Geometric distance, relativity delay, satellite position at transmission time, satellite elevation and azimuth, 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 ephemeris information, it will be summarily deleted from the data structure.

See also:
ModelObs.hpp and ModelObsFixedStation.hpp for classes carrying out a more complete model.

Definition at line 101 of file BasicModel.hpp.

Public Member Functions

 BasicModel ()
 Default constructor.
 BasicModel (const double &aRx, const double &bRx, const double &cRx, Position::CoordinateSystem s=Position::Cartesian, EllipsoidModel *ell=NULL, ReferenceFrame frame=ReferenceFrame::Unknown)
 Explicit constructor taking as input reference station coordinates.
 BasicModel (const Position &RxCoordinates)
 Explicit constructor, taking as input a Position object containing reference station coordinates.
 BasicModel (const Position &RxCoordinates, XvtStore< SatID > &dEphemeris, const TypeID &dObservable=TypeID::C1, const bool &applyTGD=false)
 Explicit constructor, taking as input reference station coordinates, ephemeris to be used and whether TGD will be computed or not.
virtual satTypeValueMapProcess (const CommonTime &time, satTypeValueMap &gData) throw (ProcessingException)
 Returns a satTypeValueMap object, adding the new data generated when calling a modeling object.
virtual gnssSatTypeValueProcess (gnssSatTypeValue &gData) throw (ProcessingException)
 Returns a gnnsSatTypeValue object, adding the new data generated when calling a modeling object.
virtual gnssRinexProcess (gnssRinex &gData) throw (ProcessingException)
 Returns a gnnsRinex object, adding the new data generated when calling a modeling object.
virtual double getMinElev () const
 Method to get satellite elevation cut-off angle.
virtual BasicModelsetMinElev (double newElevation)
 Method to set satellite elevation cut-off angle.
virtual TypeID getDefaultObservable () const
 Method to get the default observable for computations.
virtual BasicModelsetDefaultObservable (const TypeID &type)
 Method to set the default observable for computations.
virtual XvtStore< SatID > * getDefaultEphemeris () const
 Method to get a pointer to the default XvtStore<SatID> to be used with GNSS data structures.
virtual BasicModelsetDefaultEphemeris (XvtStore< SatID > &ephem)
 Method to set the default XvtStore<SatID> to be used with GNSS data structures.
virtual std::string getClassName (void) const
 Returns a string identifying this object.
virtual ~BasicModel ()
 Destructor.

Public Attributes

Position rxPos
 Either estimated or "a priori" position of receiver.

Protected Member Functions

virtual int setInitialRxPosition (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.
virtual int setInitialRxPosition (const Position &RxCoordinates)
 Method to set the initial (a priori) position of receiver.
virtual int setInitialRxPosition ()
 Method to set the initial (a priori) position of receiver.
virtual double getTGDCorrections (CommonTime Tr, const XvtStore< SatID > &Eph, SatID sat) throw ()
 Method to get TGD corrections.

Protected Attributes

double minElev
 The elevation cut-off angle for accepted satellites.
XvtStore< SatID > * pDefaultEphemeris
 Pointer to default XvtStore<SatID> object when working with GNSS data structures.
TypeID defaultObservable
 Default observable to be used when fed with GNSS data structures.
bool useTGD
 Whether the TGD effect will be applied to C1 observable or not.


Constructor & Destructor Documentation

BasicModel  )  [inline]
 

Default constructor.

Observable C1 will be used for computations and satellites with elevation less than 10 degrees will be deleted.

Definition at line 108 of file BasicModel.hpp.

BasicModel const double &  aRx,
const double &  bRx,
const double &  cRx,
Position::CoordinateSystem  s = Position::Cartesian,
EllipsoidModel ell = NULL,
ReferenceFrame  frame = ReferenceFrame::Unknown
 

Explicit constructor taking as input reference station coordinates.

Those coordinates may be Cartesian (X, Y, Z in meters) or Geodetic (Latitude, Longitude, Altitude), but defaults to Cartesian.

Also, a pointer to GeoidModel may be specified, but default is NULL (in which case WGS84 values will be used).

Parameters:
aRx first coordinate [ X(m), or latitude (degrees N) ]
bRx second coordinate [ Y(m), or longitude (degrees E) ]
cRx third coordinate [ Z, height above ellipsoid or radius, in meters ]
s coordinate system (default is Cartesian, may be set to Geodetic).
ell pointer to EllipsoidModel.
frame Reference frame associated with this position.

Definition at line 64 of file BasicModel.cpp.

References BasicModel::defaultObservable, BasicModel::minElev, BasicModel::pDefaultEphemeris, BasicModel::setInitialRxPosition(), and BasicModel::useTGD.

BasicModel const Position RxCoordinates  ) 
 

Explicit constructor, taking as input a Position object containing reference station coordinates.

Definition at line 83 of file BasicModel.cpp.

References BasicModel::defaultObservable, BasicModel::minElev, BasicModel::pDefaultEphemeris, BasicModel::setInitialRxPosition(), and BasicModel::useTGD.

BasicModel const Position RxCoordinates,
XvtStore< SatID > &  dEphemeris,
const TypeID dObservable = TypeID::C1,
const bool &  applyTGD = false
 

Explicit constructor, taking as input reference station coordinates, ephemeris to be used and whether TGD will be computed or not.

Parameters:
RxCoordinates Reference station coordinates.
dEphemeris EphemerisStore object to be used by default.
dObservable Observable type to be used by default.
applyTGD Whether or not C1 observable will be corrected from TGD effect.

Definition at line 107 of file BasicModel.cpp.

References BasicModel::defaultObservable, BasicModel::minElev, BasicModel::setDefaultEphemeris(), BasicModel::setInitialRxPosition(), and BasicModel::useTGD.

virtual ~BasicModel  )  [inline, virtual]
 

Destructor.

Definition at line 242 of file BasicModel.hpp.


Member Function Documentation

std::string getClassName void   )  const [virtual]
 

Returns a string identifying this object.

Implements ProcessingClass.

Definition at line 41 of file BasicModel.cpp.

virtual XvtStore<SatID>* getDefaultEphemeris  )  const [inline, virtual]
 

Method to get a pointer to the default XvtStore<SatID> to be used with GNSS data structures.

Definition at line 220 of file BasicModel.hpp.

virtual TypeID getDefaultObservable  )  const [inline, virtual]
 

Method to get the default observable for computations.

Definition at line 206 of file BasicModel.hpp.

virtual double getMinElev  )  const [inline, virtual]
 

Method to get satellite elevation cut-off angle.

By default, it is set to 10 degrees.

Definition at line 195 of file BasicModel.hpp.

double getTGDCorrections CommonTime  Tr,
const XvtStore< SatID > &  Eph,
SatID  sat
throw () [protected, virtual]
 

Method to get TGD corrections.

Definition at line 328 of file BasicModel.cpp.

References GPSEphemerisStore::findEphemeris(), and EngEphemeris::getTgd().

virtual gnssRinex& Process gnssRinex gData  )  throw (ProcessingException) [inline, virtual]
 

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

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 188 of file BasicModel.hpp.

virtual gnssSatTypeValue& Process gnssSatTypeValue gData  )  throw (ProcessingException) [inline, virtual]
 

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

Parameters:
gData Data object holding the data.

Implements ProcessingClass.

Definition at line 178 of file BasicModel.hpp.

satTypeValueMap & Process const CommonTime time,
satTypeValueMap gData
throw (ProcessingException) [virtual]
 

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

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

Definition at line 129 of file BasicModel.cpp.

References CorrectedEphemerisRange::azimuthGeodetic, CorrectedEphemerisRange::ComputeAtTransmitTime(), CorrectedEphemerisRange::cosines, CorrectedEphemerisRange::elevationGeodetic, GPSTK_THROW, CorrectedEphemerisRange::rawrange, CorrectedEphemerisRange::relativity, gpstk::SatIDSet, CorrectedEphemerisRange::svclkbias, CorrectedEphemerisRange::svPosVel, Xvt::v, and Xvt::x.

virtual BasicModel& setDefaultEphemeris XvtStore< SatID > &  ephem  )  [inline, virtual]
 

Method to set the default XvtStore<SatID> to be used with GNSS data structures.

Parameters:
ephem XvtStore<SatID> object to be used by default

Definition at line 229 of file BasicModel.hpp.

Referenced by BasicModel::BasicModel().

virtual BasicModel& setDefaultObservable const TypeID type  )  [inline, virtual]
 

Method to set the default observable for computations.

Parameters:
type TypeID object to be used by default

Definition at line 214 of file BasicModel.hpp.

int setInitialRxPosition  )  [protected, virtual]
 

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

Definition at line 310 of file BasicModel.cpp.

Referenced by BasicModel::BasicModel(), and BasicModel::setInitialRxPosition().

int setInitialRxPosition const Position RxCoordinates  )  [protected, virtual]
 

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

Definition at line 292 of file BasicModel.cpp.

References BasicModel::rxPos.

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

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

Returns:
0 if OK -1 if problems arose

Definition at line 268 of file BasicModel.cpp.

References BasicModel::setInitialRxPosition().

virtual BasicModel& setMinElev double  newElevation  )  [inline, virtual]
 

Method to set satellite elevation cut-off angle.

By default, it is set to 10 degrees.

Definition at line 201 of file BasicModel.hpp.


Member Data Documentation

TypeID defaultObservable [protected]
 

Default observable to be used when fed with GNSS data structures.

Definition at line 259 of file BasicModel.hpp.

Referenced by BasicModel::BasicModel().

double minElev [protected]
 

The elevation cut-off angle for accepted satellites.

By default it is set to 10 degrees.

Definition at line 250 of file BasicModel.hpp.

Referenced by BasicModel::BasicModel().

XvtStore<SatID>* pDefaultEphemeris [protected]
 

Pointer to default XvtStore<SatID> object when working with GNSS data structures.

Definition at line 255 of file BasicModel.hpp.

Referenced by BasicModel::BasicModel().

Position rxPos
 

Either estimated or "a priori" position of receiver.

Definition at line 234 of file BasicModel.hpp.

Referenced by BasicModel::setInitialRxPosition().

bool useTGD [protected]
 

Whether the TGD effect will be applied to C1 observable or not.

Definition at line 263 of file BasicModel.hpp.

Referenced by BasicModel::BasicModel().


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