FACT++  1.0
apcg13.c
Go to the documentation of this file.
1 #include "erfa.h"
2 
3 void eraApcg13(double date1, double date2, eraASTROM *astrom)
4 /*
5 ** - - - - - - - - - -
6 ** e r a A p c g 1 3
7 ** - - - - - - - - - -
8 **
9 ** For a geocentric observer, prepare star-independent astrometry
10 ** parameters for transformations between ICRS and GCRS coordinates.
11 ** The caller supplies the date, and ERFA models are used to predict
12 ** the Earth ephemeris.
13 **
14 ** The parameters produced by this function are required in the
15 ** parallax, light deflection and aberration parts of the astrometric
16 ** transformation chain.
17 **
18 ** Given:
19 ** date1 double TDB as a 2-part...
20 ** date2 double ...Julian Date (Note 1)
21 **
22 ** Returned:
23 ** astrom eraASTROM* star-independent astrometry parameters:
24 ** pmt double PM time interval (SSB, Julian years)
25 ** eb double[3] SSB to observer (vector, au)
26 ** eh double[3] Sun to observer (unit vector)
27 ** em double distance from Sun to observer (au)
28 ** v double[3] barycentric observer velocity (vector, c)
29 ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
30 ** bpn double[3][3] bias-precession-nutation matrix
31 ** along double unchanged
32 ** xpl double unchanged
33 ** ypl double unchanged
34 ** sphi double unchanged
35 ** cphi double unchanged
36 ** diurab double unchanged
37 ** eral double unchanged
38 ** refa double unchanged
39 ** refb double unchanged
40 **
41 ** Notes:
42 **
43 ** 1) The TDB date date1+date2 is a Julian Date, apportioned in any
44 ** convenient way between the two arguments. For example,
45 ** JD(TDB)=2450123.7 could be expressed in any of these ways, among
46 ** others:
47 **
48 ** date1 date2
49 **
50 ** 2450123.7 0.0 (JD method)
51 ** 2451545.0 -1421.3 (J2000 method)
52 ** 2400000.5 50123.2 (MJD method)
53 ** 2450123.5 0.2 (date & time method)
54 **
55 ** The JD method is the most natural and convenient to use in cases
56 ** where the loss of several decimal digits of resolution is
57 ** acceptable. The J2000 method is best matched to the way the
58 ** argument is handled internally and will deliver the optimum
59 ** resolution. The MJD method and the date & time methods are both
60 ** good compromises between resolution and convenience. For most
61 ** applications of this function the choice will not be at all
62 ** critical.
63 **
64 ** TT can be used instead of TDB without any significant impact on
65 ** accuracy.
66 **
67 ** 2) All the vectors are with respect to BCRS axes.
68 **
69 ** 3) In cases where the caller wishes to supply his own Earth
70 ** ephemeris, the function eraApcg can be used instead of the present
71 ** function.
72 **
73 ** 4) This is one of several functions that inserts into the astrom
74 ** structure star-independent parameters needed for the chain of
75 ** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed.
76 **
77 ** The various functions support different classes of observer and
78 ** portions of the transformation chain:
79 **
80 ** functions observer transformation
81 **
82 ** eraApcg eraApcg13 geocentric ICRS <-> GCRS
83 ** eraApci eraApci13 terrestrial ICRS <-> CIRS
84 ** eraApco eraApco13 terrestrial ICRS <-> observed
85 ** eraApcs eraApcs13 space ICRS <-> GCRS
86 ** eraAper eraAper13 terrestrial update Earth rotation
87 ** eraApio eraApio13 terrestrial CIRS <-> observed
88 **
89 ** Those with names ending in "13" use contemporary ERFA models to
90 ** compute the various ephemerides. The others accept ephemerides
91 ** supplied by the caller.
92 **
93 ** The transformation from ICRS to GCRS covers space motion,
94 ** parallax, light deflection, and aberration. From GCRS to CIRS
95 ** comprises frame bias and precession-nutation. From CIRS to
96 ** observed takes account of Earth rotation, polar motion, diurnal
97 ** aberration and parallax (unless subsumed into the ICRS <-> GCRS
98 ** transformation), and atmospheric refraction.
99 **
100 ** 5) The context structure astrom produced by this function is used by
101 ** eraAtciq* and eraAticq*.
102 **
103 ** Called:
104 ** eraEpv00 Earth position and velocity
105 ** eraApcg astrometry parameters, ICRS-GCRS, geocenter
106 **
107 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
108 ** Derived, with permission, from the SOFA library. See notes at end of file.
109 */
110 {
111  double ehpv[2][3], ebpv[2][3];
112 
113 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
114  (void) eraEpv00(date1, date2, ehpv, ebpv);
115 
116 /* Compute the star-independent astrometry parameters. */
117  eraApcg(date1, date2, ebpv, ehpv[0], astrom);
118 
119 /* Finished. */
120 
121 }
122 /*----------------------------------------------------------------------
123 **
124 **
125 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
126 ** All rights reserved.
127 **
128 ** This library is derived, with permission, from the International
129 ** Astronomical Union's "Standards of Fundamental Astronomy" library,
130 ** available from http://www.iausofa.org.
131 **
132 ** The ERFA version is intended to retain identical functionality to
133 ** the SOFA library, but made distinct through different function and
134 ** file names, as set out in the SOFA license conditions. The SOFA
135 ** original has a role as a reference standard for the IAU and IERS,
136 ** and consequently redistribution is permitted only in its unaltered
137 ** state. The ERFA version is not subject to this restriction and
138 ** therefore can be included in distributions which do not support the
139 ** concept of "read only" software.
140 **
141 ** Although the intent is to replicate the SOFA API (other than
142 ** replacement of prefix names) and results (with the exception of
143 ** bugs; any that are discovered will be fixed), SOFA is not
144 ** responsible for any errors found in this version of the library.
145 **
146 ** If you wish to acknowledge the SOFA heritage, please acknowledge
147 ** that you are using a library derived from SOFA, rather than SOFA
148 ** itself.
149 **
150 **
151 ** TERMS AND CONDITIONS
152 **
153 ** Redistribution and use in source and binary forms, with or without
154 ** modification, are permitted provided that the following conditions
155 ** are met:
156 **
157 ** 1 Redistributions of source code must retain the above copyright
158 ** notice, this list of conditions and the following disclaimer.
159 **
160 ** 2 Redistributions in binary form must reproduce the above copyright
161 ** notice, this list of conditions and the following disclaimer in
162 ** the documentation and/or other materials provided with the
163 ** distribution.
164 **
165 ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
166 ** the International Astronomical Union nor the names of its
167 ** contributors may be used to endorse or promote products derived
168 ** from this software without specific prior written permission.
169 **
170 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
172 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
173 ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
174 ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
175 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
176 ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
177 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
178 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
179 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
180 ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
181 ** POSSIBILITY OF SUCH DAMAGE.
182 **
183 */
void eraApcg13(double date1, double date2, eraASTROM *astrom)
Definition: apcg13.c:3
void eraApcg(double date1, double date2, double ebpv[2][3], double ehp[3], eraASTROM *astrom)
Definition: apcg.c:3
int eraEpv00(double date1, double date2, double pvh[2][3], double pvb[2][3])
Definition: epv00.c:3