FACT++  1.0
void eraFk5hz ( double  r5,
double  d5,
double  date1,
double  date2,
double *  rh,
double *  dh 
)

Definition at line 3 of file fk5hz.c.

References eraAnp(), eraC2s(), eraFk5hip(), eraRv2m(), eraRxp(), eraS2c(), eraSxp(), eraTrxp(), ERFA_DJ00, ERFA_DJY, and t.

Referenced by palFk5hz(), and t_fk5hz().

75 {
76  double t, p5e[3], r5h[3][3], s5h[3], vst[3], rst[3][3], p5[3],
77  ph[3], w;
78 
79 /* Interval from given date to fundamental epoch J2000.0 (JY). */
80  t = - ((date1 - ERFA_DJ00) + date2) / ERFA_DJY;
81 
82 /* FK5 barycentric position vector. */
83  eraS2c(r5, d5, p5e);
84 
85 /* FK5 to Hipparcos orientation matrix and spin vector. */
86  eraFk5hip(r5h, s5h);
87 
88 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
89  eraSxp(t, s5h, vst);
90 
91 /* Express the accumulated spin as a rotation matrix. */
92  eraRv2m(vst, rst);
93 
94 /* Derotate the vector's FK5 axes back to date. */
95  eraTrxp(rst, p5e, p5);
96 
97 /* Rotate the vector into the Hipparcos system. */
98  eraRxp(r5h, p5, ph);
99 
100 /* Hipparcos vector to spherical. */
101  eraC2s(ph, &w, dh);
102  *rh = eraAnp(w);
103 
104  return;
105 
106 }
#define ERFA_DJ00
Definition: erfam.h:87
#define ERFA_DJY
Definition: erfam.h:78
void eraS2c(double theta, double phi, double c[3])
Definition: s2c.c:3
void eraFk5hip(double r5h[3][3], double s5h[3])
Definition: fk5hip.c:3
void eraC2s(double p[3], double *theta, double *phi)
Definition: c2s.c:3
void eraRxp(double r[3][3], double p[3], double rp[3])
Definition: rxp.c:3
void eraTrxp(double r[3][3], double p[3], double trp[3])
Definition: trxp.c:3
void eraSxp(double s, double p[3], double sp[3])
Definition: sxp.c:3
void eraRv2m(double w[3], double r[3][3])
Definition: rv2m.c:3
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: