JNISpice
version 2.0.0

spice.basic
Class DSK

java.lang.Object
  extended by spice.basic.DAS
      extended by spice.basic.DLA
          extended by spice.basic.DSK
Direct Known Subclasses:
TestDSKProt

public class DSK
extends DLA

Class DSK supports segment-level access to DSK files; this class also provides methods to obtain DSK coverage information and to access DSK subsystem tolerance parameters.

Many SPICE-based user applications won't need to make direct use of the DSK class. A typical computation involving DSK data can be performed by loading one or more DSK files via KernelDatabase.load(java.lang.String) and then calling high-level computational methods, for example constructors of class SurfaceIntercept.

DSK segment list traversal methods are inherited from class DLA.

Methods specific to DSK data type 2 are provided in class CSPICE. Additional methods for computations involving triangular plates are provided in classes TriangularPlate and TriangularPlateVertices.

Version 3.0.0 09-JAN-2017 (NJB)

This class is now derived from the DLA class.

DSK descriptor parameters are now declared in class DSKDescriptor.

Data class parameter value SPHCLS was changed to SVFCLS. Data class parameter GENCLS was added.

DSK tolerance keyword parameters are now declared in class DSKToleranceKey.

The internal file name is no longer an instance field of this class.

Version 2.0.0 08-JUN-2014 (NJB)

Index parameters were changed from Fortran style (1-based)
to Java style (0-based).

Version 1.0.0 18-SEP-2010 (NJB)


Field Summary
 
Fields inherited from class spice.basic.DAS
fileName, handle, readable, writable
 
Constructor Summary
  DSK()
          No-arguments constructor.
  DSK(DAS das)
          Construct a DSK instance from a DAS instance.
protected DSK(java.lang.String filename)
          Construct a DSK instance representing a file.
 
Method Summary
 Body[] getBodies()
          Get the set of Bodies covered by a DSK file.
 DSKDescriptor getDSKDescriptor(DLADescriptor dladsc)
          Get a DSKDescriptor for a specified DSK segment.
 Surface[] getSurfaces(Body b)
          Get the set of Surfaces associated with a specified Body in a DSK file.
static double getTolerance(DSKToleranceKey keyword)
          Obtain the value of a DSK tolerance parameter.
static DSK openForRead(java.lang.String filename)
          Open a DSK file for read access.
static DSK openForWrite(java.lang.String filename)
          Open a DSK file for write access.
static void setTolerance(DSKToleranceKey keyword, double value)
          Set the value of a DSK tolerance parameter.
 
Methods inherited from class spice.basic.DLA
beginBackwardSearch, beginForwardSearch, getNext, getPrevious, getSegmentCount, hasNext, hasPrevious
 
Methods inherited from class spice.basic.DAS
addComments, close, deleteComments, getCommentCharacterCount, getCommentRecordCount, getFileName, getHandle, getInternalFileName, isReadable, isWritable, readComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSK

protected DSK(java.lang.String filename)
       throws SpiceErrorException
Construct a DSK instance representing a file. The file need not exist.

User applications will not need to call this constructor directly. See the methods openForRead(java.lang.String) and openForWrite(java.lang.String).

Throws:
SpiceErrorException

DSK

public DSK()
No-arguments constructor.


DSK

public DSK(DAS das)
    throws SpiceException
Construct a DSK instance from a DAS instance. This constructor creates a deep copy.

User applications usually will not need to call this constructor directly. See the methods openForRead(java.lang.String) and openForWrite(java.lang.String).

Throws:
SpiceException
Method Detail

openForRead

public static DSK openForRead(java.lang.String filename)
                       throws SpiceException
Open a DSK file for read access.

Throws:
SpiceException

openForWrite

public static DSK openForWrite(java.lang.String filename)
                        throws SpiceException
Open a DSK file for write access.

Throws:
SpiceException

getDSKDescriptor

public DSKDescriptor getDSKDescriptor(DLADescriptor dladsc)
                               throws SpiceException
Get a DSKDescriptor for a specified DSK segment. The segment is identified by its DLA Descriptor.

Throws:
SpiceException

getBodies

public Body[] getBodies()
                 throws SpiceException
Get the set of Bodies covered by a DSK file.

Throws:
SpiceException

getSurfaces

public Surface[] getSurfaces(Body b)
                      throws SpiceException
Get the set of Surfaces associated with a specified Body in a DSK file.

Throws:
SpiceException

getTolerance

public static double getTolerance(DSKToleranceKey keyword)
                           throws SpiceErrorException
Obtain the value of a DSK tolerance parameter.

Throws:
SpiceErrorException

setTolerance

public static void setTolerance(DSKToleranceKey keyword,
                                double value)
                         throws SpiceErrorException
Set the value of a DSK tolerance parameter.

Throws:
SpiceErrorException

JNISpice
version 2.0.0

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