Last change
on this file since 4450 was 731, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | double slaPa ( double ha, double dec, double phi )
|
---|
4 | /*+
|
---|
5 | ** - - - - - -
|
---|
6 | ** s l a P a
|
---|
7 | ** - - - - - -
|
---|
8 | **
|
---|
9 | ** HA, Dec to Parallactic Angle.
|
---|
10 | **
|
---|
11 | ** (double precision)
|
---|
12 | **
|
---|
13 | ** Given:
|
---|
14 | ** ha d hour angle in radians (geocentric apparent)
|
---|
15 | ** dec d declination in radians (geocentric apparent)
|
---|
16 | ** phi d observatory latitude in radians (geodetic)
|
---|
17 | **
|
---|
18 | ** The result is in the range -pi to +pi
|
---|
19 | **
|
---|
20 | ** Notes:
|
---|
21 | **
|
---|
22 | ** 1) The parallactic angle at a point in the sky is the position
|
---|
23 | ** angle of the vertical, i.e. the angle between the direction to
|
---|
24 | ** the pole and to the zenith. In precise applications care must
|
---|
25 | ** be taken only to use geocentric apparent HA,Dec and to consider
|
---|
26 | ** separately the effects of atmospheric refraction and telescope
|
---|
27 | ** mount errors.
|
---|
28 | **
|
---|
29 | ** 2) At the pole a zero result is returned.
|
---|
30 | **
|
---|
31 | ** Last revision: 16 August 1994
|
---|
32 | **
|
---|
33 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
34 | */
|
---|
35 | {
|
---|
36 | double cp, cqsz, sqsz;
|
---|
37 |
|
---|
38 | cp = cos ( phi );
|
---|
39 | sqsz = cp * sin ( ha );
|
---|
40 | cqsz = sin ( phi ) * cos ( dec) - cp * sin ( dec) * cos ( ha );
|
---|
41 | return ( ( sqsz != 0.0 || cqsz != 0.0 ) ? atan2 ( sqsz, cqsz ) : 0.0 );
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.