Coverage Report

Created: 2026-09-04 06:48

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/cal/epb2jd.rs
Line
Count
Source
1
use crate::consts::{DJM0, DTY};
2
3
/// Besselian Epoch to Julian Date.
4
///
5
/// This function is part of the International Astronomical Union's
6
/// SOFA (Standards of Fundamental Astronomy) software collection.
7
///
8
/// Status: support function.
9
///
10
/// # Given:
11
/// * `epb`: Besselian Epoch (e.g. 1957.3)
12
///
13
/// # Returned:
14
/// * `djm0`: MJD zero-point: always 2400000.5
15
/// * `djm`: Modified Julian Date
16
///
17
/// # Note:
18
/// The Julian Date is returned in two pieces, in the usual SOFA
19
/// manner, which is designed to preserve time resolution. The
20
/// Julian Date is available as a single number by adding djm0 and
21
/// djm.
22
///
23
/// # Reference:
24
/// Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
25
0
pub fn epb2jd(epb: f64) -> (f64, f64) {
26
0
    (DJM0, 15019.81352 + (epb - 1900.0) * DTY)
27
0
}