### SLA_AOPPA

Appt-to-Obs Parameters

ACTION:
Pre-compute the set of apparent to observed place parameters required by the “quick” routines sla_AOPQK and sla_OAPQK.
CALL:
CALL sla_AOPPA (DATE, DUT, ELONGM, PHIM, HM, XP, YP, TDK, PMB, RH, WL, TLR, AOPRMS) 
##### GIVEN:
 DATE D UTC date/time (Modified Julian Date, JD$-$2400000.5) DUT D $\Delta$UT: UT1$-$UTC (UTC seconds) ELONGM D observer’s mean longitude (radians, east +ve) PHIM D observer’s mean geodetic latitude (radians) HM D observer’s height above sea level (metres) XP,YP D polar motion $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$ coordinates (radians) TDK D local ambient temperature (K; std=273.15D0) PMB D local atmospheric pressure (mb; std=1013.25D0) RH D local relative humidity (in the range 0D0 – 1D0) WL D effective wavelength ($\mu m$, e.g. 0.55D0) TLR D tropospheric lapse rate (K per metre, e.g. 0.0065D0)

##### RETURNED:
 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)

NOTES:
(1)
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.
(2)
The DATE argument is UTC expressed as an MJD. This is, strictly speaking, wrong, because of leap seconds. However, as long as the $\Delta$UT and the UTC are consistent there are no difficulties, except during a leap second. In this case, the start of the 61st second of the final minute should begin a new MJD day and the old pre-leap $\Delta$UT should continue to be used. As the 61st second completes, the MJD should revert to the start of the day as, simultaneously, the $\Delta$UT changes by one second to its post-leap new value.
(3)
The $\Delta$UT (UT1$-$UTC) is tabulated in IERS circulars and elsewhere. It increases by exactly one second at the end of each UTC leap second, introduced in order to keep $\Delta$UT within $±$$0$$s$$\phantom{\rule{-3.28502pt}{0ex}}.9$. The “sidereal $\Delta$UT” which forms part of AOPRMS(13) is the same quantity, but converted from solar to sidereal seconds and expressed in radians.
(4)
IMPORTANT – TAKE CARE WITH THE LONGITUDE SIGN CONVENTION. The longitude required by the present routine is east-positive, in accordance with geographical convention (and right-handed). In particular, note that the longitudes returned by the sla_OBS routine are west-positive (as in the Astronomical Almanac before 1984) and must be reversed in sign before use in the present routine.
(5)
The polar coordinates XP,YP can be obtained from IERS circulars and equivalent publications. The maximum amplitude is about ′′03. If XP,YP values are unavailable, use XP=YP=0D0. See page B60 of the 1988 Astronomical Almanac for a definition of the two angles.
(6)
The height above sea level of the observing station, HM, can be obtained from the Astronomical Almanac (Section J in the 1988 edition), or via the routine sla_OBS. If P, the pressure in millibars, is available, an adequate estimate of HM can be obtained from the following expression:

HM=-29.3D0*TSL*LOG(P/1013.25D0)

where TSL is the approximate sea-level air temperature in K (see Astrophysical Quantities, C.W.Allen, 3rd edition, §52). Similarly, if the pressure P is not known, it can be estimated from the height of the observing station, HM as follows:

P=1013.25D0*EXP(-HM/(29.3D0*TSL))

Note, however, that the refraction is nearly proportional to the pressure and that an accurate P value is important for precise work.

(7)
Repeated, computationally-expensive, calls to sla_AOPPA for times that are very close together can be avoided by calling sla_AOPPA just once and then using sla_AOPPAT for the subsequent times. Fresh calls to sla_AOPPA will be needed only when changes in the precession have grown to unacceptable levels or when anything affecting the refraction has changed.