-
Notifications
You must be signed in to change notification settings - Fork 12
/
palMap.c
128 lines (108 loc) · 4.15 KB
/
palMap.c
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
/*
*+
* Name:
* palMap
* Purpose:
* Convert star RA,Dec from mean place to geocentric apparent
* Language:
* Starlink ANSI C
* Type of Module:
* Library routine
* Invocation:
* void palMap( double rm, double dm, double pr, double pd,
* double px, double rv, double eq, double date,
* double *ra, double *da );
* Arguments:
* rm = double (Given)
* Mean RA (radians)
* dm = double (Given)
* Mean declination (radians)
* pr = double (Given)
* RA proper motion, changes per Julian year (radians)
* pd = double (Given)
* Dec proper motion, changes per Julian year (radians)
* px = double (Given)
* Parallax (arcsec)
* rv = double (Given)
* Radial velocity (km/s, +ve if receding)
* eq = double (Given)
* Epoch and equinox of star data (Julian)
* date = double (Given)
* TDB for apparent place (JD-2400000.5)
* ra = double * (Returned)
* Apparent RA (radians)
* dec = double * (Returned)
* Apparent dec (radians)
* Description:
* Convert star RA,Dec from mean place to geocentric apparent.
* Authors:
* PTW: Patrick T. Wallace
* TIMJ: Tim Jenness (JAC, Hawaii)
* {enter_new_authors_here}
* Notes:
* - Calls palMappa and palMapqk
* - The reference systems and timescales used are IAU 2006.
* - EQ is the Julian epoch specifying both the reference frame and
* the epoch of the position - usually 2000. For positions where
* the epoch and equinox are different, use the routine palPm to
* apply proper motion corrections before using this routine.
*
* - The distinction between the required TDB and TT is always
* negligible. Moreover, for all but the most critical
* applications UTC is adequate.
*
* - The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt.
*
* - This routine may be wasteful for some applications because it
* recomputes the Earth position/velocity and the precession-
* nutation matrix each time, and because it allows for parallax
* and proper motion. Where multiple transformations are to be
* carried out for one epoch, a faster method is to call the
* palMappa routine once and then either the palMapqk routine
* (which includes parallax and proper motion) or palMapqkz (which
* assumes zero parallax and proper motion).
*
* - The accuracy is sub-milliarcsecond, limited by the
* precession-nutation model (see palPrenut for details).
*
* - The accuracy is further limited by the routine palEvp, called
* by palMappa, which computes the Earth position and velocity.
* See eraEpv00 for details on that calculation.
* History:
* 2012-03-01 (TIMJ):
* Initial version
* Adapted with permission from the Fortran SLALIB library.
* {enter_further_changes_here}
* Copyright:
* Copyright (C) 2001 Rutherford Appleton Laboratory
* Copyright (C) 2012 Science and Technology Facilities Council.
* All Rights Reserved.
* Licence:
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA.
* Bugs:
* {note_any_bugs_here}
*-
*/
#include "pal.h"
void palMap( double rm, double dm, double pr, double pd,
double px, double rv, double eq, double date,
double *ra, double *da ) {
double amprms[21];
/* Star independent parameters */
palMappa( eq, date, amprms );
/* Mean to apparent */
palMapqk( rm, dm, pr, pd, px, rv, amprms, ra, da );
}