Skip to content

Commit

Permalink
Rename cip_xy to avoid module path stutter
Browse files Browse the repository at this point in the history
  • Loading branch information
AngusGMorrison committed Dec 13, 2023
1 parent 4170015 commit c6c9b03
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/lox_core/src/bodies/cip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
// TODO: Remove this once all module components are actively used.
#![allow(dead_code)]

pub mod xy;
pub mod xy06;
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct NutationComponents {

/// (X, Y) coordinates of the Celestial Intermediate Pole (CIP) using the the IAU 2006 precession
/// and IAU 2000A nutation models.
pub fn cip_xy(t: TDBJulianCenturiesSinceJ2000) -> XY {
pub fn xy(t: TDBJulianCenturiesSinceJ2000) -> XY {
let powers_of_t = powers_of_t(t);
let fundamental_args = fundamental_args(t);
let polynomial_components = polynomial_components(&powers_of_t);
Expand Down Expand Up @@ -187,23 +187,23 @@ mod tests {
#[test]
fn test_cip_xy_jd0() {
let jd0: TDBJulianCenturiesSinceJ2000 = -67.11964407939767;
let xy = cip_xy(jd0);
let xy = xy(jd0);
assert_float_eq!(xy[0], -0.4088355637476968, rel <= TOLERANCE);
assert_float_eq!(xy[1], -0.38359667445777073, rel <= TOLERANCE);
}

#[test]
fn test_cip_xy_j2000() {
let j2000: TDBJulianCenturiesSinceJ2000 = 0.0;
let xy = cip_xy(j2000);
let xy = xy(j2000);
assert_float_eq!(xy[0], -0.0000269463795685740, rel <= TOLERANCE);
assert_float_eq!(xy[1], -0.00002800472282281282, rel <= TOLERANCE);
}

#[test]
fn test_cip_xy_j2100() {
let j2100: TDBJulianCenturiesSinceJ2000 = 1.0;
let xy = cip_xy(j2100);
let xy = xy(j2100);
assert_float_eq!(xy[0], 0.00972070446172924, rel <= TOLERANCE);
assert_float_eq!(xy[1], -0.0000673058699616719, rel <= TOLERANCE);
}
Expand Down

0 comments on commit c6c9b03

Please sign in to comment.