Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
cspice_dskb02

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_DSKB02 returns bookkeeping data from a DSK type 2 segment.

I/O


   Given:

      handle   the handle of a DSK file containing a type 2 segment from which
               data are to be fetched.

               help, handle
                  LONG = Scalar

      dladsc   the DLA descriptor associated with the segment from which data
               are to be fetched.

               help, dladsc
                  LONG = Array[SPICE_DLA_DSCSIZ]

   the call:

      cspice_dskb02, handle, dladsc, nv,     np,     nvxtot, vtxbds,         $
                     voxsiz, voxori, vgrext, cgscal, vtxnpl, voxnpt,         $
                     voxnpl

   returns:

      nv       the number of vertices in model.

               help, nv
                  LONG = Scalar

      np       the number of plates in model.

               help, np
                  LONG = Scalar

      nvxtot   the total number of voxels in fine grid.

               help, nvxtot
                  LONG = Scalar

      vtxbds   the vertex bounds.

               help, vtxbds
                  DOUBLE = Array[2,3]

               This is an array of six values giving the minimum and maximum
               values of each component of the vertex set. Units are km.

      voxsiz   the fine grid voxel size.

               help, voxsiz
                  DOUBLE = Scalar

               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   the voxel grid origin.

               help, voxori
                  DOUBLE = Array[3]

               This is the location of the voxel grid origin in the body-fixed
               frame associated with the target body. Units are km.

      vgrext   the voxel grid extent.

               help, vgrext
                  LONG = Array[3]

               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   the coarse voxel grid scale.

               help, cgscal
                  LONG = Scalar

               The extent of the fine voxel grid is related to the extent of
               the coarse voxel grid by this scale factor.

      vtxnpl   the vertex-plate correspondence list size.

               help, vtxnpl
                  LONG = Scalar

      voxnpt   the size of the voxel-to-plate pointer list.

               help, voxnpt
                  LONG = Scalar

      voxnpl   the voxel-plate correspondence list size.

               help, voxnpl
                  LONG = Scalar

Parameters


   See the parameter definitions file

      IcyDLA.pro

   for declarations of DLA descriptor sizes and documentation of the
   contents of DLA descriptors.

   See the parameter definitions file

      IcyDSK.pro

   for declarations of DSK descriptor sizes and documentation of the
   contents of DSK descriptors.

   See the parameter definitions file

      IcyDSK.pro

   for declarations of DSK data type 2 (plate model) parameters.

Examples


   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.

   1) Dump several parameters from the first DLA segment of
      a DSK file. The segment is assumed to be of type 2.

      Example code begins here.


      PRO dskb02_ex1

         ;;
         ;; Local variables
         ;;
         dsk = ''

         ;;
         ;;  Prompt for the name of the file to search.
         ;;
         read, dsk, PROMPT='Enter name of DSK file > '

         ;;
         ;; 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

         endif

         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, FORMAT='(A,I8)', $
                   'Number of vertices:                 ', nv
            print, FORMAT='(A,I8)', $
                   'Number of plates:                   ', np
            print, FORMAT='(A,I8)', $
                   'Number of voxels:                   ', nvxtot
            print, FORMAT='(A,2F12.6)', $
                   'Vertex bounds in X direction (km):  ', vtxbds[*,0]
            print, FORMAT='(A,2F12.6)', $
                   'Vertex bounds in Y direction (km):  ', vtxbds[*,1]
            print, FORMAT='(A,2F12.6)', $
                   'Vertex bounds in Z direction (km):  ', vtxbds[*,2]
            print, FORMAT='(A,F12.6)', $
                   'Voxel edge length (km):             ', voxsiz
            print, FORMAT='(A,3F12.6)', $
                   'Voxel grid origin (km):             ', voxori
            print, FORMAT='(A,3I12)', $
                   'Voxel grid extents:                 ', vgrext
            print, FORMAT='(A,I8)', $
                   'Coarse voxel grid scale:            ', cgscal
            print, FORMAT='(A,I8)', $
                   'Size of vertex-plate list:          ', vtxnpl
            print, FORMAT='(A,I8)', $
                   'Size of voxel-plate pointer array:  ', voxnpt
            print, FORMAT='(A,I8)', $
                   'Size of voxel-plate list:           ', voxnpl
            print

            ;;
            ;; 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

         endwhile


         ;;
         ;; Close the kernel. This frees program and system resources.
         ;;
         cspice_dascls, handle

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, using the DSK file named phobos512.bds, the output
      was:


      Enter name of DSK file > 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.570780   10.055000
      Voxel edge length (km):                 0.104248
      Voxel grid origin (km):               -14.073520  -11.988554   -9.903588
      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


Particulars


   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.

Exceptions


   1)  If the input handle is invalid, an error is signaled by a
       routine in the call tree of this routine.

   2)  If a file read error occurs, the error is signaled by a
       routine in the call tree of this routine.

   3)  If the input DLA descriptor is invalid, the effect of this
       routine is undefined. The error *may* be diagnosed by
       routines in the call tree of this routine, but there are no
       guarantees.

   4)  If any of the input arguments, `handle' or `dladsc', is
       undefined, an error is signaled by the IDL error handling
       system.

   5)  If any of the input arguments, `handle' or `dladsc', is not of
       the expected type, or it does not have the expected dimensions
       and size, an error is signaled by the Icy interface.

   6)  If any of the output arguments, `nv', `np', `nvxtot',
       `vtxbds', `voxsiz', `voxori', `vgrext', `cgscal', `vtxnpl',
       `voxnpt' or `voxnpl', is not a named variable, an error is
       signaled by the Icy interface.

Files


   See input argument `handle'.

Restrictions


   1)  The caller must verify that the segment associated with
       the input DLA descriptor is a DSK type 2 segment.

Required_Reading


   DAS.REQ
   DSK.REQ
   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   M. Liukis           (JPL)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.1, 31-MAY-2021 (JDR)

       Edited the header to comply with NAIF standard. Updated
       code example to prompt for the input DSK file and reformatted
       example's output.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.0, 13-DEC-2016 (ML) (EDW)

Index_Entries


   fetch parameters from a type 2 DSK segment



Fri Dec 31 18:43:03 2021