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.
wvector1 | ( | double | r = 0.0 , |
|
double | t = 0.0 , |
|||
double | p = 0.0 | |||
) |
Constructs an individual vector.
Copy one element from a matrix of world vectors.
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.
p2 | Second point in space | |
p3 | Third point in space | |
p4 | Forth point in space |
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) ]
p2 | Second point in space | |
p3 | Third point in space |
void clear | ( | ) |
Reset all data elements back to zero.
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.
pos | Position from which direction is measured. | |
dir | Direction in terms of a spherical earth vector (output). |
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.
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.
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.
origin | Point from which distance is measured. |
double distance2 | ( | const wvector1 & | origin | ) | const |
Compute the square of the straight line distance between this point and some other point in space.
origin | Point from which distance is measured. |
double dot | ( | const wvector1 & | other | ) | const |
Compute the dot product between this vector and some other spherical earth vector.
other | Second vector in the dot product. |
double dotnorm | ( | const wvector1 & | other | ) | const |
Dot product divided by the magnitude of the two vectors.
other | Second vector in the dot product. |
void phi | ( | double | p | ) | [inline] |
Defines the longitude component of the spherical earth coordinate.
p | Longitude coordinate in radians. |
double phi | ( | ) | const [inline] |
Retrieves the longitude component of the spherical earth coordinate system.
void rho | ( | double | r | ) | [inline] |
Defines the radial component of the spherical earth coordinate.
r | Radial coordinate in meters. |
double rho | ( | ) | const [inline] |
Retrieves the radial component of the spherical earth coordinate system.
void theta | ( | double | t | ) | [inline] |
Defines the colatitude component of the spherical earth coordinate.
t | Colatitude coordinate in radians. |
double theta | ( | ) | const [inline] |
Retrieves the colatitude component of the spherical earth coordinate system.
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.