| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauC2tpe(double tta, double ttb, double uta, double utb,
|
|---|
| 4 | double dpsi, double deps, double xp, double yp,
|
|---|
| 5 | double rc2t[3][3])
|
|---|
| 6 | /*
|
|---|
| 7 | ** - - - - - - - - -
|
|---|
| 8 | ** i a u C 2 t p e
|
|---|
| 9 | ** - - - - - - - - -
|
|---|
| 10 | **
|
|---|
| 11 | ** Form the celestial to terrestrial matrix given the date, the UT1,
|
|---|
| 12 | ** the nutation and the polar motion. IAU 2000.
|
|---|
| 13 | **
|
|---|
| 14 | ** This function is part of the International Astronomical Union's
|
|---|
| 15 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
|---|
| 16 | **
|
|---|
| 17 | ** Status: support function.
|
|---|
| 18 | **
|
|---|
| 19 | ** Given:
|
|---|
| 20 | ** tta,ttb double TT as a 2-part Julian Date (Note 1)
|
|---|
| 21 | ** uta,utb double UT1 as a 2-part Julian Date (Note 1)
|
|---|
| 22 | ** dpsi,deps double nutation (Note 2)
|
|---|
| 23 | ** xp,yp double coordinates of the pole (radians, Note 3)
|
|---|
| 24 | **
|
|---|
| 25 | ** Returned:
|
|---|
| 26 | ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 4)
|
|---|
| 27 | **
|
|---|
| 28 | ** Notes:
|
|---|
| 29 | **
|
|---|
| 30 | ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
|
|---|
| 31 | ** apportioned in any convenient way between the arguments uta and
|
|---|
| 32 | ** utb. For example, JD(UT1)=2450123.7 could be expressed in any of
|
|---|
| 33 | ** these ways, among others:
|
|---|
| 34 | **
|
|---|
| 35 | ** uta utb
|
|---|
| 36 | **
|
|---|
| 37 | ** 2450123.7 0.0 (JD method)
|
|---|
| 38 | ** 2451545.0 -1421.3 (J2000 method)
|
|---|
| 39 | ** 2400000.5 50123.2 (MJD method)
|
|---|
| 40 | ** 2450123.5 0.2 (date & time method)
|
|---|
| 41 | **
|
|---|
| 42 | ** The JD method is the most natural and convenient to use in
|
|---|
| 43 | ** cases where the loss of several decimal digits of resolution is
|
|---|
| 44 | ** acceptable. The J2000 and MJD methods are good compromises
|
|---|
| 45 | ** between resolution and convenience. In the case of uta,utb, the
|
|---|
| 46 | ** date & time method is best matched to the Earth rotation angle
|
|---|
| 47 | ** algorithm used: maximum precision is delivered when the uta
|
|---|
| 48 | ** argument is for 0hrs UT1 on the day in question and the utb
|
|---|
| 49 | ** argument lies in the range 0 to 1, or vice versa.
|
|---|
| 50 | **
|
|---|
| 51 | ** 2) The caller is responsible for providing the nutation components;
|
|---|
| 52 | ** they are in longitude and obliquity, in radians and are with
|
|---|
| 53 | ** respect to the equinox and ecliptic of date. For high-accuracy
|
|---|
| 54 | ** applications, free core nutation should be included as well as
|
|---|
| 55 | ** any other relevant corrections to the position of the CIP.
|
|---|
| 56 | **
|
|---|
| 57 | ** 3) The arguments xp and yp are the coordinates (in radians) of the
|
|---|
| 58 | ** Celestial Intermediate Pole with respect to the International
|
|---|
| 59 | ** Terrestrial Reference System (see IERS Conventions 2003),
|
|---|
| 60 | ** measured along the meridians to 0 and 90 deg west respectively.
|
|---|
| 61 | **
|
|---|
| 62 | ** 4) The matrix rc2t transforms from celestial to terrestrial
|
|---|
| 63 | ** coordinates:
|
|---|
| 64 | **
|
|---|
| 65 | ** [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
|
|---|
| 66 | **
|
|---|
| 67 | ** = rc2t * [CRS]
|
|---|
| 68 | **
|
|---|
| 69 | ** where [CRS] is a vector in the Geocentric Celestial Reference
|
|---|
| 70 | ** System and [TRS] is a vector in the International Terrestrial
|
|---|
| 71 | ** Reference System (see IERS Conventions 2003), RBPN is the
|
|---|
| 72 | ** bias-precession-nutation matrix, GST is the Greenwich (apparent)
|
|---|
| 73 | ** Sidereal Time and RPOM is the polar motion matrix.
|
|---|
| 74 | **
|
|---|
| 75 | ** 5) Although its name does not include "00", This function is in fact
|
|---|
| 76 | ** specific to the IAU 2000 models.
|
|---|
| 77 | **
|
|---|
| 78 | ** Called:
|
|---|
| 79 | ** iauPn00 bias/precession/nutation results, IAU 2000
|
|---|
| 80 | ** iauGmst00 Greenwich mean sidereal time, IAU 2000
|
|---|
| 81 | ** iauSp00 the TIO locator s', IERS 2000
|
|---|
| 82 | ** iauEe00 equation of the equinoxes, IAU 2000
|
|---|
| 83 | ** iauPom00 polar motion matrix
|
|---|
| 84 | ** iauC2teqx form equinox-based celestial-to-terrestrial matrix
|
|---|
| 85 | **
|
|---|
| 86 | ** Reference:
|
|---|
| 87 | **
|
|---|
| 88 | ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
|
|---|
| 89 | ** IERS Technical Note No. 32, BKG (2004)
|
|---|
| 90 | **
|
|---|
| 91 | ** This revision: 2013 June 18
|
|---|
| 92 | **
|
|---|
| 93 | ** SOFA release 2015-02-09
|
|---|
| 94 | **
|
|---|
| 95 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 96 | */
|
|---|
| 97 | {
|
|---|
| 98 | double epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3],
|
|---|
| 99 | rbpn[3][3], gmst, ee, sp, rpom[3][3];
|
|---|
| 100 |
|
|---|
| 101 | /* Form the celestial-to-true matrix for this TT. */
|
|---|
| 102 | iauPn00(tta, ttb, dpsi, deps, &epsa, rb, rp, rbp, rn, rbpn);
|
|---|
| 103 |
|
|---|
| 104 | /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
|
|---|
| 105 | gmst = iauGmst00(uta, utb, tta, ttb);
|
|---|
| 106 |
|
|---|
| 107 | /* Predict the equation of the equinoxes given TT and nutation. */
|
|---|
| 108 | ee = iauEe00(tta, ttb, epsa, dpsi);
|
|---|
| 109 |
|
|---|
| 110 | /* Estimate s'. */
|
|---|
| 111 | sp = iauSp00(tta, ttb);
|
|---|
| 112 |
|
|---|
| 113 | /* Form the polar motion matrix. */
|
|---|
| 114 | iauPom00(xp, yp, sp, rpom);
|
|---|
| 115 |
|
|---|
| 116 | /* Combine to form the celestial-to-terrestrial matrix. */
|
|---|
| 117 | iauC2teqx(rbpn, gmst + ee, rpom, rc2t);
|
|---|
| 118 |
|
|---|
| 119 | return;
|
|---|
| 120 |
|
|---|
| 121 | /*----------------------------------------------------------------------
|
|---|
| 122 | **
|
|---|
| 123 | ** Copyright (C) 2015
|
|---|
| 124 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 125 | ** of the International Astronomical Union.
|
|---|
| 126 | **
|
|---|
| 127 | ** =====================
|
|---|
| 128 | ** SOFA Software License
|
|---|
| 129 | ** =====================
|
|---|
| 130 | **
|
|---|
| 131 | ** NOTICE TO USER:
|
|---|
| 132 | **
|
|---|
| 133 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 134 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 135 | **
|
|---|
| 136 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 137 | **
|
|---|
| 138 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 139 | ** purpose, including commercial applications, free of charge and
|
|---|
| 140 | ** without payment of royalties, subject to the conditions and
|
|---|
| 141 | ** restrictions listed below.
|
|---|
| 142 | **
|
|---|
| 143 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 144 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 145 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 146 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 147 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 148 | ** with the following requirements:
|
|---|
| 149 | **
|
|---|
| 150 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 151 | ** (i) uses routines and computations derived by you from
|
|---|
| 152 | ** software provided by SOFA under license to you; and
|
|---|
| 153 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 154 | ** endorsed by SOFA.
|
|---|
| 155 | **
|
|---|
| 156 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 157 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 158 | ** from the original SOFA software.
|
|---|
| 159 | **
|
|---|
| 160 | ** c) The names of all routines in your derived work shall not
|
|---|
| 161 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 162 | ** thereof such as changes of case.
|
|---|
| 163 | **
|
|---|
| 164 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 165 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 166 | ** original software, nor file a patent application for SOFA
|
|---|
| 167 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 168 | **
|
|---|
| 169 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 170 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 171 | ** granted a further right to modify the source code of your
|
|---|
| 172 | ** derived work.
|
|---|
| 173 | **
|
|---|
| 174 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 175 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 176 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 177 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 178 | ** such, as explained above.
|
|---|
| 179 | **
|
|---|
| 180 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 181 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 182 | ** by inappropriate modification.
|
|---|
| 183 | **
|
|---|
| 184 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 185 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 186 | ** the performance or results which the user may obtain by using the
|
|---|
| 187 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 188 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 189 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 190 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 191 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 192 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 193 | ** claim by any third party.
|
|---|
| 194 | **
|
|---|
| 195 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 196 | ** and conditions specified herein does not imply that future
|
|---|
| 197 | ** versions will also be made available under the same terms and
|
|---|
| 198 | ** conditions.
|
|---|
| 199 | *
|
|---|
| 200 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 201 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 202 | ** appreciated.
|
|---|
| 203 | **
|
|---|
| 204 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 205 | ** follows:
|
|---|
| 206 | **
|
|---|
| 207 | ** By email: sofa@ukho.gov.uk
|
|---|
| 208 | ** By post: IAU SOFA Center
|
|---|
| 209 | ** HM Nautical Almanac Office
|
|---|
| 210 | ** UK Hydrographic Office
|
|---|
| 211 | ** Admiralty Way, Taunton
|
|---|
| 212 | ** Somerset, TA1 2DN
|
|---|
| 213 | ** United Kingdom
|
|---|
| 214 | **
|
|---|
| 215 | **--------------------------------------------------------------------*/
|
|---|
| 216 | }
|
|---|