FACT++  1.0
double eraEect00 ( double  date1,
double  date2 
)

Definition at line 3 of file eect00.c.

References eraFad03(), eraFae03(), eraFaf03(), eraFal03(), eraFalp03(), eraFaom03(), eraFapa03(), eraFave03(), ERFA_DAS2R, ERFA_DJ00, ERFA_DJC, i, and t.

Referenced by eraEe00(), and t_eect00().

97 {
98 /* Time since J2000.0, in Julian centuries */
99  double t;
100 
101 /* Miscellaneous */
102  int i, j;
103  double a, s0, s1;
104 
105 /* Fundamental arguments */
106  double fa[14];
107 
108 /* Returned value. */
109  double eect;
110 
111 /* ----------------------------------------- */
112 /* The series for the EE complementary terms */
113 /* ----------------------------------------- */
114 
115  typedef struct {
116  int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */
117  double s, c; /* sine and cosine coefficients */
118  } TERM;
119 
120 /* Terms of order t^0 */
121  static const TERM e0[] = {
122 
123  /* 1-10 */
124  {{ 0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6 },
125  {{ 0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6 },
126  {{ 0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6 },
127  {{ 0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6 },
128  {{ 0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6 },
129  {{ 0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6 },
130  {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6 },
131  {{ 0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6 },
132  {{ 0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6 },
133  {{ 0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6 },
134 
135  /* 11-20 */
136  {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6 },
137  {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6 },
138  {{ 0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6 },
139  {{ 0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6 },
140  {{ 0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6 },
141  {{ 0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6 },
142  {{ 0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6 },
143  {{ 0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6 },
144  {{ 1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6 },
145  {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6 },
146 
147  /* 21-30 */
148  {{ 0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 },
149  {{ 0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6 },
150  {{ 0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6 },
151  {{ 0, 0, 0, 0, 0, 8,-13, -1}, -0.10e-6, 0.05e-6 },
152  {{ 0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6 },
153  {{ 2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 },
154  {{ 1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6 },
155  {{ 0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6 },
156  {{ 1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 },
157  {{ 0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6 },
158 
159  /* 31-33 */
160  {{ 0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6 },
161  {{ 1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6 },
162  {{ 1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6 }
163  };
164 
165 /* Terms of order t^1 */
166  static const TERM e1[] = {
167  {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6 }
168  };
169 
170 /* Number of terms in the series */
171  const int NE0 = (int) (sizeof e0 / sizeof (TERM));
172  const int NE1 = (int) (sizeof e1 / sizeof (TERM));
173 
174 /*--------------------------------------------------------------------*/
175 
176 /* Interval between fundamental epoch J2000.0 and current date (JC). */
177  t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC;
178 
179 /* Fundamental Arguments (from IERS Conventions 2003) */
180 
181 /* Mean anomaly of the Moon. */
182  fa[0] = eraFal03(t);
183 
184 /* Mean anomaly of the Sun. */
185  fa[1] = eraFalp03(t);
186 
187 /* Mean longitude of the Moon minus that of the ascending node. */
188  fa[2] = eraFaf03(t);
189 
190 /* Mean elongation of the Moon from the Sun. */
191  fa[3] = eraFad03(t);
192 
193 /* Mean longitude of the ascending node of the Moon. */
194  fa[4] = eraFaom03(t);
195 
196 /* Mean longitude of Venus. */
197  fa[5] = eraFave03(t);
198 
199 /* Mean longitude of Earth. */
200  fa[6] = eraFae03(t);
201 
202 /* General precession in longitude. */
203  fa[7] = eraFapa03(t);
204 
205 /* Evaluate the EE complementary terms. */
206  s0 = 0.0;
207  s1 = 0.0;
208 
209  for (i = NE0-1; i >= 0; i--) {
210  a = 0.0;
211  for (j = 0; j < 8; j++) {
212  a += (double)(e0[i].nfa[j]) * fa[j];
213  }
214  s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
215  }
216 
217  for (i = NE1-1; i >= 0; i--) {
218  a = 0.0;
219  for (j = 0; j < 8; j++) {
220  a += (double)(e1[i].nfa[j]) * fa[j];
221  }
222  s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
223  }
224 
225  eect = (s0 + s1 * t ) * ERFA_DAS2R;
226 
227  return eect;
228 
229 }
#define ERFA_DJ00
Definition: erfam.h:87
double eraFae03(double t)
Definition: fae03.c:3
double eraFapa03(double t)
Definition: fapa03.c:3
double eraFal03(double t)
Definition: fal03.c:3
int i
Definition: db_dim_client.c:21
#define ERFA_DAS2R
Definition: erfam.h:60
double eraFaom03(double t)
Definition: faom03.c:3
double eraFad03(double t)
Definition: fad03.c:3
double eraFaf03(double t)
Definition: faf03.c:3
double eraFalp03(double t)
Definition: falp03.c:3
#define ERFA_DJC
Definition: erfam.h:81
TT t
Definition: test_client.c:26
double eraFave03(double t)
Definition: fave03.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: