spkr08 |
Table of contents
ProcedureSPKR08 ( Read SPK record from segment, type 8 ) SUBROUTINE SPKR08 ( HANDLE, DESCR, ET, RECORD ) AbstractRead a single SPK data record from a segment of type 8 (equally spaced discrete states, interpolated by Lagrange polynomials). Required_ReadingSPK TIME KeywordsEPHEMERIS DeclarationsIMPLICIT NONE INTEGER HANDLE DOUBLE PRECISION DESCR ( 5 ) DOUBLE PRECISION ET DOUBLE PRECISION RECORD ( * ) Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- HANDLE I File handle. DESCR I Segment descriptor. ET I Target epoch. RECORD O Data record. Detailed_InputHANDLE, DESCR are the file handle and segment descriptor for a SPK segment of type 8. ET is a target epoch, for which a data record from a specific segment is required. Detailed_OutputRECORD is a set of data from the specified segment which, when evaluated at epoch ET, will give the state (position and velocity) of some body, relative to some center, in some inertial reference frame. The structure of the record is as follows: +----------------------+ | number of states (n) | +----------------------+ | start epoch | +----------------------+ | step size | +----------------------+ | state 1 (6 elts.) | +----------------------+ | state 2 (6 elts.) | +----------------------+ . . . +----------------------+ | state n (6 elts.) | +----------------------+ ParametersNone. ExceptionsThis routine follows the pattern established in the lower-numbered SPK data type readers of not explicitly performing error diagnoses. Exceptions are listed below nonetheless. 1) If the input HANDLE does not designate a loaded SPK file, an error is signaled by a routine in the call tree of this routine. 2) If the segment specified by DESCR is not of data type 08, the error SPICE(WRONGSPKTYPE) is signaled. 3) If the input ET value is not within the range specified in the segment descriptor, the error SPICE(TIMEOUTOFBOUNDS) is signaled. FilesSee argument HANDLE. ParticularsSee the SPK Required Reading file for a description of the structure of a data type 8 segment. ExamplesThe data returned by the SPKRnn routine is in its rawest form, taken directly from the segment. As such, it will be meaningless to a user unless he/she understands the structure of the data type completely. Given that understanding, however, the SPKRxx routines might be used to "dump" and check segment data for a particular epoch. C C Get a segment applicable to a specified body and epoch. C CALL SPKSFS ( BODY, ET, HANDLE, DESCR, IDENT, FOUND ) C C Look at parts of the descriptor. C CALL DAFUS ( DESCR, 2, 6, DCD, ICD ) CENTER = ICD( 2 ) REF = ICD( 3 ) TYPE = ICD( 4 ) IF ( TYPE .EQ. 8 ) THEN CALL SPKR08 ( HANDLE, DESCR, ET, RECORD ) . . Look at the RECORD data. . END IF Restrictions1) Correctness of inputs must be ensured by the caller of this routine. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) E.D. Wright (JPL) VersionSPICELIB Version 2.1.1, 12-AUG-2021 (JDR) Edited the header to comply with NAIF standard. SPICELIB Version 2.1.0, 07-SEP-2001 (EDW) Replaced DAFRDA call with DAFGDA. Added IMPLICIT NONE. SPICELIB Version 2.0.0, 06-NOV-1999 (NJB) Data type check was relaxed to enable reading type 12 segments. SPICELIB Version 1.0.1, 24-OCT-1994 (NJB) In-line comment concerning transpose of state data was removed. SPICELIB Version 1.0.0, 14-AUG-1993 (NJB) |
Fri Dec 31 18:36:53 2021