FACT++  1.0
double eraGmst82 ( double  dj1,
double  dj2 
)

Definition at line 3 of file gmst82.c.

References C, eraAnp(), ERFA_DAYSEC, ERFA_DJ00, ERFA_DJC, ERFA_DS2R, and t.

Referenced by eraGst94(), and t_gmst82().

66 {
67 /* Coefficients of IAU 1982 GMST-UT1 model */
68  double A = 24110.54841 - ERFA_DAYSEC / 2.0;
69  double B = 8640184.812866;
70  double C = 0.093104;
71  double D = -6.2e-6;
72 
73 /* Note: the first constant, A, has to be adjusted by 12 hours */
74 /* because the UT1 is supplied as a Julian date, which begins */
75 /* at noon. */
76 
77  double d1, d2, t, f, gmst;
78 
79 /* Julian centuries since fundamental epoch. */
80  if (dj1 < dj2) {
81  d1 = dj1;
82  d2 = dj2;
83  } else {
84  d1 = dj2;
85  d2 = dj1;
86  }
87  t = (d1 + (d2 - ERFA_DJ00)) / ERFA_DJC;
88 
89 /* Fractional part of JD(UT1), in seconds. */
90  f = ERFA_DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0));
91 
92 /* GMST at this UT1. */
93  gmst = eraAnp(ERFA_DS2R * ((A + (B + (C + D * t) * t) * t) + f));
94 
95  return gmst;
96 
97 }
#define ERFA_DJ00
Definition: erfam.h:87
#define ERFA_DS2R
Definition: erfam.h:63
#define ERFA_DAYSEC
Definition: erfam.h:75
in C
Definition: README_v19.txt:379
#define ERFA_DJC
Definition: erfam.h:81
TT t
Definition: test_client.c:26
double eraAnp(double a)
Definition: anp.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: