source: branches/FACT++_part_filenames/erfa/src/epb2jd.c@ 19365

Last change on this file since 19365 was 18711, checked in by tbretz, 8 years ago
Updated to ERFA 1.3.0 (no relevant code change except the leap second at the beginning of 2017)
File size: 3.8 KB
Line 
1#include "erfa.h"
2
3void eraEpb2jd(double epb, double *djm0, double *djm)
4/*
5** - - - - - - - - - -
6** e r a E p b 2 j d
7** - - - - - - - - - -
8**
9** Besselian Epoch to Julian Date.
10**
11** Given:
12** epb double Besselian Epoch (e.g. 1957.3)
13**
14** Returned:
15** djm0 double MJD zero-point: always 2400000.5
16** djm double Modified Julian Date
17**
18** Note:
19**
20** The Julian Date is returned in two pieces, in the usual ERFA
21** manner, which is designed to preserve time resolution. The
22** Julian Date is available as a single number by adding djm0 and
23** djm.
24**
25** Reference:
26**
27** Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
28**
29** Copyright (C) 2013-2016, NumFOCUS Foundation.
30** Derived, with permission, from the SOFA library. See notes at end of file.
31*/
32{
33 *djm0 = ERFA_DJM0;
34 *djm = 15019.81352 + (epb - 1900.0) * ERFA_DTY;
35
36 return;
37
38}
39/*----------------------------------------------------------------------
40**
41**
42** Copyright (C) 2013-2016, NumFOCUS Foundation.
43** All rights reserved.
44**
45** This library is derived, with permission, from the International
46** Astronomical Union's "Standards of Fundamental Astronomy" library,
47** available from http://www.iausofa.org.
48**
49** The ERFA version is intended to retain identical functionality to
50** the SOFA library, but made distinct through different function and
51** file names, as set out in the SOFA license conditions. The SOFA
52** original has a role as a reference standard for the IAU and IERS,
53** and consequently redistribution is permitted only in its unaltered
54** state. The ERFA version is not subject to this restriction and
55** therefore can be included in distributions which do not support the
56** concept of "read only" software.
57**
58** Although the intent is to replicate the SOFA API (other than
59** replacement of prefix names) and results (with the exception of
60** bugs; any that are discovered will be fixed), SOFA is not
61** responsible for any errors found in this version of the library.
62**
63** If you wish to acknowledge the SOFA heritage, please acknowledge
64** that you are using a library derived from SOFA, rather than SOFA
65** itself.
66**
67**
68** TERMS AND CONDITIONS
69**
70** Redistribution and use in source and binary forms, with or without
71** modification, are permitted provided that the following conditions
72** are met:
73**
74** 1 Redistributions of source code must retain the above copyright
75** notice, this list of conditions and the following disclaimer.
76**
77** 2 Redistributions in binary form must reproduce the above copyright
78** notice, this list of conditions and the following disclaimer in
79** the documentation and/or other materials provided with the
80** distribution.
81**
82** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
83** the International Astronomical Union nor the names of its
84** contributors may be used to endorse or promote products derived
85** from this software without specific prior written permission.
86**
87** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
88** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
89** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
90** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
91** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
92** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
93** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
94** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
95** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
96** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
97** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
98** POSSIBILITY OF SUCH DAMAGE.
99**
100*/
Note: See TracBrowser for help on using the repository browser.