Triple Class Reference
[Geodetic coordinates and geoids]

#include <Triple.hpp>

Inheritance diagram for Triple:

Inheritance graph
[legend]
List of all members.

Detailed Description

Three-dimensional vectors.

This class provides mathematical functions for 3D vectors, including some functions specific to orbital tracking.

Definition at line 69 of file Triple.hpp.

Public Member Functions

 Triple ()
 Default constructor, initialize as triple.
 Triple (const Triple &right)
 Copy constructor.
 Triple (double a, double b, double c)
 Construct from three doubles.
virtual ~Triple ()
 Destructor.
Tripleoperator= (const Triple &right)
 Assignment operator.
Tripleoperator= (const std::valarray< double > &right) throw (GeometryException)
 Assign from valarray.
double dot (const Triple &right) const throw ()
 Computes the Dot Product of two vectors.
Triple cross (const Triple &right) const throw ()
 Computes the Cross Product of two vectors.
double mag () const throw ()
 Computes the Magnigude of this vector.
Triple unitVector () const throw (GeometryException)
 Returns the unit vector of this vector.
double cosVector (const Triple &right) const throw (GeometryException)
 Computes the Cosine of the Angle Between this vector and another.
double slantRange (const Triple &right) const throw ()
 Computes the slant range between this vector and another.
double elvAngle (const Triple &right) const throw (GeometryException)
 Computes the elevation of a point with respect to this point.
double azAngle (const Triple &right) const throw (GeometryException)
 Computes an azimuth from this point.
Triple R1 (const double &angle) const throw ()
 Computes rotation about axis X.
Triple R2 (const double &angle) const throw ()
 Computes rotation about axis Y.
Triple R3 (const double &angle) const throw ()
 Computes rotation about axis Z.
double & operator[] (const size_t index)
 Return a reference to the element at /a index.
double operator[] (const size_t index) const
 Return the value of the element at /a index.
bool operator== (const Triple &right) const
 Equality Operator.
Triple operator- (const Triple &right) const
 Difference Operator.
Triple operator+ (const Triple &right) const
 Sum Operator.
size_t size (void) const
 Return the size of this object.

Public Attributes

std::valarray< double > theArray

Friends

Triple operator * (double right, const Triple &rhs)
 Multiplication Operator.
std::ostream & operator<< (std::ostream &s, const gpstk::Triple &v)
 Output operator for dvec.


Constructor & Destructor Documentation

Triple  ) 
 

Default constructor, initialize as triple.

Definition at line 57 of file Triple.cpp.

Triple const Triple right  ) 
 

Copy constructor.

Definition at line 62 of file Triple.cpp.

Triple double  a,
double  b,
double  c
 

Construct from three doubles.

Definition at line 67 of file Triple.cpp.

References Triple::theArray.

virtual ~Triple  )  [inline, virtual]
 

Destructor.

Definition at line 84 of file Triple.hpp.


Member Function Documentation

double azAngle const Triple right  )  const throw (GeometryException)
 

Computes an azimuth from this point.

Parameters:
right The position to determine azimuth of.
Returns:
The azimuth of right relative to this

Definition at line 187 of file Triple.cpp.

References GPSTK_THROW.

Referenced by Position::azimuth(), and main().

double cosVector const Triple right  )  const throw (GeometryException)
 

Computes the Cosine of the Angle Between this vector and another.

Parameters:
right the other vector
Returns:
The cosine of the angle between this and right

Definition at line 139 of file Triple.cpp.

References Triple::dot(), gpstk::dot(), and GPSTK_THROW.

Referenced by Triple::elvAngle().

Triple cross const Triple right  )  const throw ()
 

Computes the Cross Product of two vectors.

Parameters:
right vector to compute cross product with
Returns:
The cross product of v1 and v2

Definition at line 107 of file Triple.cpp.

Referenced by RACRotation::compute(), gpstk::doSatAtt(), and gpstk::PhaseWindup().

double dot const Triple right  )  const throw ()
 

Computes the Dot Product of two vectors.

Parameters:
right vector to compute dot product with.
Returns:
The dot product of this and right

Definition at line 96 of file Triple.cpp.

References Triple::theArray.

Referenced by Position::azimuthGeodetic(), PreciseRange::ComputeAtTransmitTime(), Triple::cosVector(), gpstk::doSatAtt(), Position::elevationGeodetic(), Triple::mag(), gpstk::PhaseWindup(), CorrectObservables::Process(), and Triple::unitVector().

double elvAngle const Triple right  )  const throw (GeometryException)
 

Computes the elevation of a point with respect to this point.

Parameters:
right The second point
Returns:
The elevation of right relative to this

Definition at line 176 of file Triple.cpp.

References Triple::cosVector(), and Triple::theArray.

Referenced by Position::elevation(), and main().

double mag  )  const throw ()
 

Computes the Magnigude of this vector.

Definition at line 118 of file Triple.cpp.

References Triple::dot(), and gpstk::sqrt().

Referenced by Position::azimuthGeodetic(), gpstk::doSatAtt(), Position::elevationGeodetic(), gpstk::PhaseWindup(), GravitationalDelay::Process(), gpstk::SatelliteNadirAzimuthAngles(), Triple::slantRange(), and Triple::unitVector().

