1 /* 2 3 -Procedure dskgtl_c ( DSK, get tolerance ) 4 5 -Abstract 6 7 Retrieve the value of a specified DSK tolerance or margin parameter. 8 9 -Disclaimer 10 11 THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE 12 CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. 13 GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE 14 ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE 15 PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" 16 TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY 17 WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A 18 PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC 19 SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 20 SOFTWARE AND RELATED MATERIALS, HOWEVER USED. 21 22 IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA 23 BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT 24 LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, 25 INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, 26 REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE 27 REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. 28 29 RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF 30 THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY 31 CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE 32 ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. 33 34 -Required_Reading 35 36 DSK 37 38 -Keywords 39 40 DSK 41 MARGIN 42 NUMERIC 43 TOLERANCE 44 45 */ 46 #include "SpiceUsr.h" 47 #include "SpiceZfc.h" 48 49 dskgtl_c(SpiceInt keywrd,SpiceDouble * dpval)50 void dskgtl_c ( SpiceInt keywrd, 51 SpiceDouble * dpval ) 52 53 /* 54 55 -Brief_I/O 56 57 Variable I/O Description 58 -------- --- -------------------------------------------------- 59 keywrd I Code specifying parameter to retrieve. 60 dpval O Value of parameter. 61 62 -Detailed_Input 63 64 keywrd is an integer code specifying the parameter to 65 retrieve. See the include file dsktol.inc for 66 a description of the possible keywords. 67 68 -Detailed_Output 69 70 dpval is the value of the parameter specified by `keywrd'. 71 72 -Parameters 73 74 See the header file 75 76 SpiceDtl.h 77 78 for descriptions and values of the tolerance or margin parameters 79 accessed by this routine, and of the keyword parameters used to 80 refer to them. 81 82 -Exceptions 83 84 1) If the input keyword is not recognized, the error 85 SPICE(INDEXOUTOFRANGE) is signaled. 86 87 -Files 88 89 None. 90 91 -Particulars 92 93 The DSK tolerance routines centralize numeric tolerance and margin 94 values used by the DSK subsystem. The DSK subsystem retrieves values 95 from the DSK tolerance subsystem to use at run time. 96 97 The DSK tolerance access functions are 98 99 dskgtl_c {DSK, get tolerance value} 100 dskstl_c {DSK, set tolerance value} 101 102 To minimize run time overhead, the "keywords" used by these routines 103 to identify parameters are actually integer codes. 104 105 SPICE users may override certain values maintained by this subsystem; 106 others values are fixed. It is recommended that any change to the 107 tolerance values made at run time be performed only by expert SPICE 108 users. 109 110 -Examples 111 112 1) Obtain and display the DSK type 2 plate expansion fraction: 113 114 #include <stdio.h> 115 #include "SpiceUsr.h" 116 117 int main() 118 { 119 SpiceDouble dpval; 120 121 dskgtl_c ( SPICE_DSK_KEYXFR, &dpval ); 122 123 printf ( "Plate expansion fraction = %e\n", dpval ); 124 125 return ( 0 ); 126 } 127 128 129 -Restrictions 130 131 None. 132 133 -Literature_References 134 135 None. 136 137 -Author_and_Institution 138 139 N.J. Bachman (JPL) 140 141 -Version 142 143 -CSPICE Version 1.0.0, 27-FEB-2016 (NJB) 144 145 -Index_Entries 146 147 retrieve dsk tolerance or margin parameters 148 149 -& 150 */ 151 152 { /* Begin dskgtl_c */ 153 154 155 156 /* 157 Participate in error tracing. 158 */ 159 chkin_c ( "dskgtl_c" ); 160 161 162 dskgtl_ ( (integer *) &keywrd, 163 (doublereal *) dpval ); 164 165 166 chkout_c ( "dskgtl_c" ); 167 168 } /* End dskgtl_c */ 169