source: trunk/FACT++/erfa/src/numat.c@ 18350

Last change on this file since 18350 was 18348, checked in by tbretz, 9 years ago
File size: 4.5 KB
Line 
1#include "erfa.h"
2
3void eraNumat(double epsa, double dpsi, double deps, double rmatn[3][3])
4/*
5** - - - - - - - - -
6** e r a N u m a t
7** - - - - - - - - -
8**
9** Form the matrix of nutation.
10**
11** Given:
12** epsa double mean obliquity of date (Note 1)
13** dpsi,deps double nutation (Note 2)
14**
15** Returned:
16** rmatn double[3][3] nutation matrix (Note 3)
17**
18** Notes:
19**
20** 1) The supplied mean obliquity epsa, must be consistent with the
21** precession-nutation models from which dpsi and deps were obtained.
22**
23** 2) The caller is responsible for providing the nutation components;
24** they are in longitude and obliquity, in radians and are with
25** respect to the equinox and ecliptic of date.
26**
27** 3) The matrix operates in the sense V(true) = rmatn * V(mean),
28** where the p-vector V(true) is with respect to the true
29** equatorial triad of date and the p-vector V(mean) is with
30** respect to the mean equatorial triad of date.
31**
32** Called:
33** eraIr initialize r-matrix to identity
34** eraRx rotate around X-axis
35** eraRz rotate around Z-axis
36**
37** Reference:
38**
39** Explanatory Supplement to the Astronomical Almanac,
40** P. Kenneth Seidelmann (ed), University Science Books (1992),
41** Section 3.222-3 (p114).
42**
43** Copyright (C) 2013-2015, NumFOCUS Foundation.
44** Derived, with permission, from the SOFA library. See notes at end of file.
45*/
46{
47/* Build the rotation matrix. */
48 eraIr(rmatn);
49 eraRx(epsa, rmatn);
50 eraRz(-dpsi, rmatn);
51 eraRx(-(epsa + deps), rmatn);
52
53 return;
54
55}
56/*----------------------------------------------------------------------
57**
58**
59** Copyright (C) 2013-2015, NumFOCUS Foundation.
60** All rights reserved.
61**
62** This library is derived, with permission, from the International
63** Astronomical Union's "Standards of Fundamental Astronomy" library,
64** available from http://www.iausofa.org.
65**
66** The ERFA version is intended to retain identical functionality to
67** the SOFA library, but made distinct through different function and
68** file names, as set out in the SOFA license conditions. The SOFA
69** original has a role as a reference standard for the IAU and IERS,
70** and consequently redistribution is permitted only in its unaltered
71** state. The ERFA version is not subject to this restriction and
72** therefore can be included in distributions which do not support the
73** concept of "read only" software.
74**
75** Although the intent is to replicate the SOFA API (other than
76** replacement of prefix names) and results (with the exception of
77** bugs; any that are discovered will be fixed), SOFA is not
78** responsible for any errors found in this version of the library.
79**
80** If you wish to acknowledge the SOFA heritage, please acknowledge
81** that you are using a library derived from SOFA, rather than SOFA
82** itself.
83**
84**
85** TERMS AND CONDITIONS
86**
87** Redistribution and use in source and binary forms, with or without
88** modification, are permitted provided that the following conditions
89** are met:
90**
91** 1 Redistributions of source code must retain the above copyright
92** notice, this list of conditions and the following disclaimer.
93**
94** 2 Redistributions in binary form must reproduce the above copyright
95** notice, this list of conditions and the following disclaimer in
96** the documentation and/or other materials provided with the
97** distribution.
98**
99** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
100** the International Astronomical Union nor the names of its
101** contributors may be used to endorse or promote products derived
102** from this software without specific prior written permission.
103**
104** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
105** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
106** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
107** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
108** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
109** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
110** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
111** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
112** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
113** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
114** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
115** POSSIBILITY OF SUCH DAMAGE.
116**
117*/
Note: See TracBrowser for help on using the repository browser.