source: trunk/FACT++/sofa/src/prec76.c@ 18375

Last change on this file since 18375 was 18346, checked in by tbretz, 11 years ago
File size: 7.8 KB
Line 
1#include "sofa.h"
2
3void iauPrec76(double date01, double date02, double date11, double date12,
4 double *zeta, double *z, double *theta)
5/*
6** - - - - - - - - - -
7** i a u P r e c 7 6
8** - - - - - - - - - -
9**
10** IAU 1976 precession model.
11**
12** This function forms the three Euler angles which implement general
13** precession between two dates, using the IAU 1976 model (as for the
14** FK5 catalog).
15**
16** This function is part of the International Astronomical Union's
17** SOFA (Standards Of Fundamental Astronomy) software collection.
18**
19** Status: canonical model.
20**
21** Given:
22** date01,date02 double TDB starting date (Note 1)
23** date11,date12 double TDB ending date (Note 1)
24**
25** Returned:
26** zeta double 1st rotation: radians cw around z
27** z double 3rd rotation: radians cw around z
28** theta double 2nd rotation: radians ccw around y
29**
30** Notes:
31**
32** 1) The dates date01+date02 and date11+date12 are Julian Dates,
33** apportioned in any convenient way between the arguments daten1
34** and daten2. For example, JD(TDB)=2450123.7 could be expressed in
35** any of these ways, among others:
36**
37** daten1 daten2
38**
39** 2450123.7 0.0 (JD method)
40** 2451545.0 -1421.3 (J2000 method)
41** 2400000.5 50123.2 (MJD method)
42** 2450123.5 0.2 (date & time method)
43**
44** The JD method is the most natural and convenient to use in cases
45** where the loss of several decimal digits of resolution is
46** acceptable. The J2000 method is best matched to the way the
47** argument is handled internally and will deliver the optimum
48** optimum resolution. The MJD method and the date & time methods
49** are both good compromises between resolution and convenience.
50** The two dates may be expressed using different methods, but at
51** the risk of losing some resolution.
52**
53** 2) The accumulated precession angles zeta, z, theta are expressed
54** through canonical polynomials which are valid only for a limited
55** time span. In addition, the IAU 1976 precession rate is known to
56** be imperfect. The absolute accuracy of the present formulation
57** is better than 0.1 arcsec from 1960AD to 2040AD, better than
58** 1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for
59** the whole of the period 500BC to 3000AD. The errors exceed
60** 10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec
61** outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to
62** 8200AD.
63**
64** 3) The three angles are returned in the conventional order, which
65** is not the same as the order of the corresponding Euler
66** rotations. The precession matrix is
67** R_3(-z) x R_2(+theta) x R_3(-zeta).
68**
69** Reference:
70**
71** Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations
72** (6) & (7), p283.
73**
74** This revision: 2013 November 19
75**
76** SOFA release 2015-02-09
77**
78** Copyright (C) 2015 IAU SOFA Board. See notes at end.
79*/
80{
81 double t0, t, tas2r, w;
82
83/* Interval between fundamental epoch J2000.0 and start date (JC). */
84 t0 = ((date01 - DJ00) + date02) / DJC;
85
86/* Interval over which precession required (JC). */
87 t = ((date11 - date01) + (date12 - date02)) / DJC;
88
89/* Euler angles. */
90 tas2r = t * DAS2R;
91 w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0;
92
93 *zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r;
94
95 *z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r;
96
97 *theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0)
98 + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r;
99
100 return;
101
102/*----------------------------------------------------------------------
103**
104** Copyright (C) 2015
105** Standards Of Fundamental Astronomy Board
106** of the International Astronomical Union.
107**
108** =====================
109** SOFA Software License
110** =====================
111**
112** NOTICE TO USER:
113**
114** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
115** CONDITIONS WHICH APPLY TO ITS USE.
116**
117** 1. The Software is owned by the IAU SOFA Board ("SOFA").
118**
119** 2. Permission is granted to anyone to use the SOFA software for any
120** purpose, including commercial applications, free of charge and
121** without payment of royalties, subject to the conditions and
122** restrictions listed below.
123**
124** 3. You (the user) may copy and distribute SOFA source code to others,
125** and use and adapt its code and algorithms in your own software,
126** on a world-wide, royalty-free basis. That portion of your
127** distribution that does not consist of intact and unchanged copies
128** of SOFA source code files is a "derived work" that must comply
129** with the following requirements:
130**
131** a) Your work shall be marked or carry a statement that it
132** (i) uses routines and computations derived by you from
133** software provided by SOFA under license to you; and
134** (ii) does not itself constitute software provided by and/or
135** endorsed by SOFA.
136**
137** b) The source code of your derived work must contain descriptions
138** of how the derived work is based upon, contains and/or differs
139** from the original SOFA software.
140**
141** c) The names of all routines in your derived work shall not
142** include the prefix "iau" or "sofa" or trivial modifications
143** thereof such as changes of case.
144**
145** d) The origin of the SOFA components of your derived work must
146** not be misrepresented; you must not claim that you wrote the
147** original software, nor file a patent application for SOFA
148** software or algorithms embedded in the SOFA software.
149**
150** e) These requirements must be reproduced intact in any source
151** distribution and shall apply to anyone to whom you have
152** granted a further right to modify the source code of your
153** derived work.
154**
155** Note that, as originally distributed, the SOFA software is
156** intended to be a definitive implementation of the IAU standards,
157** and consequently third-party modifications are discouraged. All
158** variations, no matter how minor, must be explicitly marked as
159** such, as explained above.
160**
161** 4. You shall not cause the SOFA software to be brought into
162** disrepute, either by misuse, or use for inappropriate tasks, or
163** by inappropriate modification.
164**
165** 5. The SOFA software is provided "as is" and SOFA makes no warranty
166** as to its use or performance. SOFA does not and cannot warrant
167** the performance or results which the user may obtain by using the
168** SOFA software. SOFA makes no warranties, express or implied, as
169** to non-infringement of third party rights, merchantability, or
170** fitness for any particular purpose. In no event will SOFA be
171** liable to the user for any consequential, incidental, or special
172** damages, including any lost profits or lost savings, even if a
173** SOFA representative has been advised of such damages, or for any
174** claim by any third party.
175**
176** 6. The provision of any version of the SOFA software under the terms
177** and conditions specified herein does not imply that future
178** versions will also be made available under the same terms and
179** conditions.
180*
181** In any published work or commercial product which uses the SOFA
182** software directly, acknowledgement (see www.iausofa.org) is
183** appreciated.
184**
185** Correspondence concerning SOFA software should be addressed as
186** follows:
187**
188** By email: sofa@ukho.gov.uk
189** By post: IAU SOFA Center
190** HM Nautical Almanac Office
191** UK Hydrographic Office
192** Admiralty Way, Taunton
193** Somerset, TA1 2DN
194** United Kingdom
195**
196**--------------------------------------------------------------------*/
197}
Note: See TracBrowser for help on using the repository browser.