source: branches/FACT++_lidctrl_usb/erfa/src/apcs13.c@ 18752

Last change on this file since 18752 was 18711, checked in by tbretz, 8 years ago
Updated to ERFA 1.3.0 (no relevant code change except the leap second at the beginning of 2017)
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-2016, 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
121/* Earth barycentric & heliocentric position/velocity (au, au/d). */
122 (void) eraEpv00(date1, date2, ehpv, ebpv);
123
124/* Compute the star-independent astrometry parameters. */
125 eraApcs(date1, date2, pv, ebpv, ehpv[0], astrom);
126
127/* Finished. */
128
129}
130/*----------------------------------------------------------------------
131**
132**
133** Copyright (C) 2013-2016, NumFOCUS Foundation.
134** All rights reserved.
135**
136** This library is derived, with permission, from the International
137** Astronomical Union's "Standards of Fundamental Astronomy" library,
138** available from http://www.iausofa.org.
139**
140** The ERFA version is intended to retain identical functionality to
141** the SOFA library, but made distinct through different function and
142** file names, as set out in the SOFA license conditions. The SOFA
143** original has a role as a reference standard for the IAU and IERS,
144** and consequently redistribution is permitted only in its unaltered
145** state. The ERFA version is not subject to this restriction and
146** therefore can be included in distributions which do not support the
147** concept of "read only" software.
148**
149** Although the intent is to replicate the SOFA API (other than
150** replacement of prefix names) and results (with the exception of
151** bugs; any that are discovered will be fixed), SOFA is not
152** responsible for any errors found in this version of the library.
153**
154** If you wish to acknowledge the SOFA heritage, please acknowledge
155** that you are using a library derived from SOFA, rather than SOFA
156** itself.
157**
158**
159** TERMS AND CONDITIONS
160**
161** Redistribution and use in source and binary forms, with or without
162** modification, are permitted provided that the following conditions
163** are met:
164**
165** 1 Redistributions of source code must retain the above copyright
166** notice, this list of conditions and the following disclaimer.
167**
168** 2 Redistributions in binary form must reproduce the above copyright
169** notice, this list of conditions and the following disclaimer in
170** the documentation and/or other materials provided with the
171** distribution.
172**
173** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
174** the International Astronomical Union nor the names of its
175** contributors may be used to endorse or promote products derived
176** from this software without specific prior written permission.
177**
178** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
179** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
180** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
181** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
182** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
183** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
184** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
185** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
186** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
187** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
188** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
189** POSSIBILITY OF SUCH DAMAGE.
190**
191*/
Note: See TracBrowser for help on using the repository browser.