Coverage Report

Created: 2026-10-28 06:40

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.2/src/pnp/fw2xy.rs
Line
Count
Source
1
use super::{bpn2xy, fw2m};
2
3
///  CIP X,Y given Fukushima-Williams bias-precession-nutation angles.
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
///     gamb     double    F-W angle gamma_bar (radians)
12
///     phib     double    F-W angle phi_bar (radians)
13
///     psi      double    F-W angle psi (radians)
14
///     eps      double    F-W angle epsilon (radians)
15
///
16
///  Returned (function value):
17
///     (x, y)   (f64, f64)  CIP unit vector X,Y
18
///
19
///  Notes:
20
///
21
///  1) Naming the following points:
22
///
23
///     ```text
24
///           e = J2000.0 ecliptic pole,
25
///           p = GCRS pole
26
///           E = ecliptic pole of date,
27
///     and   P = CIP,
28
///     ```
29
///
30
///     the four Fukushima-Williams angles are as follows:
31
///
32
///     ```text
33
///        gamb = gamma = epE
34
///        phib = phi = pE
35
///        psi = psi = pEP
36
///        eps = epsilon = EP
37
///     ```
38
///
39
///  2) The matrix representing the combined effects of frame bias,
40
///     precession and nutation is:
41
///
42
///        NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb)
43
///
44
///     The returned values x,y are elements [2][0] and [2][1] of the
45
///     matrix.  Near J2000.0, they are essentially angles in radians.
46
///
47
///  Called:
48
///     iauFw2m      F-W angles to r-matrix
49
///     iauBpn2xy    extract CIP X,Y coordinates from NPB matrix
50
///
51
///  Reference:
52
///
53
///     Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
54
0
pub fn fw2xy(gamb: f64, phib: f64, psi: f64, eps: f64) -> (f64, f64) {
55
    /* Form NxPxB matrix. */
56
0
    let r = fw2m(gamb, phib, psi, eps);
57
58
    /* Extract CIP X,Y. */
59
0
    bpn2xy(&r)
60
0
}