### SLA_OAPQK

Quick Observed to Apparent

ACTION:
Quick observed to apparent place.
CALL:
CALL sla_OAPQK (TYPE, OB1, OB2, AOPRMS, RAP, DAP)
##### GIVEN:
 TYPE C*(*) type of coordinates – ‘R’, ‘H’ or ‘A’ (see below) OB1 D observed Az, HA or RA (radians; Az is N=0, E=$9{0}^{\circ }$) OB2 D observed zenith distance or $\delta$ (radians) AOPRMS D(14) star-independent apparent-to-observed parameters: (1) geodetic latitude (radians) (2,3) sine and cosine of geodetic latitude (4) magnitude of diurnal aberration vector (5) height (HM) (6) ambient temperature (TDK) (7) pressure (PMB) (8) relative humidity (RH) (9) wavelength (WL) (10) lapse rate (TLR) (11,12) refraction constants A and B (radians) (13) longitude + eqn of equinoxes + “sidereal $\Delta$UT” (radians) (14) local apparent sidereal time (radians)

##### RETURNED:
 RAP,DAP D geocentric apparent $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$

NOTES:
(1)
Only the first character of the TYPE argument is significant. ‘R’ or ‘r’ indicates that OBS1 and OBS2 are the observed right ascension and declination; ‘H’ or ‘h’ indicates that they are hour angle (west +ve) and declination; anything else (‘A’ or ‘a’ is recommended) indicates that OBS1 and OBS2 are Azimuth (north zero, east $9{0}^{\circ }$) and zenith distance. (Zenith distance is used rather than elevation in order to reflect the fact that no allowance is made for depression of the horizon.)
(2)
The accuracy of the result is limited by the corrections for refraction. Providing the meteorological parameters are known accurately and there are no gross local effects, the predicted azimuth and elevation should be within about ′′01 for $\zeta <7{0}^{\circ }$. Even at a topocentric zenith distance of $9{0}^{\circ }$, the accuracy in elevation should be better than 1 arcminute; useful results are available for a further ${3}^{\circ }$, beyond which the sla_REFRO routine returns a fixed value of the refraction. The complementary routines sla_AOP (or sla_AOPQK) and sla_OAP (or sla_OAPQK) are self-consistent to better than 1 microarcsecond all over the celestial sphere.
(3)
It is advisable to take great care with units, as even unlikely values of the input parameters are accepted and processed in accordance with the models used.
(4)
Observed $\left[\phantom{\rule{0.3em}{0ex}}Az,El\phantom{\rule{1em}{0ex}}\right]$ means the position that would be seen by a perfect theodolite located at the observer. This is related to the observed $\left[\phantom{\rule{0.3em}{0ex}}h,\delta \phantom{\rule{0.3em}{0ex}}\right]$ via the standard rotation, using the geodetic latitude (corrected for polar motion), while the observed HA and RA are related simply through the local apparent ST. Observed $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$ or $\left[\phantom{\rule{0.3em}{0ex}}h,\delta \phantom{\rule{0.3em}{0ex}}\right]$ thus means the position that would be seen by a perfect equatorial located at the observer and with its polar axis aligned to the Earth’s axis of rotation (n.b. not to the refracted pole). By removing from the observed place the effects of atmospheric refraction and diurnal aberration, the geocentric apparent $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$ is obtained.
(5)
Frequently, mean rather than apparent $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$ will be required, in which case further transformations will be necessary. The sla_AMP etc. routines will convert the apparent $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$ produced by the present routine into an FK5 J2000 mean place, by allowing for the Sun’s gravitational lens effect, annual aberration, nutation and precession. Should FK4 B1950 coordinates be required, the routines sla_FK524 etc. will also have to be applied.
(6)
To convert to apparent $\left[\phantom{\rule{0.3em}{0ex}}\alpha ,\delta \phantom{\rule{0.3em}{0ex}}\right]$ the coordinates read from a real telescope, corrections would have to be applied for encoder zero points, gear and encoder errors, tube flexure, the position of the rotator axis and the pointing axis relative to it, non-perpendicularity between the mounting axes, and finally for the tilt of the azimuth or polar axis of the mounting (with appropriate corrections for mount flexures). Some telescopes would, of course, exhibit other properties which would need to be accounted for at the appropriate point in the sequence.
(7)
The star-independent apparent-to-observed-place parameters in AOPRMS may be computed by means of the sla_AOPPA routine. If nothing has changed significantly except the time, the sla_AOPPAT routine may be used to perform the requisite partial recomputation of AOPRMS.
(8)
The azimuths etc. used by the present routine are with respect to the celestial pole. Corrections from the terrestrial pole can be computed using sla_POLMO.