FACT++  1.0
void palAmpqk ( double  ra,
double  da,
double  amprms[21],
double *  rm,
double *  dm 
)

Definition at line 85 of file palAmpqk.c.

References eraAnp(), eraC2s(), eraPdp(), eraPn(), eraS2c(), eraTrxp(), and i.

Referenced by PointingModel::CalcPointingPos(), palAmp(), and t_ampqk().

86  {
87 
88 /* Local Variables: */
89  double ab1; /* sqrt(1-v*v) where v=modulus of Earth vel */
90  double abv[3]; /* Earth velocity wrt SSB (c, FK5) */
91  double p1[3], p2[3], p3[3]; /* work vectors */
92  double ab1p1, p1dv, p1dvp1, w;
93  int i, j;
94 
95 /* Unpack some of the parameters */
96  ab1 = amprms[11];
97  for( i = 0; i < 3; i++ ) {
98  abv[i] = amprms[i + 8];
99  }
100 
101 /* Apparent RA,Dec to Cartesian */
102  eraS2c( ra, da, p3 );
103 
104 /* Precession and nutation */
105  eraTrxp( (double(*)[3]) &amprms[12], p3, p2 );
106 
107 /* Aberration */
108  ab1p1 = ab1 + 1.0;
109  for( i = 0; i < 3; i++ ) {
110  p1[i] = p2[i];
111  }
112  for( j = 0; j < 2; j++ ) {
113  p1dv = eraPdp( p1, abv );
114  p1dvp1 = 1.0 + p1dv;
115  w = 1.0 + p1dv / ab1p1;
116  for( i = 0; i < 3; i++ ) {
117  p1[i] = ( p1dvp1 * p2[i] - w * abv[i] ) / ab1;
118  }
119  eraPn( p1, &w, p3 );
120  for( i = 0; i < 3; i++ ) {
121  p1[i] = p3[i];
122  }
123  }
124 
125 /* Mean RA,Dec */
126  eraC2s( p1, rm, dm );
127  *rm = eraAnp( *rm );
128 }
double eraPdp(double a[3], double b[3])
Definition: pdp.c:3
int i
Definition: db_dim_client.c:21
void eraS2c(double theta, double phi, double c[3])
Definition: s2c.c:3
double w
Definition: palObs.c:168
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
void eraPn(double p[3], double *r, double u[3])
Definition: pn.c:3
double eraAnp(double a)
Definition: anp.c:3

+ Here is the call graph for this function:

+ Here is the caller graph for this function: