source: trunk/FACT++/sofa/src/pnm80.c@ 18365

Last change on this file since 18365 was 18346, checked in by tbretz, 10 years ago
File size: 6.6 KB
Line 
1#include "sofa.h"
2
3void iauPnm80(double date1, double date2, double rmatpn[3][3])
4/*
5** - - - - - - - - -
6** i a u P n m 8 0
7** - - - - - - - - -
8**
9** Form the matrix of precession/nutation for a given date, IAU 1976
10** precession model, IAU 1980 nutation model.
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** date1,date2 double TDB date (Note 1)
19**
20** Returned:
21** rmatpn double[3][3] combined precession/nutation matrix
22**
23** Notes:
24**
25** 1) The TDB date date1+date2 is a Julian Date, apportioned in any
26** convenient way between the two arguments. For example,
27** JD(TDB)=2450123.7 could be expressed in any of these ways,
28** among others:
29**
30** date1 date2
31**
32** 2450123.7 0.0 (JD method)
33** 2451545.0 -1421.3 (J2000 method)
34** 2400000.5 50123.2 (MJD method)
35** 2450123.5 0.2 (date & time method)
36**
37** The JD method is the most natural and convenient to use in
38** cases where the loss of several decimal digits of resolution
39** is acceptable. The J2000 method is best matched to the way
40** the argument is handled internally and will deliver the
41** optimum resolution. The MJD method and the date & time methods
42** are both good compromises between resolution and convenience.
43**
44** 2) The matrix operates in the sense V(date) = rmatpn * V(J2000),
45** where the p-vector V(date) is with respect to the true equatorial
46** triad of date date1+date2 and the p-vector V(J2000) is with
47** respect to the mean equatorial triad of epoch J2000.0.
48**
49** Called:
50** iauPmat76 precession matrix, IAU 1976
51** iauNutm80 nutation matrix, IAU 1980
52** iauRxr product of two r-matrices
53**
54** Reference:
55**
56** Explanatory Supplement to the Astronomical Almanac,
57** P. Kenneth Seidelmann (ed), University Science Books (1992),
58** Section 3.3 (p145).
59**
60** This revision: 2013 June 18
61**
62** SOFA release 2015-02-09
63**
64** Copyright (C) 2015 IAU SOFA Board. See notes at end.
65*/
66{
67 double rmatp[3][3], rmatn[3][3];
68
69/* Precession matrix, J2000.0 to date. */
70 iauPmat76(date1, date2, rmatp);
71
72/* Nutation matrix. */
73 iauNutm80(date1, date2, rmatn);
74
75/* Combine the matrices: PN = N x P. */
76 iauRxr(rmatn, rmatp, rmatpn);
77
78 return;
79
80/*----------------------------------------------------------------------
81**
82** Copyright (C) 2015
83** Standards Of Fundamental Astronomy Board
84** of the International Astronomical Union.
85**
86** =====================
87** SOFA Software License
88** =====================
89**
90** NOTICE TO USER:
91**
92** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
93** CONDITIONS WHICH APPLY TO ITS USE.
94**
95** 1. The Software is owned by the IAU SOFA Board ("SOFA").
96**
97** 2. Permission is granted to anyone to use the SOFA software for any
98** purpose, including commercial applications, free of charge and
99** without payment of royalties, subject to the conditions and
100** restrictions listed below.
101**
102** 3. You (the user) may copy and distribute SOFA source code to others,
103** and use and adapt its code and algorithms in your own software,
104** on a world-wide, royalty-free basis. That portion of your
105** distribution that does not consist of intact and unchanged copies
106** of SOFA source code files is a "derived work" that must comply
107** with the following requirements:
108**
109** a) Your work shall be marked or carry a statement that it
110** (i) uses routines and computations derived by you from
111** software provided by SOFA under license to you; and
112** (ii) does not itself constitute software provided by and/or
113** endorsed by SOFA.
114**
115** b) The source code of your derived work must contain descriptions
116** of how the derived work is based upon, contains and/or differs
117** from the original SOFA software.
118**
119** c) The names of all routines in your derived work shall not
120** include the prefix "iau" or "sofa" or trivial modifications
121** thereof such as changes of case.
122**
123** d) The origin of the SOFA components of your derived work must
124** not be misrepresented; you must not claim that you wrote the
125** original software, nor file a patent application for SOFA
126** software or algorithms embedded in the SOFA software.
127**
128** e) These requirements must be reproduced intact in any source
129** distribution and shall apply to anyone to whom you have
130** granted a further right to modify the source code of your
131** derived work.
132**
133** Note that, as originally distributed, the SOFA software is
134** intended to be a definitive implementation of the IAU standards,
135** and consequently third-party modifications are discouraged. All
136** variations, no matter how minor, must be explicitly marked as
137** such, as explained above.
138**
139** 4. You shall not cause the SOFA software to be brought into
140** disrepute, either by misuse, or use for inappropriate tasks, or
141** by inappropriate modification.
142**
143** 5. The SOFA software is provided "as is" and SOFA makes no warranty
144** as to its use or performance. SOFA does not and cannot warrant
145** the performance or results which the user may obtain by using the
146** SOFA software. SOFA makes no warranties, express or implied, as
147** to non-infringement of third party rights, merchantability, or
148** fitness for any particular purpose. In no event will SOFA be
149** liable to the user for any consequential, incidental, or special
150** damages, including any lost profits or lost savings, even if a
151** SOFA representative has been advised of such damages, or for any
152** claim by any third party.
153**
154** 6. The provision of any version of the SOFA software under the terms
155** and conditions specified herein does not imply that future
156** versions will also be made available under the same terms and
157** conditions.
158*
159** In any published work or commercial product which uses the SOFA
160** software directly, acknowledgement (see www.iausofa.org) is
161** appreciated.
162**
163** Correspondence concerning SOFA software should be addressed as
164** follows:
165**
166** By email: sofa@ukho.gov.uk
167** By post: IAU SOFA Center
168** HM Nautical Almanac Office
169** UK Hydrographic Office
170** Admiralty Way, Taunton
171** Somerset, TA1 2DN
172** United Kingdom
173**
174**--------------------------------------------------------------------*/
175}
Note: See TracBrowser for help on using the repository browser.