- java.lang.Object
-
- spice.basic.DAS
-
- spice.basic.DLA
-
- 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 classSurfaceIntercept
.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 classesTriangularPlate
andTriangularPlateVertices
.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)
-
-
Method Summary
Modifier and Type Method Description Body[]
getBodies()
Get the set of Bodies covered by a DSK file.DSKDescriptor
getDSKDescriptor(DLADescriptor dladsc)
Get a DSKDescriptor for a specified DSK segment.The segment is identified by its DLA Descriptor.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
-
-
-
-
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)
andopenForWrite(java.lang.String)
.- Parameters:
filename
- String- Throws:
SpiceErrorException
- exception
-
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)
andopenForWrite(java.lang.String)
.- Parameters:
das
- DAS- Throws:
SpiceException
- exception
-
-
Method Detail
-
openForRead
public static DSK openForRead(java.lang.String filename) throws SpiceException
Open a DSK file for read access.- Parameters:
filename
- String- Returns:
- DSK
- Throws:
SpiceException
- exception
-
openForWrite
public static DSK openForWrite(java.lang.String filename) throws SpiceException
Open a DSK file for write access.- Parameters:
filename
- String- Returns:
- DSK
- Throws:
SpiceException
- exception
-
getDSKDescriptor
public DSKDescriptor getDSKDescriptor(DLADescriptor dladsc) throws SpiceException
Get a DSKDescriptor for a specified DSK segment.The segment is identified by its DLA Descriptor.- Parameters:
dladsc
- DLADescriptor- Returns:
- DSKDescriptor
- Throws:
SpiceException
- exception
-
getBodies
public Body[] getBodies() throws SpiceException
Get the set of Bodies covered by a DSK file.- Returns:
- Body[]
- Throws:
SpiceException
- exception
-
getSurfaces
public Surface[] getSurfaces(Body b) throws SpiceException
Get the set of Surfaces associated with a specified Body in a DSK file.- Parameters:
b
- Body- Returns:
- Surface[]
- Throws:
SpiceException
- exception
-
getTolerance
public static double getTolerance(DSKToleranceKey keyword) throws SpiceErrorException
Obtain the value of a DSK tolerance parameter.- Parameters:
keyword
- DSKToleranceKey- Returns:
- double
- Throws:
SpiceErrorException
- exception
-
setTolerance
public static void setTolerance(DSKToleranceKey keyword, double value) throws SpiceErrorException
Set the value of a DSK tolerance parameter.- Parameters:
keyword
- DSKToleranceKeyvalue
- double- Throws:
SpiceErrorException
- exception
-
-