line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "erfa.h" |
2
|
|
|
|
|
|
|
|
3
|
0
|
|
|
|
|
|
void eraLtpb(double epj, double rpb[3][3]) |
4
|
|
|
|
|
|
|
/* |
5
|
|
|
|
|
|
|
** - - - - - - - - |
6
|
|
|
|
|
|
|
** e r a L t p b |
7
|
|
|
|
|
|
|
** - - - - - - - - |
8
|
|
|
|
|
|
|
** |
9
|
|
|
|
|
|
|
** Long-term precession matrix, including ICRS frame bias. |
10
|
|
|
|
|
|
|
** |
11
|
|
|
|
|
|
|
** Given: |
12
|
|
|
|
|
|
|
** epj double Julian epoch (TT) |
13
|
|
|
|
|
|
|
** |
14
|
|
|
|
|
|
|
** Returned: |
15
|
|
|
|
|
|
|
** rpb double[3][3] precession-bias matrix, J2000.0 to date |
16
|
|
|
|
|
|
|
** |
17
|
|
|
|
|
|
|
** Notes: |
18
|
|
|
|
|
|
|
** |
19
|
|
|
|
|
|
|
** 1) The matrix is in the sense |
20
|
|
|
|
|
|
|
** |
21
|
|
|
|
|
|
|
** P_date = rpb x P_ICRS, |
22
|
|
|
|
|
|
|
** |
23
|
|
|
|
|
|
|
** where P_ICRS is a vector in the Geocentric Celestial Reference |
24
|
|
|
|
|
|
|
** System, and P_date is the vector with respect to the Celestial |
25
|
|
|
|
|
|
|
** Intermediate Reference System at that date but with nutation |
26
|
|
|
|
|
|
|
** neglected. |
27
|
|
|
|
|
|
|
** |
28
|
|
|
|
|
|
|
** 2) A first order frame bias formulation is used, of sub- |
29
|
|
|
|
|
|
|
** microarcsecond accuracy compared with a full 3D rotation. |
30
|
|
|
|
|
|
|
** |
31
|
|
|
|
|
|
|
** 3) The Vondrak et al. (2011, 2012) 400 millennia precession model |
32
|
|
|
|
|
|
|
** agrees with the IAU 2006 precession at J2000.0 and stays within |
33
|
|
|
|
|
|
|
** 100 microarcseconds during the 20th and 21st centuries. It is |
34
|
|
|
|
|
|
|
** accurate to a few arcseconds throughout the historical period, |
35
|
|
|
|
|
|
|
** worsening to a few tenths of a degree at the end of the |
36
|
|
|
|
|
|
|
** +/- 200,000 year time span. |
37
|
|
|
|
|
|
|
** |
38
|
|
|
|
|
|
|
** References: |
39
|
|
|
|
|
|
|
** |
40
|
|
|
|
|
|
|
** Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession |
41
|
|
|
|
|
|
|
** expressions, valid for long time intervals, Astron.Astrophys. 534, |
42
|
|
|
|
|
|
|
** A22 |
43
|
|
|
|
|
|
|
** |
44
|
|
|
|
|
|
|
** Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession |
45
|
|
|
|
|
|
|
** expressions, valid for long time intervals (Corrigendum), |
46
|
|
|
|
|
|
|
** Astron.Astrophys. 541, C1 |
47
|
|
|
|
|
|
|
** |
48
|
|
|
|
|
|
|
** Copyright (C) 2013-2019, NumFOCUS Foundation. |
49
|
|
|
|
|
|
|
** Derived, with permission, from the SOFA library. See notes at end of file. |
50
|
|
|
|
|
|
|
*/ |
51
|
|
|
|
|
|
|
{ |
52
|
|
|
|
|
|
|
/* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */ |
53
|
|
|
|
|
|
|
const double dx = -0.016617 * ERFA_DAS2R, |
54
|
|
|
|
|
|
|
de = -0.0068192 * ERFA_DAS2R, |
55
|
|
|
|
|
|
|
dr = -0.0146 * ERFA_DAS2R; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
int i; |
58
|
|
|
|
|
|
|
double rp[3][3]; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
/* Precession matrix. */ |
62
|
0
|
|
|
|
|
|
eraLtp(epj, rp); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
/* Apply the bias. */ |
65
|
0
|
0
|
|
|
|
|
for ( i = 0; i < 3; i++ ) { |
66
|
0
|
|
|
|
|
|
rpb[i][0] = rp[i][0] - rp[i][1]*dr + rp[i][2]*dx; |
67
|
0
|
|
|
|
|
|
rpb[i][1] = rp[i][0]*dr + rp[i][1] + rp[i][2]*de; |
68
|
0
|
|
|
|
|
|
rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2]; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- |
73
|
|
|
|
|
|
|
** |
74
|
|
|
|
|
|
|
** |
75
|
|
|
|
|
|
|
** Copyright (C) 2013-2019, NumFOCUS Foundation. |
76
|
|
|
|
|
|
|
** All rights reserved. |
77
|
|
|
|
|
|
|
** |
78
|
|
|
|
|
|
|
** This library is derived, with permission, from the International |
79
|
|
|
|
|
|
|
** Astronomical Union's "Standards of Fundamental Astronomy" library, |
80
|
|
|
|
|
|
|
** available from http://www.iausofa.org. |
81
|
|
|
|
|
|
|
** |
82
|
|
|
|
|
|
|
** The ERFA version is intended to retain identical functionality to |
83
|
|
|
|
|
|
|
** the SOFA library, but made distinct through different function and |
84
|
|
|
|
|
|
|
** file names, as set out in the SOFA license conditions. The SOFA |
85
|
|
|
|
|
|
|
** original has a role as a reference standard for the IAU and IERS, |
86
|
|
|
|
|
|
|
** and consequently redistribution is permitted only in its unaltered |
87
|
|
|
|
|
|
|
** state. The ERFA version is not subject to this restriction and |
88
|
|
|
|
|
|
|
** therefore can be included in distributions which do not support the |
89
|
|
|
|
|
|
|
** concept of "read only" software. |
90
|
|
|
|
|
|
|
** |
91
|
|
|
|
|
|
|
** Although the intent is to replicate the SOFA API (other than |
92
|
|
|
|
|
|
|
** replacement of prefix names) and results (with the exception of |
93
|
|
|
|
|
|
|
** bugs; any that are discovered will be fixed), SOFA is not |
94
|
|
|
|
|
|
|
** responsible for any errors found in this version of the library. |
95
|
|
|
|
|
|
|
** |
96
|
|
|
|
|
|
|
** If you wish to acknowledge the SOFA heritage, please acknowledge |
97
|
|
|
|
|
|
|
** that you are using a library derived from SOFA, rather than SOFA |
98
|
|
|
|
|
|
|
** itself. |
99
|
|
|
|
|
|
|
** |
100
|
|
|
|
|
|
|
** |
101
|
|
|
|
|
|
|
** TERMS AND CONDITIONS |
102
|
|
|
|
|
|
|
** |
103
|
|
|
|
|
|
|
** Redistribution and use in source and binary forms, with or without |
104
|
|
|
|
|
|
|
** modification, are permitted provided that the following conditions |
105
|
|
|
|
|
|
|
** are met: |
106
|
|
|
|
|
|
|
** |
107
|
|
|
|
|
|
|
** 1 Redistributions of source code must retain the above copyright |
108
|
|
|
|
|
|
|
** notice, this list of conditions and the following disclaimer. |
109
|
|
|
|
|
|
|
** |
110
|
|
|
|
|
|
|
** 2 Redistributions in binary form must reproduce the above copyright |
111
|
|
|
|
|
|
|
** notice, this list of conditions and the following disclaimer in |
112
|
|
|
|
|
|
|
** the documentation and/or other materials provided with the |
113
|
|
|
|
|
|
|
** distribution. |
114
|
|
|
|
|
|
|
** |
115
|
|
|
|
|
|
|
** 3 Neither the name of the Standards Of Fundamental Astronomy Board, |
116
|
|
|
|
|
|
|
** the International Astronomical Union nor the names of its |
117
|
|
|
|
|
|
|
** contributors may be used to endorse or promote products derived |
118
|
|
|
|
|
|
|
** from this software without specific prior written permission. |
119
|
|
|
|
|
|
|
** |
120
|
|
|
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
121
|
|
|
|
|
|
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
122
|
|
|
|
|
|
|
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
123
|
|
|
|
|
|
|
** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
124
|
|
|
|
|
|
|
** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
125
|
|
|
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
126
|
|
|
|
|
|
|
** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
127
|
|
|
|
|
|
|
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
128
|
|
|
|
|
|
|
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
129
|
|
|
|
|
|
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
130
|
|
|
|
|
|
|
** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
131
|
|
|
|
|
|
|
** POSSIBILITY OF SUCH DAMAGE. |
132
|
|
|
|
|
|
|
** |
133
|
|
|
|
|
|
|
*/ |