4 double pmr1,
double pmd1,
double px1,
double rv1,
5 double ep1a,
double ep1b,
double ep2a,
double ep2b,
6 double *ra2,
double *dec2,
7 double *pmr2,
double *pmd2,
double *px2,
double *rv2)
113 double pv1[2][3], tl1, dt, pv[2][3], r2, rdv, v2, c2mv2, tl2,
118 j1 =
eraStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1);
124 dt = (ep2a - ep1a) + (ep2b - ep1b);
128 eraPvu(dt + tl1, pv1, pv);
132 r2 =
eraPdp(pv[0], pv[0]);
133 rdv =
eraPdp(pv[0], pv[1]);
134 v2 =
eraPdp(pv[1], pv[1]);
136 if (c2mv2 <= 0)
return -1;
137 tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2;
141 eraPvu(dt + (tl1 - tl2), pv1, pv2);
144 j2 =
eraPvstar(pv2, ra2, dec2, pmr2, pmd2, px2, rv2);
147 j = (j2 == 0) ? j1 : -1;
double eraPdp(double a[3], double b[3])
int eraStarpm(double ra1, double dec1, double pmr1, double pmd1, double px1, double rv1, double ep1a, double ep1b, double ep2a, double ep2b, double *ra2, double *dec2, double *pmr2, double *pmd2, double *px2, double *rv2)
double eraPm(double p[3])
int eraPvstar(double pv[2][3], double *ra, double *dec, double *pmr, double *pmd, double *px, double *rv)
int eraStarpv(double ra, double dec, double pmr, double pmd, double px, double rv, double pv[2][3])
void eraPvu(double dt, double pv[2][3], double upv[2][3])