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/erst/gst06a.rs
Line
Count
Source
1
use super::gst06;
2
use crate::pnp::pnm06a;
3
4
///  Greenwich apparent sidereal time, IAU 2006/2000A
5
///
6
///  Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
7
///  resolutions).
8
///
9
///  This function is part of the International Astronomical Union's
10
///  SOFA (Standards of Fundamental Astronomy) software collection.
11
///
12
///  Status:  canonical model.
13
///
14
///  Given:
15
///  ```
16
///     uta,utb    double    UT1 as a 2-part Julian Date (Notes 1,2)
17
///     tta,ttb    double    TT as a 2-part Julian Date (Notes 1,2)
18
///  ```
19
///  Returned (function value):
20
///  ```
21
///                double    Greenwich apparent sidereal time (radians)
22
///  ```
23
///  Notes:
24
///
25
///  1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both
26
///     Julian Dates, apportioned in any convenient way between the
27
///     argument pairs.  For example, JD(UT1)=2450123.7 could be
28
///     expressed in any of these ways, among others:
29
///  ```
30
///             uta            utb
31
///
32
///         2450123.7           0.0       (JD method)
33
///         2451545.0       -1421.3       (J2000 method)
34
///         2400000.5       50123.2       (MJD method)
35
///         2450123.5           0.2       (date & time method)
36
///  ```
37
///     The JD method is the most natural and convenient to use in
38
///     cases where the loss of several decimal digits of resolution
39
///     is acceptable (in the case of UT;  the TT is not at all critical
40
///     in this respect).  The J2000 and MJD methods are good compromises
41
///     between resolution and convenience.  For UT, the date & time
42
///     method is best matched to the algorithm that is used by the Earth
43
///     rotation angle function, called internally:  maximum precision is
44
///     delivered when the uta argument is for 0hrs UT1 on the day in
45
///     question and the utb argument lies in the range 0 to 1, or vice
46
///     versa.
47
///
48
///  2) Both UT1 and TT are required, UT1 to predict the Earth rotation
49
///     and TT to predict the effects of precession-nutation.  If UT1 is
50
///     used for both purposes, errors of order 100 microarcseconds
51
///     result.
52
///
53
///  3) This GAST is compatible with the IAU 2000/2006 resolutions and
54
///     must be used only in conjunction with IAU 2006 precession and
55
///     IAU 2000A nutation.
56
///
57
///  4) The result is returned in the range 0 to 2pi.
58
///
59
///  Called:
60
///  ```
61
///     iauPnm06a    classical NPB matrix, IAU 2006/2000A
62
///     iauGst06     Greenwich apparent ST, IAU 2006, given NPB matrix
63
///  ```
64
///  Reference:
65
///
66
///     Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
67
///
68
0
pub fn gst06a(uta: f64, utb: f64, tta: f64, ttb: f64) -> f64 {
69
    // Classical nutation x precession x bias matrix, IAU 2000A.
70
0
    let rnpb = pnm06a(tta, ttb);
71
72
    // Greenwich apparent sidereal time.
73
0
    gst06(uta, utb, tta, ttb, &rnpb)
74
0
}