- java.lang.Object
-
- spice.basic.DAF
-
- 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)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PCK(java.lang.String fileName)
Construct an PCK instance representing a file.
-
Method Summary
Modifier and Type Method Description 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.private void
openNew(java.lang.String internalFileName, int nCommentChars)
Open a new PCK file.static PCK
openNew(java.lang.String fileName, java.lang.String internalFileName, int nCommentChars)
Create a new PCK file.The file must not exist prior to this method call.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
-
-
-
-
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
- StringnCommentChars
- intinternalFileName
- 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
- intcover
- 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
- intbtime
- TimebaseFrame
- ReferenceFrameChebyCoeffs
- double[][][]first
- Timepolydg
- intlast
- Timen
- intsegid
- Stringintlen
- TDBDuration- Throws:
SpiceException
- exception
-
-