| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauNut00b(double date1, double date2, double *dpsi, double *deps)
|
|---|
| 4 | /*
|
|---|
| 5 | ** - - - - - - - - - -
|
|---|
| 6 | ** i a u N u t 0 0 b
|
|---|
| 7 | ** - - - - - - - - - -
|
|---|
| 8 | **
|
|---|
| 9 | ** Nutation, IAU 2000B model.
|
|---|
| 10 | **
|
|---|
| 11 | ** This function is part of the International Astronomical Union's
|
|---|
| 12 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
|---|
| 13 | **
|
|---|
| 14 | ** Status: canonical model.
|
|---|
| 15 | **
|
|---|
| 16 | ** Given:
|
|---|
| 17 | ** date1,date2 double TT as a 2-part Julian Date (Note 1)
|
|---|
| 18 | **
|
|---|
| 19 | ** Returned:
|
|---|
| 20 | ** dpsi,deps double nutation, luni-solar + planetary (Note 2)
|
|---|
| 21 | **
|
|---|
| 22 | ** Notes:
|
|---|
| 23 | **
|
|---|
| 24 | ** 1) The TT date date1+date2 is a Julian Date, apportioned in any
|
|---|
| 25 | ** convenient way between the two arguments. For example,
|
|---|
| 26 | ** JD(TT)=2450123.7 could be expressed in any of these ways,
|
|---|
| 27 | ** among others:
|
|---|
| 28 | **
|
|---|
| 29 | ** date1 date2
|
|---|
| 30 | **
|
|---|
| 31 | ** 2450123.7 0.0 (JD method)
|
|---|
| 32 | ** 2451545.0 -1421.3 (J2000 method)
|
|---|
| 33 | ** 2400000.5 50123.2 (MJD method)
|
|---|
| 34 | ** 2450123.5 0.2 (date & time method)
|
|---|
| 35 | **
|
|---|
| 36 | ** The JD method is the most natural and convenient to use in
|
|---|
| 37 | ** cases where the loss of several decimal digits of resolution
|
|---|
| 38 | ** is acceptable. The J2000 method is best matched to the way
|
|---|
| 39 | ** the argument is handled internally and will deliver the
|
|---|
| 40 | ** optimum resolution. The MJD method and the date & time methods
|
|---|
| 41 | ** are both good compromises between resolution and convenience.
|
|---|
| 42 | **
|
|---|
| 43 | ** 2) The nutation components in longitude and obliquity are in radians
|
|---|
| 44 | ** and with respect to the equinox and ecliptic of date. The
|
|---|
| 45 | ** obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
|
|---|
| 46 | ** value of 84381.448 arcsec. (The errors that result from using
|
|---|
| 47 | ** this function with the IAU 2006 value of 84381.406 arcsec can be
|
|---|
| 48 | ** neglected.)
|
|---|
| 49 | **
|
|---|
| 50 | ** The nutation model consists only of luni-solar terms, but
|
|---|
| 51 | ** includes also a fixed offset which compensates for certain long-
|
|---|
| 52 | ** period planetary terms (Note 7).
|
|---|
| 53 | **
|
|---|
| 54 | ** 3) This function is an implementation of the IAU 2000B abridged
|
|---|
| 55 | ** nutation model formally adopted by the IAU General Assembly in
|
|---|
| 56 | ** 2000. The function computes the MHB_2000_SHORT luni-solar
|
|---|
| 57 | ** nutation series (Luzum 2001), but without the associated
|
|---|
| 58 | ** corrections for the precession rate adjustments and the offset
|
|---|
| 59 | ** between the GCRS and J2000.0 mean poles.
|
|---|
| 60 | **
|
|---|
| 61 | ** 4) The full IAU 2000A (MHB2000) nutation model contains nearly 1400
|
|---|
| 62 | ** terms. The IAU 2000B model (McCarthy & Luzum 2003) contains only
|
|---|
| 63 | ** 77 terms, plus additional simplifications, yet still delivers
|
|---|
| 64 | ** results of 1 mas accuracy at present epochs. This combination of
|
|---|
| 65 | ** accuracy and size makes the IAU 2000B abridged nutation model
|
|---|
| 66 | ** suitable for most practical applications.
|
|---|
| 67 | **
|
|---|
| 68 | ** The function delivers a pole accurate to 1 mas from 1900 to 2100
|
|---|
| 69 | ** (usually better than 1 mas, very occasionally just outside
|
|---|
| 70 | ** 1 mas). The full IAU 2000A model, which is implemented in the
|
|---|
| 71 | ** function iauNut00a (q.v.), delivers considerably greater accuracy
|
|---|
| 72 | ** at current dates; however, to realize this improved accuracy,
|
|---|
| 73 | ** corrections for the essentially unpredictable free-core-nutation
|
|---|
| 74 | ** (FCN) must also be included.
|
|---|
| 75 | **
|
|---|
| 76 | ** 5) The present function provides classical nutation. The
|
|---|
| 77 | ** MHB_2000_SHORT algorithm, from which it is adapted, deals also
|
|---|
| 78 | ** with (i) the offsets between the GCRS and mean poles and (ii) the
|
|---|
| 79 | ** adjustments in longitude and obliquity due to the changed
|
|---|
| 80 | ** precession rates. These additional functions, namely frame bias
|
|---|
| 81 | ** and precession adjustments, are supported by the SOFA functions
|
|---|
| 82 | ** iauBi00 and iauPr00.
|
|---|
| 83 | **
|
|---|
| 84 | ** 6) The MHB_2000_SHORT algorithm also provides "total" nutations,
|
|---|
| 85 | ** comprising the arithmetic sum of the frame bias, precession
|
|---|
| 86 | ** adjustments, and nutation (luni-solar + planetary). These total
|
|---|
| 87 | ** nutations can be used in combination with an existing IAU 1976
|
|---|
| 88 | ** precession implementation, such as iauPmat76, to deliver GCRS-
|
|---|
| 89 | ** to-true predictions of mas accuracy at current epochs. However,
|
|---|
| 90 | ** for symmetry with the iauNut00a function (q.v. for the reasons),
|
|---|
| 91 | ** the SOFA functions do not generate the "total nutations"
|
|---|
| 92 | ** directly. Should they be required, they could of course easily
|
|---|
| 93 | ** be generated by calling iauBi00, iauPr00 and the present function
|
|---|
| 94 | ** and adding the results.
|
|---|
| 95 | **
|
|---|
| 96 | ** 7) The IAU 2000B model includes "planetary bias" terms that are
|
|---|
| 97 | ** fixed in size but compensate for long-period nutations. The
|
|---|
| 98 | ** amplitudes quoted in McCarthy & Luzum (2003), namely
|
|---|
| 99 | ** Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for
|
|---|
| 100 | ** the "total nutations" method described in Note 6. The Luzum
|
|---|
| 101 | ** (2001) values used in this SOFA implementation, namely -0.135 mas
|
|---|
| 102 | ** and +0.388 mas, are optimized for the "rigorous" method, where
|
|---|
| 103 | ** frame bias, precession and nutation are applied separately and in
|
|---|
| 104 | ** that order. During the interval 1995-2050, the SOFA
|
|---|
| 105 | ** implementation delivers a maximum error of 1.001 mas (not
|
|---|
| 106 | ** including FCN).
|
|---|
| 107 | **
|
|---|
| 108 | ** References:
|
|---|
| 109 | **
|
|---|
| 110 | ** Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions
|
|---|
| 111 | ** for the precession quantities based upon the IAU /1976/ system of
|
|---|
| 112 | ** astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)
|
|---|
| 113 | **
|
|---|
| 114 | ** Luzum, B., private communication, 2001 (Fortran code
|
|---|
| 115 | ** MHB_2000_SHORT)
|
|---|
| 116 | **
|
|---|
| 117 | ** McCarthy, D.D. & Luzum, B.J., "An abridged model of the
|
|---|
| 118 | ** precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.
|
|---|
| 119 | ** 85, 37-49 (2003)
|
|---|
| 120 | **
|
|---|
| 121 | ** Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
|
|---|
| 122 | ** Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)
|
|---|
| 123 | **
|
|---|
| 124 | ** This revision: 2013 June 18
|
|---|
| 125 | **
|
|---|
| 126 | ** SOFA release 2015-02-09
|
|---|
| 127 | **
|
|---|
| 128 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 129 | */
|
|---|
| 130 | {
|
|---|
| 131 | double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
|
|---|
| 132 | dpsils, depsls, dpsipl, depspl;
|
|---|
| 133 | int i;
|
|---|
| 134 |
|
|---|
| 135 | /* Units of 0.1 microarcsecond to radians */
|
|---|
| 136 | static const double U2R = DAS2R / 1e7;
|
|---|
| 137 |
|
|---|
| 138 | /* ---------------------------------------- */
|
|---|
| 139 | /* Fixed offsets in lieu of planetary terms */
|
|---|
| 140 | /* ---------------------------------------- */
|
|---|
| 141 |
|
|---|
| 142 | static const double DPPLAN = -0.135 * DMAS2R;
|
|---|
| 143 | static const double DEPLAN = 0.388 * DMAS2R;
|
|---|
| 144 |
|
|---|
| 145 | /* --------------------------------------------------- */
|
|---|
| 146 | /* Luni-solar nutation: argument and term coefficients */
|
|---|
| 147 | /* --------------------------------------------------- */
|
|---|
| 148 |
|
|---|
| 149 | /* The units for the sine and cosine coefficients are */
|
|---|
| 150 | /* 0.1 microarcsec and the same per Julian century */
|
|---|
| 151 |
|
|---|
| 152 | static const struct {
|
|---|
| 153 | int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
|
|---|
| 154 | double ps,pst,pc; /* longitude sin, t*sin, cos coefficients */
|
|---|
| 155 | double ec,ect,es; /* obliquity cos, t*cos, sin coefficients */
|
|---|
| 156 |
|
|---|
| 157 | } x[] = {
|
|---|
| 158 |
|
|---|
| 159 | /* 1-10 */
|
|---|
| 160 | { 0, 0, 0, 0,1,
|
|---|
| 161 | -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0},
|
|---|
| 162 | { 0, 0, 2,-2,2,
|
|---|
| 163 | -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0},
|
|---|
| 164 | { 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0},
|
|---|
| 165 | { 0, 0, 0, 0,2,2074554.0, 207.0, -698.0,-897492.0, 470.0,-291.0},
|
|---|
| 166 | { 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0},
|
|---|
| 167 | { 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0},
|
|---|
| 168 | { 1, 0, 0, 0,0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0},
|
|---|
| 169 | { 0, 0, 2, 0,1,-387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0},
|
|---|
| 170 | { 1, 0, 2, 0,2,-301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0},
|
|---|
| 171 | { 0,-1, 2,-2,2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0},
|
|---|
| 172 |
|
|---|
| 173 | /* 11-20 */
|
|---|
| 174 | { 0, 0, 2,-2,1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0},
|
|---|
| 175 | {-1, 0, 2, 0,2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0},
|
|---|
| 176 | {-1, 0, 0, 2,0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0},
|
|---|
| 177 | { 1, 0, 0, 0,1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0},
|
|---|
| 178 | {-1, 0, 0, 0,1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0},
|
|---|
| 179 | {-1, 0, 2, 2,2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0},
|
|---|
| 180 | { 1, 0, 2, 0,1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0},
|
|---|
| 181 | {-2, 0, 2, 0,1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0},
|
|---|
| 182 | { 0, 0, 0, 2,0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0},
|
|---|
| 183 | { 0, 0, 2, 2,2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0},
|
|---|
| 184 |
|
|---|
| 185 | /* 21-30 */
|
|---|
| 186 | { 0,-2, 2,-2,2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0},
|
|---|
| 187 | {-2, 0, 0, 2,0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0},
|
|---|
| 188 | { 2, 0, 2, 0,2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0},
|
|---|
| 189 | { 1, 0, 2,-2,2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0},
|
|---|
| 190 | {-1, 0, 2, 0,1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0},
|
|---|
| 191 | { 2, 0, 0, 0,0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0},
|
|---|
| 192 | { 0, 0, 2, 0,0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0},
|
|---|
| 193 | { 0, 1, 0, 0,1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0},
|
|---|
| 194 | {-1, 0, 0, 2,1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0},
|
|---|
| 195 | { 0, 2, 2,-2,2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0},
|
|---|
| 196 |
|
|---|
| 197 | /* 31-40 */
|
|---|
| 198 | { 0, 0,-2, 2,0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0},
|
|---|
| 199 | { 1, 0, 0,-2,1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0},
|
|---|
| 200 | { 0,-1, 0, 0,1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0},
|
|---|
| 201 | {-1, 0, 2, 2,1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0},
|
|---|
| 202 | { 0, 2, 0, 0,0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0},
|
|---|
| 203 | { 1, 0, 2, 2,2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0},
|
|---|
| 204 | {-2, 0, 2, 0,0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0},
|
|---|
| 205 | { 0, 1, 2, 0,2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0},
|
|---|
| 206 | { 0, 0, 2, 2,1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0},
|
|---|
| 207 | { 0,-1, 2, 0,2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0},
|
|---|
| 208 |
|
|---|
| 209 | /* 41-50 */
|
|---|
| 210 | { 0, 0, 0, 2,1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0},
|
|---|
| 211 | { 1, 0, 2,-2,1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0},
|
|---|
| 212 | { 2, 0, 2,-2,2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0},
|
|---|
| 213 | {-2, 0, 0, 2,1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0},
|
|---|
| 214 | { 2, 0, 2, 0,1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0},
|
|---|
| 215 | { 0,-1, 2,-2,1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0},
|
|---|
| 216 | { 0, 0, 0,-2,1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0},
|
|---|
| 217 | {-1,-1, 0, 2,0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0},
|
|---|
| 218 | { 2, 0, 0,-2,1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0},
|
|---|
| 219 | { 1, 0, 0, 2,0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0},
|
|---|
| 220 |
|
|---|
| 221 | /* 51-60 */
|
|---|
| 222 | { 0, 1, 2,-2,1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0},
|
|---|
| 223 | { 1,-1, 0, 0,0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0},
|
|---|
| 224 | {-2, 0, 2, 0,2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0},
|
|---|
| 225 | { 3, 0, 2, 0,2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0},
|
|---|
| 226 | { 0,-1, 0, 2,0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0},
|
|---|
| 227 | { 1,-1, 2, 0,2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0},
|
|---|
| 228 | { 0, 0, 0, 1,0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0},
|
|---|
| 229 | {-1,-1, 2, 2,2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0},
|
|---|
| 230 | {-1, 0, 2, 0,0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0},
|
|---|
| 231 | { 0,-1, 2, 2,2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0},
|
|---|
| 232 |
|
|---|
| 233 | /* 61-70 */
|
|---|
| 234 | {-2, 0, 0, 0,1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0},
|
|---|
| 235 | { 1, 1, 2, 0,2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0},
|
|---|
| 236 | { 2, 0, 0, 0,1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0},
|
|---|
| 237 | {-1, 1, 0, 1,0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0},
|
|---|
| 238 | { 1, 1, 0, 0,0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0},
|
|---|
| 239 | { 1, 0, 2, 0,0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0},
|
|---|
| 240 | {-1, 0, 2,-2,1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0},
|
|---|
| 241 | { 1, 0, 0, 0,2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0},
|
|---|
| 242 | {-1, 0, 0, 1,0, 4026.0, 0.0, -353.0, -553.0, 0.0,-139.0},
|
|---|
| 243 | { 0, 0, 2, 1,2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0},
|
|---|
| 244 |
|
|---|
| 245 | /* 71-77 */
|
|---|
| 246 | {-1, 0, 2, 4,2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0},
|
|---|
| 247 | {-1, 1, 0, 1,1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0},
|
|---|
| 248 | { 0,-2, 2,-2,1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0},
|
|---|
| 249 | { 1, 0, 2, 2,1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0},
|
|---|
| 250 | {-2, 0, 2, 2,2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0},
|
|---|
| 251 | {-1, 0, 0, 0,2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0},
|
|---|
| 252 | { 1, 1, 2,-2,2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0}
|
|---|
| 253 | };
|
|---|
| 254 |
|
|---|
| 255 | /* Number of terms in the series */
|
|---|
| 256 | const int NLS = (int) (sizeof x / sizeof x[0]);
|
|---|
| 257 |
|
|---|
| 258 | /*--------------------------------------------------------------------*/
|
|---|
| 259 |
|
|---|
| 260 | /* Interval between fundamental epoch J2000.0 and given date (JC). */
|
|---|
| 261 | t = ((date1 - DJ00) + date2) / DJC;
|
|---|
| 262 |
|
|---|
| 263 | /* --------------------*/
|
|---|
| 264 | /* LUNI-SOLAR NUTATION */
|
|---|
| 265 | /* --------------------*/
|
|---|
| 266 |
|
|---|
| 267 | /* Fundamental (Delaunay) arguments from Simon et al. (1994) */
|
|---|
| 268 |
|
|---|
| 269 | /* Mean anomaly of the Moon. */
|
|---|
| 270 | el = fmod(485868.249036 + (1717915923.2178) * t, TURNAS) * DAS2R;
|
|---|
| 271 |
|
|---|
| 272 | /* Mean anomaly of the Sun. */
|
|---|
| 273 | elp = fmod(1287104.79305 + (129596581.0481) * t, TURNAS) * DAS2R;
|
|---|
| 274 |
|
|---|
| 275 | /* Mean argument of the latitude of the Moon. */
|
|---|
| 276 | f = fmod(335779.526232 + (1739527262.8478) * t, TURNAS) * DAS2R;
|
|---|
| 277 |
|
|---|
| 278 | /* Mean elongation of the Moon from the Sun. */
|
|---|
| 279 | d = fmod(1072260.70369 + (1602961601.2090) * t, TURNAS) * DAS2R;
|
|---|
| 280 |
|
|---|
| 281 | /* Mean longitude of the ascending node of the Moon. */
|
|---|
| 282 | om = fmod(450160.398036 + (-6962890.5431) * t, TURNAS) * DAS2R;
|
|---|
| 283 |
|
|---|
| 284 | /* Initialize the nutation values. */
|
|---|
| 285 | dp = 0.0;
|
|---|
| 286 | de = 0.0;
|
|---|
| 287 |
|
|---|
| 288 | /* Summation of luni-solar nutation series (smallest terms first). */
|
|---|
| 289 | for (i = NLS-1; i >= 0; i--) {
|
|---|
| 290 |
|
|---|
| 291 | /* Argument and functions. */
|
|---|
| 292 | arg = fmod( (double)x[i].nl * el +
|
|---|
| 293 | (double)x[i].nlp * elp +
|
|---|
| 294 | (double)x[i].nf * f +
|
|---|
| 295 | (double)x[i].nd * d +
|
|---|
| 296 | (double)x[i].nom * om, D2PI );
|
|---|
| 297 | sarg = sin(arg);
|
|---|
| 298 | carg = cos(arg);
|
|---|
| 299 |
|
|---|
| 300 | /* Term. */
|
|---|
| 301 | dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg;
|
|---|
| 302 | de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg;
|
|---|
| 303 | }
|
|---|
| 304 |
|
|---|
| 305 | /* Convert from 0.1 microarcsec units to radians. */
|
|---|
| 306 | dpsils = dp * U2R;
|
|---|
| 307 | depsls = de * U2R;
|
|---|
| 308 |
|
|---|
| 309 | /* ------------------------------*/
|
|---|
| 310 | /* IN LIEU OF PLANETARY NUTATION */
|
|---|
| 311 | /* ------------------------------*/
|
|---|
| 312 |
|
|---|
| 313 | /* Fixed offset to correct for missing terms in truncated series. */
|
|---|
| 314 | dpsipl = DPPLAN;
|
|---|
| 315 | depspl = DEPLAN;
|
|---|
| 316 |
|
|---|
| 317 | /* --------*/
|
|---|
| 318 | /* RESULTS */
|
|---|
| 319 | /* --------*/
|
|---|
| 320 |
|
|---|
| 321 | /* Add luni-solar and planetary components. */
|
|---|
| 322 | *dpsi = dpsils + dpsipl;
|
|---|
| 323 | *deps = depsls + depspl;
|
|---|
| 324 |
|
|---|
| 325 | return;
|
|---|
| 326 |
|
|---|
| 327 | /*----------------------------------------------------------------------
|
|---|
| 328 | **
|
|---|
| 329 | ** Copyright (C) 2015
|
|---|
| 330 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 331 | ** of the International Astronomical Union.
|
|---|
| 332 | **
|
|---|
| 333 | ** =====================
|
|---|
| 334 | ** SOFA Software License
|
|---|
| 335 | ** =====================
|
|---|
| 336 | **
|
|---|
| 337 | ** NOTICE TO USER:
|
|---|
| 338 | **
|
|---|
| 339 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 340 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 341 | **
|
|---|
| 342 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 343 | **
|
|---|
| 344 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 345 | ** purpose, including commercial applications, free of charge and
|
|---|
| 346 | ** without payment of royalties, subject to the conditions and
|
|---|
| 347 | ** restrictions listed below.
|
|---|
| 348 | **
|
|---|
| 349 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 350 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 351 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 352 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 353 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 354 | ** with the following requirements:
|
|---|
| 355 | **
|
|---|
| 356 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 357 | ** (i) uses routines and computations derived by you from
|
|---|
| 358 | ** software provided by SOFA under license to you; and
|
|---|
| 359 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 360 | ** endorsed by SOFA.
|
|---|
| 361 | **
|
|---|
| 362 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 363 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 364 | ** from the original SOFA software.
|
|---|
| 365 | **
|
|---|
| 366 | ** c) The names of all routines in your derived work shall not
|
|---|
| 367 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 368 | ** thereof such as changes of case.
|
|---|
| 369 | **
|
|---|
| 370 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 371 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 372 | ** original software, nor file a patent application for SOFA
|
|---|
| 373 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 374 | **
|
|---|
| 375 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 376 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 377 | ** granted a further right to modify the source code of your
|
|---|
| 378 | ** derived work.
|
|---|
| 379 | **
|
|---|
| 380 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 381 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 382 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 383 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 384 | ** such, as explained above.
|
|---|
| 385 | **
|
|---|
| 386 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 387 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 388 | ** by inappropriate modification.
|
|---|
| 389 | **
|
|---|
| 390 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 391 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 392 | ** the performance or results which the user may obtain by using the
|
|---|
| 393 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 394 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 395 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 396 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 397 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 398 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 399 | ** claim by any third party.
|
|---|
| 400 | **
|
|---|
| 401 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 402 | ** and conditions specified herein does not imply that future
|
|---|
| 403 | ** versions will also be made available under the same terms and
|
|---|
| 404 | ** conditions.
|
|---|
| 405 | *
|
|---|
| 406 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 407 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 408 | ** appreciated.
|
|---|
| 409 | **
|
|---|
| 410 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 411 | ** follows:
|
|---|
| 412 | **
|
|---|
| 413 | ** By email: sofa@ukho.gov.uk
|
|---|
| 414 | ** By post: IAU SOFA Center
|
|---|
| 415 | ** HM Nautical Almanac Office
|
|---|
| 416 | ** UK Hydrographic Office
|
|---|
| 417 | ** Admiralty Way, Taunton
|
|---|
| 418 | ** Somerset, TA1 2DN
|
|---|
| 419 | ** United Kingdom
|
|---|
| 420 | **
|
|---|
| 421 | **--------------------------------------------------------------------*/
|
|---|
| 422 | }
|
|---|