SRM Reference Manual
Functions
SRM ConvertVector3D
extern SRM_Status_Code
SRM_ConvertVector3D
(
constSRM_SRF_Parameters_Pair convert_params_ptr, (notes)
constSRM_Coordinate *conversion_location_src_ptr, (notes)
constSRM_Vector_3D *source_vec_ptr, (notes)
SRM_Vector_3D *dest_vec_ptr (notes)
);

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

SRM_STAT_CODE_SUCCESS and *dest_vec_ptr is set to the appropriate values, if valid parameters were passed in.
SRM_STAT_CODE_INVALID_SRF_PAIR and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if convert_params_ptr was NULL.
SRM_STAT_CODE_INVALID_SOURCE_VECTOR and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if source_vec_ptr is NULL.
SRM_STAT_CODE_INVALID_SOURCE_COORD and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if conversion_location_src_ptr is NULL and required.
SRM_STAT_CODE_INVALID_DEST_VECTOR and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if dest_vect_ptr is NULL.
SRM_STAT_CODE_INVALID_DEST_COORD and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if conversion_location_dest_ptr is NULL.
SRM_STAT_CODE_UNSUPPORTED and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, if an invalid vector conversion was requested.
SRM_STAT_CODE_FAILURE and *dest_vec_ptr, *conversion_location_dest_ptr are left unchanged, an unspecified error condition occurred.


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: SRM_ConvertMatrix3x3. Next: SRM_Coordinate2DEqual. Up:Index.

Last updated: May 15, 2003 Copyright © 2003 SEDRIS™