CVector could almost be used directly for this purpose, but CVector is not unit-safe. Displacement aggregates a CVector, exposes some of CVector's functionality, and provides a unit-safe wrapper.
Public Member Functions | |
| Displacement () | |
| Build a zero vector by default. | |
| Displacement (const Location &, const Location &) | |
| Build from a reference point and a target location. | |
| Displacement (const Location &, const Angle &, const Angle &, const Length &) | |
| Build from a reference point and a list of differences. | |
| Displacement (const Location &, const Length &, const Length &, const Length &) | |
| Build from a reference point and a list of Lengths. | |
| Length | getLength () const |
| Return the norm (magnitude) of the displacement vector. | |
| Displacement | operator+ (const Displacement &) const |
| Vector addition for displacements. | |
| Displacement & | operator+= (const Displacement &) |
| Vector additive assignment for displacements. | |
| Displacement | operator- (const Displacement &) const |
| Vector subtraction for displacements. | |
| Displacement & | operator-= (const Displacement &) |
| Vector subtractive assignment for displacements. | |
| Displacement | operator * (float) const |
| Right scalar multiplication. | |
| Displacement | operator/ (float) const |
| Scalar division. | |
| CVector | getUnit_ECCC () const |
| Return a unit vector in EarthCenteredCartesianCoordinateSystem. | |
| const CVector & | getVector_ECCC () const |
| Return the C vector. | |
Friends | |
| class | Location |
| Displacement | operator * (float, const Displacement &) |
| Left scalar multiplication. | |
| Displacement | operator- (const Displacement &) |
| Negation operator. | |
| std::ostream & | operator<< (std::ostream &, const Displacement &) |
| Print a nice formatted string representation of this Displacement. | |
| code::Displacement::Displacement | ( | ) | [inline] |
Build a zero vector by default.
Build from a reference point and a target location.
| const_Location& | reference (from) location | |
| const_Location& | target (to) location |
| code::Displacement::Displacement | ( | const Location & | , | |
| const Angle & | , | |||
| const Angle & | , | |||
| const Length & | ||||
| ) |
Build from a reference point and a list of differences.
| const_Location& | reference point | |
| const_Angle& | difference in latitude | |
| const_Angle& | difference in longitude | |
| const_Length& | difference in height |
| code::Displacement::Displacement | ( | const Location & | , | |
| const Length & | , | |||
| const Length & | , | |||
| const Length & | ||||
| ) |
Build from a reference point and a list of Lengths.
FIXME: "distance east" and "distance north" are ambiguous terms that should be precisely defined here. For example, is "distance east" a distance along
(1) the surface of the earth,
(2) a sphere whose radius corresponds to the altitude of the reference point at the tail of the displacement vector,
(3) a sphere whose radius corresponds to the altitude of the point at the head of the displacement vector,
(4) some particular straight line, or
(5) something else?
| const_Location& | reference point | |
| const_Length& | distance east | |
| const_Length& | distance north | |
| const_Length& | difference in height |
| Length code::Displacement::getLength | ( | ) | const |
Return the norm (magnitude) of the displacement vector.
| CVector code::Displacement::getUnit_ECCC | ( | ) | const [inline] |
Return a unit vector in EarthCenteredCartesianCoordinateSystem.
| const CVector& code::Displacement::getVector_ECCC | ( | ) | const [inline] |
Return the C vector.
This is in the EarthCenteredCartesianCoordinateSystem.
| Displacement code::Displacement::operator * | ( | float | ) | const |
Right scalar multiplication.
| Displacement code::Displacement::operator+ | ( | const Displacement & | ) | const |
Vector addition for displacements.
| Displacement& code::Displacement::operator+= | ( | const Displacement & | ) |
Vector additive assignment for displacements.
| Displacement code::Displacement::operator- | ( | const Displacement & | ) | const |
Vector subtraction for displacements.
| Displacement& code::Displacement::operator-= | ( | const Displacement & | ) |
Vector subtractive assignment for displacements.
| Displacement code::Displacement::operator/ | ( | float | ) | const |
Scalar division.
friend class Location [friend] |
| Displacement operator * | ( | float | , | |
| const Displacement & | ||||
| ) | [friend] |
Left scalar multiplication.
| Displacement operator- | ( | const Displacement & | ) | [friend] |
Negation operator.
| std::ostream& operator<< | ( | std::ostream & | , | |
| const Displacement & | ||||
| ) | [friend] |
Print a nice formatted string representation of this Displacement.
1.4.7