void twovec_c ( ConstSpiceDouble axdef [3],
SpiceInt indexa,
ConstSpiceDouble plndef [3],
SpiceInt indexp,
SpiceDouble mout [3][3] )
Find the transformation to the right-handed frame having a
given vector as a specified axis and having a second given
vector lying in a specified coordinate plane.
None.
AXES, FRAME, ROTATION, TRANSFORMATION
VARIABLE I/O DESCRIPTION
-------- --- -------------------------------------------------
axdef I Vector defining a principal axis.
indexa I Principal axis number of axdef (X=1, Y=2, Z=3).
plndef I Vector defining (with axdef) a principal plane.
indexp I Second axis number (with indexa) of principal
plane.
mout O Output rotation matrix.
axdef is a vector defining one of the principal axes of a
coordinate frame.
indexa is a number that determines which of the three
coordinate axes contains axdef.
If indexa is 1 then axdef defines the X axis of the
coordinate frame.
If indexa is 2 then axdef defines the Y axis of the
coordinate frame.
If indexa is 3 then axdef defines the Z axis of the
coordinate frame
plndef is a vector defining (with axdef) a principal plane of
the coordinate frame.
indexp is the second axis of the principal frame determined
by axdef and plndef.
If indexp is 1, the second axis of the principal
plane is the X-axis.
If indexp is 2, the second axis of the principal
plane is the Y-axis.
If indexp is 3, the second axis of the principal plane
is the Z-axis.
mout is a rotation matrix that transforms coordinates given
in the input frame to the frame determined by axdef,
plndef, indexa and indexp.
None.
1) If indexa or indexp is not in the set {1,2,3} the error
SPICE(BADINDEX) will be signalled.
2) If indexa and indexp are the same the error
SPICE(UNDEFINEDFRAME) will be signalled.
3) If the cross product of the vectors axdef and plndef is zero,
the error SPICE(DEPENDENTVECTORS) will be signalled.
None.
Given two linearly independent vectors there is a unique
right-handed coordinate frame having:
1) axdef lying along the indexa axis.
2) plndef lying in the indexa-indexp coordinate plane.
This routine determines the transformation matrix that transforms
from coordinates used to represent the input vectors to the
the system determined by axdef and plndef. Thus a vector
(x,y,z) in the input coordinate system will have coordinates
t
mout * (x,y,z)
in the frame determined by axdef and plndef.
The rotation matrix ticc from inertial to Sun-Canopus
(celestial) coordinates is found by the call
twovec_c ( Sun_vector, 3, Canopus_vector, 1, ticc );
indexa, indexp must be different and be integers from 1 to 3.
axdef and plndef must be linearly independent.
None.
W.M. Owen (JPL)
W.L. Taber (JPL)
-CSPICE Version 1.1.0, 22-OCT-1998 (NJB)
Made input matrices const.
-CSPICE Version 1.0.0, 2-MAR-1998
define an orthonormal frame from two vectors
Link to routine twovec_c source file twovec_c.c
|