JNISpice
version 2.0.0

spice.basic
Class PCK

java.lang.Object
  extended by spice.basic.DAF
      extended by spice.basic.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)


Field Summary
 
Fields inherited from class spice.basic.DAF
fileName, handle, internalFileName, ND, NI, readable, writable
 
Method Summary
 SpiceWindow getCoverage(int classID)
          Obtain a SpiceWindow representing the time coverage provided by this PCK for a given reference frame.
 SpiceWindow getCoverage(int classID, SpiceWindow cover)
          Return a SpiceWindow representing the union of a given SPICE coverage window with the time coverage provided by this PCK for a given object.
 int[] getFrameClassIDs()
          Obtain a set of frame class ID codes of body-fixed reference frames for which a PCK file contains data.
 int[] getFrameClassIDs(int[] initialSet)
          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.
static PCK openForRead(java.lang.String fileName)
          Open an existing PCK file for read access.
static PCK openNew(java.lang.String fileName, java.lang.String internalFileName, int nCommentChars)
          Create a new PCK file.
 void writeType02Segment(int clssid, ReferenceFrame baseFrame, Time first, Time last, java.lang.String segid, TDBDuration intlen, int n, int polydg, double[][][] ChebyCoeffs, Time btime)
          Write a type 2 segment to a PCK file.
 
Methods inherited from class spice.basic.DAF
addComments, beginBackwardSearch, beginForwardSearch, close, countSegments, deleteComments, findNextArray, findPreviousArray, getArrayName, getDoubleSummaryComponent, getFileName, getHandle, getIntegerSummaryComponent, getInternalFileName, getND, getNI, isReadable, isWritable, openForWrite, readComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.

Throws:
SpiceException

openForRead

public static PCK openForRead(java.lang.String fileName)
                       throws SpiceException
Open an existing PCK file for read access.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

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.

Throws:
SpiceException

JNISpice
version 2.0.0

JNISpice Alpha Test Version 2.0.0 28-JAN-2017 (NJB)