Coverage Report

Created: 2026-07-30 06:46

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/pnm06a.rs
Line
Count
Source
1
use super::{fw2m, nut06a, pfw06};
2
3
///  Classical NPB matrix, IAU 2006/2000A
4
///
5
///  Form the matrix of precession-nutation for a given date (including
6
///  frame bias), equinox based, IAU 2006 precession and IAU 2000A
7
///  nutation models.
8
///
9
///  This function is part of the International Astronomical Union's
10
///  SOFA (Standards of Fundamental Astronomy) software collection.
11
///
12
///  Status:  support function.
13
///
14
///  Given:
15
///  ```
16
///     date1,date2 double       TT as a 2-part Julian Date (Note 1)
17
///  ```
18
///  Returned:
19
///  ```
20
///     rbpn        double[3][3] bias-precession-nutation matrix (Note 2)
21
///  ```
22
///  Notes:
23
///
24
///  1) The TT date date1+date2 is a Julian Date, apportioned in any
25
///     convenient way between the two arguments.  For example,
26
///     JD(TT)=2450123.7 could be expressed in any of these ways, among
27
///     others:
28
///  ```
29
///            date1          date2
30
///
31
///         2450123.7           0.0       (JD method)
32
///         2451545.0       -1421.3       (J2000 method)
33
///         2400000.5       50123.2       (MJD method)
34
///         2450123.5           0.2       (date & time method)
35
///  ```
36
///     The JD method is the most natural and convenient to use in
37
///     cases where the loss of several decimal digits of resolution
38
///     is acceptable.  The J2000 method is best matched to the way
39
///     the argument is handled internally and will deliver the
40
///     optimum resolution.  The MJD method and the date & time methods
41
///     are both good compromises between resolution and convenience.
42
///
43
///  2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where
44
///     the p-vector V(date) is with respect to the true equatorial triad
45
///     of date date1+date2 and the p-vector V(GCRS) is with respect to
46
///     the Geocentric Celestial Reference System (IAU, 2000).
47
///
48
///  Called:
49
///     iauPfw06     bias-precession F-W angles, IAU 2006
50
///     iauNut06a    nutation, IAU 2006/2000A
51
///     iauFw2m      F-W angles to r-matrix
52
///
53
///  Reference:
54
///
55
///     Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855.
56
0
pub fn pnm06a(date1: f64, date2: f64) -> [[f64; 3]; 3] {
57
    /* Fukushima-Williams angles for frame bias and precession. */
58
0
    let (gamb, phib, psib, epsa) = pfw06(date1, date2);
59
60
    /* Nutation components. */
61
0
    let (dp, de) = nut06a(date1, date2);
62
63
    /* Equinox based nutation x precession x bias matrix. */
64
0
    fw2m(gamb, phib, psib + dp, epsa + de)
65
0
}