dskrb2_c |

## Procedurevoid dskrb2_c ( SpiceInt nv, ConstSpiceDouble vrtces[][3], SpiceInt np, ConstSpiceInt plates[][3], SpiceInt corsys, ConstSpiceDouble corpar[], SpiceDouble * mncor3, SpiceDouble * mxcor3 ) ## AbstractDetermine range bounds for a set of triangular plates to be stored in a type 2 DSK segment. ## Required_ReadingDSK ## KeywordsDAS DSK FILES PLATE TOPOGRAPHY ## Brief_I/OVariable I/O Description -------- --- -------------------------------------------------- nv I Number of vertices. vrtces I Vertices. np I Number of plates. plates I Plates. corsys I DSK coordinate system code. corpar I DSK coordinate system parameters. mncor3 O Lower bound on range of third coordinate. mxcor3 O Upper bound on range of third coordinate. ## Detailed_Inputnv is the number of vertices belonging to the input set of plates. vrtces is an array of coordinates of the vertices. The Ith vertex occupies elements [I-1][0:2] of this array. np is the number of plates in the input plate set. plates is an array representing the triangular plates of a shape model. The elements of `plates' are vertex indices; vertex indices are 1-based. The vertex indices of the Ith plate occupy elements [I-1][0:2] of this array. corsys is an integer parameter identifying the coordinate system in which the bounds are to be computed. The bounds apply to the third coordinate in each system: Latitudinal: radius Planetodetic: altitude Rectangular: Z corpar is an array of parameters associated with the coordinate system. Currently the only supported system that has associated parameters is the planetodetic system. For planetodetic coordinates, corpar[0] is the equatorial radius corpar[1] is the flattening coefficient. Let `re' and `rp' represent, respectively, the equatorial and polar radii of the reference ellipsoid of the system. Then corpar[1] = ( re - rp ) / re ## Detailed_Outputmncor3 is a lower bound on the range of the third coordinate of the system identified by `corsys' and `corpar', taken over all plates. For latitudinal and rectangular coordinates, `mncor3' is the greatest lower bound of the third coordinate. For planetodetic coordinates, `mncor3' is an approximation: it is less than or equal to the greatest lower bound. mxcor3 is the least upper bound on the range of the third coordinate of the system identified by `corsys' and `corpar', taken over all plates. ## ParametersSee the include file dskdsc.inc for declarations of the public DSK type 2 parameters used by this routine. ## Exceptions1) If the input coordinate system is not recognized, the error SPICE(NOTSUPPORTED) is signaled. 2) If a conversion from rectangular to planetodetic coordinates fails, the error will be signaled by a routine in the call tree of this routine. ## FilesNone. ## ParticularsUsers planning to create DSK files should consider whether the SPICE DSK creation utility MKDSK may be suitable for their needs. This routine supports use of the DSK type 2 segment writer dskw02_c by computing bounds on the range of the third coordinates of the input plate set. ## ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) Create a three-segment DSK file using plate model data for Phobos. Use latitudinal, rectangular, and planetodetic coordinates in the respective segments. This is not a realistic example, but it serves to demonstrate use of the supported coordinate systems. For simplicity, use an existing DSK file to provide the input plate and vertex data. The selected input file has one segment. Example code begins here. /. Example program for dskw02_c, dskmi2_c, and ## Restrictions1) For planetodetic coordinates, the computation of the lower altitude bound requires that the surface at altitude `mncor3' be convex. This is the case for realistic geometries, but can be false if a plate is very large compared to the overall shape model. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) ## Version-CSPICE Version 1.0.0, 04-APR-2017 (NJB) ## Index_Entriescompute range bounds for type 2 dsk segment |

Wed Apr 5 17:54:32 2017