frinfo_c |
Table of contents
Procedurefrinfo_c ( Frame Information ) void frinfo_c ( SpiceInt frcode, SpiceInt *cent, SpiceInt *frclss, SpiceInt *clssid, SpiceBoolean *found ) AbstractRetrieve the minimal attributes associated with a frame needed for converting transformations to and from it. Required_ReadingNone. KeywordsFRAMES Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- frcode I the idcode for some frame cent O the center of the frame frclss O the class (type) of the frame clssid O the idcode for the frame within its class. found O SPICETRUE if the requested information is available. Detailed_Inputfrcode is the ID code for some reference frame. Detailed_Outputcent is the body ID code for the center of the reference frame (if such an ID code is appropriate). frclss 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. found is SPICETRUE if cent, frclss and frcode are available. Otherwise, found is returned with the value SPICEFALSE. ParametersNone. Exceptions1) If a frame definition is encountered that does not define a central body for the frame, an error is signaled by a routine in the call tree of this routine. 2) If a frame definition is encountered that does not define a class for the frame, an error is signaled by a routine in the call tree of this routine. 3) If a frame definition is encountered that does not define a class ID for the frame, an error is signaled by a routine in the call tree of this routine. 4) If a kernel variable defining a frame name is found, but that variable has dimension greater than 1, the error SPICE(INVALIDDIMENSION) is signaled by a routine in the call tree of this routine. FilesNone. ParticularsThis is a low level routine needed by state transformation software to transform states and attitudes between different reference frames. The routine first examines local "hard-coded" information about reference frames to see if the requested frame belongs to this set. If it does that information is returned. If the requested information is not stored locally, the routine then examines the kernel pool to see if the requested information is stored there. If it is and has the expected format, the data is retrieved and returned. ExamplesThe 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) Given a frame ID, retrieve the SPICE body ID associated with the frame's center, the frame class (or type of the frame), and the ID used for the frame within its class. Example code begins here. /. Program frinfo_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local constants. ./ SpiceInt frcode = 13000; /. Local variables. ./ SpiceBoolean found; SpiceInt cent; SpiceInt clssid; SpiceInt frclss; /. Retrieve the information for frame ID 13000. ./ frinfo_c ( frcode, ¢, &frclss, &clssid, &found ); if ( found ) { printf ( "Frame center : %d\n", (int)cent ); printf ( "Frame class : %d\n", (int)frclss ); printf ( "Frame class ID: %d\n", (int)clssid ); } else { printf ( "There is insufficient data for frame %d\n", (int)frcode ); } return ( 0 ); } When this program was executed on a Mac/Intel/cc/64-bit platform, the output was: Frame center : 399 Frame class : 2 Frame class ID: 3000 RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) Version-CSPICE Version 1.2.1, 02-AUG-2021 (JDR) Edited the header to comply with NAIF standard. Added complete code example. Added -Exceptions section. -CSPICE Version 1.2.0, 22-JUL-1999 (NJB) Now uses logical local variable for found flag. -CSPICE Version 1.1.0, 16-MAY-1999 (NJB) Changed name of argument "class" to frclss for C++ compatibility. -CSPICE Version 1.0.0, 21-JUN-1998 (NJB) (WLT) Based on SPICELIB Version 3.0.0, 03-JUN-1997 (WLT) Index_EntriesFetch reference frame attributes |
Fri Dec 31 18:41:06 2021