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>
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 |
Triple & | operator= (const std::valarray< double > &right) |
Triple & | operator= (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) |
gnsstk::Triple::Triple | ( | ) |
Default constructor, initialize as triple.
Definition at line 52 of file Triple.cpp.
Copy constructor.
Definition at line 57 of file Triple.cpp.
gnsstk::Triple::Triple | ( | double | a, |
double | b, | ||
double | c | ||
) |
Construct from three doubles.
Definition at line 62 of file Triple.cpp.
|
inlinevirtual |
Destructor.
Definition at line 83 of file Triple.hpp.
Computes an azimuth from this point.
right | The position to determine azimuth of. |
right
relative to this
GeometryException |
Definition at line 195 of file Triple.cpp.
Computes the Cosine of the Angle Between this vector and another.
right | the other vector |
this
and right
GeometryException |
Definition at line 149 of file Triple.cpp.
Computes the Cross Product of two vectors
right | vector to compute cross product with |
v1
and v2
Definition at line 118 of file Triple.cpp.
Computes the Dot Product of two vectors
right | vector to compute dot product with. |
this
and right
Definition at line 107 of file Triple.cpp.
Computes the elevation of a point with respect to this point.
right | The second point |
right
relative to this
GeometryException |
Definition at line 185 of file Triple.cpp.
|
noexcept |
Computes the Magnigude of this vector
Definition at line 129 of file Triple.cpp.
Sum Operator.
right | the Triple to add to this object |
Definition at line 311 of file Triple.cpp.
Difference Operator.
right | the Triple to subtract from this object |
Definition at line 304 of file Triple.cpp.
Assign from valarray.
GeometryException | if right.size() != 3. |
Definition at line 78 of file Triple.cpp.
Assignment operator.
Definition at line 72 of file Triple.cpp.
Equality Operator.
right | the Triple to test equality against |
Definition at line 299 of file Triple.cpp.
|
inline |
Return a reference to the element at /a index.
index | the index of the element to return. |
Definition at line 190 of file Triple.hpp.
|
inline |
Return the value of the element at /a index.
index | the index of the element to return. |
Definition at line 198 of file Triple.hpp.
Computes rotation about axis X.
angle | Angle to rotate, in degrees |
Definition at line 249 of file Triple.cpp.
Computes rotation about axis Y.
angle | Angle to rotate, in degrees |
Definition at line 267 of file Triple.cpp.
Computes rotation about axis Z.
angle | Angle to rotate, in degrees |
Definition at line 285 of file Triple.cpp.
|
inline |
Return the size of this object.
Definition at line 240 of file Triple.hpp.
Computes the slant range between this vector and another
right | A Vector |
this
and right
Definition at line 173 of file Triple.cpp.
std::vector< double > gnsstk::Triple::toStdVector | ( | ) |
Return the data as a std::vector object.
Definition at line 99 of file Triple.cpp.
Vector< double > gnsstk::Triple::toVector | ( | ) |
Return the data as a Vector<double> object.
Definition at line 90 of file Triple.cpp.
Triple gnsstk::Triple::unitVector | ( | ) | const |
Returns the unit vector of this vector
GeometryException |
Definition at line 134 of file Triple.cpp.
Multiplication by a scalar on the right
Definition at line 236 of file Triple.hpp.
Multiplication Operator.
Definition at line 318 of file Triple.cpp.
|
friend |
Output operator for dvec
s | output stream to which v is sent |
v | dvec that is sent to s |
Definition at line 325 of file Triple.cpp.
std::valarray<double> gnsstk::Triple::theArray |
Definition at line 251 of file Triple.hpp.