wvector1 Class Reference
[World Coordinates]


Detailed Description

Individual world vector in spherical earth coordinates.

Each of the three coordinate parameters (rho,theta,phi) is a scalar. This class is a convenience to save the developer from doing a lot of operations on 1x1 matrices.


Constructor & Destructor Documentation

wvector1 ( double  r = 0.0,
double  t = 0.0,
double  p = 0.0 
)

Constructs an individual vector.

wvector1 ( const wvector other,
size_t  row,
size_t  col 
)

Copy one element from a matrix of world vectors.


Member Function Documentation

double area ( const wvector1 p2,
const wvector1 p3,
const wvector1 p4 
) const

Compute the surface area between four points in space.

Similar to the three point version, but this one combines two triangle (this,p2,p3) and (this,p3,p4) to form the complete solution. This allows the distance from this to p3 to be reused.

Parameters:
p2 Second point in space
p3 Third point in space
p4 Forth point in space
double area ( const wvector1 p2,
const wvector1 p3 
) const

Compute the surface area between three points in space.

The distances between the vertices in the triangle (this,p2,p3) can be used to compute the surface area using the formula:

 		a = length(this,p2)
 		b = length(this,p3)
 		c = length(p2,p3)
      area = 1/4 sqrt[ (a+b+c)(b+c-a)(c+a-b)(a+b-c) ]
 
References:
Weisstein, Eric W. "Triangle Area." From MathWorld - A Wolfram Web Resource. http://mathworld.wolfram.com/TriangleArea.html
Parameters:
p2 Second point in space
p3 Third point in space
void clear (  ) 

Reset all data elements back to zero.

void direction ( const wvector1 pos,
wvector1 dir 
)

Extract spherical earth geocentric direction from acoustic ray direction in the local tangent plane.

Used to extract grazing angle information at the beginning of the reflection process.

Parameters:
pos Position from which direction is measured.
dir Direction in terms of a spherical earth vector (output).
void direction ( const wvector1 pos,
const wvector1 dir 
)

Compute acoustic ray direction in the local tangent plane using the spherical earth geocentric direction vector.

Used to re-initialize the direction of propagation after reflection.

Parameters:
pos Position from which direction is measured.
dir Direction in terms of a spherical earth vector (input).
void direction ( double *  de,
double *  az 
) const

Extract depression/elevation and azimuthal angles from acoustic ray direction in the local tangent plane.

Used to extract ray angle information from eigenray collisions with targets.

Parameters:
de Initial depression/elevation angle at the source location (degrees, positive is up).
az Initial azimuthal angle at the source location (degrees, clockwise from true north).
double distance ( const wvector1 origin  )  const

Compute the straight line distance between this point and some other point in space.

Parameters:
origin Point from which distance is measured.
Returns:
Distance from this point to the origin point.
double distance2 ( const wvector1 origin  )  const

Compute the square of the straight line distance between this point and some other point in space.

Parameters:
origin Point from which distance is measured.
Returns:
Distance from this point to the origin point.
double dot ( const wvector1 other  )  const

Compute the dot product between this vector and some other spherical earth vector.

Parameters:
other Second vector in the dot product.
Returns:
Dot product between these two vectors.
double dotnorm ( const wvector1 other  )  const

Dot product divided by the magnitude of the two vectors.

Parameters:
other Second vector in the dot product.
Returns:
Normalized dot product between these two vectors.
void phi ( double  p  )  [inline]

Defines the longitude component of the spherical earth coordinate.

Parameters:
p Longitude coordinate in radians.
double phi (  )  const [inline]

Retrieves the longitude component of the spherical earth coordinate system.

Returns:
Longitude coordinate in radians.
void rho ( double  r  )  [inline]

Defines the radial component of the spherical earth coordinate.

Parameters:
r Radial coordinate in meters.
double rho (  )  const [inline]

Retrieves the radial component of the spherical earth coordinate system.

Returns:
Radial coordinate in meters.
void theta ( double  t  )  [inline]

Defines the colatitude component of the spherical earth coordinate.

Parameters:
t Colatitude coordinate in radians.
double theta (  )  const [inline]

Retrieves the colatitude component of the spherical earth coordinate system.

Returns:
Colatitude coordinate in radians.

Member Data Documentation

double _phi [private]

Storage for the longitude component of the coordinate system.

double _rho [private]

Storage for the radial component of the coordinate system.

double _theta [private]

Storage for the colatitude component of the coordinate system.


Generated on 4 May 2015 for USML by  doxygen 1.6.1