Module JNISpice
Package spice.basic

Class PCK


  • public class PCK
    extends DAF
    Class PCK provides methods for writing, summarizing, and conducting low-level read operations on PCK files.

    To make PCK data available to programs for state or position transformation computations, use the method KernelDatabase.load(java.lang.String).

    State or position transformation matrices, which may rely on PCK data for their construction, are normally computed via methods of the class ReferenceFrame.

    Note that the "frame class ID" argument occurring in some of the calling sequences of methods of this class is referred to as a "body" or "body ID" in older SPICE documentation. The new terminology is more accurate, since the ID code is not necessarily that of a body. In all cases the ID designates a reference frame of the PCK class.

    Version 1.0.0 20-DEC-2016 (NJB)

    • Constructor Detail

      • PCK

        private PCK​(java.lang.String fileName)
        Construct an PCK instance representing a file. The file need not exist.
    • Method Detail

      • openNew

        private void openNew​(java.lang.String internalFileName,
                             int nCommentChars)
                      throws SpiceException
        Open a new PCK file. The file must not exist prior to this method call.
        Throws:
        SpiceException
      • openNew

        public static PCK openNew​(java.lang.String fileName,
                                  java.lang.String internalFileName,
                                  int nCommentChars)
                           throws SpiceException
        Create a new PCK file.The file must not exist prior to this method call.
        Parameters:
        fileName - String
        nCommentChars - int
        internalFileName - String
        Returns:
        PCK
        Throws:
        SpiceException - exception
      • openForRead

        public static PCK openForRead​(java.lang.String fileName)
                               throws SpiceException
        Open an existing PCK file for read access.
        Parameters:
        fileName - String
        Returns:
        PCK
        Throws:
        SpiceException - exception
      • getFrameClassIDs

        public int[] getFrameClassIDs()
                               throws SpiceException
        Obtain a set of frame class ID codes of body-fixed reference frames for which a PCK file contains data.
        Returns:
        int[]
        Throws:
        SpiceException - exception
      • getFrameClassIDs

        public int[] getFrameClassIDs​(int[] initialSet)
                               throws SpiceException
        Obtain a set of frame class ID codes of frames for which a PCK file contains data, merged with an existing set of ID codes.

        The result is returned in a new set.

        Parameters:
        initialSet - int[]
        Returns:
        int[]
        Throws:
        SpiceException - exception
      • getCoverage

        public SpiceWindow getCoverage​(int classID)
                                throws SpiceException
        Obtain a SpiceWindow representing the time coverage provided by this PCK for a given reference frame.

        The returned window contains times expressed as seconds past J2000 TDB.

        Parameters:
        classID - int
        Returns:
        SpiceWindow
        Throws:
        SpiceException - exception
      • getCoverage

        public SpiceWindow getCoverage​(int classID,
                                       SpiceWindow cover)
                                throws SpiceException
        Return a SpiceWindow representing the union of a given SPICE coverage window with the time coverage provided by this PCK for a given object.

        The returned window contains times expressed as seconds past J2000 TDB.

        Parameters:
        classID - int
        cover - SpiceWindow
        Returns:
        SpiceWindow
        Throws:
        SpiceException - exception
      • writeType02Segment

        public void writeType02Segment​(int clssid,
                                       ReferenceFrame baseFrame,
                                       Time first,
                                       Time last,
                                       java.lang.String segid,
                                       TDBDuration intlen,
                                       int n,
                                       int polydg,
                                       double[][][] ChebyCoeffs,
                                       Time btime)
                                throws SpiceException
        Write a type 2 segment to a PCK file.
        Parameters:
        clssid - int
        btime - Time
        baseFrame - ReferenceFrame
        ChebyCoeffs - double[][][]
        first - Time
        polydg - int
        last - Time
        n - int
        segid - String
        intlen - TDBDuration
        Throws:
        SpiceException - exception