dvhat_c

Index Page dvhat_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void dvhat_c ( ConstSpiceDouble s1  [6],
                      SpiceDouble      sout[6] )
#### Abstract
       Find the unit vector corresponding to a state vector and the
       derivative of the unit vector.
#### Required_Reading
       None.
#### Keywords
       VECTOR
       DERIVATIVE
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       s1        I     State to be normalized.
       sout      O     Unit vector s1 / |s1|, and its time derivative.
#### Detailed_Input
       s1       This is any double precision state. If the position
                component of the state is the zero vector, this routine
                will detect it and will not attempt to divide by zero.
#### Detailed_Output
       sout     sout is a state containing the unit vector pointing in
                the direction of position component of s1 and the
                derivative of the unit vector with respect to time.

                sout may overwrite s1.
#### Parameters
       None.
#### Exceptions
       Error free.

       1) If s1 represents the zero vector, then the position
          component of sout will also be the zero vector.  The
          velocity component will be the velocity component
          of s1.
#### Files
       None.
#### Particulars
       Let s1 be a state vector with position and velocity components p
       and v respectively.  From these components one can compute the
       unit vector parallel to p, call it u and the derivative of u
       with respect to time, du.  This pair (u,du) is the state returned
       by this routine in sout.
#### Examples
       Suppose that STATE gives the apparent state of a body with
       respect to an observer.  This routine can be used to compute the
       instantaneous angular rate of the object across the sky as seen
       from the observers vantage.

          dvhat_c ( state, ustate );

          vel[0] = ustate[3];
          vel[1] = ustate[4];
          vel[2] = ustate[5];

          angular_rate = vnorm_c ( vel );
#### Restrictions
       None.
#### Literature_References
         None.
#### Author_and_Institution
         W.L. Taber      (JPL)
         E.D. Wright     (JPL)
#### Version
       -CSPICE Version 1.0.0, 7-JUL-1999
#### Index_Entries
       State of a unit vector parallel to a state vector
#### Link to routine dvhat_c source file dvhat_c.c

    Thu Apr 16 08:57:48 2009