source: trunk/FACT++/sofa/src/apcs13.c@ 18375

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