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/pnm00b.rs
Line
Count
Source
1
use super::pn00b::pn00b;
2
3
///  Form the matrix of precession-nutation for a given date (including
4
///  frame bias), equinox-based, IAU 2000B model.
5
///
6
///  Given:
7
///     date1,date2 f64          TT as a 2-part Julian Date (Note 1)
8
///
9
///  Returned (function value):
10
///                 [[f64; 3]; 3] bias-precession-nutation matrix (Note 2)
11
///
12
///  Notes:
13
///
14
///  1) The TT date date1+date2 is a Julian Date, apportioned in any
15
///     convenient way between the two arguments.  For example,
16
///     JD(TT)=2450123.7 could be expressed in any of these ways,
17
///     among others:
18
///
19
///            date1          date2
20
///
21
///         2450123.7           0.0       (JD method)
22
///         2451545.0       -1421.3       (J2000 method)
23
///         2400000.5       50123.2       (MJD method)
24
///         2450123.5           0.2       (date & time method)
25
///
26
///     The JD method is the most natural and convenient to use in
27
///     cases where the loss of several decimal digits of resolution
28
///     is acceptable.  The J2000 method is best matched to the way
29
///     the argument is handled internally and will deliver the
30
///     optimum resolution.  The MJD method and the date & time methods
31
///     are both good compromises between resolution and convenience.
32
///
33
///  2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where
34
///     the p-vector V(date) is with respect to the true equatorial triad
35
///     of date date1+date2 and the p-vector V(GCRS) is with respect to
36
///     the Geocentric Celestial Reference System (IAU, 2000).
37
///
38
///  3) A faster, but slightly less accurate, result (about 1 mas), than
39
///     the iauPnm00a function.
40
///
41
///  Called:
42
///     iauPn00b     bias/precession/nutation, IAU 2000B
43
///
44
///  Reference:
45
///
46
///     Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
47
///     "Expressions for the Celestial Intermediate Pole and Celestial
48
///     Ephemeris Origin consistent with the IAU 2000A precession-
49
///     nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
50
0
pub fn pnm00b(date1: f64, date2: f64) -> [[f64; 3]; 3] {
51
    /* Obtain the required matrix (discarding other results). */
52
0
    let (_, _, _, _, _, _, _, rbpn) = pn00b(date1, date2);
53
0
    rbpn
54
0
}