Index of Functions: A B C D E F G H I J K L M N O P Q R S T U V W X
Index Page vequ_c
Table of contents
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
       vequ_c ( Vector equality, 3 dimensions )

       void vequ_c ( ConstSpiceDouble   vin[3],
                     SpiceDouble        vout[3] )
#### Abstract
       Make one double precision 3-dimensional vector equal to
       another.
#### Required_Reading
       None.
#### Keywords
       ASSIGNMENT
       VECTOR
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       vin        I   Double precision 3-dimensional vector.
       vout       O   Double precision 3-dimensional vector set equal
                      to `vin'.
#### Detailed_Input
       vin         is an arbitrary, double precision 3-dimensional vector.
#### Detailed_Output
       vout        is a double precision 3-dimensional vector set equal
                   to `vin'.
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       vequ_c simply sets each component of `vout' in turn equal to `vin'. No
       error checking is performed because none is needed.
#### Examples
       The numerical results shown for this example may differ across
       platforms. The results depend on the SPICE kernels used as
       input, the compiler and supporting libraries, and the machine
       specific arithmetic implementation.

       1) Lets assume we have a pointing record that contains the
          start time of an interpolation interval, the components of
          the quaternion that represents the C-matrix associated with
          the start time of the interval, and the angular velocity vector
          of the interval. The following example demonstrates how to
          extract the time, the quaternion and the angular velocity
          vector into separate variables for their processing.

          Example code begins here.

          /.
             Program vequ_ex1
          ./
          #include <stdio.h>
          #include "SpiceUsr.h"

          int main( )
          {

             /.
             Local variables.
             ./
             SpiceDouble          av     [3];
             SpiceDouble          quat   [4];
             SpiceDouble          time;

             /.
             Define the pointing record. We would normally obtain it
             from, e.g. CK readers or other non SPICE data files.
             ./
             SpiceDouble          record [8] = { 283480.753,        0.99999622,
                                                      0.0,          0.0,
                                                     -0.0027499965, 0.0,
                                                      0.0,          0.01 };

             /.
             Get the time, quaternion and angular velocity vector
             into separate variables.
             ./
             time = record[0];

             vequg_c ( record+1, 4, quat );
             vequ_c  ( record+5,    av   );

             /.
             Display the contents of the variables.
             ./
             printf( "Time            : %10.3f\n", time );

             printf( "Quaternion      :\n" );
             printf( "%15.10f %14.10f %14.10f %14.10f\n",
                       quat[0], quat[1], quat[2], quat[3] );
             printf( "Angular velocity:\n" );
             printf( "%15.10f %14.10f %14.10f\n", av[0], av[1], av[2] );

             return ( 0 );
          }

          When this program was executed on a Mac/Intel/cc/64-bit
          platform, the output was:

          Time            : 283480.753
          Quaternion      :
             0.9999962200   0.0000000000   0.0000000000  -0.0027499965
          Angular velocity:
             0.0000000000   0.0000000000   0.0100000000
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman        (JPL)
       J. Diaz del Rio     (ODC Space)
       W.M. Owen           (JPL)
       E.D. Wright         (JPL)
#### Version
       -CSPICE Version 1.1.1, 23-JUL-2020 (JDR)

           Edited the header to comply with NAIF standard. Added complete
           code example.

       -CSPICE Version 1.1.0, 22-OCT-1998 (NJB)

           Made input vector const. Removed #include of SpiceZfc.h.

       -CSPICE Version 1.0.0, 08-FEB-1998 (EDW) (WMO)
#### Index_Entries
       assign a 3-dimensional vector to another
#### Link to routine vequ_c source file vequ_c.c

    Fri Dec 31 18:41:14 2021