template<class T1, class T2>
rlp_deg_to_z<T1,T2> Function Reference
Obtains cartesian z-coordinate from coordinates expressed in terms of
magnitude, latitude and longitude.
Details...
#include <CoordSys.h>
Prototype
-
template <class T1, class T2>
void rlp_deg_to_z( const T1& r_in,
const T1& lat_in,const T1& phi_in,T2& z_out)
-
template <class T1, class T2>
void rlp_deg_to_z( const T1& r_in,
const T1& lat_in,const T1& phi_in, const T2& z_out)
Details
rlp_deg_to_z obtains the cartesian z-coordinate from coordinates expressed in
terms of magnitude, latitude, and longitude (r,(l)atitude,(p)hi), where:-
- latitude = 90 deg - theta, ( theta is the angular distance
in degrees from the positive z axis) , in range [90,-90),
- phi is the angular distance in degrees from the positive
x axis and is equal to the longitude, in range, [0,360); and,
- r is the magnitude of the radial distance.
See also: rlp_to_z,
rlp_deg_to_x,
rlp_deg_to_y,
rlp_deg_to_xyz,
xyz_to_rlp, and
xyz_to_rlp_deg.
Examples:
test_coordrep_trans.cc
Function Documentation
template <class T1, class T2>
void rlp_deg_to_z( const T1& r_in,
const T1& lat_in,const T1& phi_in,T2& z_out)
Calculates z_out as:-
z_out=r_in*sin(lat_in);
template <class T1, class T2>
void rlp_deg_to_z( const T1& r_in,
const T1& lat_in,const T1& phi_in, const T2& z_out)
As above, but with the exception that this version is instantiated when
z_out is the result of an operation passed-by-value (e.g.
the result of a Matrix<T> index operation.)
In these cases, z_out acts as a handle on the actual data
storage area - z_out cannot itself be modified, but the data it refers
to can be.
Requirements on types
-
lat_in and phi_in must both be objects of a class T1
for which the maths function sin and the operation * must be
defined.
-
z_out must be an object of a class T2 which is convertible
from an object of class T1.
For the second const version:-
- z_out must belong to a class T2 for which
update operations are possible on const objects.