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
spkr19

Table of contents
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

     SPKR19 ( SPK, read record from segment, type 19 )

     SUBROUTINE SPKR19 ( HANDLE, DESCR, ET, RECORD )

Abstract

     Read a single SPK data record from a segment of type 19
     (ESOC/DDID Piecewise Interpolation).

Required_Reading

     SPK

Keywords

     EPHEMERIS

Declarations

     IMPLICIT NONE

     INCLUDE 'spk19.inc'
     INCLUDE 'spkrec.inc'

     INTEGER               HANDLE
     DOUBLE PRECISION      DESCR    ( 5 )
     DOUBLE PRECISION      ET
     DOUBLE PRECISION      RECORD   ( * )

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     HANDLE     I   File handle.
     DESCR      I   Segment descriptor.
     ET         I   Target epoch.
     RECORD     O   Data record.

Detailed_Input

     HANDLE,
     DESCR    are the file handle and segment descriptor for an SPK
              segment of type 19. The SPK file designated by HANDLE
              must be open for read access.

     ET       is an epoch for which a data record from a specific
              segment is required. ET is expressed as seconds past
              J2000 TDB.

Detailed_Output

     RECORD   is an array of data from the specified segment which,
              when evaluated at epoch ET, will give the state
              (position and velocity) of the target body identified
              by the input segment descriptor. The descriptor
              specifies the center of motion and reference frame of
              the state.

              The structure of the record is as follows:

                 +----------------------+
                 | subtype code         |
                 +----------------------+
                 | number of packets (n)|
                 +----------------------+
                 | packet 1             |
                 +----------------------+
                 | packet 2             |
                 +----------------------+
                             .
                             .
                             .
                 +----------------------+
                 | packet n             |
                 +----------------------+
                 | epochs 1--n          |
                 +----------------------+

              The packet size is a function of the type 19 subtype.
              All packets in a record have the same size.

Parameters

     See the Fortran INCLUDE file spk19.inc.

Exceptions

     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 19,
         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.

     4)  If the window size is non-positive or greater than the
         maximum allowed value, the error SPICE(INVALIDVALUE) is
         signaled.

     5)  If the window size is not compatible with the segment
         subtype, the error SPICE(INVALIDVALUE) is signaled.

     6)  If the segment subtype is not recognized, the error
         SPICE(NOTSUPPORTED) is signaled.

Files

     See argument HANDLE.

Particulars

     SPICE user applications normally will have no need to call this
     routine directly. For further information, see the headers of the
     SPICE SPK APIs

        SPKEZR
        SPKPOS

     the SPK Required Reading file spk.req, and the SPICE SPK
     tutorial.

     See the SPK Required Reading file for a description of the
     structure of a data type 19 segment.

Examples

     The 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. 19 ) THEN
              CALL SPKR19 ( HANDLE, DESCR, ET, RECORD )
                  .
                  .  Look at the RECORD data.
                  .
           END IF

Restrictions

     1)  Correctness of inputs must be ensured by the caller of
         this routine.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman       (JPL)
     J. Diaz del Rio    (ODC Space)
     B.V. Semenov       (JPL)

Version

    SPICELIB Version 2.0.1, 12-AUG-2021 (JDR)

        Edited the header to comply with NAIF standard.

    SPICELIB Version 2.0.0, 11-MAY-2015 (NJB)

        Updated to support subtype 2.

    SPICELIB Version 1.0.0, 14-MAR-2014 (NJB) (BVS)
Fri Dec 31 18:36:54 2021