Coverage Report

Created: 2026-05-16 06:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/pnp/num06a.rs
Line
Count
Source
1
use super::{numat, nut06a, obl06};
2
3
///  Form the matrix of nutation for a given date, IAU 2006/2000A model.
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
///     date1,date2   double          TT as a 2-part Julian Date (Note 1)
12
///
13
///  Returned (function value):
14
///     rmatn         [[f64; 3]; 3]    nutation matrix
15
///
16
///  Notes:
17
///
18
///  1) The TT date date1+date2 is a Julian Date, apportioned in any
19
///     convenient way between the two arguments.  For example,
20
///     JD(TT)=2450123.7 could be expressed in any of these ways,
21
///     among others:
22
///
23
///            date1          date2
24
///
25
///         2450123.7           0.0       (JD method)
26
///         2451545.0       -1421.3       (J2000 method)
27
///         2400000.5       50123.2       (MJD method)
28
///         2450123.5           0.2       (date & time method)
29
///
30
///     The JD method is the most natural and convenient to use in
31
///     cases where the loss of several decimal digits of resolution
32
///     is acceptable.  The J2000 method is best matched to the way
33
///     the argument is handled internally and will deliver the
34
///     optimum resolution.  The MJD method and the date & time methods
35
///     are both good compromises between resolution and convenience.
36
///
37
///  2) The matrix operates in the sense V(true) = rmatn * V(mean), where
38
///     the p-vector V(true) is with respect to the true equatorial triad
39
///     of date and the p-vector V(mean) is with respect to the mean
40
///     equatorial triad of date.
41
///
42
///  Called:
43
///     iauObl06     mean obliquity, IAU 2006
44
///     iauNut06a    nutation, IAU 2006/2000A
45
///     iauNumat     form nutation matrix
46
///
47
///  Reference:
48
///
49
///     Explanatory Supplement to the Astronomical Almanac,
50
///     P. Kenneth Seidelmann (ed), University Science Books (1992),
51
///     Section 3.222-3 (p114).
52
0
pub fn num06a(date1: f64, date2: f64) -> [[f64; 3]; 3] {
53
    /* Mean obliquity. */
54
0
    let eps = obl06(date1, date2);
55
56
    /* Nutation components. */
57
0
    let (dp, de) = nut06a(date1, date2);
58
59
    /* Nutation matrix. */
60
0
    numat(eps, dp, de)
61
0
}