source: trunk/FACT++/sofa/src/epb.c@ 18355

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