FACT++  1.0
void eraHfk5z ( double  rh,
double  dh,
double  date1,
double  date2,
double *  r5,
double *  d5,
double *  dr5,
double *  dd5 
)

Definition at line 3 of file hfk5z.c.

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

Referenced by palHfk5z(), and t_hfk5z().

80 {
81  double t, ph[3], r5h[3][3], s5h[3], sh[3], vst[3],
82  rst[3][3], r5ht[3][3], pv5e[2][3], vv[3],
83  w, r, v;
84 
85 /* Time interval from fundamental epoch J2000.0 to given date (JY). */
86  t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJY;
87 
88 /* Hipparcos barycentric position vector (normalized). */
89  eraS2c(rh, dh, ph);
90 
91 /* FK5 to Hipparcos orientation matrix and spin vector. */
92  eraFk5hip(r5h, s5h);
93 
94 /* Rotate the spin into the Hipparcos system. */
95  eraRxp(r5h, s5h, sh);
96 
97 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
98  eraSxp(t, s5h, vst);
99 
100 /* Express the accumulated spin as a rotation matrix. */
101  eraRv2m(vst, rst);
102 
103 /* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */
104  eraRxr(r5h, rst, r5ht);
105 
106 /* De-orient & de-spin the Hipparcos position into FK5 J2000.0. */
107  eraTrxp(r5ht, ph, pv5e[0]);
108 
109 /* Apply spin to the position giving a space motion. */
110  eraPxp(sh, ph, vv);
111 
112 /* De-orient & de-spin the Hipparcos space motion into FK5 J2000.0. */
113  eraTrxp(r5ht, vv, pv5e[1]);
114 
115 /* FK5 position/velocity pv-vector to spherical. */
116  eraPv2s(pv5e, &w, d5, &r, dr5, dd5, &v);
117  *r5 = eraAnp(w);
118 
119  return;
120 
121 }
#define ERFA_DJ00
Definition: erfam.h:87
void eraPv2s(double pv[2][3], double *theta, double *phi, double *r, double *td, double *pd, double *rd)
Definition: pv2s.c:3
#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 eraRxr(double a[3][3], double b[3][3], double atb[3][3])
Definition: rxr.c:3
void eraPxp(double a[3], double b[3], double axb[3])
Definition: pxp.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: