source: trunk/FACT++/pal/palMap.c@ 19779

Last change on this file since 19779 was 18347, checked in by tbretz, 9 years ago
File size: 4.2 KB
Line 
1/*
2*+
3* Name:
4* palMap
5
6* Purpose:
7* Convert star RA,Dec from mean place to geocentric apparent
8
9* Language:
10* Starlink ANSI C
11
12* Type of Module:
13* Library routine
14
15* Invocation:
16* void palMap( double rm, double dm, double pr, double pd,
17* double px, double rv, double eq, double date,
18* double *ra, double *da );
19
20* Arguments:
21* rm = double (Given)
22* Mean RA (radians)
23* dm = double (Given)
24* Mean declination (radians)
25* pr = double (Given)
26* RA proper motion, changes per Julian year (radians)
27* pd = double (Given)
28* Dec proper motion, changes per Julian year (radians)
29* px = double (Given)
30* Parallax (arcsec)
31* rv = double (Given)
32* Radial velocity (km/s, +ve if receding)
33* eq = double (Given)
34* Epoch and equinox of star data (Julian)
35* date = double (Given)
36* TDB for apparent place (JD-2400000.5)
37* ra = double * (Returned)
38* Apparent RA (radians)
39* dec = double * (Returned)
40* Apparent dec (radians)
41
42* Description:
43* Convert star RA,Dec from mean place to geocentric apparent.
44
45* Authors:
46* PTW: Patrick T. Wallace
47* TIMJ: Tim Jenness (JAC, Hawaii)
48* {enter_new_authors_here}
49
50* Notes:
51* - Calls palMappa and palMapqk
52
53* - The reference systems and timescales used are IAU 2006.
54
55* - EQ is the Julian epoch specifying both the reference frame and
56* the epoch of the position - usually 2000. For positions where
57* the epoch and equinox are different, use the routine palPm to
58* apply proper motion corrections before using this routine.
59*
60* - The distinction between the required TDB and TT is always
61* negligible. Moreover, for all but the most critical
62* applications UTC is adequate.
63*
64* - The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt.
65*
66* - This routine may be wasteful for some applications because it
67* recomputes the Earth position/velocity and the precession-
68* nutation matrix each time, and because it allows for parallax
69* and proper motion. Where multiple transformations are to be
70* carried out for one epoch, a faster method is to call the
71* palMappa routine once and then either the palMapqk routine
72* (which includes parallax and proper motion) or palMapqkz (which
73* assumes zero parallax and proper motion).
74*
75* - The accuracy is sub-milliarcsecond, limited by the
76* precession-nutation model (see palPrenut for details).
77*
78* - The accuracy is further limited by the routine palEvp, called
79* by palMappa, which computes the Earth position and velocity.
80* See eraEpv00 for details on that calculation.
81
82* History:
83* 2012-03-01 (TIMJ):
84* Initial version
85* Adapted with permission from the Fortran SLALIB library.
86* {enter_further_changes_here}
87
88* Copyright:
89* Copyright (C) 2001 Rutherford Appleton Laboratory
90* Copyright (C) 2012 Science and Technology Facilities Council.
91* All Rights Reserved.
92
93* Licence:
94* This program is free software; you can redistribute it and/or
95* modify it under the terms of the GNU General Public License as
96* published by the Free Software Foundation; either version 3 of
97* the License, or (at your option) any later version.
98*
99* This program is distributed in the hope that it will be
100* useful, but WITHOUT ANY WARRANTY; without even the implied
101* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
102* PURPOSE. See the GNU General Public License for more details.
103*
104* You should have received a copy of the GNU General Public License
105* along with this program; if not, write to the Free Software
106* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
107* USA.
108
109* Bugs:
110* {note_any_bugs_here}
111*-
112*/
113
114#include "pal.h"
115
116void palMap( double rm, double dm, double pr, double pd,
117 double px, double rv, double eq, double date,
118 double *ra, double *da ) {
119
120 double amprms[21];
121
122 /* Star independent parameters */
123 palMappa( eq, date, amprms );
124
125 /* Mean to apparent */
126 palMapqk( rm, dm, pr, pd, px, rv, amprms, ra, da );
127
128}
Note: See TracBrowser for help on using the repository browser.