/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/pnp/nutm80.rs
Line | Count | Source |
1 | | use super::{numat, nut80, obl80}; |
2 | | |
3 | | /// Form the matrix of nutation for a given date, IAU 1980 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 TDB 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), |
38 | | /// where the p-vector V(true) is with respect to the true |
39 | | /// equatorial triad of date and the p-vector V(mean) is with |
40 | | /// respect to the mean equatorial triad of date. |
41 | | /// |
42 | | /// Called: |
43 | | /// iauNut80 nutation, IAU 1980 |
44 | | /// iauObl80 mean obliquity, IAU 1980 |
45 | | /// iauNumat form nutation matrix |
46 | 0 | pub fn nutm80(date1: f64, date2: f64) -> [[f64; 3]; 3] { |
47 | | /* Nutation components and mean obliquity. */ |
48 | 0 | let (dpsi, deps) = nut80(date1, date2); |
49 | 0 | let epsa = obl80(date1, date2); |
50 | | |
51 | | /* Build the rotation matrix. */ |
52 | 0 | numat(epsa, dpsi, deps) |
53 | 0 | } |