| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauRxr(double a[3][3], double b[3][3], double atb[3][3])
|
|---|
| 4 | /*
|
|---|
| 5 | ** - - - - - - -
|
|---|
| 6 | ** i a u R x r
|
|---|
| 7 | ** - - - - - - -
|
|---|
| 8 | **
|
|---|
| 9 | ** Multiply two r-matrices.
|
|---|
| 10 | **
|
|---|
| 11 | ** This function is part of the International Astronomical Union's
|
|---|
| 12 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
|---|
| 13 | **
|
|---|
| 14 | ** Status: vector/matrix support function.
|
|---|
| 15 | **
|
|---|
| 16 | ** Given:
|
|---|
| 17 | ** a double[3][3] first r-matrix
|
|---|
| 18 | ** b double[3][3] second r-matrix
|
|---|
| 19 | **
|
|---|
| 20 | ** Returned:
|
|---|
| 21 | ** atb double[3][3] a * b
|
|---|
| 22 | **
|
|---|
| 23 | ** Note:
|
|---|
| 24 | ** It is permissible to re-use the same array for any of the
|
|---|
| 25 | ** arguments.
|
|---|
| 26 | **
|
|---|
| 27 | ** Called:
|
|---|
| 28 | ** iauCr copy r-matrix
|
|---|
| 29 | **
|
|---|
| 30 | ** This revision: 2013 June 18
|
|---|
| 31 | **
|
|---|
| 32 | ** SOFA release 2015-02-09
|
|---|
| 33 | **
|
|---|
| 34 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 35 | */
|
|---|
| 36 | {
|
|---|
| 37 | int i, j, k;
|
|---|
| 38 | double w, wm[3][3];
|
|---|
| 39 |
|
|---|
| 40 | for (i = 0; i < 3; i++) {
|
|---|
| 41 | for (j = 0; j < 3; j++) {
|
|---|
| 42 | w = 0.0;
|
|---|
| 43 | for (k = 0; k < 3; k++) {
|
|---|
| 44 | w += a[i][k] * b[k][j];
|
|---|
| 45 | }
|
|---|
| 46 | wm[i][j] = w;
|
|---|
| 47 | }
|
|---|
| 48 | }
|
|---|
| 49 | iauCr(wm, atb);
|
|---|
| 50 |
|
|---|
| 51 | return;
|
|---|
| 52 |
|
|---|
| 53 | /*----------------------------------------------------------------------
|
|---|
| 54 | **
|
|---|
| 55 | ** Copyright (C) 2015
|
|---|
| 56 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 57 | ** of the International Astronomical Union.
|
|---|
| 58 | **
|
|---|
| 59 | ** =====================
|
|---|
| 60 | ** SOFA Software License
|
|---|
| 61 | ** =====================
|
|---|
| 62 | **
|
|---|
| 63 | ** NOTICE TO USER:
|
|---|
| 64 | **
|
|---|
| 65 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 66 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 67 | **
|
|---|
| 68 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 69 | **
|
|---|
| 70 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 71 | ** purpose, including commercial applications, free of charge and
|
|---|
| 72 | ** without payment of royalties, subject to the conditions and
|
|---|
| 73 | ** restrictions listed below.
|
|---|
| 74 | **
|
|---|
| 75 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 76 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 77 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 78 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 79 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 80 | ** with the following requirements:
|
|---|
| 81 | **
|
|---|
| 82 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 83 | ** (i) uses routines and computations derived by you from
|
|---|
| 84 | ** software provided by SOFA under license to you; and
|
|---|
| 85 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 86 | ** endorsed by SOFA.
|
|---|
| 87 | **
|
|---|
| 88 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 89 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 90 | ** from the original SOFA software.
|
|---|
| 91 | **
|
|---|
| 92 | ** c) The names of all routines in your derived work shall not
|
|---|
| 93 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 94 | ** thereof such as changes of case.
|
|---|
| 95 | **
|
|---|
| 96 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 97 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 98 | ** original software, nor file a patent application for SOFA
|
|---|
| 99 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 100 | **
|
|---|
| 101 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 102 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 103 | ** granted a further right to modify the source code of your
|
|---|
| 104 | ** derived work.
|
|---|
| 105 | **
|
|---|
| 106 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 107 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 108 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 109 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 110 | ** such, as explained above.
|
|---|
| 111 | **
|
|---|
| 112 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 113 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 114 | ** by inappropriate modification.
|
|---|
| 115 | **
|
|---|
| 116 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 117 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 118 | ** the performance or results which the user may obtain by using the
|
|---|
| 119 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 120 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 121 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 122 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 123 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 124 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 125 | ** claim by any third party.
|
|---|
| 126 | **
|
|---|
| 127 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 128 | ** and conditions specified herein does not imply that future
|
|---|
| 129 | ** versions will also be made available under the same terms and
|
|---|
| 130 | ** conditions.
|
|---|
| 131 | *
|
|---|
| 132 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 133 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 134 | ** appreciated.
|
|---|
| 135 | **
|
|---|
| 136 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 137 | ** follows:
|
|---|
| 138 | **
|
|---|
| 139 | ** By email: sofa@ukho.gov.uk
|
|---|
| 140 | ** By post: IAU SOFA Center
|
|---|
| 141 | ** HM Nautical Almanac Office
|
|---|
| 142 | ** UK Hydrographic Office
|
|---|
| 143 | ** Admiralty Way, Taunton
|
|---|
| 144 | ** Somerset, TA1 2DN
|
|---|
| 145 | ** United Kingdom
|
|---|
| 146 | **
|
|---|
| 147 | **--------------------------------------------------------------------*/
|
|---|
| 148 | }
|
|---|