3 int eraDat(
int iy,
int im,
int id,
double fd,
double *deltat )
126 static const double drift[][2] = {
127 { 37300.0, 0.0012960 },
128 { 37300.0, 0.0012960 },
129 { 37300.0, 0.0012960 },
130 { 37665.0, 0.0011232 },
131 { 37665.0, 0.0011232 },
132 { 38761.0, 0.0012960 },
133 { 38761.0, 0.0012960 },
134 { 38761.0, 0.0012960 },
135 { 38761.0, 0.0012960 },
136 { 38761.0, 0.0012960 },
137 { 38761.0, 0.0012960 },
138 { 38761.0, 0.0012960 },
139 { 39126.0, 0.0025920 },
140 { 39126.0, 0.0025920 }
144 enum { NERA1 = (int) (
sizeof drift /
sizeof (
double) / 2) };
147 static const struct {
151 { 1960, 1, 1.4178180 },
152 { 1961, 1, 1.4228180 },
153 { 1961, 8, 1.3728180 },
154 { 1962, 1, 1.8458580 },
155 { 1963, 11, 1.9458580 },
156 { 1964, 1, 3.2401300 },
157 { 1964, 4, 3.3401300 },
158 { 1964, 9, 3.4401300 },
159 { 1965, 1, 3.5401300 },
160 { 1965, 3, 3.6401300 },
161 { 1965, 7, 3.7401300 },
162 { 1965, 9, 3.8401300 },
163 { 1966, 1, 4.3131700 },
164 { 1968, 2, 4.2131700 },
195 enum { NDAT = (int) (
sizeof changes /
sizeof changes[0]) };
199 double da, djm0, djm;
206 if (fd < 0.0 || fd > 1.0)
return -4;
215 if (iy < changes[0].iyear)
return 1;
218 if (iy > IYV + 5) j = 1;
224 for (i = NDAT-1; i >=0; i--) {
225 if (m >= (12 * changes[i].iyear + changes[i].month))
break;
229 if (i < 0)
return -5;
232 da = changes[
i].delat;
235 if (i < NERA1) da += (djm + fd - drift[
i][0]) * drift[i][1];
int eraDat(int iy, int im, int id, double fd, double *deltat)
int eraCal2jd(int iy, int im, int id, double *djm0, double *djm)