-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
zzteme.c
172 lines (118 loc) · 4.84 KB
/
zzteme.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/* zzteme.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__6 = 6;
static integer c__3 = 3;
static integer c__1 = 1;
/* $Procedure ZZTEME ( J2000 to TEME at epoch ) */
/* Subroutine */ int zzteme_(doublereal *et, doublereal *mt)
{
doublereal xj2000[6], zj2000[6];
extern /* Subroutine */ int mxvg_(doublereal *, doublereal *, integer *,
integer *, doublereal *);
doublereal m1inv[36] /* was [6][6] */, m2inv[36] /* was [6][6]
*/, z__[6];
extern /* Subroutine */ int chkin_(char *, ftnlen), zztwovxf_(doublereal *
, integer *, doublereal *, integer *, doublereal *), moved_(
doublereal *, integer *, doublereal *);
doublereal xtemp[36] /* was [6][6] */, m1[36] /* was [6][6]
*/, m2[36] /* was [6][6] */;
extern /* Subroutine */ int chkout_(char *, ftnlen);
extern logical return_(void);
extern /* Subroutine */ int invstm_(doublereal *, doublereal *),
zzeprc76_(doublereal *, doublereal *), zzenut80_(doublereal *,
doublereal *);
/* $ Abstract */
/* J2000 to TEME, probably. */
/* $ Disclaimer */
/* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
/* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
/* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
/* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
/* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
/* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
/* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
/* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
/* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
/* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
/* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
/* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
/* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
/* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
/* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
/* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
/* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
/* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
/* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
/* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
/* $ Required_Reading */
/* FRAMES */
/* $ Keywords */
/* FRAMES */
/* $ Declarations */
/* $ Brief_I/O */
/* Variable I/O Description */
/* -------- --- -------------------------------------------------- */
/* ET I Epoch of the state transformation operator. */
/* MT O The state transformation operator. */
/* $ Detailed_Input */
/* ET time expressed in terms of TDB seconds past epoch J2000 */
/* for which to to calculate the J2000 frame to TEME frame */
/* transformation operator. */
/* $ Detailed_Output */
/* MT the 6x6 operator that transforms cartesian states from */
/* the J2000 to TEME reference frames. */
/* $ Parameters */
/* None. */
/* $ Exceptions */
/* None. */
/* $ Files */
/* None. */
/* $ Particulars */
/* TETE True equator true equinox */
/* MEME Mean equator mean equinox */
/* TEME True equator mean equinox */
/* $ Examples */
/* None. */
/* $ Restrictions */
/* None. */
/* $ Literature_References */
/* None. */
/* $ Author_and_Institution */
/* N.J. Bachman (JPL) */
/* S.C. Krening (JPL) */
/* E.D. Wright (JPL) */
/* $ Version */
/* - SPICELIB Version 1.0.0, 06-MAR-2012 (NJB) (SCK) (EDW) */
/* -& */
/* $ Index_Entries */
/* tranformation J2000 frame to pseudo TEME */
/* -& */
/* SPICELIB functions */
/* Local variables */
if (return_()) {
return 0;
}
chkin_("ZZTEME", (ftnlen)6);
/* Extract the MEME +X vector and its derivative, both */
/* expressed relative to the J2000 frame, into X. */
zzeprc76_(et, m1);
invstm_(m1, m1inv);
moved_(m1inv, &c__6, xj2000);
/* Extract the TETE +Z vector and its derivative, both */
/* expressed relative to the MEME frame, into Z. */
zzenut80_(et, m2);
invstm_(m2, m2inv);
moved_(&m2inv[12], &c__6, z__);
/* Transform Z to the J2000 frame. */
mxvg_(m1inv, z__, &c__6, &c__6, zj2000);
/* Compute the TEME to J2000 state transformation; */
/* invert this to produce the output matrix. */
zztwovxf_(zj2000, &c__3, xj2000, &c__1, xtemp);
invstm_(xtemp, mt);
chkout_("ZZTEME", (ftnlen)6);
return 0;
} /* zzteme_ */