FACT++  1.0
void palAoppa ( double  date,
double  dut,
double  elongm,
double  phim,
double  hm,
double  xp,
double  yp,
double  tdk,
double  pmb,
double  rh,
double  wl,
double  tlr,
double  aoprms[14] 
)

Definition at line 172 of file palAoppa.c.

References C, PAL__D2PI, PAL__DS2R, pal__Eqeqx(), pal__Geoc(), palAoppat(), and palRefco().

Referenced by PointingModel::CalcPointingPos(), palAop(), palOap(), and t_aop().

174  {
175 
176  /* Constants */
177  const double C = 173.14463331; /* Speed of light (AU per day) */
178  const double SOLSID = 1.0027379093; /* Ratio between solar and sidereal time */
179 
180  /* Local variables */
181  double cphim,xt,yt,zt,xc,yc,zc,elong,phi,uau,vau;
182 
183  /* Observer's location corrected for polar motion */
184  cphim = cos(phim);
185  xt = cos(elongm)*cphim;
186  yt = sin(elongm)*cphim;
187  zt = sin(phim);
188  xc = xt-xp*zt;
189  yc = yt+yp*zt;
190  zc = xp*xt-yp*yt+zt;
191  if (xc == 0.0 && yc == 0.0) {
192  elong = 0.0;
193  } else {
194  elong = atan2(yc,xc);
195  }
196  phi = atan2(zc,sqrt(xc*xc+yc*yc));
197  aoprms[0] = phi;
198  aoprms[1] = sin(phi);
199  aoprms[2] = cos(phi);
200 
201  /* magnitude of the diurnal aberration vector */
202  pal__Geoc(phi,hm,&uau,&vau);
203  aoprms[3] = PAL__D2PI*uau*SOLSID/C;
204 
205  /* copy the refraction parameters and compute the a & b constants */
206  aoprms[4] = hm;
207  aoprms[5] = tdk;
208  aoprms[6] = pmb;
209  aoprms[7] = rh;
210  aoprms[8] = wl;
211  aoprms[9] = tlr;
212  palRefco(hm,tdk,pmb,rh,wl,phi,tlr,1e-10,
213  &aoprms[10],&aoprms[11]);
214 
215  /* longitude + equation of the equinoxes + sidereal equivalent of DUT
216  * (ignoring change in equation of the equinoxes between UTC and TDB) */
217  aoprms[12] = elong+pal__Eqeqx(date)+dut*SOLSID*PAL__DS2R;
218 
219  /* sidereal time */
220  palAoppat(date,aoprms);
221 
222 }
static const double PAL__DS2R
Definition: palmac.h:93
void palRefco(double hm, double tdk, double pmb, double rh, double wl, double phi, double tlr, double eps, double *refa, double *refb)
Definition: palRefco.c:102
static double pal__Eqeqx(double date)
Definition: palAoppa.c:253
in C
Definition: README_v19.txt:379
void palAoppat(double date, double aoprms[14])
Definition: palAoppat.c:78
static void pal__Geoc(double p, double h, double *r, double *z)
Definition: palAoppa.c:228
static const double PAL__D2PI
Definition: palmac.h:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function: