RCNVRT

Utility/GeneralConverts rotational coordinates between the various supported representations.

Use

This function can be called by any user-defined subroutine.

Format

Fortran Calling Syntax
CALL RCNVRT(SYS1, COORD1, SYS2, COORD2, ISTAT)
C/C++ Calling Syntax
c_rcnvrt(sys1, coord1, sys2, coord2, istat)
Python Calling Syntax
[coord2, istat] = py_rcnvrt(sys1, coord1, sys2)
MATLAB Calling Syntax
[coord2, istat] = m_rcnvrt(sys1, coord1, sys2)

Attributes

SYS1
[string]
A string specifying the system in which the values are passed in coord1.
COORD1
[double precision]
An array containing the coordinates to be converted. Angles should be input in radians.
SYS2
[string]
A string specifying the system in which the values are returned as output in coord2.

Output

COORD2
[double precision]
An array containing the converted coordinates. Angles are output in radians.
ISTAT
[integer]
A variable indicating the success or the reason for the failure of the call to RCNVRT.
Possible values are:
istat = 0
Success in conversion.
istat = -10
Error in conversion.

A possible reason for an error in the conversion is a misspelled keyword for SYS1 or SYS2.

Comments

The following table lists the valid options you may specify for SYS1 or SYS2 and the corresponding sizes of the input or output arrays COORD1 or COORD2.

SYS1/SYS2 Description COORD1/COORD2 Size COORD1/COORD2 Contents
EULER Euler angles 3 [angle1, angle2, angle3]
EULPAR Euler parameters 4 [e0, e1, e2, e3]
RODPAR Rodrigues parameters 3 [r1, r2, r3]
AXAYAZ Rotational displacements about X, Y and Z axes 3 [angle1, angle2, angle3]
YPR Yaw, pitch and roll angles 3 [angle1, angle2, angle3]
COSINES Direction cosines 9 [a11, a21, a31,

a12, a22, a32,

a13, a23, a33]

B313 Body 3-1-3 3 [angle1, angle2, angle3]
B321 Body 3-2-1 3 [angle1, angle2, angle3]
B312 Body 3-1-2 3 [angle1, angle2, angle3]
B323 Body 3-2-3 3 [angle1, angle2, angle3]
B123 Body 1-2-3 3 [angle1, angle2, angle3]
BRYANT Bryant angles 3 [b1, b2, b3]
B132 Body 1-3-2 3 [angle1, angle2, angle3]
B121 Body 1-2-1 3 [angle1, angle2, angle3]
B131 Body 1-3-1 3 [angle1, angle2, angle3]
B231 Body 2-3-1 3 [angle1, angle2, angle3]
B213 Body 2-1-3 3 [angle1, angle2, angle3]
B212 Body 2-1-2 3 [angle1, angle2, angle3]
B232 Body 2-3-2 3 [angle1, angle2, angle3]
S313 Space 3-1-3 3 [angle1, angle2, angle3]
S321 Space 3-2-1 3 [angle1, angle2, angle3]
S312 Space 3-1-2 3 [angle1, angle2, angle3]
S323 Space 3-2-3 3 [angle1, angle2, angle3]
S123 Space 1-2-3 3 [angle1, angle2, angle3]
S132 Space 1-3-2 3 [angle1, angle2, angle3]
S121 Space 1-2-1 3 [angle1, angle2, angle3]
S131 Space 1-3-1 3 [angle1, angle2, angle3]
S231 Space 2-3-1 3 [angle1, angle2, angle3]
S213 Space 2-1-3 3 [angle1, angle2, angle3]
S212 Space 2-1-2 3 [angle1, angle2, angle3]
S232 Space 2-3-2 3 [angle1, angle2, angle3]