PageRenderTime 29ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/src/ckr02.c

https://github.com/mattbornski/spice
C | 659 lines | 161 code | 173 blank | 325 comment | 34 complexity | d47125e523fd93052f5071691d71f381 MD5 | raw file
  1. /* ckr02.f -- translated by f2c (version 19980913).
  2. You must link the resulting object file with the libraries:
  3. -lf2c -lm (in that order)
  4. */
  5. #include "f2c.h"
  6. /* Table of constant values */
  7. static integer c__2 = 2;
  8. static integer c__6 = 6;
  9. static integer c__7 = 7;
  10. /* $Procedure CKR02 ( C-kernel, read pointing record, data type 2 ) */
  11. /* Subroutine */ int ckr02_(integer *handle, doublereal *descr, doublereal *
  12. sclkdp, doublereal *tol, doublereal *record, logical *found)
  13. {
  14. /* System generated locals */
  15. integer i__1, i__2;
  16. doublereal d__1;
  17. /* Builtin functions */
  18. integer i_dnnt(doublereal *), s_rnge(char *, integer, char *, integer);
  19. /* Local variables */
  20. integer nrec;
  21. doublereal prec[8];
  22. integer ndir, skip;
  23. doublereal diff1, diff2;
  24. integer i__, n;
  25. extern /* Subroutine */ int chkin_(char *, ftnlen), dafus_(doublereal *,
  26. integer *, integer *, doublereal *, integer *);
  27. integer index;
  28. extern /* Subroutine */ int vequg_(doublereal *, integer *, doublereal *);
  29. integer group;
  30. doublereal start, stopi;
  31. extern /* Subroutine */ int dafgda_(integer *, integer *, integer *,
  32. doublereal *);
  33. doublereal buffer[100];
  34. integer remain, dirloc;
  35. extern integer lstled_(doublereal *, integer *, doublereal *);
  36. extern /* Subroutine */ int sigerr_(char *, ftnlen), chkout_(char *,
  37. ftnlen);
  38. doublereal clkout;
  39. integer grpndx;
  40. extern /* Subroutine */ int setmsg_(char *, ftnlen);
  41. integer stploc;
  42. extern /* Subroutine */ int errint_(char *, integer *, ftnlen);
  43. integer arrsiz;
  44. extern logical return_(void);
  45. doublereal dcd[2];
  46. integer beg, icd[6], end;
  47. logical fnd;
  48. /* $ Abstract */
  49. /* Read a pointing record from a CK segment, data type 2. */
  50. /* $ Disclaimer */
  51. /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
  52. /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
  53. /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
  54. /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
  55. /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
  56. /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
  57. /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
  58. /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
  59. /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
  60. /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
  61. /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
  62. /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
  63. /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
  64. /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
  65. /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
  66. /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
  67. /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
  68. /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
  69. /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
  70. /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
  71. /* $ Required_Reading */
  72. /* CK */
  73. /* DAF */
  74. /* $ Keywords */
  75. /* POINTING */
  76. /* $ Declarations */
  77. /* $ Brief_I/O */
  78. /* Variable I/O Description */
  79. /* -------- --- -------------------------------------------------- */
  80. /* HANDLE I File handle. */
  81. /* DESCR I Segment descriptor. */
  82. /* SCLKDP I Spacecraft clock time. */
  83. /* TOL I Time tolerance */
  84. /* RECORD O Pointing data record. */
  85. /* FOUND O True when data is found. */
  86. /* $ Detailed_Input */
  87. /* HANDLE is the integer handle of the CK file containing the */
  88. /* segment. */
  89. /* DESCR is the descriptor of the segment. */
  90. /* SCLKDP is the encoded spacecraft clock time for which */
  91. /* pointing is being requested. */
  92. /* TOL is a time tolerance, measured in the same units as */
  93. /* encoded spacecraft clock. */
  94. /* When SCLKDP falls within the bounds of one of the */
  95. /* intervals then the tolerance has no effect. However, */
  96. /* if the request time is not in one of the intervals */
  97. /* then the tolerance is used to determine if pointing */
  98. /* at one of the interval endpoints should be returned. */
  99. /* $ Detailed_Output */
  100. /* RECORD is the pointing record. Contents are as follows: */
  101. /* RECORD( 1 ) = Start time of interval. */
  102. /* RECORD( 2 ) = Time for which pointing was found. */
  103. /* RECORD( 3 ) = Seconds per tick rate. */
  104. /* RECORD( 4 ) = q0 */
  105. /* RECORD( 5 ) = q1 */
  106. /* RECORD( 6 ) = q2 */
  107. /* RECORD( 7 ) = q3 */
  108. /* RECORD( 8 ) = av1 */
  109. /* RECORD( 9 ) = av2 */
  110. /* RECORD( 10 ) = av3 */
  111. /* The quantities q0 - q3 are the components of the */
  112. /* quaternion that represents the C-matrix associated with */
  113. /* the start time of the interval. The quantities av1, */
  114. /* av2, and av3 represent the angular velocity vector of */
  115. /* the interval. The components of the angular velocity */
  116. /* vector are specified relative to the inertial reference */
  117. /* frame of the segment. */
  118. /* FOUND is true if a record was found to satisfy the pointing */
  119. /* request. */
  120. /* $ Parameters */
  121. /* None. */
  122. /* $ Exceptions */
  123. /* 1) If the specified handle does not belong to any file that is */
  124. /* currently known to be open, an error is diagnosed by a */
  125. /* routine that this routine calls. */
  126. /* 2) If DESCR is not a valid, packed descriptor of a segment in */
  127. /* the CK file specified by HANDLE, the results of this routine */
  128. /* are unpredictable. */
  129. /* 3) If the segment is not of data type 2, as specified in the */
  130. /* third integer component of the segment descriptor, then */
  131. /* the error SPICE(WRONGDATATYPE) is signalled. */
  132. /* $ Files */
  133. /* The file containing the segment is specified by its handle, and */
  134. /* should be opened for read, either by CKLPF or DAFOPR. */
  135. /* $ Particulars */
  136. /* See the CK Required Reading file for a detailed description of */
  137. /* the structure of a type 2 pointing segment. */
  138. /* This routine searches a type 2 segment and determines if the */
  139. /* request for pointing can be satisfied by the segment. If so, */
  140. /* then it returns information in the array RECORD that CKE02 uses */
  141. /* to evaluate the pointing at the time for which pointing was found. */
  142. /* When the time for which pointing was requested falls within one */
  143. /* of the intervals then the returned time is the same as the */
  144. /* requested time. However, when the request time is not within any */
  145. /* of the intervals then the returned time will be the interval */
  146. /* endpoint closest to the request time, provided that endpoint is */
  147. /* within the tolerance specified by the user. */
  148. /* $ Examples */
  149. /* The CKRnn routines are usually used in tandem with the CKEnn */
  150. /* routines, which evaluate the record returned by CKRnn to give */
  151. /* the pointing information and output time. */
  152. /* The following code fragment searches through a file (attached to */
  153. /* HANDLE) for all segments applicable to the Voyager 2 wide angle */
  154. /* camera, for a particular spacecraft clock time, that are of data */
  155. /* types 1 or 2. It then evaluates the pointing for that epoch and */
  156. /* prints the result. */
  157. /* SC = -32 */
  158. /* INST = -32002 */
  159. /* C */
  160. /* C Load the Voyager 2 spacecraft clock kernel and the C-kernel. */
  161. /* C */
  162. /* CALL FURNSH ( 'VGR_SCLK.TSC' ) */
  163. /* CALL DAFOPR ( 'VGR2_CK.BC', HANDLE ) */
  164. /* C */
  165. /* C Get the spacecraft clock time. Must encode it for use */
  166. /* C in the C-kernel. */
  167. /* C */
  168. /* WRITE (*,*) 'Enter spacecraft clock time string:' */
  169. /* READ (*,FMT='(A)') SCLKCH */
  170. /* CALL SCENCD ( SC, SCLKCH, SCLKDP ) */
  171. /* C */
  172. /* C Search from the beginning through all segments. */
  173. /* C */
  174. /* CALL DAFBFS ( HANDLE ) */
  175. /* CALL DAFFNA ( SFND ) */
  176. /* DO WHILE ( SFND ) */
  177. /* CALL DAFGN ( IDENT ) */
  178. /* CALL DAFGS ( DESCR ) */
  179. /* CALL DAFUS ( DESCR, 2, 6, DCD, ICD ) */
  180. /* IF ( INST .EQ. ICD( 1 ) .AND. */
  181. /* . SCLKDP + TOL .GE. DCD( 1 ) .AND. */
  182. /* . SCLKDP - TOL .LE. DCD( 2 ) ) THEN */
  183. /* DTYPE = ICD ( 3 ) */
  184. /* IF ( DTYPE .EQ. 1 ) THEN */
  185. /* CALL CKR01 ( HANDLE, DESCR, SCLKDP, TOL, NEEDAV, */
  186. /* . RECORD, FOUND ) */
  187. /* IF ( FOUND ) THEN */
  188. /* CALL CKE01 ( NEEDAV, RECORD, CMAT, AV, CLKOUT ) */
  189. /* END IF */
  190. /* ELSE IF ( DTYPE .EQ. 2 ) THEN */
  191. /* CALL CKR02 ( HANDLE, DESCR, SCLKDP, TOL, */
  192. /* . RECORD, FOUND ) */
  193. /* IF ( FOUND ) THEN */
  194. /* CALL CKE02 ( NEEDAV, RECORD, CMAT, AV, CLKOUT ) */
  195. /* END IF */
  196. /* END IF */
  197. /* IF ( FOUND ) THEN */
  198. /* WRITE (*,*) 'Segment descriptor and identifier:' */
  199. /* WRITE (*,*) DCD, ICD */
  200. /* WRITE (*,*) IDENT */
  201. /* WRITE (*,*) 'C-matrix:' */
  202. /* WRITE (*,*) CMAT */
  203. /* END IF */
  204. /* END IF */
  205. /* CALL DAFFNA ( SFND ) */
  206. /* END DO */
  207. /* $ Restrictions */
  208. /* 1) The file containing the segment should be opened for read, */
  209. /* either by CKLPF or DAFOPR. */
  210. /* $ Literature_References */
  211. /* None. */
  212. /* $ Author_and_Institution */
  213. /* J.M. Lynch (JPL) */
  214. /* $ Version */
  215. /* - SPICELIB Version 1.1.1, 22-AUG-2006 (EDW) */
  216. /* Replaced references to LDPOOL with references */
  217. /* to FURNSH. */
  218. /* - SPICELIB Version 1.1.0, 07-SEP-2001 (EDW) */
  219. /* Replaced DAFRDA call with DAFGDA. */
  220. /* Added IMPLICIT NONE. */
  221. /* - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) */
  222. /* Comment section for permuted index source lines was added */
  223. /* following the header. */
  224. /* - SPICELIB Version 1.0.0, 30-AUG-1991 (JML) */
  225. /* -& */
  226. /* $ Index_Entries */
  227. /* read ck type_2 pointing data record */
  228. /* -& */
  229. /* SPICELIB functions */
  230. /* Local parameters */
  231. /* DIRSIZ is the directory size. */
  232. /* NDC is the number of double precision components in an */
  233. /* unpacked C-kernel segment descriptor. */
  234. /* NIC is the number of integer components in an unpacked */
  235. /* C-kernel segment descriptor. */
  236. /* PSIZ is the number of double precision numbers making up */
  237. /* the record containing the quaternion, angular */
  238. /* velocity vector, and seconds per tick rate. */
  239. /* DTYPE is the data type of the segment that this routine */
  240. /* operates on. */
  241. /* Local variables */
  242. /* Standard SPICE error handling. */
  243. if (return_()) {
  244. return 0;
  245. } else {
  246. chkin_("CKR02", (ftnlen)5);
  247. }
  248. /* To minimize the number of file reads performed during the search, */
  249. /* a buffer of 100 double precision numbers is used to read the SCLK */
  250. /* times from the C-kernel. If there are 10,001 or fewer pointing */
  251. /* records, at most four reads will be needed to satisfy the request: */
  252. /* one to read in 100 or fewer directory times, one to read 100 or */
  253. /* fewer interval start times, one to read from the stop times, and */
  254. /* then, after the appropriate record has been located, one to read */
  255. /* the pointing record. */
  256. /* One more read would be required for every other group of 10,000 */
  257. /* records in the segment. */
  258. /* Start off with FOUND equal to false. */
  259. *found = FALSE_;
  260. /* We need to look at a few of the descriptor components. */
  261. /* The unpacked descriptor contains the following information */
  262. /* about the segment: */
  263. /* DCD(1) Initial encoded SCLK */
  264. /* DCD(2) Final encoded SCLK */
  265. /* ICD(1) Instrument */
  266. /* ICD(2) Inertial reference frame */
  267. /* ICD(3) Data type */
  268. /* ICD(4) Angular velocity flag */
  269. /* ICD(5) Initial address of segment data */
  270. /* ICD(6) Final address of segment data */
  271. dafus_(descr, &c__2, &c__6, dcd, icd);
  272. /* Check to make sure that the segment is type 2. */
  273. if (icd[2] != 2) {
  274. setmsg_("The segment is not a type 2 segment. Type is #", (ftnlen)47)
  275. ;
  276. errint_("#", &icd[2], (ftnlen)1);
  277. sigerr_("SPICE(WRONGDATATYPE)", (ftnlen)20);
  278. chkout_("CKR02", (ftnlen)5);
  279. return 0;
  280. }
  281. /* The beginning and ending addresses of the segment are in the */
  282. /* descriptor. */
  283. beg = icd[4];
  284. end = icd[5];
  285. /* Get the number of records in this segment, and from that determine */
  286. /* the number of directory epochs. */
  287. /* Based on the structure of a type 2 segment, the size of a */
  288. /* segment with N pointing intervals is given as follows: */
  289. /* ARRSIZ = PSIZ * N + 2 * N + ( N-1 ) / 100 (1) */
  290. /* In the above equation PSIZ is eight and integer arithmetic is */
  291. /* used. This equation is equivalent to: */
  292. /* 100 * ARRSIZ = 1000 * N + ( N-1 ) * 100 (2) */
  293. /* ------- */
  294. /* 100 */
  295. /* If we can eliminate the integer division then, since all of */
  296. /* the other values represent whole numbers, we can solve the */
  297. /* equation for N in terms of ARRSIZ by using double precision */
  298. /* arithmetic and then rounding the result to the nearest integer. */
  299. /* This next equation uses double precision arithmetic and is */
  300. /* equivalent to (2): */
  301. /* 100 * ARRSIZ = 1000 * N + ( N-1 ) - ( N-1 ) MOD 100 (3) */
  302. /* Which means: */
  303. /* 100 * ARRSIZ + 1 ( N-1 ) MOD 100 */
  304. /* ---------------- + --------------- = N (4) */
  305. /* 1001 1001 */
  306. /* Since the second term on the left side of (4) is always less */
  307. /* than 0.1, the first term will always round to the correct */
  308. /* value of N. */
  309. arrsiz = end - beg + 1;
  310. d__1 = ((doublereal) arrsiz * 100. + 1.) / 1001.;
  311. nrec = i_dnnt(&d__1);
  312. ndir = (nrec - 1) / 100;
  313. /* The directory epochs narrow down the search to a group of DIRSIZ */
  314. /* or fewer records. */
  315. /* There is only one group if there are no directory epochs. */
  316. if (ndir == 0) {
  317. group = 1;
  318. } else {
  319. /* Compute the location of the first directory epoch. From the */
  320. /* beginning of the segment, we need to go through all of the */
  321. /* pointing numbers (PSIZ*NREC of them), then through all of */
  322. /* the SCLK start and stop times (2*NREC more) to get to the */
  323. /* first SCLK directory. */
  324. dirloc = beg + nrec * 10;
  325. /* Locate the last directory epoch less than or equal to SCLKDP. */
  326. /* Read in as many as DIRSIZ directory epochs at a time for */
  327. /* comparison. */
  328. fnd = FALSE_;
  329. remain = ndir;
  330. group = 0;
  331. while(! fnd) {
  332. /* The number of records to read in the buffer. */
  333. n = min(remain,100);
  334. i__1 = dirloc + n - 1;
  335. dafgda_(handle, &dirloc, &i__1, buffer);
  336. remain -= n;
  337. /* Determine the last directory element in BUFFER that's less */
  338. /* than or equal to SCLKDP. */
  339. /* If we reach the end of the directories, and still haven't */
  340. /* found one bigger than the epoch, the group is the last group */
  341. /* in the segment. */
  342. /* Otherwise keep looking. */
  343. i__ = lstled_(sclkdp, &n, buffer);
  344. if (i__ < n) {
  345. group = group + i__ + 1;
  346. fnd = TRUE_;
  347. } else if (remain == 0) {
  348. group = ndir + 1;
  349. fnd = TRUE_;
  350. } else {
  351. dirloc += n;
  352. group += n;
  353. }
  354. }
  355. }
  356. /* Now we know which group of DIRSIZ (or less) times to look at. */
  357. /* Out of the NREC START times, the number that we should skip over */
  358. /* to get to the proper group is DIRSIZ*( GROUP - 1 ). */
  359. skip = (group - 1) * 100;
  360. /* From this we can compute the index into the segment of the group */
  361. /* of times we want. From the beginning, we need to pass through */
  362. /* PSIZ*NREC pointing numbers to get to the first START time. */
  363. /* Then we skip over the number just computed above. */
  364. grpndx = beg + (nrec << 3) + skip;
  365. /* The number of times that we have to look at may be less than */
  366. /* DIRSIZ. However many there are, go ahead and read them into the */
  367. /* buffer. */
  368. /* Computing MIN */
  369. i__1 = 100, i__2 = nrec - skip;
  370. n = min(i__1,i__2);
  371. i__1 = grpndx + n - 1;
  372. dafgda_(handle, &grpndx, &i__1, buffer);
  373. /* Find the largest time in the group less than or equal to the input */
  374. /* time. */
  375. i__ = lstled_(sclkdp, &n, buffer);
  376. /* If the request time does not fall into one of the intervals, then */
  377. /* there are several cases in which this routine can return an */
  378. /* endpoint of an interval. */
  379. /* 1) If I = 0 then the request time falls before the first START */
  380. /* time in the group. Because of the way that the directory */
  381. /* is constructed we already know that the preceding STOP */
  382. /* time is not the right one so all we have to check is if */
  383. /* SCLKDP + TOL is greater than or equal to the first START */
  384. /* time of the group. */
  385. /* 2) If I = N and the request time is not in the Nth interval */
  386. /* then we know that the request time is after the last STOP */
  387. /* time in the group. Because of the way that the directory */
  388. /* is constructed we already know that the following START */
  389. /* time is not the right one so all we have to check is if */
  390. /* SCLKDP - TOL is less than or equal to the last STOP time */
  391. /* of the group. */
  392. /* 3) Finally, if I is between 1 and N-1 and the request time */
  393. /* does not fall in any of the intervals then we need to */
  394. /* return the closer of STOP(I) or START(I+1) if it is */
  395. /* within TOL of SCLKDP. */
  396. /* If SCLKDP is less than the first time in BUFFER then check to see */
  397. /* if we want the first START time in the group. */
  398. if (i__ == 0) {
  399. if (*sclkdp + *tol >= buffer[0]) {
  400. *found = TRUE_;
  401. start = buffer[0];
  402. clkout = buffer[0];
  403. index = 1;
  404. } else {
  405. chkout_("CKR02", (ftnlen)5);
  406. return 0;
  407. }
  408. } else {
  409. /* I is not equal to zero. Determine if the request time falls */
  410. /* within the Ith interval. */
  411. stploc = beg + nrec * 9 + skip + i__ - 1;
  412. dafgda_(handle, &stploc, &stploc, &stopi);
  413. if (*sclkdp <= stopi) {
  414. *found = TRUE_;
  415. start = buffer[(i__1 = i__ - 1) < 100 && 0 <= i__1 ? i__1 :
  416. s_rnge("buffer", i__1, "ckr02_", (ftnlen)619)];
  417. clkout = *sclkdp;
  418. index = i__;
  419. } else {
  420. /* The request time does not fall within the interval. Check */
  421. /* to see if the Ith STOP time or the (I+1)th START time */
  422. /* satisfy the request. */
  423. /* If I = N then we need to consider only the STOP time */
  424. /* because of the way that the directory is constructed. */
  425. if (i__ == n) {
  426. if (*sclkdp - *tol <= stopi) {
  427. *found = TRUE_;
  428. start = buffer[(i__1 = i__ - 1) < 100 && 0 <= i__1 ? i__1
  429. : s_rnge("buffer", i__1, "ckr02_", (ftnlen)638)];
  430. clkout = stopi;
  431. index = i__;
  432. } else {
  433. chkout_("CKR02", (ftnlen)5);
  434. return 0;
  435. }
  436. } else {
  437. /* Find which time SCLKDP is closest to and then see if */
  438. /* it is within the tolerance. */
  439. diff1 = *sclkdp - stopi;
  440. diff2 = buffer[(i__1 = i__) < 100 && 0 <= i__1 ? i__1 :
  441. s_rnge("buffer", i__1, "ckr02_", (ftnlen)656)] - *
  442. sclkdp;
  443. if (min(diff1,diff2) <= *tol) {
  444. *found = TRUE_;
  445. /* Notice that if the request time is equidistant from */
  446. /* the STOP and START time the START time will be chosen. */
  447. if (diff2 <= diff1) {
  448. start = buffer[(i__1 = i__) < 100 && 0 <= i__1 ? i__1
  449. : s_rnge("buffer", i__1, "ckr02_", (ftnlen)
  450. 667)];
  451. clkout = buffer[(i__1 = i__) < 100 && 0 <= i__1 ?
  452. i__1 : s_rnge("buffer", i__1, "ckr02_", (
  453. ftnlen)668)];
  454. index = i__ + 1;
  455. } else {
  456. start = buffer[(i__1 = i__ - 1) < 100 && 0 <= i__1 ?
  457. i__1 : s_rnge("buffer", i__1, "ckr02_", (
  458. ftnlen)673)];
  459. clkout = stopi;
  460. index = i__;
  461. }
  462. } else {
  463. chkout_("CKR02", (ftnlen)5);
  464. return 0;
  465. }
  466. }
  467. }
  468. }
  469. /* Now we know the exact record that we want and can begin */
  470. /* constructing the output record. */
  471. /* RECORD( 1 ) holds the interval start time. */
  472. /* RECORD( 2 ) holds the time for which pointing was found (CLKOUT). */
  473. record[0] = start;
  474. record[1] = clkout;
  475. /* We need the pointing record out of GROUP indexed by INDEX. */
  476. /* This group of size DIRSIZ is SKIP records into the beginning */
  477. /* of the segment. And each record is PSIZ big. */
  478. n = beg + (skip + index - 1 << 3);
  479. i__1 = n + 7;
  480. dafgda_(handle, &n, &i__1, prec);
  481. record[2] = prec[7];
  482. vequg_(prec, &c__7, &record[3]);
  483. /* That is all. */
  484. chkout_("CKR02", (ftnlen)5);
  485. return 0;
  486. } /* ckr02_ */