FACT++  1.0
int eraPmsafe ( 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 
)

Definition at line 3 of file pmsafe.c.

References eraSeps(), and eraStarpm().

Referenced by t_pmsafe().

111 {
112 
113 /* Minimum allowed parallax (arcsec) */
114  const double PXMIN = 5e-7;
115 
116 /* Factor giving maximum allowed transverse speed of about 1% c */
117  const double F = 326.0;
118 
119  int jpx, j;
120  double pm, px1a;
121 
122 /* Proper motion in one year (radians). */
123  pm = eraSeps(ra1, dec1, ra1+pmr1, dec1+pmd1);
124 
125 /* Override the parallax to reduce the chances of a warning status. */
126  jpx = 0;
127  px1a = px1;
128  pm *= F;
129  if (px1a < pm) {jpx = 1; px1a = pm;}
130  if (px1a < PXMIN) {jpx = 1; px1a = PXMIN;}
131 
132 /* Carry out the transformation using the modified parallax. */
133  j = eraStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1,
134  ep1a, ep1b, ep2a, ep2b,
135  ra2, dec2, pmr2, pmd2, px2, rv2);
136 
137 /* Revise and return the status. */
138  if ( !(j%2) ) j += jpx;
139  return j;
140 
141 /* Finished. */
142 
143 }
double eraSeps(double al, double ap, double bl, double bp)
Definition: seps.c: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)
Definition: starpm.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: