Coverage Report

Created: 2026-09-14 07:01

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/epj2jd.rs
Line
Count
Source
1
use crate::consts::{DJM0, DJM00};
2
3
/// Julian 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
/// * `epj`: Julian Epoch (e.g. 1996.8)
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 epj2jd(epj: f64) -> (f64, f64) {
26
0
    (DJM0, DJM00 + (epj - 2000.0) * 365.25)
27
0
}