source: trunk/FACT++/erfa/src/apcg.c@ 18367

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