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

Last change on this file since 18365 was 18346, checked in by tbretz, 10 years ago
File size: 5.2 KB
Line 
1#include "sofa.h"
2
3void iauEpb2jd(double epb, double *djm0, double *djm)
4/*
5** - - - - - - - - - -
6** i a u E p b 2 j d
7** - - - - - - - - - -
8**
9** Besselian Epoch to Julian Date.
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** epb double Besselian Epoch (e.g. 1957.3)
18**
19** Returned:
20** djm0 double MJD zero-point: always 2400000.5
21** djm double Modified Julian Date
22**
23** Note:
24**
25** The Julian Date is returned in two pieces, in the usual SOFA
26** manner, which is designed to preserve time resolution. The
27** Julian Date is available as a single number by adding djm0 and
28** djm.
29**
30** Reference:
31**
32** Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
33**
34** This revision: 2013 August 13
35**
36** SOFA release 2015-02-09
37**
38** Copyright (C) 2015 IAU SOFA Board. See notes at end.
39*/
40{
41 *djm0 = DJM0;
42 *djm = 15019.81352 + (epb - 1900.0) * DTY;
43
44 return;
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.