Date: Sat, 24 Nov 2007 13:34:55 -0500 From: Frank Ghigo To: Rick Fisher Cc: rnorrod@nrao.edu, fghigo Subject: Re: 20-meter pointing corrections Rick, This is how it goes: DAZ = az' - az DEL = el' - el az' and el' are the values you send to the encoder; az and el are the calculated astronomical az/el The full model, which you can ignore, because not all these terms are used: DAZ = P1 - P2*cos(phi)*sin(az)*sec(el) + P3*tan(el) - P4*sec(el) + P5*sin(az)*tan(el) - P6*cos(az)*tan(el) + P12*az + P13*cos(az) + P14*sin(az) DEL = P5*cos(az) + P6*sin(az) + P7 - P8*(cos(phi)*cos(az)*sin(el)-sin(phi)*cos(el)) + P9*el + P10*cos(el) + P11*sin(el) +P15*cos(2az) + P16*sin(2az) This form is used for antennas of different types of axes; the "phi" term is 90 deg for an az/el telescope, so some terms drop out; and not all the coefficients are used, so it simplifies to: DAZ = P1 + P3*tan(el) - P4*sec(el) + p5*sin(az)*tan(el) - P6*cos(az)*tan(el) DEL = P5*cos(az) + P6*sin(az) + P7 - P8*cos(el)+ P9*el + P15*cos(2az) + P16*sin(2az) The coefficient values, in degrees: P1 = -0.614458 P3 = +0.002687 P4 = -0.020850 P5 = +0.007284 P6 = +0.003707 P7 = -0.127830 P8 = -0.071832 P9 = +0.027348 P15= -0.001024 P16= -0.004177 There is also a refraction correction, but probably you can ignore it. The form of it looks complicated, but I can send it to you if you want. -- frank Date: Sat, 24 Nov 2007 13:45:13 -0500 From: Frank Ghigo To: Rick Fisher Cc: Frank Ghigo , rnorrod@nrao.edu Subject: Re: 20-meter pointing corrections Rick, Oops, I got a sign wrong -- the DEL equation is actually: (the P8 term is subtracted, not added) DEL = P5*cos(az) + P6*sin(az) + P7 - P8*cos(el)+ P9*el + P15*cos(2az) + P16*sin(2az) ==================================================================== /* refrw Compute refraction correction given surface weather input. Copied from FORTRAN. */ #include #include #include "../include/dpi.h" #define MAX(a,b) ((a > b) ? a : b) static double p[5]={0.458675e1, 0.322009e0, 0.103452e-1, 0.274777e-3, 0.157115e-5}; static double cvt = 1.33289; static double a = 40; static double b = 2.7; static double c = 4.0; static double d = 42.5; static double e = 0.4; static double f = 2.64; static double g = .57295787e-4; double refrw(delin,tempc,humi,pres) double delin; float tempc,humi,pres; { double el,rhumi,dewpt,x,pp,tempk,sn; double aphi,ang,dele,bphi,ref; int i; el = MAX(1.0,delin*RAD2DEG); /* fprintf(stderr,"REFRW: el=%f\n",el); */ /* Compute SN (surface refractivity) */ rhumi = (100.0-humi)*0.9; dewpt = tempc-rhumi*(-.136667+rhumi*1.33333e-3+tempc*1.5e-3); /* fprintf(stderr,"REFRW: dewpt=%f\n",dewpt); */ x = dewpt; pp = p[0]; for (i=1; i<5; i++) { pp += x*p[i]; x += dewpt; } /* fprintf(stderr,"REFRW: tempk,cvt,pp,sn=%f %f %f %f\n",tempk,cvt,pp,sn); */ tempk = tempc + 273.0; sn = 77.6*(pres+(4810.0*cvt*pp)/tempk)/tempk; /* Compute refraction at elevation */ /* fprintf(stderr,"REFRW: el,b,c= %f %f %f\n",el,b,c); */ aphi = a/pow((el+b),c); ang = (90-el)*DEG2RAD; dele = -d/pow((el+e),f); bphi = g*(sin(ang)/cos(ang)+dele); if (el < 0.01) bphi = g*(1.0+dele); return (bphi*sn-aphi)*DEG2RAD; }