FACT++  1.0
int eraTcgtt ( double  tcg1,
double  tcg2,
double *  tt1,
double *  tt2 
)

Definition at line 3 of file tcgtt.c.

References ERFA_DAYSEC, ERFA_DJM0, ERFA_DJM77, ERFA_ELG, and ERFA_TTMTAI.

Referenced by t_tcgtt().

38 {
39 
40 /* 1977 Jan 1 00:00:32.184 TT, as MJD */
41  static const double t77t = ERFA_DJM77 + ERFA_TTMTAI/ERFA_DAYSEC;
42 
43 /* Result, safeguarding precision. */
44  if ( tcg1 > tcg2 ) {
45  *tt1 = tcg1;
46  *tt2 = tcg2 - ( ( tcg1 - ERFA_DJM0 ) + ( tcg2 - t77t ) ) * ERFA_ELG;
47  } else {
48  *tt1 = tcg1 - ( ( tcg2 - ERFA_DJM0 ) + ( tcg1 - t77t ) ) * ERFA_ELG;
49  *tt2 = tcg2;
50  }
51 
52 /* OK status. */
53  return 0;
54 
55 }
#define ERFA_DJM0
Definition: erfam.h:90
#define ERFA_DJM77
Definition: erfam.h:96
#define ERFA_DAYSEC
Definition: erfam.h:75
#define ERFA_ELG
Definition: erfam.h:114
#define ERFA_TTMTAI
Definition: erfam.h:99

+ Here is the caller graph for this function: