source: trunk/FACT++/erfa/src/apcs13.c@ 18350

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