cspice_eul2xf

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_EUL2XF computes a state transformation from an Euler angle
factorization of a rotation and the derivatives of those Euler
angles.

```

#### I/O

```
Given:

eulang   the array(s) of Euler angles corresponding to the
specified factorization.

[6,n] = size(eulang); double = class(eulang)

If we represent r as shown here:

r =  [ alpha ]     [ beta ]     [ gamma ]
axisa        axisb         axisc

then (6x1)

eulang = alpha
eulang = beta
eulang = gamma
eulang = dalpha/dt
eulang = dbeta/dt
eulang = dgamma/dt

or (6xN)

eulang[1,N] = alpha_N
eulang[2,N] = beta_N
eulang[3,N] = gamma_N
eulang[4,N] = dalpha_N/dt
eulang[5,N] = dbeta_N/dt
eulang[6,N] = dgamma_N/dt

axisa
axisb
axisc     the indices defining the axes desired for the factorization
of "r". All must be in the range from 1 to 3.

[1,1] = size(axis3); int32 = class(axis3)
[1,1] = size(axis2); int32 = class(axis2)
[1,1] = size(axis1); int32 = class(axis1)

Every rotation matrix can be represented as a product
of three rotation matrices about the principal axes
of a reference frame.

r =  [ alpha ]     [ beta ]     [ gamma ]
axisa        axisb         axisc

The value 1 corresponds to the X axis.
The value 2 corresponds to the Y axis.
The value 3 corresponds to the Z axis.

the call:

xform = cspice_eul2xf(eulang, axisa, axisb, axisc)

returns:

xform   a  array(s) of a state transformation matrices corresponding to
'r' as described above.

If [6,1] = size(eulang) then [3,3]   = size(xform)
If [6,n] = size(eulang) then [3,3,n] = size(xform)
double = class(xform)

'xform'  returns with the same vectorization
measure, N, as 'eulang'.

```

#### Examples

```
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.

%
% Suppose you have a set of Euler angles and their derivatives
% for a 3 1 3 rotation, and that you would like to determine
% the equivalent angles and derivatives for a 1 2 3 rotation.
%
% r = [alpha]  [beta]  [gamma]
%           3       1        3
%
% r = [roll]  [pitch]  [yaw]
%           1        2      3
%
% The following code fragment will perform the desired computation.
%
abgang = [0.01; 0.03; 0.09; -0.001; -0.003; -0.009 ];

xform              = cspice_eul2xf( abgang, 3, 1, 3 );
[ rpyang, unique ] = cspice_xf2eul( xform , 1, 2, 3 );

if( unique )
disp( '1-2-3 equivalent rotation to input (radians):')
fprintf( 'Roll  %12.6f, dRoll/dt  %12.6f\n', rpyang(1), rpyang(4) )
fprintf( 'Pitch %12.6f, dPitch/dt %12.6f\n', rpyang(2), rpyang(5) )
fprintf( 'Yaw   %12.6f, dYaw/dt   %12.6f\n', rpyang(3), rpyang(6) )
else
disp( 'The values in ''rpyang'' not uniquely determined.' )
end

MATLAB outputs:

1-2-3 equivalent rotation to input (radians):
Roll      0.029999, dRoll/dt     -0.003000
Pitch    -0.000300, dPitch/dt     0.000060
Yaw       0.099996, dYaw/dt      -0.009999

```

#### Particulars

```
This function is intended to provide an inverse for the function
cspice_xf2eul.

```

#### Required Reading

```
For important details concerning this module's function, please refer to
the CSPICE routine eul2xf_c.

MICE.REQ

```

#### Version

```
-Mice Version 1.0.3, 06-NOV-2014, EDW (JPL)

Edited I/O section to conform to NAIF standard for Mice documentation.

-Mice Version 1.0.2, 29-FEB-2012, EDW (JPL)

Edit to "Usage" string. "xform(3,3)" corrected to read
"xform(6,6)."

-Mice Version 1.0.1, 06-MAY-2009, EDW (JPL)

Added MICE.REQ reference to the Required Reading section.

-Mice Version 1.0.0, 02-APR-2007, EDW (JPL)

```

#### Index_Entries

```
State transformation from Euler angles and derivatives

```
`Wed Apr  5 18:00:31 2017`