source: trunk/MagicSoft/slalib/aop.c@ 1572

Last change on this file since 1572 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 8.4 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaAop ( double rap, double dap, double date, double dut,
4 double elongm, double phim, double hm,
5 double xp, double yp, double tdk, double pmb,
6 double rh, double wl, double tlr,
7 double *aob, double *zob,
8 double *hob, double *dob,
9 double *rob )
10/*
11** - - - - - - -
12** s l a A o p
13** - - - - - - -
14**
15** Apparent to observed place, for optical sources distant from
16** the solar system.
17**
18** Given:
19** rap double geocentric apparent right ascension
20** dap double geocentric apparent declination
21** date double UTC date/time (Modified Julian Date, JD-2400000.5)
22** dut double delta UT: UT1-UTC (UTC seconds)
23** elongm double mean longitude of the observer (radians, east +ve)
24** phim double mean geodetic latitude of the observer (radians)
25** hm double observer's height above sea level (metres)
26** xp double polar motion x-coordinate (radians)
27** yp double polar motion y-coordinate (radians)
28** tdk double local ambient temperature (DegK; std=273.155)
29** pmb double local atmospheric pressure (mB; std=1013.25)
30** rh double local relative humidity (in the range 0.0-1.0)
31** wl double effective wavelength (micron, e.g. 0.55)
32** tlr double tropospheric lapse rate (DegK/metre, e.g. 0.0065)
33**
34** Returned:
35** aob double observed azimuth (radians: N=0,E=90)
36** zob double observed zenith distance (radians)
37** hob double observed Hour Angle (radians)
38** dob double observed Declination (radians)
39** rob double observed Right Ascension (radians)
40**
41** Notes:
42**
43** 1) This routine returns zenith distance rather than elevation
44** in order to reflect the fact that no allowance is made for
45** depression of the horizon.
46**
47** 2) The accuracy of the result is limited by the corrections for
48** refraction. Providing the meteorological parameters are
49** known accurately and there are no gross local effects, the
50** predicted apparent RA,Dec should be within about 0.1 arcsec
51** for a zenith distance of less than 70 degrees. Even at a
52** topocentric zenith distance of 90 degrees, the accuracy in
53** elevation should be better than 1 arcmin; useful results
54** are available for a further 3 degrees, beyond which the
55** slaRefro routine returns a fixed value of the refraction.
56** The complementary routines slaAop (or slaAopqk) and slaOap
57** (or slaOapqk) are self-consistent to better than 1 micro-
58** arcsecond all over the celestial sphere.
59**
60** 3) It is advisable to take great care with units, as even
61** unlikely values of the input parameters are accepted and
62** processed in accordance with the models used.
63**
64** 4) "Apparent" place means the geocentric apparent right ascension
65** and declination, which is obtained from a catalogue mean place
66** by allowing for space motion, parallax, precession, nutation,
67** annual aberration, and the Sun's gravitational lens effect. For
68** star positions in the FK5 system (i.e. J2000), these effects can
69** be applied by means of the slaMap etc routines. Starting from
70** other mean place systems, additional transformations will be
71** needed; for example, FK4 (i.e. B1950) mean places would first
72** have to be converted to FK5, which can be done with the
73** slaFk425 etc routines.
74**
75** 5) "Observed" Az,El means the position that would be seen by a
76** perfect theodolite located at the observer. This is obtained
77** from the geocentric apparent RA,Dec by allowing for Earth
78** orientation and diurnal aberration, rotating from equator
79** to horizon coordinates, and then adjusting for refraction.
80** The HA,Dec is obtained by rotating back into equatorial
81** coordinates, using the geodetic latitude corrected for polar
82** motion, and is the position that would be seen by a perfect
83** equatorial located at the observer and with its polar axis
84** aligned to the Earth's axis of rotation (n.b. not to the
85** refracted pole). Finally, the RA is obtained by subtracting
86** the HA from the local apparent ST.
87**
88** 6) To predict the required setting of a real telescope, the
89** observed place produced by this routine would have to be
90** adjusted for the tilt of the azimuth or polar axis of the
91** mounting (with appropriate corrections for mount flexures),
92** for non-perpendicularity between the mounting axes, for the
93** position of the rotator axis and the pointing axis relative
94** to it, for tube flexure, for gear and encoder errors, and
95** finally for encoder zero points. Some telescopes would, of
96** course, exhibit other properties which would need to be
97** accounted for at the appropriate point in the sequence.
98**
99** 7) This routine takes time to execute, due mainly to the
100** rigorous integration used to evaluate the refraction.
101** For processing multiple stars for one location and time,
102** call slaAoppa once followed by one call per star to slaAopqk.
103** Where a range of times within a limited period of a few hours
104** is involved, and the highest precision is not required, call
105** slaAoppa once, followed by a call to slaAoppat each time the
106** time changes, followed by one call per star to slaAopqk.
107**
108** 8) The date argument is UTC expressed as an MJD. This is,
109** strictly speaking, wrong, because of leap seconds. However,
110** as long as the delta UT and the UTC are consistent there
111** are no difficulties, except during a leap second. In this
112** case, the start of the 61st second of the final minute should
113** begin a new MJD day and the old pre-leap delta UT should
114** continue to be used. As the 61st second completes, the MJD
115** should revert to the start of the day as, simultaneously,
116** the delta UTC changes by one second to its post-leap new value.
117**
118** 9) The delta UT (UT1-UTC) is tabulated in IERS circulars and
119** elsewhere. It increases by exactly one second at the end of
120** each UTC leap second, introduced in order to keep delta UT
121** within +/- 0.9 seconds.
122**
123** 10) IMPORTANT -- TAKE CARE WITH THE LONGITUDE SIGN CONVENTION.
124** The longitude required by the present routine is east-positive,
125** in accordance with geographical convention (and right-handed).
126** In particular, note that the longitudes returned by the
127** slaObs routine are west-positive, following astronomical
128** usage, and must be reversed in sign before use in the present
129** routine.
130**
131** 11) The polar coordinates xp,yp can be obtained from IERS
132** circulars and equivalent publications. The maximum amplitude
133** is about 0.3 arcseconds. If xp,yp values are unavailable,
134** use xp=yp=0.0. See page B60 of the 1988 Astronomical Almanac
135** for a definition of the two angles.
136**
137** 12) The height above sea level of the observing station, hm,
138** can be obtained from the Astronomical Almanac (Section J
139** in the 1988 edition), or via the routine slaObs. If p,
140** the pressure in millibars, is available, an adequate
141** estimate of hm can be obtained from the expression
142**
143** hm = -29.3 * tsl * log ( p / 1013.25 );
144**
145** where tsl is the approximate sea-level air temperature
146** in deg K (See Astrophysical Quantities, C.W.Allen,
147** 3rd edition, section 52). Similarly, if the pressure p
148** is not known, it can be estimated from the height of the
149** observing station, hm as follows:
150**
151** p = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
152**
153** Note, however, that the refraction is proportional to the
154** pressure and that an accurate p value is important for
155** precise work.
156**
157** 13) The azimuths etc produced by the present routine are with
158** respect to the celestial pole. Corrections to the terrestrial
159** pole can be computed using slaPolmo.
160**
161** Called: slaAoppa, slaAopqk
162**
163** Last revision: 6 September 1999
164**
165** Copyright P.T.Wallace. All rights reserved.
166*/
167{
168 double aoprms[14];
169
170 slaAoppa ( date, dut, elongm, phim, hm, xp,
171 yp, tdk, pmb, rh, wl, tlr, aoprms );
172 slaAopqk ( rap, dap, aoprms, aob, zob, hob, dob, rob );
173}
Note: See TracBrowser for help on using the repository browser.