FACT++  1.0
void eraAticqn ( double  ri,
double  di,
eraASTROM astrom,
int  n,
eraLDBODY  b[],
double *  rc,
double *  dc 
)

Definition at line 3 of file aticqn.c.

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

Referenced by t_aticqn().

103 {
104  int j, i;
105  double pi[3], ppr[3], pnat[3], pco[3], w, d[3], before[3], r2, r,
106  after[3];
107 
108 /* CIRS RA,Dec to Cartesian. */
109  eraS2c(ri, di, pi);
110 
111 /* Bias-precession-nutation, giving GCRS proper direction. */
112  eraTrxp(astrom->bpn, pi, ppr);
113 
114 /* Aberration, giving GCRS natural direction. */
115  eraZp(d);
116  for (j = 0; j < 2; j++) {
117  r2 = 0.0;
118  for (i = 0; i < 3; i++) {
119  w = ppr[i] - d[i];
120  before[i] = w;
121  r2 += w*w;
122  }
123  r = sqrt(r2);
124  for (i = 0; i < 3; i++) {
125  before[i] /= r;
126  }
127  eraAb(before, astrom->v, astrom->em, astrom->bm1, after);
128  r2 = 0.0;
129  for (i = 0; i < 3; i++) {
130  d[i] = after[i] - before[i];
131  w = ppr[i] - d[i];
132  pnat[i] = w;
133  r2 += w*w;
134  }
135  r = sqrt(r2);
136  for (i = 0; i < 3; i++) {
137  pnat[i] /= r;
138  }
139  }
140 
141 /* Light deflection, giving BCRS coordinate direction. */
142  eraZp(d);
143  for (j = 0; j < 5; j++) {
144  r2 = 0.0;
145  for (i = 0; i < 3; i++) {
146  w = pnat[i] - d[i];
147  before[i] = w;
148  r2 += w*w;
149  }
150  r = sqrt(r2);
151  for (i = 0; i < 3; i++) {
152  before[i] /= r;
153  }
154  eraLdn(n, b, astrom->eb, before, after);
155  r2 = 0.0;
156  for (i = 0; i < 3; i++) {
157  d[i] = after[i] - before[i];
158  w = pnat[i] - d[i];
159  pco[i] = w;
160  r2 += w*w;
161  }
162  r = sqrt(r2);
163  for (i = 0; i < 3; i++) {
164  pco[i] /= r;
165  }
166  }
167 
168 /* ICRS astrometric RA,Dec. */
169  eraC2s(pco, &w, dc);
170  *rc = eraAnp(w);
171 
172 /* Finished. */
173 
174 }
void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3])
Definition: ab.c:3
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 eb[3]
Definition: erfam.h:18
double eraAnp(double a)
Definition: anp.c:3
double em
Definition: erfam.h:20
double bm1
Definition: erfam.h:22
void eraLdn(int n, eraLDBODY b[], double ob[3], double sc[3], double sn[3])
Definition: ldn.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: