CSPICE_DSKB02 return bookkeeping data from a DSK type 2 segment.
For important details concerning this module's function, please refer to
the CSPICE routine dskb02_c.
handle the handle of a DSK file containing a type 2
segment from which data are to be fetched.
dladsc the DLA descriptor associated with the segment
from which data are to be fetched.
cspice_dskb02, handle, dladsc, nv, np, nvxtot, vtxbds, voxsiz, $
voxori, vgrext, cgscal, vtxnpl, voxnpt, voxnpl
nv the number of vertices belonging to the specified plate
np the number of plates belonging to the specified plate
nvxtot Total number of voxels in fine grid.
vtxbds Vertex bounds. This is an array of six values giving
the minimum and maximum values of each component of
the vertex set. Units are km.
voxsiz Fine grid voxel size. DSK voxels are cubes; the edge
length of each cube is given by the voxel size. This
size applies to the fine voxel grid. Units are km.
voxori Voxel grid origin. This is the location of the voxel
grid origin in the body-fixed frame associated with
the target body. Units are km.
vgrext Voxel grid extent. This extent is an array of three
integers indicating the number of voxels in the X, Y, and
Z directions in the fine voxel grid.
cgscal Coarse voxel grid scale. The extent of the fine voxel
grid is related to the extent of the coarse voxel grid by
this scale factor.
vtxnpl Vertex-plate correspondence list size.
voxnpt Size of the voxel-to-plate pointer list.
voxnpl Voxel-plate correspondence list size.
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Dump several parameters from the first DLA segment of
a DSK file. The segment is assumed to be of type 2.
PRO DSKB02_T, dsk
;; Open the DSK file for read access. We use the
;; DAS-level interface for this function.
cspice_dasopr, dsk, handle
;; Begin a forward search through the kernel. In
;; this example, it's a very short search.
cspice_dlabfs, handle, dladsc, found
if ( ~found ) then begin
message, 'SPICE(NOSEGMENT): No segment found in file '+ dsk
while ( found ) do begin
;; If we made it this far, DLADSC is the
;; DLA descriptor of the first segment.
;; Read and display type 2 bookkeeping data.
cspice_dskb02, handle, dladsc, nv, np, nvxtot, $
vtxbds, voxsiz, voxori, vgrext, $
cgscal, vtxnpl, voxnpt, voxnpl
print, 'Number of vertices: ', nv
print, 'Number of plates: ', np
print, 'Number of voxels: ', nvxtot
print, 'Vertex bounds in X direction (km): ', vtxbds[*,0]
print, 'Vertex bounds in Y direction (km): ', vtxbds[*,1]
print, 'Vertex bounds in Z direction (km): ', vtxbds[*,2]
print, 'Voxel edge length (km): ', voxsiz
print, 'Voxel grid origin (km): ', voxori
print, 'Voxel grid extents: ', vgrext
print, 'Coarse voxel grid scale: ', cgscal
print, 'Size of vertex-plate list: ', vtxnpl
print, 'Size of voxel-plate pointer array: ', voxnpt
print, 'Size of voxel-plate list: ', voxnpl
;; Search for the segment after that described by 'dladsc'.
;; 'found' returns as false if no such segment located.
cspice_dlafns, handle, dladsc, nxtdsc, found
dladsc = nxtdsc
;; Close the kernel. This frees program and system resources.
IDL> dskb02_t, 'phobos512.bds'
Number of vertices: 1579014
Number of plates: 3145728
Number of voxels: 11914500
Vertex bounds in X direction (km): -13.440030 12.762800
Vertex bounds in Y direction (km): -11.520650 12.061140
Vertex bounds in Z direction (km): -9.5707800 10.055000
Voxel edge length (km): 0.10424830
Voxel grid origin (km): -14.073520 -11.988554 -9.9035881
Voxel grid extents: 260 235 195
Coarse voxel grid scale: 5
Size of vertex-plate list: 11010050
Size of voxel-plate pointer array: 1151500
Size of voxel-plate list: 6419540
This routine supports computations involving bookkeeping information
stored in DSK type 2 segments. User applications typically will not
need to call this routine.
DSK files are built using the DLA low-level format and the DAS
architecture; DLA files are a specialized type of DAS file in which
data are organized as a doubly linked list of segments. Each
segment's data belong to contiguous components of character, double
precision, and integer type.
-Icy Version 1.0.0, 13-DEC-2016, ML (JPL), EDW (JPL)
fetch parameters from a type 2 dsk segment