1 /* pckuds.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
6 #include "f2c.h"
7
8 /* Table of constant values */
9
10 static integer c__2 = 2;
11 static integer c__5 = 5;
12
13 /* $Procedure PCKUDS (PCK, unpack segment descriptor ) */
pckuds_(doublereal * descr,integer * body,integer * frame,integer * type__,doublereal * first,doublereal * last,integer * begin,integer * end)14 /* Subroutine */ int pckuds_(doublereal *descr, integer *body, integer *frame,
15 integer *type__, doublereal *first, doublereal *last, integer *begin,
16 integer *end)
17 {
18 extern /* Subroutine */ int chkin_(char *, ftnlen), dafus_(doublereal *,
19 integer *, integer *, doublereal *, integer *);
20 integer ipart[5];
21 extern logical failed_(void);
22 doublereal dppart[2];
23 extern /* Subroutine */ int chkout_(char *, ftnlen);
24 extern logical return_(void);
25
26 /* $ Abstract */
27
28 /* Unpack the contents of a PCK segment descriptor */
29
30 /* $ Disclaimer */
31
32 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
33 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
34 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
35 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
36 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
37 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
38 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
39 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
40 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
41 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
42
43 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
44 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
45 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
46 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
47 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
48 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
49
50 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
51 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
52 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
53 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
54
55 /* $ Required_Reading */
56
57 /* PCK. */
58
59 /* $ Keywords */
60
61 /* PCK */
62
63 /* $ Declarations */
64 /* $ Brief_I/O */
65
66 /* VARIABLE I/O DESCRIPTION */
67 /* -------- --- -------------------------------------------------- */
68 /* DESCR I A PCK segment descriptor. */
69 /* BODY O The NAIF ID code for the body of the segment. */
70 /* FRAME O The code for the inertial frame of this segment. */
71 /* TYPE O The type of PCK segment. */
72 /* FIRST O The first epoch for which the segment is valid. */
73 /* LAST O The last epoch for which the segment is valid. */
74 /* BEGIN O Beginning DAF address of the segment. */
75 /* END O Ending DAF address of the segment. */
76
77 /* $ Detailed_Input */
78
79 /* DESCR is a PCK segment descriptor. */
80
81 /* $ Detailed_Output */
82
83 /* BODY is the NAIF ID code for the body of the segment. */
84
85 /* FRAME is the SPICE ID code for the inertial frame to which */
86 /* the body fixed orientation is referenced. */
87
88 /* TYPE is the type of PCK segment. */
89
90 /* FIRST is the first epoch for which the segment has */
91 /* orientation data. */
92
93 /* LAST is the last epoch for which the segment has */
94 /* orientation data. */
95
96 /* BEGIN is the starting address of the data associated */
97 /* with this descriptor. */
98
99 /* END is the last address of the data associated with */
100 /* this descriptor. */
101
102 /* $ Parameters */
103
104 /* None. */
105
106 /* $ Exceptions */
107
108 /* None. */
109
110 /* $ Files */
111
112 /* None. */
113
114 /* $ Particulars */
115
116 /* This routine extracts the contents of a PCK segment */
117 /* descriptor into the components needed for reading and */
118 /* evaluating the data stored in the segment. It serves */
119 /* as a macro for expanding the PCK segment descriptor. */
120
121 /* $ Examples */
122
123 /* Suppose you wished to summarize a particular PCK segment */
124 /* and that you have the descriptor for that segment in hand. */
125 /* The following code fragment shows how you might use this */
126 /* routine to create a summary message concerning the segment. */
127
128 /* CALL PCKUDS ( DESCR, BODY, FRAME, TYPE, FIRST, LAST ) */
129
130 /* Convert the start and stop times to ephemeris calendar strings */
131
132 /* CALL ETCAL ( FIRST, FSTCAL ) */
133 /* CALL ETCAL ( LAST, LSTCAL ) */
134
135 /* WRITE (*,*) */
136 /* WRITE (*,*) 'Body : ', BODY */
137 /* WRITE (*,*) 'Frame ID : ', FRAME */
138 /* WRITE (*,*) 'Data Type: ', TYPE */
139 /* WRITE (*,*) */
140 /* WRITE (*,*) 'Segment Start : ', FSTCAL */
141 /* WRITE (*,*) 'Segment Stop : ', LSTCAL */
142
143
144 /* $ Restrictions */
145
146 /* None. */
147
148 /* $ Literature_References */
149
150 /* None. */
151
152 /* $ Author_and_Institution */
153
154 /* W.L. Taber (JPL) */
155
156 /* $ Version */
157
158 /* - SPICELIB Version 1.0.1, 03-JAN-2014 (EDW) */
159
160 /* Minor edits to Procedure; clean trailing whitespace. */
161 /* Corrected order of header sections to conform to NAIF */
162 /* standard. */
163
164 /* - SPICELIB Version 1.0.0, 1994-JAN-4 (WLT) */
165
166 /* -& */
167 /* $ Index_Entries */
168
169 /* Unpack and PCK segment descriptor */
170
171 /* -& */
172
173 /* SPICELIB Functions */
174
175
176 /* Local Parameters */
177
178
179 /* Local Variables */
180
181
182 /* Standard SPICELIB error handling. */
183
184 if (return_()) {
185 return 0;
186 } else {
187 chkin_("PCKUDS", (ftnlen)6);
188 }
189
190 /* No judgements are made about the descriptor when we */
191 /* unpack it. If things were done right when the descriptor */
192 /* was created, it should be fine now. */
193
194 dafus_(descr, &c__2, &c__5, dppart, ipart);
195 if (failed_()) {
196 chkout_("PCKUDS", (ftnlen)6);
197 return 0;
198 }
199 *body = ipart[0];
200 *frame = ipart[1];
201 *type__ = ipart[2];
202 *begin = ipart[3];
203 *end = ipart[4];
204 *first = dppart[0];
205 *last = dppart[1];
206 chkout_("PCKUDS", (ftnlen)6);
207 return 0;
208 } /* pckuds_ */
209
210