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
cspice_bltfrm

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_BLTFRM returns a SPICE set containing the frame IDs of all built-in
   frames of a specified class.

I/O


   Given:

      frmcls   an integer code specifying the frame class or classes for which
               built-in frame ID codes are requested.

               help, frmcls
                  LONG = Scalar

               `frmcls' may designate a single class or "all classes."

               The Icy parameter definitions file IcyFrm.pro declares
               parameters identifying frame classes. The supported values
               and corresponding meanings of `frmcls' are

                  Parameter            Value    Meaning
                  ===================  =====    ==================
                  SPICE_FRMTYP_ALL       -1     All frame classes.
                  SPICE_FRMTYP_INERTL     1     Built-in inertial.
                  SPICE_FRMTYP_PCK        2     PCK-based frame.
                  SPICE_FRMTYP_CK         3     CK-based frame.
                  SPICE_FRMTYP_TK         4     Fixed offset ("text
                                                kernel") frame.
                  SPICE_FRMTYP_DYN        5     Dynamic frame.
                  SPICE_FRMTYP_SWTCH      6     Switch frame.

   the call:

      cspice_bltfrm, frmcls, idset

   returns:

      idset    a SPICE set containing the ID codes of all built-in reference
               frames of the specified class or classes.

               help, idset
                  STRUCT = cspice_celli(N)

               The user must create `idset' using cspice_celli.

               If `idset' is non-empty on input, its contents will be
               discarded.

Parameters


   See the Icy parameter definitions file IcyFrm.pro.

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.

   1) Display the IDs and names of all SPICE built-in frames.
      Group the outputs by frame class. Also fetch and display
      the entire set of IDs and names using the parameter
      SPICE_FRMTYP_ALL.


      Example code begins here.


      PRO bltfrm_ex1

         ;;
         ;; IcyUser is a file that makes certain variables global.
         ;; You must call IcyUser to have access to the parameters used
         ;; in this example.
         ;;
         ;; To use the variables in IcyUser, add the 'src/icy' directory
         ;; to your IDL path by doing the following in which /path/to is the
         ;; local path to Icy.
         ;;
         ;;    pref_set, 'IDL_PATH', '/path/to/icy/src/icy:<IDL_DEFAULT>', $
         ;;                           /COMMIT
         ;;
         @IcyUser

         ;;
         ;; Local parameters
         ;;
         NFRAME = ( SPICE_NFRAME_NINERT + SPICE_NFRAME_NNINRT )

         ;;
         ;; Local variables
         ;;
         idset = cspice_celli( NFRAME )

         ;;
         ;; Get the Toolkit version number and display it.
         ;;
         print, 'Toolkit version: ' + cspice_tkvrsn( 'TOOLKIT' )

         ;;
         ;; Fetch and display the frames of each class.
         ;;
         for i=1, 7 do begin

            if ( i lt 7 ) then begin

               ;;
               ;; Fetch the frames of class i.
               ;;
               cspice_bltfrm, i, idset

               outlin = STRING( format='(%"Number of frames of ' +           $
                                       'class %d: %d")', i,                  $
                                       cspice_card( idset ) )

            endif else begin

               ;;
               ;; Fetch IDs of all built-in frames.
               ;;
               cspice_bltfrm, SPICE_FRMTYP_ALL, idset

               outlin = STRING( format='(%"Number of built-in ' +            $
                                       'frames: %d")',                       $
                                       cspice_card( idset ) )

            endelse

            ;;
            ;; Display the NAIF ID and name of a maximum of 5 frames
            ;; per family.
            ;;
            print, ''
            print, outlin
            print, '   Frame IDs and names'

            nfrms = min( [ 5, cspice_card( idset ) ] )

            for j=0, nfrms - 1L do begin

               cspice_frmnam, idset.base[ idset.data + j ], frname
               print, format='(I12,3X,A)', idset.base[ idset.data + j ],     $
                                           frname

            endfor

         endfor

      END


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


      Toolkit version: CSPICE_N0067

      Number of frames of class 1: 21
         Frame IDs and names
                 1   J2000
                 2   B1950
                 3   FK4
                 4   DE-118
                 5   DE-96

      Number of frames of class 2: 105
         Frame IDs and names
             10001   IAU_MERCURY_BARYCENTER
             10002   IAU_VENUS_BARYCENTER
             10003   IAU_EARTH_BARYCENTER
             10004   IAU_MARS_BARYCENTER
             10005   IAU_JUPITER_BARYCENTER

      Number of frames of class 3: 0
         Frame IDs and names

      Number of frames of class 4: 1
         Frame IDs and names
             10081   EARTH_FIXED

      Number of frames of class 5: 0
         Frame IDs and names

      Number of frames of class 6: 0
         Frame IDs and names

      Number of built-in frames: 145
         Frame IDs and names
                 1   J2000
                 2   B1950
                 3   FK4
                 4   DE-118
                 5   DE-96


      Note that the set of built-in frames, particularly the
      non-inertial ones, will grow over time, so the output
      shown here may be out of sync with that produced by a
      current SPICE Toolkit. Only the first 5 frames of each
      family are presented in the output.

Particulars


   This routine has a counterpart

      cspice_kplfrm

   which fetches the frame IDs of all frames specified in the kernel
   pool.

Exceptions


   1)  If the input frame class argument is not defined in IcyFrm.pro,
       the error SPICE(BADFRAMECLASS) is signaled by a routine in the
       call tree of this routine.

   2)  If the size of `idset' is too small to hold the requested frame
       ID set, the error SPICE(SETTOOSMALL) is signaled by a routine
       in the call tree of this routine.

   3)  If any of the input arguments, `frmcls' or `idset', is
       undefined, an error is signaled by the IDL error handling
       system.

   4)  If any of the input arguments, `frmcls' or `idset', is not of
       the expected type, or it does not have the expected dimensions
       and size, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   FRAMES.REQ
   ICY.REQ
   NAIF_IDS.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)

Version


   -Icy Version 1.0.0, 26-AUG-2021 (JDR)

Index_Entries


   fetch IDs of built-in reference frames



Fri Dec 31 18:43:02 2021