1 /* spks13.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 /* $Procedure SPKS13 ( S/P Kernel, subset, type 13 ) */
spks13_(integer * handle,integer * baddr,integer * eaddr,doublereal * begin,doublereal * end)9 /* Subroutine */ int spks13_(integer *handle, integer *baddr, integer *eaddr,
10 doublereal *begin, doublereal *end)
11 {
12 extern /* Subroutine */ int chkin_(char *, ftnlen), spks09_(integer *,
13 integer *, integer *, doublereal *, doublereal *), chkout_(char *,
14 ftnlen);
15 extern logical return_(void);
16
17 /* $ Abstract */
18
19 /* Extract a subset of the data in an SPK segment of type 13 */
20 /* into a new segment. */
21
22 /* $ Disclaimer */
23
24 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
25 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
26 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
27 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
28 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
29 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
30 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
31 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
32 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
33 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
34
35 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
36 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
37 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
38 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
39 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
40 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
41
42 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
43 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
44 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
45 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
46
47 /* $ Required_Reading */
48
49 /* SPK */
50 /* DAF */
51
52 /* $ Keywords */
53
54 /* EPHEMERIS */
55
56 /* $ Declarations */
57 /* $ Brief_I/O */
58
59 /* Variable I/O Description */
60 /* -------- --- -------------------------------------------------- */
61 /* HANDLE I Handle of file containing source segment. */
62 /* BADDR I Beginning address in file of source segment. */
63 /* EADDR I Ending address in file of source segment. */
64 /* BEGIN I Beginning (initial epoch) of subset. */
65 /* END I End (final epoch) of subset. */
66
67 /* $ Detailed_Input */
68
69 /* HANDLE, */
70 /* BADDR, */
71 /* EADDR are the file handle assigned to an SPK file, and the */
72 /* beginning and ending addresses of a segment within */
73 /* that file. Together they determine a complete set of */
74 /* ephemeris data, from which a subset is to be */
75 /* extracted. */
76
77 /* BEGIN, */
78 /* END are the initial and final epochs (ephemeris time) */
79 /* of the subset. */
80
81 /* The output segment will be padded to the left of */
82 /* BEGIN and the right of END with sufficient states to */
83 /* ensure that the segment yields an ephemeris identical */
84 /* to that given by the source segment. */
85
86 /* $ Detailed_Output */
87
88 /* See $Files section. */
89
90 /* $ Parameters */
91
92 /* None. */
93
94 /* $ Exceptions */
95
96 /* 1) This routine relies on the caller to ensure that the */
97 /* interval [BEGIN, END] is contained in the coverage */
98 /* interval of the segment. */
99
100 /* 2) If BEGIN > END, no data is written to the target file. */
101
102 /* $ Files */
103
104 /* Data is extracted from the file connected to the input */
105 /* handle, and written to the current DAF open for writing. */
106
107 /* The segment descriptor and summary must already have been written */
108 /* prior to calling this routine. The segment must be ended */
109 /* external to this routine. */
110
111 /* $ Particulars */
112
113 /* This routine is intended solely for use as a utility by the */
114 /* routine SPKSUB. */
115
116 /* It transfers a subset of a type 13 SPK data segment to */
117 /* a properly initialized segment of a second SPK file. */
118
119 /* The exact structure of a segment of data type 13 is described */
120 /* in the section on type 13 in the SPK Required Reading. */
121
122 /* $ Examples */
123
124 /* This routine is intended only for use as a utility by SPKSUB. */
125 /* To use this routine successfully, you must: */
126
127 /* Open the SPK file from which to extract data. */
128 /* Locate the segment from which data should be extracted. */
129
130 /* Open the SPK file to which this data should be written. */
131 /* Begin a new segment (array). */
132 /* Write the summary information for the array. */
133
134 /* Call this routine to extract the appropriate data from the */
135 /* SPK open for read. */
136
137 /* End the array to which this routine writes data. */
138
139 /* Much of this procedure is carried out by the routine SPKSUB. The */
140 /* examples of that routine illustrate more fully the process */
141 /* described above. */
142
143 /* $ Restrictions */
144
145 /* None. */
146
147 /* $ Literature_References */
148
149 /* None. */
150
151 /* $ Author_and_Institution */
152
153 /* N.J. Bachman (JPL) */
154
155 /* $ Version */
156
157 /* - SPICELIB Version 1.0.0, 25-FEB-2000 (NJB) */
158
159 /* -& */
160 /* $ Index_Entries */
161
162 /* subset type_13 spk segment */
163
164 /* -& */
165
166 /* SPICELIB functions */
167
168
169 /* Standard SPICE error handling. */
170
171 if (return_()) {
172 return 0;
173 } else {
174 chkin_("SPKS13", (ftnlen)6);
175 }
176
177 /* The type 9 subsetter knows how to do this job. */
178
179 spks09_(handle, baddr, eaddr, begin, end);
180 chkout_("SPKS13", (ftnlen)6);
181 return 0;
182 } /* spks13_ */
183
184