spksfs |
Table of contents
ProcedureSPKSFS ( S/P Kernel, Select file and segment ) ENTRY SPKSFS ( BODY, ET, HANDLE, DESCR, IDENT, FOUND ) AbstractSearch through loaded SPK files to find the highest-priority segment applicable to the body and time specified and buffer searched segments in the process, to attempt to avoid re-reading files. Required_ReadingSPK KeywordsEPHEMERIS FILES DeclarationsINTEGER BODY DOUBLE PRECISION ET INTEGER HANDLE DOUBLE PRECISION DESCR ( * ) CHARACTER*(*) IDENT LOGICAL FOUND Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- BODY I Body ID. ET I Ephemeris time. HANDLE O Handle of file containing the applicable segment. DESCR O Descriptor of the applicable segment. IDENT O Identifier of the applicable segment. FOUND O Indicates whether or not a segment was found. Detailed_InputBODY is the NAIF integer code of an ephemeris object, typically a solar system body. ET is a time, in seconds past the epoch J2000 TDB. Detailed_OutputHANDLE is the handle of the SPK file containing a located segment. DESCR is the descriptor of a located segment. IDENT is the identifier of a located segment. FOUND is a logical flag indicating whether a requested segment was found or not. ParametersNone. Exceptions1) If an attempt is made to call SPKSFS when there aren't any files loaded, the error SPICE(NOLOADEDFILES) is signaled. 2) If an error occurs while this routine attempts to extract segment descriptors from loaded SPK files, the error is signaled by a routine in the call tree of this routine. Note however that I/O errors occurring during reads of DAF double precision records are NOT treated as SPICE errors and are not signaled. FilesAll SPK files loaded by FURNSH or SPKLEF are potential search targets for SPKSFS. ParticularsThis routine finds the highest-priority segment, in any loaded SPK file, such that the segment provides data for the specified body and epoch. ExamplesSee $Examples in SPKBSR. Restrictions1) If Fortran I/O errors occur while searching a loaded SPK file, the internal state of this suite of routines may be corrupted. It may be possible to correct the state by unloading the pertinent SPK files and then re-loading them. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) H.A. Neilan (JPL) W.L. Taber (JPL) R.E. Thurman (JPL) VersionSPICELIB Version 4.3.0, 13-OCT-2021 (JDR) (NJB) Edited the header to comply with NAIF standard. Improved $Abstract description. Relocated initialization of FOUND so it is always executed, even if an error state is indicated by RETURN(). Added entry #2 to $Exceptions section. Added reference to FURNSH routine in $Files section. SPICELIB Version 4.2.1, 15-MAR-2017 (NJB) Corrected various spelling errors within comments. SPICELIB Version 4.2.0, 01-MAR-2011 (NJB) Bug fix: In the SPKSFS 'MAKE ROOM' state, when the suspended activity is 'ADD TO FRONT' and no segment table room is available, the body table's pointer to the current segment list is now set to null. Previously the pointer was allowed to go stale. SPICELIB Version 4.1.0, 08-SEP-2005 (NJB) Updated to remove non-standard use of duplicate arguments in MOVED call. SPICELIB Version 4.0.0, 28-DEC-2001 (NJB) Bug fixes: 1) When a segment list is freed because the entire list is contributed by a single SPK file, and the list is too large to be buffered, the corresponding body table pointer is now set to null. 2) An algorithm change has eliminated a bug caused by not updating the current body index when body table entries having empty segment lists were compressed out of the body table. Previously the body table pointer BINDEX could go stale after the compression. 3) DAF calls are now followed by tests of FAILED() in order to ensure that the main state loop terminates. 4) A subscript bound violation in a loop termination test was corrected. The "re-use interval" feature was introduced to improve speed in the case where repeated, consecutive requests are satisfied by the same segment. The segment list cost algorithm was modified slightly: the contribution of a file search to the cost of a list is included only when the file search is completed. The cost of finding the re-use interval is accounted for when unbuffered searches are required. The file table size has been increased to 1000, in order to take advantage of the DAF system's new ability to load 1000 files. The body table size has been increased to 200 in order to decrease the chance of thrashing due to swapping segment lists for different bodies. Various small updates and corrections were made to the comments throughout the file. SPICELIB Version 3.0.0, 14-AUG-1995 (WLT) An interim fix to a bug in SPKBSR was made. The parameters STSIZE and BTSIZE were increased to be much larger than before (from 100 and 20 to 2000 and 40 respectively). This should keep the boundary errors experienced by Cassini users from occurring again. Version 4.0.0 with a real fix to the boundary problem should be installed in SPICELIB by October 1995 SPICELIB Version 1.1.1, 10-MAR-1992 (WLT) Comment section for permuted index source lines was added following the header. SPICELIB Version 1.1.0, 02-MAY-1990 (RET) New error detected. SPICELIB Version 1.0.1, 22-MAR-1990 (HAN) Literature references added to the header. SPICELIB Version 1.0.0, 31-JAN-1990 (RET) |
Fri Dec 31 18:36:55 2021