186 const double zbreak = 0.242535625;
189 double sphi,cphi,st,v[3],xhd,yhd,zhd,diurab,f,
190 xhdt,yhdt,zhdt,xaet,yaet,zaet,azobs,
191 zdt,refa,refb,zdobs,dzd,dref,ce,
192 xaeo,yaeo,zaeo,hmobs,dcobs,raobs;
209 f = (1.0-diurab*yhd);
211 yhdt = f*(yhd+diurab);
215 xaet = sphi*xhdt-cphi*zhdt;
217 zaet = cphi*xhdt+sphi*zhdt;
220 if (xaet == 0.0 && yaet == 0.0) {
223 azobs = atan2(yaet,-xaet);
227 zdt = atan2(sqrt(xaet*xaet+yaet*yaet),zaet);
239 if (cos(zdobs) < zbreak) {
246 while (fabs(dzd) > 1e-10 && i <= 10) {
249 palRefro(zdobs,aoprms[4],aoprms[5],aoprms[6],
250 aoprms[7],aoprms[8],aoprms[0],
251 aoprms[9],1e-8,&dref);
254 dzd = zdobs+dref-zdt;
266 xaeo = -cos(azobs)*ce;
267 yaeo = sin(azobs)*ce;
271 v[0] = sphi*xaeo+cphi*zaeo;
273 v[2] = -cphi*xaeo+sphi*zaeo;
void palRefro(double zobs, double hm, double tdk, double pmb, double rh, double wl, double phi, double tlr, double eps, double *ref)
void palRefz(double zu, double refa, double refb, double *zr)
void palDcc2s(double v[3], double *a, double *b)
double palDranrm(double angle)
void palDcs2c(double a, double b, double v[3])