source: trunk/FACT++/sofa/src/apci13.c@ 18355

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 9.7 KB
Line 
1#include "sofa.h"
2
3void iauApci13(double date1, double date2,
4 iauASTROM *astrom, double *eo)
5/*
6** - - - - - - - - - -
7** i a u A p c i 1 3
8** - - - - - - - - - -
9**
10** For a terrestrial observer, prepare star-independent astrometry
11** parameters for transformations between ICRS and geocentric CIRS
12** coordinates. The caller supplies the date, and SOFA models are used
13** to predict the Earth ephemeris and CIP/CIO.
14**
15** The parameters produced by this function are required in the
16** parallax, light deflection, aberration, and bias-precession-nutation
17** parts of the astrometric transformation chain.
18**
19** This function is part of the International Astronomical Union's
20** SOFA (Standards of Fundamental Astronomy) software collection.
21**
22** Status: support function.
23**
24** Given:
25** date1 double TDB as a 2-part...
26** date2 double ...Julian Date (Note 1)
27**
28** Returned:
29** astrom iauASTROM* star-independent astrometry parameters:
30** pmt double PM time interval (SSB, Julian years)
31** eb double[3] SSB to observer (vector, au)
32** eh double[3] Sun to observer (unit vector)
33** em double distance from Sun to observer (au)
34** v double[3] barycentric observer velocity (vector, c)
35** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
36** bpn double[3][3] bias-precession-nutation matrix
37** along double unchanged
38** xpl double unchanged
39** ypl double unchanged
40** sphi double unchanged
41** cphi double unchanged
42** diurab double unchanged
43** eral double unchanged
44** refa double unchanged
45** refb double unchanged
46** eo double* equation of the origins (ERA-GST)
47**
48** Notes:
49**
50** 1) The TDB date date1+date2 is a Julian Date, apportioned in any
51** convenient way between the two arguments. For example,
52** JD(TDB)=2450123.7 could be expressed in any of these ways, among
53** others:
54**
55** date1 date2
56**
57** 2450123.7 0.0 (JD method)
58** 2451545.0 -1421.3 (J2000 method)
59** 2400000.5 50123.2 (MJD method)
60** 2450123.5 0.2 (date & time method)
61**
62** The JD method is the most natural and convenient to use in cases
63** where the loss of several decimal digits of resolution is
64** acceptable. The J2000 method is best matched to the way the
65** argument is handled internally and will deliver the optimum
66** resolution. The MJD method and the date & time methods are both
67** good compromises between resolution and convenience. For most
68** applications of this function the choice will not be at all
69** critical.
70**
71** TT can be used instead of TDB without any significant impact on
72** accuracy.
73**
74** 2) All the vectors are with respect to BCRS axes.
75**
76** 3) In cases where the caller wishes to supply his own Earth
77** ephemeris and CIP/CIO, the function iauApci can be used instead
78** of the present function.
79**
80** 4) This is one of several functions that inserts into the astrom
81** structure star-independent parameters needed for the chain of
82** astrometric transformations ICRS <-> GCRS <-> CIRS <-> observed.
83**
84** The various functions support different classes of observer and
85** portions of the transformation chain:
86**
87** functions observer transformation
88**
89** iauApcg iauApcg13 geocentric ICRS <-> GCRS
90** iauApci iauApci13 terrestrial ICRS <-> CIRS
91** iauApco iauApco13 terrestrial ICRS <-> observed
92** iauApcs iauApcs13 space ICRS <-> GCRS
93** iauAper iauAper13 terrestrial update Earth rotation
94** iauApio iauApio13 terrestrial CIRS <-> observed
95**
96** Those with names ending in "13" use contemporary SOFA models to
97** compute the various ephemerides. The others accept ephemerides
98** supplied by the caller.
99**
100** The transformation from ICRS to GCRS covers space motion,
101** parallax, light deflection, and aberration. From GCRS to CIRS
102** comprises frame bias and precession-nutation. From CIRS to
103** observed takes account of Earth rotation, polar motion, diurnal
104** aberration and parallax (unless subsumed into the ICRS <-> GCRS
105** transformation), and atmospheric refraction.
106**
107** 5) The context structure astrom produced by this function is used by
108** iauAtciq* and iauAticq*.
109**
110** Called:
111** iauEpv00 Earth position and velocity
112** iauPnm06a classical NPB matrix, IAU 2006/2000A
113** iauBpn2xy extract CIP X,Y coordinates from NPB matrix
114** iauS06 the CIO locator s, given X,Y, IAU 2006
115** iauApci astrometry parameters, ICRS-CIRS
116** iauEors equation of the origins, given NPB matrix and s
117**
118** This revision: 2013 October 9
119**
120** SOFA release 2015-02-09
121**
122** Copyright (C) 2015 IAU SOFA Board. See notes at end.
123*/
124{
125 double ehpv[2][3], ebpv[2][3], r[3][3], x, y, s;
126
127/* Earth barycentric & heliocentric position/velocity (au, au/d). */
128 (void) iauEpv00(date1, date2, ehpv, ebpv);
129
130/* Form the equinox based BPN matrix, IAU 2006/2000A. */
131 iauPnm06a(date1, date2, r);
132
133/* Extract CIP X,Y. */
134 iauBpn2xy(r, &x, &y);
135
136/* Obtain CIO locator s. */
137 s = iauS06(date1, date2, x, y);
138
139/* Compute the star-independent astrometry parameters. */
140 iauApci(date1, date2, ebpv, ehpv[0], x, y, s, astrom);
141
142/* Equation of the origins. */
143 *eo = iauEors(r, s);
144
145/* Finished. */
146
147/*----------------------------------------------------------------------
148**
149** Copyright (C) 2015
150** Standards Of Fundamental Astronomy Board
151** of the International Astronomical Union.
152**
153** =====================
154** SOFA Software License
155** =====================
156**
157** NOTICE TO USER:
158**
159** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
160** CONDITIONS WHICH APPLY TO ITS USE.
161**
162** 1. The Software is owned by the IAU SOFA Board ("SOFA").
163**
164** 2. Permission is granted to anyone to use the SOFA software for any
165** purpose, including commercial applications, free of charge and
166** without payment of royalties, subject to the conditions and
167** restrictions listed below.
168**
169** 3. You (the user) may copy and distribute SOFA source code to others,
170** and use and adapt its code and algorithms in your own software,
171** on a world-wide, royalty-free basis. That portion of your
172** distribution that does not consist of intact and unchanged copies
173** of SOFA source code files is a "derived work" that must comply
174** with the following requirements:
175**
176** a) Your work shall be marked or carry a statement that it
177** (i) uses routines and computations derived by you from
178** software provided by SOFA under license to you; and
179** (ii) does not itself constitute software provided by and/or
180** endorsed by SOFA.
181**
182** b) The source code of your derived work must contain descriptions
183** of how the derived work is based upon, contains and/or differs
184** from the original SOFA software.
185**
186** c) The names of all routines in your derived work shall not
187** include the prefix "iau" or "sofa" or trivial modifications
188** thereof such as changes of case.
189**
190** d) The origin of the SOFA components of your derived work must
191** not be misrepresented; you must not claim that you wrote the
192** original software, nor file a patent application for SOFA
193** software or algorithms embedded in the SOFA software.
194**
195** e) These requirements must be reproduced intact in any source
196** distribution and shall apply to anyone to whom you have
197** granted a further right to modify the source code of your
198** derived work.
199**
200** Note that, as originally distributed, the SOFA software is
201** intended to be a definitive implementation of the IAU standards,
202** and consequently third-party modifications are discouraged. All
203** variations, no matter how minor, must be explicitly marked as
204** such, as explained above.
205**
206** 4. You shall not cause the SOFA software to be brought into
207** disrepute, either by misuse, or use for inappropriate tasks, or
208** by inappropriate modification.
209**
210** 5. The SOFA software is provided "as is" and SOFA makes no warranty
211** as to its use or performance. SOFA does not and cannot warrant
212** the performance or results which the user may obtain by using the
213** SOFA software. SOFA makes no warranties, express or implied, as
214** to non-infringement of third party rights, merchantability, or
215** fitness for any particular purpose. In no event will SOFA be
216** liable to the user for any consequential, incidental, or special
217** damages, including any lost profits or lost savings, even if a
218** SOFA representative has been advised of such damages, or for any
219** claim by any third party.
220**
221** 6. The provision of any version of the SOFA software under the terms
222** and conditions specified herein does not imply that future
223** versions will also be made available under the same terms and
224** conditions.
225*
226** In any published work or commercial product which uses the SOFA
227** software directly, acknowledgement (see www.iausofa.org) is
228** appreciated.
229**
230** Correspondence concerning SOFA software should be addressed as
231** follows:
232**
233** By email: sofa@ukho.gov.uk
234** By post: IAU SOFA Center
235** HM Nautical Almanac Office
236** UK Hydrographic Office
237** Admiralty Way, Taunton
238** Somerset, TA1 2DN
239** United Kingdom
240**
241**--------------------------------------------------------------------*/
242
243}
Note: See TracBrowser for help on using the repository browser.