1 #include "sofa.h"
2 #include "sofam.h"
3 
iauPr00(double date1,double date2,double * dpsipr,double * depspr)4 void iauPr00(double date1, double date2, double *dpsipr, double *depspr)
5 /*
6 **  - - - - - - - -
7 **   i a u P r 0 0
8 **  - - - - - - - -
9 **
10 **  Precession-rate part of the IAU 2000 precession-nutation models
11 **  (part of MHB2000).
12 **
13 **  This function is part of the International Astronomical Union's
14 **  SOFA (Standards Of Fundamental Astronomy) software collection.
15 **
16 **  Status:  canonical model.
17 **
18 **  Given:
19 **     date1,date2    double  TT as a 2-part Julian Date (Note 1)
20 **
21 **  Returned:
22 **     dpsipr,depspr  double  precession corrections (Notes 2,3)
23 **
24 **  Notes:
25 **
26 **  1) The TT date date1+date2 is a Julian Date, apportioned in any
27 **     convenient way between the two arguments.  For example,
28 **     JD(TT)=2450123.7 could be expressed in any of these ways,
29 **     among others:
30 **
31 **            date1          date2
32 **
33 **         2450123.7           0.0       (JD method)
34 **         2451545.0       -1421.3       (J2000 method)
35 **         2400000.5       50123.2       (MJD method)
36 **         2450123.5           0.2       (date & time method)
37 **
38 **     The JD method is the most natural and convenient to use in
39 **     cases where the loss of several decimal digits of resolution
40 **     is acceptable.  The J2000 method is best matched to the way
41 **     the argument is handled internally and will deliver the
42 **     optimum resolution.  The MJD method and the date & time methods
43 **     are both good compromises between resolution and convenience.
44 **
45 **  2) The precession adjustments are expressed as "nutation
46 **     components", corrections in longitude and obliquity with respect
47 **     to the J2000.0 equinox and ecliptic.
48 **
49 **  3) Although the precession adjustments are stated to be with respect
50 **     to Lieske et al. (1977), the MHB2000 model does not specify which
51 **     set of Euler angles are to be used and how the adjustments are to
52 **     be applied.  The most literal and straightforward procedure is to
53 **     adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and
54 **     to add dpsipr to psi_A and depspr to both omega_A and eps_A.
55 **
56 **  4) This is an implementation of one aspect of the IAU 2000A nutation
57 **     model, formally adopted by the IAU General Assembly in 2000,
58 **     namely MHB2000 (Mathews et al. 2002).
59 **
60 **  References:
61 **
62 **     Lieske, J.H., Lederle, T., Fricke, W. & Morando, B., "Expressions
63 **     for the precession quantities based upon the IAU (1976) System of
64 **     Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977)
65 **
66 **     Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
67 **     and precession   New nutation series for nonrigid Earth and
68 **     insights into the Earth's interior", J.Geophys.Res., 107, B4,
69 **     2002.  The MHB2000 code itself was obtained on 9th September 2002
70 **     from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
71 **
72 **     Wallace, P.T., "Software for Implementing the IAU 2000
73 **     Resolutions", in IERS Workshop 5.1 (2002).
74 **
75 **  This revision:  2021 May 11
76 **
77 **  SOFA release 2021-05-12
78 **
79 **  Copyright (C) 2021 IAU SOFA Board.  See notes at end.
80 */
81 {
82    double t;
83 
84 /* Precession and obliquity corrections (radians per century) */
85    static const double PRECOR = -0.29965 * DAS2R,
86                        OBLCOR = -0.02524 * DAS2R;
87 
88 
89 /* Interval between fundamental epoch J2000.0 and given date (JC). */
90    t = ((date1 - DJ00) + date2) / DJC;
91 
92 /* Precession rate contributions with respect to IAU 1976/80. */
93    *dpsipr = PRECOR * t;
94    *depspr = OBLCOR * t;
95 
96 /* Finished. */
97 
98 /*----------------------------------------------------------------------
99 **
100 **  Copyright (C) 2021
101 **  Standards Of Fundamental Astronomy Board
102 **  of the International Astronomical Union.
103 **
104 **  =====================
105 **  SOFA Software License
106 **  =====================
107 **
108 **  NOTICE TO USER:
109 **
110 **  BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
111 **  CONDITIONS WHICH APPLY TO ITS USE.
112 **
113 **  1. The Software is owned by the IAU SOFA Board ("SOFA").
114 **
115 **  2. Permission is granted to anyone to use the SOFA software for any
116 **     purpose, including commercial applications, free of charge and
117 **     without payment of royalties, subject to the conditions and
118 **     restrictions listed below.
119 **
120 **  3. You (the user) may copy and distribute SOFA source code to others,
121 **     and use and adapt its code and algorithms in your own software,
122 **     on a world-wide, royalty-free basis.  That portion of your
123 **     distribution that does not consist of intact and unchanged copies
124 **     of SOFA source code files is a "derived work" that must comply
125 **     with the following requirements:
126 **
127 **     a) Your work shall be marked or carry a statement that it
128 **        (i) uses routines and computations derived by you from
129 **        software provided by SOFA under license to you; and
130 **        (ii) does not itself constitute software provided by and/or
131 **        endorsed by SOFA.
132 **
133 **     b) The source code of your derived work must contain descriptions
134 **        of how the derived work is based upon, contains and/or differs
135 **        from the original SOFA software.
136 **
137 **     c) The names of all routines in your derived work shall not
138 **        include the prefix "iau" or "sofa" or trivial modifications
139 **        thereof such as changes of case.
140 **
141 **     d) The origin of the SOFA components of your derived work must
142 **        not be misrepresented;  you must not claim that you wrote the
143 **        original software, nor file a patent application for SOFA
144 **        software or algorithms embedded in the SOFA software.
145 **
146 **     e) These requirements must be reproduced intact in any source
147 **        distribution and shall apply to anyone to whom you have
148 **        granted a further right to modify the source code of your
149 **        derived work.
150 **
151 **     Note that, as originally distributed, the SOFA software is
152 **     intended to be a definitive implementation of the IAU standards,
153 **     and consequently third-party modifications are discouraged.  All
154 **     variations, no matter how minor, must be explicitly marked as
155 **     such, as explained above.
156 **
157 **  4. You shall not cause the SOFA software to be brought into
158 **     disrepute, either by misuse, or use for inappropriate tasks, or
159 **     by inappropriate modification.
160 **
161 **  5. The SOFA software is provided "as is" and SOFA makes no warranty
162 **     as to its use or performance.   SOFA does not and cannot warrant
163 **     the performance or results which the user may obtain by using the
164 **     SOFA software.  SOFA makes no warranties, express or implied, as
165 **     to non-infringement of third party rights, merchantability, or
166 **     fitness for any particular purpose.  In no event will SOFA be
167 **     liable to the user for any consequential, incidental, or special
168 **     damages, including any lost profits or lost savings, even if a
169 **     SOFA representative has been advised of such damages, or for any
170 **     claim by any third party.
171 **
172 **  6. The provision of any version of the SOFA software under the terms
173 **     and conditions specified herein does not imply that future
174 **     versions will also be made available under the same terms and
175 **     conditions.
176 *
177 **  In any published work or commercial product which uses the SOFA
178 **  software directly, acknowledgement (see www.iausofa.org) is
179 **  appreciated.
180 **
181 **  Correspondence concerning SOFA software should be addressed as
182 **  follows:
183 **
184 **      By email:  sofa@ukho.gov.uk
185 **      By post:   IAU SOFA Center
186 **                 HM Nautical Almanac Office
187 **                 UK Hydrographic Office
188 **                 Admiralty Way, Taunton
189 **                 Somerset, TA1 2DN
190 **                 United Kingdom
191 **
192 **--------------------------------------------------------------------*/
193 }
194