1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use crate::vector_matrix::{init::ir::*, build_rotations::{rx::rx, ry::ry, rz::rz} };
/// Form the matrix of polar motion for a given date, IAU 2000.
///
/// Given:
/// * xp,yp coordinates of the pole (radians, Note 1)
/// * sp the TIO locator s' (radians, Note 2)
///
/// # Returned:
/// * rpom polar-motion matrix (Note 3)
///
/// Notes:
///
/// 1) The arguments xp and yp are the coordinates (in radians) of the
/// Celestial Intermediate Pole with respect to the International
/// Terrestrial Reference System (see IERS Conventions 2003),
/// measured along the meridians 0 and 90 deg west respectively.
///
/// 2) The argument sp is the TIO locator s', in radians, which
/// positions the Terrestrial Intermediate Origin on the equator. It
/// is obtained from polar motion observations by numerical
/// integration, and so is in essence unpredictable. However, it is
/// dominated by a secular drift of about 47 microarcseconds per
/// century, and so can be taken into account by using s' = -47*t,
/// where t is centuries since J2000.0. The function eraSp00
/// implements this approximation.
///
/// 3) The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning
/// that it is the final rotation when computing the pointing
/// direction to a celestial source.
///
/// # Called:
/// * ir initialize r-matrix to identity
/// * rz rotate around Z-axis
/// * ry rotate around Y-axis
/// * rx rotate around X-axis
///
/// # Reference:
/// * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
/// IERS Technical Note No. 32, BKG (2004)
///
/// This revision: 2021 May 11
pub fn pom00(xp: f64, yp: f64, sp: f64, rpom: &mut [[f64; 3];3])
{
/* Construct the matrix. */
ir(rpom);
rz(sp, rpom);
ry(-xp, rpom);
rx(-yp, rpom);
/* Finished. */
}