| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauFw2m(double gamb, double phib, double psi, double eps,
|
|---|
| 4 | double r[3][3])
|
|---|
| 5 | /*
|
|---|
| 6 | ** - - - - - - - -
|
|---|
| 7 | ** i a u F w 2 m
|
|---|
| 8 | ** - - - - - - - -
|
|---|
| 9 | **
|
|---|
| 10 | ** Form rotation matrix given the Fukushima-Williams angles.
|
|---|
| 11 | **
|
|---|
| 12 | ** This function is part of the International Astronomical Union's
|
|---|
| 13 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
|---|
| 14 | **
|
|---|
| 15 | ** Status: support function.
|
|---|
| 16 | **
|
|---|
| 17 | ** Given:
|
|---|
| 18 | ** gamb double F-W angle gamma_bar (radians)
|
|---|
| 19 | ** phib double F-W angle phi_bar (radians)
|
|---|
| 20 | ** psi double F-W angle psi (radians)
|
|---|
| 21 | ** eps double F-W angle epsilon (radians)
|
|---|
| 22 | **
|
|---|
| 23 | ** Returned:
|
|---|
| 24 | ** r double[3][3] rotation matrix
|
|---|
| 25 | **
|
|---|
| 26 | ** Notes:
|
|---|
| 27 | **
|
|---|
| 28 | ** 1) Naming the following points:
|
|---|
| 29 | **
|
|---|
| 30 | ** e = J2000.0 ecliptic pole,
|
|---|
| 31 | ** p = GCRS pole,
|
|---|
| 32 | ** E = ecliptic pole of date,
|
|---|
| 33 | ** and P = CIP,
|
|---|
| 34 | **
|
|---|
| 35 | ** the four Fukushima-Williams angles are as follows:
|
|---|
| 36 | **
|
|---|
| 37 | ** gamb = gamma = epE
|
|---|
| 38 | ** phib = phi = pE
|
|---|
| 39 | ** psi = psi = pEP
|
|---|
| 40 | ** eps = epsilon = EP
|
|---|
| 41 | **
|
|---|
| 42 | ** 2) The matrix representing the combined effects of frame bias,
|
|---|
| 43 | ** precession and nutation is:
|
|---|
| 44 | **
|
|---|
| 45 | ** NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
|
|---|
| 46 | **
|
|---|
| 47 | ** 3) Three different matrices can be constructed, depending on the
|
|---|
| 48 | ** supplied angles:
|
|---|
| 49 | **
|
|---|
| 50 | ** o To obtain the nutation x precession x frame bias matrix,
|
|---|
| 51 | ** generate the four precession angles, generate the nutation
|
|---|
| 52 | ** components and add them to the psi_bar and epsilon_A angles,
|
|---|
| 53 | ** and call the present function.
|
|---|
| 54 | **
|
|---|
| 55 | ** o To obtain the precession x frame bias matrix, generate the
|
|---|
| 56 | ** four precession angles and call the present function.
|
|---|
| 57 | **
|
|---|
| 58 | ** o To obtain the frame bias matrix, generate the four precession
|
|---|
| 59 | ** angles for date J2000.0 and call the present function.
|
|---|
| 60 | **
|
|---|
| 61 | ** The nutation-only and precession-only matrices can if necessary
|
|---|
| 62 | ** be obtained by combining these three appropriately.
|
|---|
| 63 | **
|
|---|
| 64 | ** Called:
|
|---|
| 65 | ** iauIr initialize r-matrix to identity
|
|---|
| 66 | ** iauRz rotate around Z-axis
|
|---|
| 67 | ** iauRx rotate around X-axis
|
|---|
| 68 | **
|
|---|
| 69 | ** Reference:
|
|---|
| 70 | **
|
|---|
| 71 | ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
|---|
| 72 | **
|
|---|
| 73 | ** This revision: 2013 June 18
|
|---|
| 74 | **
|
|---|
| 75 | ** SOFA release 2015-02-09
|
|---|
| 76 | **
|
|---|
| 77 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 78 | */
|
|---|
| 79 | {
|
|---|
| 80 | /* Construct the matrix. */
|
|---|
| 81 | iauIr(r);
|
|---|
| 82 | iauRz(gamb, r);
|
|---|
| 83 | iauRx(phib, r);
|
|---|
| 84 | iauRz(-psi, r);
|
|---|
| 85 | iauRx(-eps, r);
|
|---|
| 86 |
|
|---|
| 87 | return;
|
|---|
| 88 |
|
|---|
| 89 | /*----------------------------------------------------------------------
|
|---|
| 90 | **
|
|---|
| 91 | ** Copyright (C) 2015
|
|---|
| 92 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 93 | ** of the International Astronomical Union.
|
|---|
| 94 | **
|
|---|
| 95 | ** =====================
|
|---|
| 96 | ** SOFA Software License
|
|---|
| 97 | ** =====================
|
|---|
| 98 | **
|
|---|
| 99 | ** NOTICE TO USER:
|
|---|
| 100 | **
|
|---|
| 101 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 102 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 103 | **
|
|---|
| 104 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 105 | **
|
|---|
| 106 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 107 | ** purpose, including commercial applications, free of charge and
|
|---|
| 108 | ** without payment of royalties, subject to the conditions and
|
|---|
| 109 | ** restrictions listed below.
|
|---|
| 110 | **
|
|---|
| 111 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 112 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 113 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 114 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 115 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 116 | ** with the following requirements:
|
|---|
| 117 | **
|
|---|
| 118 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 119 | ** (i) uses routines and computations derived by you from
|
|---|
| 120 | ** software provided by SOFA under license to you; and
|
|---|
| 121 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 122 | ** endorsed by SOFA.
|
|---|
| 123 | **
|
|---|
| 124 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 125 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 126 | ** from the original SOFA software.
|
|---|
| 127 | **
|
|---|
| 128 | ** c) The names of all routines in your derived work shall not
|
|---|
| 129 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 130 | ** thereof such as changes of case.
|
|---|
| 131 | **
|
|---|
| 132 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 133 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 134 | ** original software, nor file a patent application for SOFA
|
|---|
| 135 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 136 | **
|
|---|
| 137 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 138 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 139 | ** granted a further right to modify the source code of your
|
|---|
| 140 | ** derived work.
|
|---|
| 141 | **
|
|---|
| 142 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 143 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 144 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 145 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 146 | ** such, as explained above.
|
|---|
| 147 | **
|
|---|
| 148 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 149 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 150 | ** by inappropriate modification.
|
|---|
| 151 | **
|
|---|
| 152 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 153 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 154 | ** the performance or results which the user may obtain by using the
|
|---|
| 155 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 156 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 157 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 158 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 159 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 160 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 161 | ** claim by any third party.
|
|---|
| 162 | **
|
|---|
| 163 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 164 | ** and conditions specified herein does not imply that future
|
|---|
| 165 | ** versions will also be made available under the same terms and
|
|---|
| 166 | ** conditions.
|
|---|
| 167 | *
|
|---|
| 168 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 169 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 170 | ** appreciated.
|
|---|
| 171 | **
|
|---|
| 172 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 173 | ** follows:
|
|---|
| 174 | **
|
|---|
| 175 | ** By email: sofa@ukho.gov.uk
|
|---|
| 176 | ** By post: IAU SOFA Center
|
|---|
| 177 | ** HM Nautical Almanac Office
|
|---|
| 178 | ** UK Hydrographic Office
|
|---|
| 179 | ** Admiralty Way, Taunton
|
|---|
| 180 | ** Somerset, TA1 2DN
|
|---|
| 181 | ** United Kingdom
|
|---|
| 182 | **
|
|---|
| 183 | **--------------------------------------------------------------------*/
|
|---|
| 184 | }
|
|---|