Function Name: Convert Vector 3 Type

Definition

Assumptions:

  1. A vector (pointed to by source_vec_ptr) exists in a spatial reference frame SRF1. Consider this vector's data as an ordered triple, (x, y, z).
  2. There is a location, conversion_location_src_ptr, in SRF1, associated with *source_vec_ptr as the "origin" of the vector.
  3. For all spatial reference frame SRF1 *except* GD, GM, GEI, GSE, GSM, and SM, the vector (x, y, z) is in SRF1 coordinates. In GD, GM, GEI, GSE, GSM, and SM, (x, y, z) is in LTP coordinates for the canonical LTP located at conversion_location_src_ptr.

The caller wishes to convert (x, y, z) from SRF1 into a different spatial reference frame SRF2, where the transformation from SRF1 to SRF2 is specified by convert_params_ptr.

Returns

SE_COORD_SUCCESS - and *dest_vec_ptr is set to the appropriate values, if valid parameters were passed in.

SE_COORD_INVALID_SRF_PAIR - and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if convert_params_ptr was NULL.

SE_COORD_INVALID_SOURCE_VECTOR - and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if source_vec_ptr is NULL.

SE_COORD_INVALID_SOURCE_COORD - and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if conversion_location_src_ptr is NULL and required.

SE_COORD_INVALID_DEST_VECTOR - and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if dest_vect_ptr is NULL.

SE_COORD_INVALID_DEST_COORD - and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if conversion_location_dest_ptr is NULL.

SE_COORD_UNSUPPORTED - if an invalid vector conversion was requested.

SE_COORD_FAILURE - an unspecified error condition occurred.

Prototype


extern SE_COORD_STATUS_CODE_ENUM
SRM_ConvertVector3Type
(
constSE_CONVERT_COORD_SYSTEM_PAIR convert_params_ptr, (notes)
constSE_COORD *conversion_location_src_ptr, (notes)
constSE_VECTOR_3_TYPE *source_vec_ptr, (notes)
SE_VECTOR_3_TYPE *dest_vec_ptr (notes)
);

Parameters Notes

convert_params_ptr

 the spatial reference frame (SRF) parameters of the source and
 destination SRFs

conversion_location_src_ptr

 the "origin" of the source vector

source_vec_ptr

 a pointer to the incoming vector, which is to be converted

dest_vec_ptr

 a pointer to where the converted vector will be stored.  This can
 be the same location that source_vec_ptr points to, but it does
 not have to be.

Prev: Convert Radians To Degrees. Next: Coord 2D Equal. Up:Index.