FACT++  1.0
void eraPmpx ( double  rc,
double  dc,
double  pr,
double  pd,
double  px,
double  rv,
double  pmt,
double  pob[3],
double  pco[3] 
)

Definition at line 3 of file pmpx.c.

References eraPdp(), eraPn(), ERFA_AULT, ERFA_DAS2R, ERFA_DAU, ERFA_DAYSEC, ERFA_DJM, ERFA_DJY, and i.

Referenced by eraAtciq(), eraAtciqn(), and t_pmpx().

52 {
53 /* Km/s to au/year */
54  const double VF = ERFA_DAYSEC*ERFA_DJM/ERFA_DAU;
55 
56 /* Light time for 1 au, Julian years */
57  const double AULTY = ERFA_AULT/ERFA_DAYSEC/ERFA_DJY;
58 
59  int i;
60  double sr, cr, sd, cd, x, y, z, p[3], dt, pxr, w, pdz, pm[3];
61 
62 /* Spherical coordinates to unit vector (and useful functions). */
63  sr = sin(rc);
64  cr = cos(rc);
65  sd = sin(dc);
66  cd = cos(dc);
67  p[0] = x = cr*cd;
68  p[1] = y = sr*cd;
69  p[2] = z = sd;
70 
71 /* Proper motion time interval (y) including Roemer effect. */
72  dt = pmt + eraPdp(p,pob)*AULTY;
73 
74 /* Space motion (radians per year). */
75  pxr = px * ERFA_DAS2R;
76  w = VF * rv * pxr;
77  pdz = pd * z;
78  pm[0] = - pr*y - pdz*cr + w*x;
79  pm[1] = pr*x - pdz*sr + w*y;
80  pm[2] = pd*cd + w*z;
81 
82 /* Coordinate direction of star (unit vector, BCRS). */
83  for (i = 0; i < 3; i++) {
84  p[i] += dt*pm[i] - pxr*pob[i];
85  }
86  eraPn(p, &w, pco);
87 
88 /* Finished. */
89 
90 }
double eraPdp(double a[3], double b[3])
Definition: pdp.c:3
#define ERFA_DAU
Definition: erfam.h:102
#define ERFA_AULT
Definition: erfam.h:108
#define ERFA_DJY
Definition: erfam.h:78
int i
Definition: db_dim_client.c:21
#define ERFA_DAS2R
Definition: erfam.h:60
#define ERFA_DJM
Definition: erfam.h:84
#define ERFA_DAYSEC
Definition: erfam.h:75
void eraPn(double p[3], double *r, double u[3])
Definition: pn.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: