JNISpice
version 2.0.0

spice.basic
Class CK

java.lang.Object
  extended by spice.basic.DAF
      extended by spice.basic.CK

public class CK
extends DAF

Class CK provides methods for writing, summarizing, and conducting low-level read operations on CK files.

To make CK data available to programs for frame transformations, use the method KernelDatabase.load(java.lang.String).

Version 1.0.0 04-JAN-2010 (NJB)


Field Summary
 
Fields inherited from class spice.basic.DAF
fileName, handle, internalFileName, ND, NI, readable, writable
 
Method Summary
 int countSegments()
          Count the segments in an CK file.
 SpiceWindow getCoverage(Instrument instrument, boolean needav, java.lang.String level, SCLKDuration tol, TimeSystem timsys, int nintvls)
          Obtain a SpiceWindow representing the time coverage provided by this CK for a given instrument.
 SpiceWindow getCoverage(Instrument instrument, boolean needav, java.lang.String level, SCLKDuration tol, TimeSystem timsys, SpiceWindow cover, int nintvls)
          Obtain a SpiceWindow representing the time coverage provided by this CK for a given instrument; return the union of this window with a pre-existing coverage window.
 int[] getInstruments()
          Obtain a set of ID codes of objects for which an CK file contains data.
 int[] getInstruments(int[] initialSet)
          Obtain a set of ID codes of objects for which an CK file contains data, merged with an existing set of ID codes.
static CK openForRead(java.lang.String fileName)
          Open an existing CK file for read access.
static CK openForWrite(java.lang.String fileName)
          Open an existing CK for write access.
static CK openNew(java.lang.String fileName, java.lang.String internalFileName, int nCommentChars)
          Create a new CK file.
 void writeType02Segment(Time first, Time last, Instrument inst, ReferenceFrame frame, java.lang.String segid, Time[] startTimes, Time[] stopTimes, SpiceQuaternion[] quats, Vector3[] avvs, double[] rates)
          Write a type 2 segment to an CK file.
 void writeType03Segment(Time first, Time last, Instrument inst, ReferenceFrame frame, boolean avflag, java.lang.String segid, Time[] timeTags, SpiceQuaternion[] quats, Vector3[] avvs, Time[] startTimes)
          Write a type 3 segment to an CK file.
 
Methods inherited from class spice.basic.DAF
addComments, beginBackwardSearch, beginForwardSearch, close, deleteComments, findNextArray, findPreviousArray, getArrayName, getDoubleSummaryComponent, getFileName, getHandle, getIntegerSummaryComponent, getInternalFileName, getND, getNI, isReadable, isWritable, readComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openNew

public static CK openNew(java.lang.String fileName,
                         java.lang.String internalFileName,
                         int nCommentChars)
                  throws SpiceException
Create a new CK file. The file must not exist prior to this method call.

Throws:
SpiceException

openForRead

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

Throws:
SpiceException

openForWrite

public static CK openForWrite(java.lang.String fileName)
                       throws SpiceException
Open an existing CK for write access.

Note that a CK cannot be opened for write access if it has already been opened for read access.

Throws:
SpiceException

getInstruments

public int[] getInstruments()
                     throws SpiceException
Obtain a set of ID codes of objects for which an CK file contains data.

Throws:
SpiceException

getInstruments

public int[] getInstruments(int[] initialSet)
                     throws SpiceException
Obtain a set of ID codes of objects for which an CK 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(Instrument instrument,
                               boolean needav,
                               java.lang.String level,
                               SCLKDuration tol,
                               TimeSystem timsys,
                               int nintvls)
                        throws SpiceException
Obtain a SpiceWindow representing the time coverage provided by this CK for a given instrument.

Throws:
SpiceException

getCoverage

public SpiceWindow getCoverage(Instrument instrument,
                               boolean needav,
                               java.lang.String level,
                               SCLKDuration tol,
                               TimeSystem timsys,
                               SpiceWindow cover,
                               int nintvls)
                        throws SpiceException
Obtain a SpiceWindow representing the time coverage provided by this CK for a given instrument; return the union of this window with a pre-existing coverage window.

Note that the resulting window will be meaningful only if the input window is compatible with the requested coverage representation for this CK instance: specifically, the instruments, coverage levels, tolerances, time systems, and "need angular velocity" flags must match.

Throws:
SpiceException

writeType02Segment

public void writeType02Segment(Time first,
                               Time last,
                               Instrument inst,
                               ReferenceFrame frame,
                               java.lang.String segid,
                               Time[] startTimes,
                               Time[] stopTimes,
                               SpiceQuaternion[] quats,
                               Vector3[] avvs,
                               double[] rates)
                        throws SpiceException
Write a type 2 segment to an CK file.

Throws:
SpiceException

writeType03Segment

public void writeType03Segment(Time first,
                               Time last,
                               Instrument inst,
                               ReferenceFrame frame,
                               boolean avflag,
                               java.lang.String segid,
                               Time[] timeTags,
                               SpiceQuaternion[] quats,
                               Vector3[] avvs,
                               Time[] startTimes)
                        throws SpiceException
Write a type 3 segment to an CK file.

Throws:
SpiceException

countSegments

public int countSegments()
                  throws SpiceException
Count the segments in an CK file.

Overrides:
countSegments in class DAF
Throws:
SpiceException

JNISpice
version 2.0.0

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