Index Page
cspice_cidfrm
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_CIDFRM retrieves the ID code and name of the preferred 
   frame associated with a given body ID.

I/O


   Given:

      cent   NAIF ID of a body for which a preferred reference frame
             exists.

             [1,n] = size(cent); int32 = class(cent)

   the call:

      [ frcode, frname, found] = cspice_cidfrm(cent)

   returns:


      frcode   the SPICE frame code(s) associated with 'cent'.

               [1,n] = size(frcode); int32 = class(frcode)

      frname   the name(s) corresponding to 'frcode'.

               [n,m] = size(frname); char = class(frname)

      found    the flag(s) indicating if the appropriate frame ID-code and
               frame name can be determined from 'cent'.

               [1,n] = size(found); logical = class(found)

               'frcode', 'frname', and 'found' return with the same
               vectorization measure (N) as 'cent'.

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.

      %
      % Retrieve frame information for body ID 501.
      %
      disp('Scalar' )

      bodies = 501;
      [ frcode, frname, found ] = cspice_cidfrm( bodies );

      if ( found )
         fprintf( '%8d  %8d  %s\n', bodies, frcode, frname )
      end

      %
      % Retrieve frame information for a vector of body IDs.
      %
      disp('Vector' )

      bodies = [ 0, 301, 401, -501 ];

      [ frcode, frname, found ] = cspice_cidfrm( bodies );

      for i=1:numel( bodies)

         if ( found(i) )
            fprintf( '%8d  %8d  %s\n', bodies(i), frcode(i), frname(i,:) )
         else
            fprintf( 'No frame associated with ID %d\n', bodies(i) )
         end

      end

   MATLAB outputs:

      Scalar
           501     10023  IAU_IO

      Vector
             0        15  DE-202
           301     10020  IAU_MOON
           401     10021  IAU_PHOBOS
      No frame associated with ID -501

Particulars


   This routine allows the user to determine the frame that should
   be associated with a particular object. For example, if you
   need the frame name and ID associated with Io, you can call 
   cspice_cidfrm to return these values.

   The preferred frame to use with an object is specified via one
   of the kernel pool variables:

       OBJECT_<cent>_FRAME

   where <cent> is the NAIF ID or name of the object.

   For those objects that have "built-in" frame names this
   routine returns the corresponding "IAU" frame and frame ID code.

Required Reading


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

   MICE.REQ
   FRAMES.REQ

Version


   -Mice Version 1.0.0, 11-NOV-2013, EDW (JPL), SCK (JPL)

Index_Entries


   Fetch reference frame attributes


Wed Apr  5 18:00:30 2017