code::Displacement Class Reference

List of all members.

Detailed Description

Displacement vector between two points in space.

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.

Author:
: Thomas E. Vaughan
See also:
CVector, Location
Version:
Author
lakshman
Date
2009/06/02 20:17:38
RCSfile
code_Displacement.h,v


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.
Displacementoperator+= (const Displacement &)
 Vector additive assignment for displacements.
Displacement operator- (const Displacement &) const
 Vector subtraction for displacements.
Displacementoperator-= (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 CVectorgetVector_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.


Constructor & Destructor Documentation

code::Displacement::Displacement (  )  [inline]

Build a zero vector by default.

code::Displacement::Displacement ( const Location ,
const Location  
)

Build from a reference point and a target location.

Parameters:
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.

Parameters:
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?

Parameters:
const_Location& reference point
const_Length& distance east
const_Length& distance north
const_Length& difference in height


Member Function Documentation

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.


Friends And Related Function Documentation

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.


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7