Index Page
ccifrm
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
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

 CCIFRM ( frame Class and Class Id to FRaMe id and name )
 
      ENTRY CCIFRM ( CLASS, CLSSID, FRCODE, FRNAME, CENT, FOUND )
 

Abstract

     Return the frame name, frame ID, and center associated with
     a given frame class and class ID.

Required_Reading

     FRAMES

Keywords

     FRAMES

Declarations

     INTEGER               CLASS
     INTEGER               CLSSID
     INTEGER               FRCODE
     CHARACTER*(*)         FRNAME
     INTEGER               CENT
     LOGICAL               FOUND

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     CLASS      I   Class of frame.
     CLSSID     I   Class ID of frame.
     FRCODE     O   ID code of the frame identified by CLASS, CLSSID.
     FRNAME     O   Name of the frame identified by CLASS, CLSSID.
     CENT       O   Center of the frame identified by CLASS, CLSSID.
     FOUND      O   TRUE if the requested information is available.

Detailed_Input

     CLASS       is the class or type of the frame. This identifies
                 which subsystem will be used to perform frame
                 transformations.

     CLSSID      is the ID code used for the frame within its class.
                 This may be different from the frame ID code.

Detailed_Output

     FRCODE      is the frame ID code for the reference frame 
                 identified by CLASS and CLSSID.

     FRNAME      is the name of the frame identified by CLASS and
                 CLSSID. FRNAME should be declared as CHARACTER*(26)
                 to ensure that it can contain the full name of the
                 frame. If FRNAME does not have enough room to hold
                 the full name of the frame, the name will be
                 truncated on the right.

     CENT        is the body ID code for the center of the reference
                 frame identified by CLASS and CLSSID.

     FOUND       is .TRUE. if FRCODE, FRNAME, and CENT are available.
                 Otherwise, FOUND is returned with the value .FALSE.

Parameters

     None.

Exceptions

     1) This routine assumes that the first frame found with matching
        class and class ID is the correct one. SPICE's frame system
        does not diagnose the situation where there are multiple,
        distinct frames with matching classes and class ID codes, but
        this situation could occur if such conflicting frame
        specifications are loaded via one or more frame kernels. The
        user is responsible for avoiding such frame specification
        conflicts.

     2) If FRNAME does not have room to contain the frame name, the
        name will be truncated on the right. ( Declaring FRNAME to be
        CHARACTER*(26) will ensure that the name will not be
        truncated.

     3) If a frame class assignment is found that associates a 
        string (as opposed to numeric) value with a frame class
        keyword, the error SPICE(INVALIDFRAMEDEF) will be signaled.

     4) If a frame class assignment is found that matches the input
        class, but a corresponding class ID assignment is not
        found in the kernel pool, the error SPICE(INVALIDFRAMEDEF) 
        will be signaled.

     5) If a frame specification is found in the kernel pool with
        matching frame class and class ID, but either the frame name
        or frame ID code are not found, the error
        SPICE(INVALIDFRAMEDEF) will be signaled.

     6) If a frame specification is found in the kernel pool with
        matching frame class and class ID, but the frame center
        is not found, the error will be diagnosed by routines
        in the call tree of this routine.

Files

     None.

Particulars

     This routine allows the user to determine the frame associated
     with a given frame class and class ID code. The built-in frame
     list is searched first for a matching frame; if no match is
     found, then the kernel POOL is searched.

     Since the neither the frame class nor the class ID are primary
     keys, searching for matching frames is a linear (and therefore
     typically slow) process.

Examples

     Suppose that you want to find the name of a frame associated 
     with a PCK class ID, such as that found in a binary PCK.
     One could use the following code fragment:

        CALL CCIFRM ( 2, CLSSID, FRCODE, FRNAME, CENT, FOUND )

        IF ( .NOT. FOUND ) THEN

           WRITE (*,*) 'The PCK frame for class ID ', CLSSID
           WRITE (*,*) 'could not be identified.'
           STOP

        END IF

        WRITE (*,*) 'The PCK frame having class ID ', CLSSID, ' is '
        WRITE (*,*) FRNAME

Restrictions

     See item (1) in the Exceptions section above.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman    (JPL)
     B.V. Semenov    (JPL)

Version

    SPICELIB Version 1.1.1, 02-FEB-2017 (BVS) 

        Shortened one of permutted index entries.

    SPICELIB Version 1.1.0, 08-AUG-2012 (BVS) 

        The routine was updated to be more efficient by using hashes
        instead kernel POOL look-ups for kernel POOL frames and by
        using hases instead of ordered array searches for built-in
        frames.

        Bux fix: CCIFRM logic was corrected to examine the built-in
        frames before looking at the kernel POOL frames.

    SPICELIB Version 1.0.0, 05-NOV-2007 (NJB)
Wed Apr  5 17:46:04 2017