Triple operator+ const Triple right  )  const
 

Sum Operator.

Parameters:
right the Triple to add to this object
Returns:
a Triple containing the sum of *this and right

Definition at line 304 of file Triple.cpp.

References Triple::theArray.

Triple operator- const Triple right  )  const
 

Difference Operator.

Parameters:
right the Triple to subtract from this object
Returns:
a Triple containing the difference between *this and right

Definition at line 297 of file Triple.cpp.

References Triple::theArray.

Triple & operator= const std::valarray< double > &  right  )  throw (GeometryException)
 

Assign from valarray.

Exceptions:
GeometryException if right.size() != 3.

Definition at line 83 of file Triple.cpp.

References GPSTK_THROW.

Triple & operator= const Triple right  ) 
 

Assignment operator.

Definition at line 77 of file Triple.cpp.

References Triple::theArray.

bool operator== const Triple right  )  const
 

Equality Operator.

Parameters:
right the Triple to test equality against
Returns:
true if left is equal to right

Definition at line 292 of file Triple.cpp.

double operator[] const size_t  index  )  const [inline]
 

Return the value of the element at /a index.

Parameters:
index the index of the element to return.
Returns:
the value of the element at /a index.

Definition at line 192 of file Triple.hpp.

double& operator[] const size_t  index  )  [inline]
 

Return a reference to the element at /a index.

Parameters:
index the index of the element to return.
Returns:
the reference to the requested element.

Definition at line 184 of file Triple.hpp.

Referenced by ECEF::asGeodetic().

Triple R1 const double &  angle  )  const throw ()
 

Computes rotation about axis X.

Parameters:
angle Angle to rotate, in degrees
Returns:
A triple which is the original triple rotated angle about X

Definition at line 242 of file Triple.cpp.

Triple R2 const double &  angle  )  const throw ()
 

Computes rotation about axis Y.

Parameters:
angle Angle to rotate, in degrees
Returns:
A triple which is the original triple rotated angle about Y

Definition at line 260 of file Triple.cpp.

Referenced by CorrectObservables::Process().

Triple R3 const double &  angle  )  const throw ()
 

Computes rotation about axis Z.

Parameters:
angle Angle to rotate, in degrees
Returns:
A triple which is the original triple rotated angle about Z

Definition at line 278 of file Triple.cpp.

Referenced by CorrectObservables::Process().

size_t size void   )  const [inline]
 

Return the size of this object.

Definition at line 227 of file Triple.hpp.

Referenced by RinexObsHeader::dump(), Antenna::getAntennaDataSize(), Antenna::getAntennaEccMapSize(), Antenna::getNoAziMapSize(), Antenna::getPCMapSize(), and gpstk::operator<<().

double slantRange const Triple right  )  const throw ()
 

Computes the slant range between this vector and another.

Parameters:
right A Vector
Returns:
The slant range between this and right

Definition at line 164 of file Triple.cpp.

References Triple::mag(), and Triple::theArray.

Referenced by CorrectedEphemerisRange::ComputeAtTransmitSvTime(), and Xvt::preciseRho().

Triple unitVector  )  const throw (GeometryException)
 

Returns the unit vector of this vector.

Definition at line 123 of file Triple.cpp.

References Triple::dot(), GPSTK_THROW, Triple::mag(), and gpstk::sqrt().

Referenced by RACRotation::compute(), EclipsedSatFilter::Process(), and CorrectObservables::Process().


Friends And Related Function Documentation

Triple operator * double  right,
const Triple rhs
[friend]
 

Multiplication Operator.

the scale by which to multiply a Triple the Triple to scale

Returns:
a Triple containing the scaled result

Definition at line 311 of file Triple.cpp.

std::ostream& operator<< std::ostream &  s,
const gpstk::Triple v
[friend]
 

Output operator for dvec.

Parameters:
s output stream to which v is sent
v dvec that is sent to s

Definition at line 318 of file Triple.cpp.


Member Data Documentation

std::valarray<double> theArray
 

Definition at line 238 of file Triple.hpp.

Referenced by Position::azimuthGeodetic(), Triple::dot(), Position::elevationGeodetic(), Triple::elvAngle(), Position::geocentricLatitude(), Position::geodeticLatitude(), IonexStore::getIonexValue(), Position::getIonosphericPiercePoint(), SunPosition::getPositionCIS(), MoonPosition::getPositionCIS(), SolidTides::getSolidTide(), Position::height(), Position::longitude(), gpstk::operator *(), Triple::operator+(), Position::operator+=(), Triple::operator-(), Position::operator-=(), Triple::operator=(), Position::phi(), CorrectObservables::Process(), ComputeWindUp::Process(), ComputeSatPCenter::Process(), Position::radius(), Position::radiusEarth(), Triple::slantRange(), Position::theta(), Position::transformTo(), Triple::Triple(), Position::X(), Position::Y(), and Position::Z().


The documentation for this class was generated from the following files:
Generated on Thu Mar 11 03:31:22 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1