FACT++  1.0
void eraAticq ( double  ri,
double  di,
eraASTROM astrom,
double *  rc,
double *  dc 
)

Definition at line 3 of file aticq.c.

References eraASTROM::bm1, eraASTROM::bpn, eraASTROM::eh, eraASTROM::em, eraAb(), eraAnp(), eraC2s(), eraLdsun(), eraS2c(), eraTrxp(), eraZp(), i, and eraASTROM::v.

Referenced by eraAtic13(), eraAtoc13(), and t_aticq().

65 {
66  int j, i;
67  double pi[3], ppr[3], pnat[3], pco[3], w, d[3], before[3], r2, r,
68  after[3];
69 
70 /* CIRS RA,Dec to Cartesian. */
71  eraS2c(ri, di, pi);
72 
73 /* Bias-precession-nutation, giving GCRS proper direction. */
74  eraTrxp(astrom->bpn, pi, ppr);
75 
76 /* Aberration, giving GCRS natural direction. */
77  eraZp(d);
78  for (j = 0; j < 2; j++) {
79  r2 = 0.0;
80  for (i = 0; i < 3; i++) {
81  w = ppr[i] - d[i];
82  before[i] = w;
83  r2 += w*w;
84  }
85  r = sqrt(r2);
86  for (i = 0; i < 3; i++) {
87  before[i] /= r;
88  }
89  eraAb(before, astrom->v, astrom->em, astrom->bm1, after);
90  r2 = 0.0;
91  for (i = 0; i < 3; i++) {
92  d[i] = after[i] - before[i];
93  w = ppr[i] - d[i];
94  pnat[i] = w;
95  r2 += w*w;
96  }
97  r = sqrt(r2);
98  for (i = 0; i < 3; i++) {
99  pnat[i] /= r;
100  }
101  }
102 
103 /* Light deflection by the Sun, giving BCRS coordinate direction. */
104  eraZp(d);
105  for (j = 0; j < 5; j++) {
106  r2 = 0.0;
107  for (i = 0; i < 3; i++) {
108  w = pnat[i] - d[i];
109  before[i] = w;
110  r2 += w*w;
111  }
112  r = sqrt(r2);
113  for (i = 0; i < 3; i++) {
114  before[i] /= r;
115  }
116  eraLdsun(before, astrom->eh, astrom->em, after);
117  r2 = 0.0;
118  for (i = 0; i < 3; i++) {
119  d[i] = after[i] - before[i];
120  w = pnat[i] - d[i];
121  pco[i] = w;
122  r2 += w*w;
123  }
124  r = sqrt(r2);
125  for (i = 0; i < 3; i++) {
126  pco[i] /= r;
127  }
128  }
129 
130 /* ICRS astrometric RA,Dec. */
131  eraC2s(pco, &w, dc);
132  *rc = eraAnp(w);
133 
134 /* Finished. */
135 
136 }
void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3])
Definition: ab.c:3
double eh[3]
Definition: erfam.h:19
int i
Definition: db_dim_client.c:21
void eraS2c(double theta, double phi, double c[3])
Definition: s2c.c:3
void eraC2s(double p[3], double *theta, double *phi)
Definition: c2s.c:3
void eraTrxp(double r[3][3], double p[3], double trp[3])
Definition: trxp.c:3
double bpn[3][3]
Definition: erfam.h:23
double v[3]
Definition: erfam.h:21
void eraZp(double p[3])
Definition: zp.c:3
double eraAnp(double a)
Definition: anp.c:3
double em
Definition: erfam.h:20
double bm1
Definition: erfam.h:22
void eraLdsun(double p[3], double e[3], double em, double p1[3])
Definition: ldsun.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: