Public Member Functions | Public Attributes | Friends | List of all members
gnsstk::Triple Class Reference

Detailed Description

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

Definition at line 68 of file Triple.hpp.

#include <Triple.hpp>

Inheritance diagram for gnsstk::Triple:
Inheritance graph
[legend]

Public Member Functions

double azAngle (const Triple &right) const
 
double cosVector (const Triple &right) const
 
Triple cross (const Triple &right) const noexcept
 
double dot (const Triple &right) const noexcept
 
double elvAngle (const Triple &right) const
 
double mag () const noexcept
 
Triple operator+ (const Triple &right) const
 
Triple operator- (const Triple &right) const
 
Tripleoperator= (const std::valarray< double > &right)
 
Tripleoperator= (const Triple &right)
 Assignment operator. More...
 
bool operator== (const Triple &right) const
 
double & operator[] (const size_t index)
 
double operator[] (const size_t index) const
 
Triple R1 (const double &angle) const noexcept
 
Triple R2 (const double &angle) const noexcept
 
Triple R3 (const double &angle) const noexcept
 
size_t size (void) const
 Return the size of this object. More...
 
double slantRange (const Triple &right) const noexcept
 
std::vector< double > toStdVector ()
 Return the data as a std::vector object. More...
 
Vector< double > toVector ()
 Return the data as a Vector<double> object. More...
 
 Triple ()
 Default constructor, initialize as triple. More...
 
 Triple (const Triple &right)
 Copy constructor. More...
 
 Triple (double a, double b, double c)
 Construct from three doubles. More...
 
Triple unitVector () const
 
virtual ~Triple ()
 Destructor. More...
 

Public Attributes

std::valarray< double > theArray
 

Friends

Triple operator* (const Triple &rhs, double left)
 
Triple operator* (double scale, const Triple &rhs)
 
std::ostream & operator<< (std::ostream &s, const gnsstk::Triple &v)
 

Constructor & Destructor Documentation

◆ Triple() [1/3]

gnsstk::Triple::Triple ( )

Default constructor, initialize as triple.

Definition at line 52 of file Triple.cpp.

◆ Triple() [2/3]

gnsstk::Triple::Triple ( const Triple right)

Copy constructor.

Definition at line 57 of file Triple.cpp.

◆ Triple() [3/3]

gnsstk::Triple::Triple ( double  a,
double  b,
double  c 
)

Construct from three doubles.

Definition at line 62 of file Triple.cpp.

◆ ~Triple()

virtual gnsstk::Triple::~Triple ( )
inlinevirtual

Destructor.

Definition at line 83 of file Triple.hpp.

Member Function Documentation

◆ azAngle()

double gnsstk::Triple::azAngle ( const Triple right) const

Computes an azimuth from this point.

Parameters
rightThe position to determine azimuth of.
Returns
The azimuth of right relative to this
Exceptions
GeometryException

Definition at line 195 of file Triple.cpp.

◆ cosVector()

double gnsstk::Triple::cosVector ( const Triple right) const

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

Parameters
rightthe other vector
Returns
The cosine of the angle between this and right
Exceptions
GeometryException

Definition at line 149 of file Triple.cpp.

◆ cross()

Triple gnsstk::Triple::cross ( const Triple right) const
noexcept

Computes the Cross Product of two vectors

Parameters
rightvector to compute cross product with
Returns
The cross product of v1 and v2

Definition at line 118 of file Triple.cpp.

◆ dot()

double gnsstk::Triple::dot ( const Triple right) const
noexcept

Computes the Dot Product of two vectors

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

Definition at line 107 of file Triple.cpp.

◆ elvAngle()

double gnsstk::Triple::elvAngle ( const Triple right) const

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

Parameters
rightThe second point
Returns
The elevation of right relative to this
Exceptions
GeometryException

Definition at line 185 of file Triple.cpp.

◆ mag()

double gnsstk::Triple::mag ( ) const
noexcept

Computes the Magnigude of this vector

Definition at line 129 of file Triple.cpp.

◆ operator+()

Triple gnsstk::Triple::operator+ ( const Triple right) const

Sum Operator.

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

Definition at line 311 of file Triple.cpp.

◆ operator-()

Triple gnsstk::Triple::operator- ( const Triple right) const

Difference Operator.

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

Definition at line 304 of file Triple.cpp.

◆ operator=() [1/2]

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

Assign from valarray.

Exceptions
GeometryExceptionif right.size() != 3.

Definition at line 78 of file Triple.cpp.

◆ operator=() [2/2]

Triple & gnsstk::Triple::operator= ( const Triple right)

Assignment operator.

Definition at line 72 of file Triple.cpp.

◆ operator==()

bool gnsstk::Triple::operator== ( const Triple right) const

Equality Operator.

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

Definition at line 299 of file Triple.cpp.

◆ operator[]() [1/2]

double& gnsstk::Triple::operator[] ( const size_t  index)
inline

Return a reference to the element at /a index.

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

Definition at line 190 of file Triple.hpp.

◆ operator[]() [2/2]

double gnsstk::Triple::operator[] ( const size_t  index) const
inline

Return the value of the element at /a index.

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

Definition at line 198 of file Triple.hpp.

◆ R1()

Triple gnsstk::Triple::R1 ( const double &  angle) const
noexcept

Computes rotation about axis X.

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

Definition at line 249 of file Triple.cpp.

◆ R2()

Triple gnsstk::Triple::R2 ( const double &  angle) const
noexcept

Computes rotation about axis Y.

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

Definition at line 267 of file Triple.cpp.

◆ R3()

Triple gnsstk::Triple::R3 ( const double &  angle) const
noexcept

Computes rotation about axis Z.

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

Definition at line 285 of file Triple.cpp.

◆ size()

size_t gnsstk::Triple::size ( void  ) const
inline

Return the size of this object.

Definition at line 240 of file Triple.hpp.

◆ slantRange()

double gnsstk::Triple::slantRange ( const Triple right) const
noexcept

Computes the slant range between this vector and another

Parameters
rightA Vector
Returns
The slant range between this and right

Definition at line 173 of file Triple.cpp.

◆ toStdVector()

std::vector< double > gnsstk::Triple::toStdVector ( )

Return the data as a std::vector object.

Definition at line 99 of file Triple.cpp.

◆ toVector()

Vector< double > gnsstk::Triple::toVector ( )

Return the data as a Vector<double> object.

Definition at line 90 of file Triple.cpp.

◆ unitVector()

Triple gnsstk::Triple::unitVector ( ) const

Returns the unit vector of this vector

Exceptions
GeometryException

Definition at line 134 of file Triple.cpp.

Friends And Related Function Documentation

◆ operator* [1/2]

Triple operator* ( const Triple rhs,
double  left 
)
friend

Multiplication by a scalar on the right

Parameters
rhsthe Triple to scale
leftthe scale by which to multiply a Triple
Returns
a Triple containing the scaled result

Definition at line 236 of file Triple.hpp.

◆ operator* [2/2]

Triple operator* ( double  scale,
const Triple rhs 
)
friend

Multiplication Operator.

Parameters
scalethe scale by which to multiply a Triple
rhsthe Triple to scale
Returns
a Triple containing the scaled result

Definition at line 318 of file Triple.cpp.

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const gnsstk::Triple v 
)
friend

Output operator for dvec

Parameters
soutput stream to which v is sent
vdvec that is sent to s

Definition at line 325 of file Triple.cpp.

Member Data Documentation

◆ theArray

std::valarray<double> gnsstk::Triple::theArray

Definition at line 251 of file Triple.hpp.


The documentation for this class was generated from the following files:


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:46