-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsun267.tex
9601 lines (8954 loc) · 285 KB
/
sun267.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[twoside,11pt,nolof]{starlink}
% ? Specify used packages
% ? End of specify used packages
% -----------------------------------------------------------------------------
% ? Document identification
% Fixed part
\stardoccategory {Starlink User Note}
\stardocinitials {SUN}
\stardocsource {sun\stardocnumber}
\stardoccopyright{%
Copyright \copyright\ 2012 Science and Technology Facilities
Council.\\ Copyright \copyright\ 2014 Cornell University.\\
Copyright \copyright\ 2015 Tim Jenness}
% Variable part - replace [xxx] as appropriate.
\stardocnumber {267.3}
\stardocauthors {Tim Jenness}
\stardocdate {2025 April 17}
\stardoctitle {PAL --- Positional Astronomy Library}
\stardocversion {0.9.10}
\stardocmanual {Programmer's Manual}
\stardocabstract {%
PAL provides a subset of the Fortran SLALIB library but written in C
using the SLALIB C API. Where possible the PAL routines are
implemented using the C SOFA/ERFA library. It is provided with a GPLv3 license.
}
% ? End of document identification
% -----------------------------------------------------------------------------
\begin{document}
\scfrontmatter
% ? Main text
\section{Introduction}
This library provides a C library designed as a API-compatible
replacement for the C SLALIB library (SUN/67) and uses a GPL licence so is
freely redistributable. Where possible the functions call equivalent
SOFA routines (Hohenkerk, C., 2011, Scholarpedia, \textbf{6}, \emph{11404})\footnote{or equivalent ERFA routines.}
and use current IAU 2006 standards. This means that any
functions that rely on nutation or precession will return slightly
different answers to the SLA functions.
\section{Citing PAL}
If you use PAL in your work please consider citing it. The description paper
for PAL is: \emph{PAL: A Positional Astronomy Library}, Jenness, T. \& Berry, D. S.,
in \emph{Astronomical Data Anaysis Software and Systems XXII}, Friedel, D. N. (ed),
ASP Conf.\ Ser. \textbf{475}, p307.
\clearpage
\appendix
\section{\label{APP:SPEC}Function Descriptions}
By default PAL is set up to use the ERFA variant of SOFA. ERFA is an
approved redistribution of the SOFA code using a BSD-license and
renamed function calls. Whereas SOFA routines have a \texttt{iau} prefix
the ERFA equivalents have a \texttt{era} prefix. The PAL build script
will try to detect which of ERFA and SOFA is available. Wherever SOFA
is mentioned in this document the ERFA equivalent can be substituted.
ERFA can be obtained from \htmladdnormallink{https://github.com/liberfa/erfa}.
\subsection{SOFA Mappings}
The following table lists PAL/SLA functions that have direct
replacements in SOFA. Whilst these routines are implemented in the PAL
library using SOFA new code should probably call SOFA directly.
\begin{tabbing}
\hspace*{2cm}\=\hspace*{3cm}\= \kill
SLA/PAL \> SOFA \\
\texttt{palCldj} \> \texttt{iauCal2jd} \\
\texttt{palDbear} \> \texttt{iauPas} \\
\texttt{palDaf2r} \> \texttt{iauAf2a} \\
\texttt{palDav2m} \> \texttt{iauRv2m} \\
\texttt{palDcc2s} \> \texttt{iauC2s} \\
\texttt{palDcs2c} \> \texttt{iauS2c} \\
\texttt{palDd2tf} \> \texttt{iauD2tf}\\
\texttt{palDimxv} \> \texttt{iauTrxp}\\
\texttt{palDm2av} \> \texttt{iauRm2v}\\
\texttt{palDjcl} \> \texttt{iauJd2cal}\\
\texttt{palDmxm} \> \texttt{iauRxr}\\
\texttt{palDmxv} \> \texttt{iauRxp}\\
\texttt{palDpav} \> \texttt{iauPap}\\
\texttt{palDr2af} \> \texttt{iauA2af}\\
\texttt{palDr2tf} \> \texttt{iauA2tf}\\
\texttt{palDranrm} \> \texttt{iauAnp}\\
\texttt{palDsep} \> \texttt{iauSeps}\\
\texttt{palDsepv} \> \texttt{iauSepp}\\
\texttt{palDtf2d} \> \texttt{iauTf2d}\\
\texttt{palDtf2r} \> \texttt{iauTf2a}\\
\texttt{palDvdv} \> \texttt{iauPdp}\\
\texttt{palDvn} \> \texttt{iauPn}\\
\texttt{palDvxv} \> \texttt{iauPxp}\\
\texttt{palEpb} \> \texttt{iauEpb}\\
\texttt{palEpb2d} \> \texttt{iauEpb2d}\\
\texttt{palEpj} \> \texttt{iauEpj}\\
\texttt{palEpj2d} \> \texttt{iauEpj2jd}\\
\texttt{palEqeqx} \> \texttt{iauEe06a}\\
\texttt{palFk5hz} \> \texttt{iauFk5hz} \textit{also calls iauEpj2jd}\\
\texttt{palGmst} \> \texttt{iauGmst06}\\
\texttt{palGmsta} \> \texttt{iauGmst06}\\
\texttt{palHfk5z} \> \texttt{iauHfk5z} \textit{also calls iauEpj2jd}\\
\texttt{palRefcoq} \> \texttt{iauRefco}\\
\end{tabbing}
%% include palsun.tex
\sstroutine{
palAddet
}{
Add the E-terms to a pre IAU 1976 mean place
}{
\sstdescription{
Add the E-terms (elliptic component of annual aberration)
to a pre IAU 1976 mean place to conform to the old
catalogue convention.
}
\sstinvocation{
void palAddet ( double rm, double dm, double eq,
double $*$rc, double $*$dc );
}
\sstarguments{
\sstsubsection{
rm = double (Given)
}{
RA without E-terms (radians)
}
\sstsubsection{
dm = double (Given)
}{
Dec without E-terms (radians)
}
\sstsubsection{
eq = double (Given)
}{
Besselian epoch of mean equator and equinox
}
\sstsubsection{
rc = double $*$ (Returned)
}{
RA with E-terms included (radians)
}
\sstsubsection{
dc = double $*$ (Returned)
}{
Dec with E-terms included (radians)
}
}
\sstnotes{
Most star positions from pre-1984 optical catalogues (or
derived from astrometry using such stars) embody the
E-terms. If it is necessary to convert a formal mean
place (for example a pulsar timing position) to one
consistent with such a star catalogue, then the RA,Dec
should be adjusted using this routine.
}
\sstdiytopic{
See Also
}{
Explanatory Supplement to the Astronomical Ephemeris,
section 2D, page 48.
}
}
\sstroutine{
palAirmas
}{
Air mass at given zenith distance
}{
\sstdescription{
Calculates the airmass at the observed zenith distance.
}
\sstinvocation{
double palAirmas( double zd );
}
\sstarguments{
\sstsubsection{
zd = double (Given)
}{
Observed zenith distance (radians)
}
}
\sstnotes{
\sstitemlist{
\sstitem
The \texttt{"} observed\texttt{"} zenith distance referred to above means \texttt{"} as
affected by refraction\texttt{"} .
\sstitem
Uses Hardie\texttt{'} s (1962) polynomial fit to Bemporad\texttt{'} s data for
the relative air mass, X, in units of thickness at the zenith
as tabulated by Schoenberg (1929). This is adequate for all
normal needs as it is accurate to better than 0.1\% up to X =
6.8 and better than 1\% up to X = 10. Bemporad\texttt{'} s tabulated
values are unlikely to be trustworthy to such accuracy
because of variations in density, pressure and other
conditions in the atmosphere from those assumed in his work.
\sstitem
The sign of the ZD is ignored.
\sstitem
At zenith distances greater than about ZD = 87 degrees the
air mass is held constant to avoid arithmetic overflows.
}
}
\sstdiytopic{
See Also
}{
\sstitemlist{
\sstitem
Hardie, R.H., 1962, in \texttt{"} Astronomical Techniques\texttt{"}
ed. W.A. Hiltner, University of Chicago Press, p180.
\sstitem
Schoenberg, E., 1929, Hdb. d. Ap.,
Berlin, Julius Springer, 2, 268.
}
}
}
\sstroutine{
palAltaz
}{
Positions, velocities and accelerations for an altazimuth telescope mount
}{
\sstdescription{
Positions, velocities and accelerations for an altazimuth
telescope mount.
}
\sstinvocation{
palAltaz ( double ha, double dec, double phi,
double $*$az, double $*$azd, double $*$azdd,
double $*$el, double $*$eld, double $*$eldd,
double $*$pa, double $*$pad, double $*$padd );
}
\sstarguments{
\sstsubsection{
ha = double (Given)
}{
Hour angle (radians)
}
\sstsubsection{
dec = double (Given)
}{
Declination (radians)
}
\sstsubsection{
phi = double (Given)
}{
Observatory latitude (radians)
}
\sstsubsection{
az = double $*$ (Returned)
}{
Azimuth (radians)
}
\sstsubsection{
azd = double $*$ (Returned)
}{
Azimuth velocity (radians per radian of HA)
}
\sstsubsection{
azdd = double $*$ (Returned)
}{
Azimuth acceleration (radians per radian of HA squared)
}
\sstsubsection{
el = double $*$ (Returned)
}{
Elevation (radians)
}
\sstsubsection{
eld = double $*$ (Returned)
}{
Elevation velocity (radians per radian of HA)
}
\sstsubsection{
eldd = double $*$ (Returned)
}{
Elevation acceleration (radians per radian of HA squared)
}
\sstsubsection{
pa = double $*$ (Returned)
}{
Parallactic angle (radians)
}
\sstsubsection{
pad = double $*$ (Returned)
}{
Parallactic angle velocity (radians per radian of HA)
}
\sstsubsection{
padd = double $*$ (Returned)
}{
Parallactic angle acceleration (radians per radian of HA squared)
}
}
\sstnotes{
\sstitemlist{
\sstitem
Natural units are used throughout. HA, DEC, PHI, AZ, EL
and ZD are in radians. The velocities and accelerations
assume constant declination and constant rate of change of
hour angle (as for tracking a star); the units of AZD, ELD
and PAD are radians per radian of HA, while the units of AZDD,
ELDD and PADD are radians per radian of HA squared. To
convert into practical degree- and second-based units:
}
angles $*$ 360/2pi -$>$ degrees
velocities $*$ (2pi/86400)$*$(360/2pi) -$>$ degree/sec
accelerations $*$ ((2pi/86400)$*$$*$2)$*$(360/2pi) -$>$ degree/sec/sec
Note that the seconds here are sidereal rather than SI. One
sidereal second is about 0.99727 SI seconds.
The velocity and acceleration factors assume the sidereal
tracking case. Their respective numerical values are (exactly)
1/240 and (approximately) 1/3300236.9.
\sstitemlist{
\sstitem
Azimuth is returned in the range 0-2pi; north is zero,
and east is $+$pi/2. Elevation and parallactic angle are
returned in the range $+$/-pi. Parallactic angle is $+$ve for
a star west of the meridian and is the angle NP-star-zenith.
\sstitem
The latitude is geodetic as opposed to geocentric. The
hour angle and declination are topocentric. Refraction and
deficiencies in the telescope mounting are ignored. The
purpose of the routine is to give the general form of the
quantities. The details of a real telescope could profoundly
change the results, especially close to the zenith.
\sstitem
No range checking of arguments is carried out.
\sstitem
In applications which involve many such calculations, rather
than calling the present routine it will be more efficient to
use inline code, having previously computed fixed terms such
as sine and cosine of latitude, and (for tracking a star)
sine and cosine of declination.
}
}
}
\sstroutine{
palAmp
}{
Convert star RA,Dec from geocentric apparaent to mean place
}{
\sstdescription{
Convert star RA,Dec from geocentric apparent to mean place. The
mean coordinate system is close to ICRS. See palAmpqk for details.
}
\sstinvocation{
void palAmp ( double ra, double da, double date, double eq,
double $*$rm, double $*$dm );
}
\sstarguments{
\sstsubsection{
ra = double (Given)
}{
Apparent RA (radians)
}
\sstsubsection{
dec = double (Given)
}{
Apparent Dec (radians)
}
\sstsubsection{
date = double (Given)
}{
TDB for apparent place (JD-2400000.5)
}
\sstsubsection{
eq = double (Given)
}{
Equinox: Julian epoch of mean place.
}
\sstsubsection{
rm = double $*$ (Returned)
}{
Mean RA (radians)
}
\sstsubsection{
dm = double $*$ (Returned)
}{
Mean Dec (radians)
}
}
\sstnotes{
\sstitemlist{
\sstitem
See palMappa and palAmpqk for details.
}
}
}
\sstroutine{
palAmpqk
}{
Convert star RA,Dec from geocentric apparent to mean place
}{
\sstdescription{
Convert star RA,Dec from geocentric apparent to mean place. The \texttt{"} mean\texttt{"}
coordinate system is in fact close to ICRS. Use of this function
is appropriate when efficiency is important and where many star
positions are all to be transformed for one epoch and equinox. The
star-independent parameters can be obtained by calling the palMappa
function.
}
\sstinvocation{
void palAmpqk ( double ra, double da, double amprms[21],
double $*$rm, double $*$dm )
}
\sstarguments{
\sstsubsection{
ra = double (Given)
}{
Apparent RA (radians).
}
\sstsubsection{
da = double (Given)
}{
Apparent Dec (radians).
}
\sstsubsection{
amprms = double[21] (Given)
}{
Star-independent mean-to-apparent parameters (see palMappa):
(0) time interval for proper motion (Julian years)
(1-3) barycentric position of the Earth (AU)
(4-6) heliocentric direction of the Earth (unit vector)
(7) (grav rad Sun)$*$2/(Sun-Earth distance)
(8-10) abv: barycentric Earth velocity in units of c
(11) sqrt(1-v$*$v) where v=modulus(abv)
(12-20) precession/nutation (3,3) matrix
}
\sstsubsection{
rm = double (Returned)
}{
Mean RA (radians).
}
\sstsubsection{
dm = double (Returned)
}{
Mean Dec (radians).
}
}
\sstdiytopic{
Note
}{
Iterative techniques are used for the aberration and
light deflection corrections so that the routines
palAmp (or palAmpqk) and palMap (or palMapqk) are
accurate inverses; even at the edge of the Sun\texttt{'} s disc
the discrepancy is only about 1 nanoarcsecond.
}
}
\sstroutine{
palAop
}{
Apparent to observed place
}{
\sstdescription{
Apparent to observed place for sources distant from the solar system.
}
\sstinvocation{
void palAop ( double rap, double dap, double date, double dut,
double elongm, double phim, double hm, double xp,
double yp, double tdk, double pmb, double rh,
double wl, double tlr,
double $*$aob, double $*$zob, double $*$hob,
double $*$dob, double $*$rob );
}
\sstarguments{
\sstsubsection{
rap = double (Given)
}{
Geocentric apparent right ascension
}
\sstsubsection{
dap = double (Given)
}{
Geocentirc apparent declination
}
\sstsubsection{
date = double (Given)
}{
UTC date/time (Modified Julian Date, JD-2400000.5)
}
\sstsubsection{
dut = double (Given)
}{
delta UT: UT1-UTC (UTC seconds)
}
\sstsubsection{
elongm = double (Given)
}{
Mean longitude of the observer (radians, east $+$ve)
}
\sstsubsection{
phim = double (Given)
}{
Mean geodetic latitude of the observer (radians)
}
\sstsubsection{
hm = double (Given)
}{
Observer\texttt{'} s height above sea level (metres)
}
\sstsubsection{
xp = double (Given)
}{
Polar motion x-coordinates (radians)
}
\sstsubsection{
yp = double (Given)
}{
Polar motion y-coordinates (radians)
}
\sstsubsection{
tdk = double (Given)
}{
Local ambient temperature (K; std=273.15)
}
\sstsubsection{
pmb = double (Given)
}{
Local atmospheric pressure (mb; std=1013.25)
}
\sstsubsection{
rh = double (Given)
}{
Local relative humidity (in the range 0.0-1.0)
}
\sstsubsection{
wl = double (Given)
}{
Effective wavelength (micron, e.g. 0.55)
}
\sstsubsection{
tlr = double (Given)
}{
Tropospheric laps rate (K/metre, e.g. 0.0065)
}
\sstsubsection{
aob = double $*$ (Returned)
}{
Observed azimuth (radians: N=0; E=90)
}
\sstsubsection{
zob = double $*$ (Returned)
}{
Observed zenith distance (radians)
}
\sstsubsection{
hob = double $*$ (Returned)
}{
Observed Hour Angle (radians)
}
\sstsubsection{
dob = double $*$ (Returned)
}{
Observed Declination (radians)
}
\sstsubsection{
rob = double $*$ (Returned)
}{
Observed Right Ascension (radians)
}
}
\sstnotes{
\sstitemlist{
\sstitem
This routine returns zenith distance rather than elevation
in order to reflect the fact that no allowance is made for
depression of the horizon.
\sstitem
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 apparent RA,Dec should be within about 0.1 arcsec
for a zenith distance of less than 70 degrees. Even at a
topocentric zenith distance of 90 degrees, the accuracy in
elevation should be better than 1 arcmin; useful results
are available for a further 3 degrees, beyond which the
palRefro routine returns a fixed value of the refraction.
The complementary routines palAop (or palAopqk) and palOap
(or palOapqk) are self-consistent to better than 1 micro-
arcsecond all over the celestial sphere.
\sstitem
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.
\sstitem
\texttt{"} Apparent\texttt{"} place means the geocentric apparent right ascension
and declination, which is obtained from a catalogue mean place
by allowing for space motion, parallax, precession, nutation,
annual aberration, and the Sun\texttt{'} s gravitational lens effect. For
star positions in the FK5 system (i.e. J2000), these effects can
be applied by means of the palMap etc routines. Starting from
other mean place systems, additional transformations will be
needed; for example, FK4 (i.e. B1950) mean places would first
have to be converted to FK5, which can be done with the
palFk425 etc routines.
\sstitem
\texttt{"} Observed\texttt{"} Az,El means the position that would be seen by a
perfect theodolite located at the observer. This is obtained
from the geocentric apparent RA,Dec by allowing for Earth
orientation and diurnal aberration, rotating from equator
to horizon coordinates, and then adjusting for refraction.
The HA,Dec is obtained by rotating back into equatorial
coordinates, using the geodetic latitude corrected for polar
motion, and is the position that would be seen by a perfect
equatorial located at the observer and with its polar axis
aligned to the Earth\texttt{'} s axis of rotation (n.b. not to the
refracted pole). Finally, the RA is obtained by subtracting
the HA from the local apparent ST.
\sstitem
To predict the required setting of a real telescope, the
observed place produced by this routine would have to be
adjusted for the tilt of the azimuth or polar axis of the
mounting (with appropriate corrections for mount flexures),
for non-perpendicularity between the mounting axes, for the
position of the rotator axis and the pointing axis relative
to it, for tube flexure, for gear and encoder errors, and
finally for encoder zero points. Some telescopes would, of
course, exhibit other properties which would need to be
accounted for at the appropriate point in the sequence.
\sstitem
This routine takes time to execute, due mainly to the
rigorous integration used to evaluate the refraction.
For processing multiple stars for one location and time,
call palAoppa once followed by one call per star to palAopqk.
Where a range of times within a limited period of a few hours
is involved, and the highest precision is not required, call
palAoppa once, followed by a call to palAoppat each time the
time changes, followed by one call per star to palAopqk.
\sstitem
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 UTC changes by one second to its post-leap new value.
\sstitem
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.9 seconds.
\sstitem
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
palObs routine are west-positive, following astronomical
usage, and must be reversed in sign before use in the present
routine.
\sstitem
The polar coordinates XP,YP can be obtained from IERS
circulars and equivalent publications. The maximum amplitude
is about 0.3 arcseconds. If XP,YP values are unavailable,
use XP=YP=0.0. See page B60 of the 1988 Astronomical Almanac
for a definition of the two angles.
\sstitem
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 palObs. If P,
the pressure in millibars, is available, an adequate
estimate of HM can be obtained from the expression
}
HM $\sim$ -29.3$*$TSL$*$LOG(P/1013.25).
where TSL is the approximate sea-level air temperature in K
(see Astrophysical Quantities, C.W.Allen, 3rd edition,
section 52). Similarly, if the pressure P is not known,
it can be estimated from the height of the observing
station, HM, as follows:
P $\sim$ 1013.25$*$EXP(-HM/(29.3$*$TSL)).
Note, however, that the refraction is nearly proportional to the
pressure and that an accurate P value is important for precise
work.
\sstitemlist{
\sstitem
The azimuths etc produced by the present routine are with
respect to the celestial pole. Corrections to the terrestrial
pole can be computed using palPolmo.
}
}
}
\sstroutine{
palAoppa
}{
Precompute apparent to observed place parameters
}{
\sstdescription{
Precompute apparent to observed place parameters required by palAopqk
and palOapqk.
}
\sstinvocation{
void palAoppa ( double date, double dut, double elongm, double phim,
double hm, double xp, double yp, double tdk, double pmb,
double rh, double wl, double tlr, double aoprms[14] );
}
\sstarguments{
\sstsubsection{
date = double (Given)
}{
UTC date/time (modified Julian Date, JD-2400000.5)
}
\sstsubsection{
dut = double (Given)
}{
delta UT: UT1-UTC (UTC seconds)
}
\sstsubsection{
elongm = double (Given)
}{
mean longitude of the observer (radians, east $+$ve)
}
\sstsubsection{
phim = double (Given)
}{
mean geodetic latitude of the observer (radians)
}
\sstsubsection{
hm = double (Given)
}{
observer\texttt{'} s height above sea level (metres)
}
\sstsubsection{
xp = double (Given)
}{
polar motion x-coordinate (radians)
}
\sstsubsection{
yp = double (Given)
}{
polar motion y-coordinate (radians)
}
\sstsubsection{
tdk = double (Given)
}{
local ambient temperature (K; std=273.15)
}
\sstsubsection{
pmb = double (Given)
}{
local atmospheric pressure (mb; std=1013.25)
}
\sstsubsection{
rh = double (Given)
}{
local relative humidity (in the range 0.0-1.0)
}
\sstsubsection{
wl = double (Given)
}{
effective wavelength (micron, e.g. 0.55)
}
\sstsubsection{
tlr = double (Given)
}{
tropospheric lapse rate (K/metre, e.g. 0.0065)
}
\sstsubsection{
aoprms = double [14] (Returned)
}{
Star-independent apparent-to-observed parameters
(0) geodetic latitude (radians)
(1,2) sine and cosine of geodetic latitude
(3) magnitude of diurnal aberration vector
(4) height (hm)
(5) ambient temperature (tdk)
(6) pressure (pmb)
(7) relative humidity (rh)
(8) wavelength (wl)
(9) lapse rate (tlr)
(10,11) refraction constants A and B (radians)
(12) longitude $+$ eqn of equinoxes $+$ sidereal DUT (radians)
(13) local apparent sidereal time (radians)
}
}
\sstnotes{
\sstitemlist{
\sstitem
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.
\sstitem
The DATE argument is UTC expressed as an MJD. This is,
strictly speaking, improper, 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 UTC changes by one second to its post-leap new value.
\sstitem
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.9 seconds.
\sstitem
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
palObs routine are west-positive, following astronomical
usage, and must be reversed in sign before use in the present
routine.
\sstitem
The polar coordinates XP,YP can be obtained from IERS
circulars and equivalent publications. The maximum amplitude
is about 0.3 arcseconds. If XP,YP values are unavailable,
use XP=YP=0.0. See page B60 of the 1988 Astronomical Almanac
for a definition of the two angles.
\sstitem
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 palObs. If P,
the pressure in millibars, is available, an adequate
estimate of HM can be obtained from the expression
}
HM $\sim$ -29.3$*$TSL$*$log(P/1013.25).
where TSL is the approximate sea-level air temperature in K
(see Astrophysical Quantities, C.W.Allen, 3rd edition,
section 52). Similarly, if the pressure P is not known,
it can be estimated from the height of the observing
station, HM, as follows:
P $\sim$ 1013.25$*$exp(-HM/(29.3$*$TSL)).
Note, however, that the refraction is nearly proportional to the
pressure and that an accurate P value is important for precise
work.
\sstitemlist{
\sstitem
Repeated, computationally-expensive, calls to palAoppa for
times that are very close together can be avoided by calling
palAoppa just once and then using palAoppat for the subsequent
times. Fresh calls to palAoppa will be needed only when
changes in the precession have grown to unacceptable levels or
when anything affecting the refraction has changed.
}
}
}
\sstroutine{
palAoppat
}{
Recompute sidereal time to support apparent to observed place
}{
\sstdescription{
This routine recomputes the sidereal time in the apparent to
observed place star-independent parameter block.
}
\sstinvocation{
void palAoppat( double date, double aoprms[14] );
}
\sstarguments{
\sstsubsection{
date = double (Given)
}{
UTC date/time (modified Julian Date, JD-2400000.5)
(see palAoppa description for comments on leap seconds)
}
\sstsubsection{
aoprms = double[14] (Given \& Returned)
}{
Star-independent apparent-to-observed parameters. Updated
by this routine. Requires element 12 to be the longitude $+$
eqn of equinoxes $+$ sidereal DUT and fills in element 13
with the local apparent sidereal time (in radians).
}
}
\sstnotes{
\sstitemlist{
\sstitem
See palAoppa for more information.
\sstitem
The star-independent parameters are not treated as an opaque
struct in order to retain compatibility with SLA.
}
}
}
\sstroutine{
palAopqk
}{
Quick apparent to observed place
}{
\sstdescription{
Quick apparent to observed place.
}
\sstinvocation{
void palAopqk ( double rap, double dap, const double aoprms[14],
double $*$aob, double $*$zob, double $*$hob,
double $*$dob, double $*$rob );
}
\sstarguments{
\sstsubsection{
rap = double (Given)
}{
Geocentric apparent right ascension
}
\sstsubsection{
dap = double (Given)
}{
Geocentric apparent declination
}
\sstsubsection{
aoprms = const double [14] (Given)
}{
Star-independent apparent-to-observed parameters.
[0] geodetic latitude (radians)
[1,2] sine and cosine of geodetic latitude
[3] magnitude of diurnal aberration vector
[4] height (HM)
[5] ambient temperature (T)
[6] pressure (P)
[7] relative humidity (RH)
[8] wavelength (WL)
[9] lapse rate (TLR)
[10,11] refraction constants A and B (radians)
[12] longitude $+$ eqn of equinoxes $+$ sidereal DUT (radians)
[13] local apparent sidereal time (radians)
}
\sstsubsection{
aob = double $*$ (Returned)
}{
Observed azimuth (radians: N=0,E=90)
}
\sstsubsection{
zob = double $*$ (Returned)
}{
Observed zenith distance (radians)
}
\sstsubsection{
hob = double $*$ (Returned)
}{
Observed Hour Angle (radians)
}
\sstsubsection{
dob = double $*$ (Returned)
}{
Observed Declination (radians)
}
\sstsubsection{
rob = double $*$ (Returned)
}{
Observed Right Ascension (radians)
}
}
\sstnotes{
\sstitemlist{