Skip to content

Commit 1513aa7

Browse files
committed
refactor(lox-earth): remove lox-units dependency
1 parent 72b6326 commit 1513aa7

File tree

19 files changed

+37
-31
lines changed

19 files changed

+37
-31
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/lox-earth/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ lox-io.workspace = true
2121
lox-time.workspace = true
2222
lox-math.workspace = true
2323
lox-test-utils.workspace = true
24-
lox-units.workspace = true
2524

2625
csv.workspace = true
2726
fast_polynomial.workspace = true

crates/lox-earth/src/cio/s06.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use lox_bodies::fundamental::iers03::{
1111
};
1212
use lox_bodies::{Earth, Moon, Sun, Venus};
1313
use lox_core::types::units::JulianCenturies;
14-
use lox_units::{Angle, AngleUnits};
14+
use lox_core::units::{Angle, AngleUnits};
1515

1616
use crate::cip::xy06::CipCoords;
1717

crates/lox-earth/src/cip/xy06.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use lox_bodies::fundamental::iers03::{
1313
};
1414
use lox_bodies::{Earth, Jupiter, Mars, Mercury, Moon, Neptune, Saturn, Sun, Uranus, Venus};
1515
use lox_core::types::units::JulianCenturies;
16-
use lox_units::{Angle, AngleUnits};
16+
use lox_core::units::{Angle, AngleUnits};
1717

1818
mod amplitudes;
1919
mod luni_solar;

crates/lox-earth/src/coordinate_transformations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use glam::DMat3;
1010

1111
use lox_core::types::units::Radians;
12-
use lox_units::{Angle, AngleUnits};
12+
use lox_core::units::{Angle, AngleUnits};
1313

1414
use crate::cip::xy06::CipCoords;
1515

crates/lox-earth/src/ecliptic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// SPDX-License-Identifier: MPL-2.0
44

55
use fast_polynomial::poly_array;
6+
use lox_core::units::Angle;
67
use lox_test_utils::ApproxEq;
78
use lox_time::{Time, julian_dates::JulianDate, time_scales::Tt};
8-
use lox_units::Angle;
99

1010
/// Mean obliquity of the ecliptic.
1111
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, ApproxEq)]

crates/lox-earth/src/ephemeris.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use std::iter::zip;
66

77
use glam::{DMat3, DVec3};
8+
use lox_core::units::{ASTRONOMICAL_UNIT, Distance, DistanceUnits, SPEED_OF_LIGHT};
89
use lox_core::{coords::Cartesian, f64::consts::SECONDS_PER_JULIAN_YEAR};
910
use lox_time::{Time, julian_dates::JulianDate, time_scales::Tdb};
10-
use lox_units::{ASTRONOMICAL_UNIT, Distance, DistanceUnits, SPEED_OF_LIGHT};
1111

1212
mod coefficients;
1313

@@ -149,8 +149,8 @@ const BARICENTRIC_COEFFS: Coeffs = Coeffs {
149149

150150
#[cfg(test)]
151151
mod tests {
152+
use lox_core::units::{DistanceUnits, VelocityUnits};
152153
use lox_test_utils::assert_approx_eq;
153-
use lox_units::{DistanceUnits, VelocityUnits};
154154

155155
use super::*;
156156

crates/lox-earth/src/itrf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::coordinate_transformations::{
88
PoleCoords, celestial_to_intermediate_frame_of_date_matrix, polar_motion_matrix,
99
};
1010
use crate::eop::{EopProvider, EopProviderError};
11-
use crate::rotation_angle::earth_rotation_angle_00;
11+
use crate::rotation::earth_rotation_angle_00;
1212
use crate::tio::tio_locator;
1313
use glam::{DMat3, DVec3};
1414
use lox_bodies::{Earth, RotationalElements};

crates/lox-earth/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub mod eop;
1212
pub mod ephemeris;
1313
pub mod itrf;
1414
pub mod nutation;
15-
pub mod rotation_angle;
15+
pub mod rotation;
1616
#[allow(dead_code)]
1717
pub mod tides;
1818
pub mod tio;

crates/lox-earth/src/nutation.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
use std::ops::Add;
1010

1111
use glam::DMat3;
12+
use lox_core::units::Angle;
1213
use lox_test_utils::ApproxEq;
1314
use lox_time::{
1415
Time,
1516
time_scales::{Tdb, Tt},
1617
};
17-
use lox_units::Angle;
1818

1919
use crate::ecliptic::MeanObliquity;
2020

@@ -71,8 +71,8 @@ impl Add<&Self> for Nutation {
7171

7272
#[cfg(test)]
7373
mod tests {
74+
use lox_core::units::AngleUnits;
7475
use lox_test_utils::assert_approx_eq;
75-
use lox_units::AngleUnits;
7676

7777
use super::*;
7878

@@ -103,15 +103,15 @@ mod tests {
103103
fn test_nutation_matrix_iau1980() {
104104
let time = Time::from_two_part_julian_date(Tdb, 2400000.5, 53736.0);
105105
let exp = DMat3::from_cols_array(&[
106-
0.9999999999534999268,
107-
0.8847935789636432161e-5,
108-
0.3835906502164019142e-5,
109-
-0.8847780042583435924e-5,
110-
0.9999999991366569963,
111-
-0.4060052702727130809e-4,
112-
-0.3836265729708478796e-5,
113-
0.4060049308612638555e-4,
114-
0.9999999991684415129,
106+
0.999_999_999_953_5,
107+
8.847_935_789_636_432e-6,
108+
3.835_906_502_164_019_5e-6,
109+
-8.847_780_042_583_437e-6,
110+
0.999_999_999_136_657,
111+
-4.060_052_702_727_131e-5,
112+
-3.836_265_729_708_479e-6,
113+
4.060_049_308_612_638_4e-5,
114+
0.999_999_999_168_441_5,
115115
])
116116
.transpose();
117117
let act = Nutation::nutation_matrix_iau1980(time);

0 commit comments

Comments
 (0)