Skip to content

Commit f021e00

Browse files
Merge pull request #462 from nyx-space/dependabot/cargo/anise-0.7.0
Update anise requirement from 0.6.0 to 0.7.0
2 parents d276c1a + 15fa993 commit f021e00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+234
-211
lines changed

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "nyx-space"
33
build = "build.rs"
4-
version = "2.2.0-alpha"
4+
version = "2.2.0"
55
edition = "2021"
66
authors = ["Christopher Rabotin <[email protected]>"]
77
description = "A high-fidelity space mission toolkit, with orbit propagation, estimation and some systems engineering"
@@ -32,16 +32,16 @@ maintenance = { status = "actively-developed" }
3232
github = { repository = "nyx-space/nyx", branch = "master" }
3333

3434
[dependencies]
35-
nalgebra = "0.33"
35+
nalgebra = "0.34"
3636
log = "0.4"
3737
hifitime = "4.0.0"
38-
anise = "0.6.0"
38+
anise = "0.7.0"
3939
flate2 = { version = "1.0", features = [
4040
"rust_backend",
4141
], default-features = false }
4242
serde = "1.0"
4343
serde_derive = "1.0"
44-
hyperdual = "1.3.0"
44+
hyperdual = "1.4.0"
4545
rand = "0.9"
4646
rand_distr = "0.5"
4747
regex = "1.5"
@@ -63,7 +63,7 @@ num = "0.4.0"
6363
enum-iterator = "2.0.0"
6464
typed-builder = "0.23.0"
6565
snafu = { version = "0.8.3", features = ["backtrace"] }
66-
serde_dhall = "0.12"
66+
serde_dhall = "0.13"
6767
indexmap = { version = "2.6.0", features = ["serde"] }
6868
statrs = "0.18.0"
6969

@@ -74,7 +74,6 @@ premium = []
7474

7575
[dev-dependencies]
7676
polars = { version = "0.51.0", features = ["parquet"] }
77-
planus = "=1.1.1" # cf. https://github.com/pola-rs/polars/issues/24208
7877
rstest = "0.26.1"
7978
pretty_env_logger = "0.5"
8079
toml = "0.9.0"

examples/01_orbit_prop/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() -> Result<(), Box<dyn Error>> {
4747
// This allows the frame to include the gravitational parameters and the shape of the Earth,
4848
// defined as a tri-axial ellipoid. Note that this shape can be changed manually or in the Almanac
4949
// by loading a different set of planetary constants.
50-
let earth_j2000 = almanac.frame_from_uid(EARTH_J2000)?;
50+
let earth_j2000 = almanac.frame_info(EARTH_J2000)?;
5151

5252
let orbit =
5353
Orbit::try_keplerian_altitude(300.0, 0.015, 68.5, 65.2, 75.0, 0.0, epoch, earth_j2000)?;
@@ -121,7 +121,7 @@ fn main() -> Result<(), Box<dyn Error>> {
121121
// The harmonics must be computed in the body fixed frame.
122122
// We're using the long term prediction of the Earth centered Earth fixed frame, IAU Earth.
123123
let harmonics_21x21 = Harmonics::from_stor(
124-
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
124+
almanac.frame_info(IAU_EARTH_FRAME)?,
125125
HarmonicsMem::from_cof(&jgm3_meta.uri, 21, 21, true).unwrap(),
126126
);
127127

@@ -199,7 +199,7 @@ fn main() -> Result<(), Box<dyn Error>> {
199199
40.014984, // latitude in degrees
200200
-105.270546, // longitude in degrees
201201
1.6550, // altitude in kilometers
202-
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
202+
almanac.frame_info(IAU_EARTH_FRAME)?,
203203
);
204204

205205
// We iterate over the trajectory, grabbing a state every two minutes.

examples/03_geo_analysis/drift.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn main() -> Result<(), Box<dyn Error>> {
4343
// This allows the frame to include the gravitational parameters and the shape of the Earth,
4444
// defined as a tri-axial ellipoid. Note that this shape can be changed manually or in the Almanac
4545
// by loading a different set of planetary constants.
46-
let earth_j2000 = almanac.frame_from_uid(EARTH_J2000)?;
46+
let earth_j2000 = almanac.frame_info(EARTH_J2000)?;
4747

4848
// Placing this GEO bird just above Colorado.
4949
// In theory, the eccentricity is zero, but in practice, it's about 1e-5 to 1e-6 at best.
@@ -88,7 +88,7 @@ fn main() -> Result<(), Box<dyn Error>> {
8888
// The harmonics must be computed in the body fixed frame.
8989
// We're using the long term prediction of the Earth centered Earth fixed frame, IAU Earth.
9090
let harmonics_21x21 = Harmonics::from_stor(
91-
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
91+
almanac.frame_info(IAU_EARTH_FRAME)?,
9292
HarmonicsMem::from_cof(&jgm3_meta.uri, 21, 21, true).unwrap(),
9393
);
9494

examples/03_geo_analysis/raise.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn main() -> Result<(), Box<dyn Error>> {
3838
// references to many functions.
3939
let almanac = Arc::new(MetaAlmanac::latest().map_err(Box::new)?);
4040
// Fetch the EME2000 frame from the Almabac
41-
let eme2k = almanac.frame_from_uid(EARTH_J2000).unwrap();
41+
let eme2k = almanac.frame_info(EARTH_J2000).unwrap();
4242
// Define the orbit epoch
4343
let epoch = Epoch::from_gregorian_utc_hms(2024, 2, 29, 12, 13, 14);
4444

@@ -95,7 +95,7 @@ fn main() -> Result<(), Box<dyn Error>> {
9595
// The harmonics must be computed in the body fixed frame.
9696
// We're using the long term prediction of the Earth centered Earth fixed frame, IAU Earth.
9797
let harmonics = Harmonics::from_stor(
98-
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
98+
almanac.frame_info(IAU_EARTH_FRAME)?,
9999
HarmonicsMem::from_cof(&jgm3_meta.uri, 8, 8, true).unwrap(),
100100
);
101101

examples/03_geo_analysis/stationkeeping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() -> Result<(), Box<dyn Error>> {
3232
let epoch = Epoch::from_gregorian_utc_hms(2024, 2, 29, 12, 13, 14);
3333

3434
// Define the GEO orbit, and we're just going to maintain it very tightly.
35-
let earth_j2000 = almanac.frame_from_uid(EARTH_J2000)?;
35+
let earth_j2000 = almanac.frame_info(EARTH_J2000)?;
3636
let orbit = Orbit::try_keplerian(42164.0, 1e-5, 0., 163.0, 75.0, 0.0, epoch, earth_j2000)?;
3737
println!("{orbit:x}");
3838

@@ -71,7 +71,7 @@ fn main() -> Result<(), Box<dyn Error>> {
7171
jgm3_meta.process(true)?;
7272

7373
let harmonics = Harmonics::from_stor(
74-
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
74+
almanac.frame_info(IAU_EARTH_FRAME)?,
7575
HarmonicsMem::from_cof(&jgm3_meta.uri, 8, 8, true)?,
7676
);
7777
orbital_dyn.accel_models.push(harmonics);

examples/04_lro_od/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn main() -> Result<(), Box<dyn Error>> {
4848
let meta = data_folder.join("lro-dynamics.dhall");
4949

5050
// Load this ephem in the general Almanac we're using for this analysis.
51-
let mut almanac = MetaAlmanac::new(meta.to_string_lossy().to_string())
51+
let mut almanac = MetaAlmanac::new(meta.to_string_lossy().as_ref())
5252
.map_err(Box::new)?
5353
.process(true)
5454
.map_err(Box::new)?;
@@ -126,7 +126,7 @@ fn main() -> Result<(), Box<dyn Error>> {
126126
// We're using the long term prediction of the Moon principal axes frame.
127127
let moon_pa_frame = MOON_PA_FRAME.with_orient(31008);
128128
let sph_harmonics = Harmonics::from_stor(
129-
almanac.frame_from_uid(moon_pa_frame)?,
129+
almanac.frame_info(moon_pa_frame)?,
130130
HarmonicsMem::from_shadr(&jggrx_meta.uri, 80, 80, true)?,
131131
);
132132

examples/05_cislunar_spacecraft_link_od/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ fn main() -> Result<(), Box<dyn Error>> {
5858
.unwrap(),
5959
);
6060

61-
let eme2k = almanac.frame_from_uid(EARTH_J2000).unwrap();
62-
let moon_iau = almanac.frame_from_uid(IAU_MOON_FRAME).unwrap();
61+
let eme2k = almanac.frame_info(EARTH_J2000).unwrap();
62+
let moon_iau = almanac.frame_info(IAU_MOON_FRAME).unwrap();
6363

6464
let epoch = Epoch::from_gregorian_tai(2021, 5, 29, 19, 51, 16, 852_000);
6565
let nrho = Orbit::cartesian(
@@ -231,7 +231,7 @@ fn main() -> Result<(), Box<dyn Error>> {
231231

232232
od_sol
233233
.to_parquet(
234-
out.join(format!("05_caps_interlink_od_sol.pq")),
234+
out.join("05_caps_interlink_od_sol.pq"),
235235
ExportCfg::default(),
236236
)
237237
.unwrap();
@@ -241,7 +241,7 @@ fn main() -> Result<(), Box<dyn Error>> {
241241
od_traj
242242
.ric_diff_to_parquet(
243243
&llo_traj,
244-
out.join(format!("05_caps_interlink_llo_est_error.pq")),
244+
out.join("05_caps_interlink_llo_est_error.pq"),
245245
ExportCfg::default(),
246246
)
247247
.unwrap();
@@ -266,7 +266,7 @@ fn main() -> Result<(), Box<dyn Error>> {
266266

267267
rvr_sol
268268
.to_parquet(
269-
out.join(format!("05_caps_interlink_resid_v_ref.pq")),
269+
out.join("05_caps_interlink_resid_v_ref.pq"),
270270
ExportCfg::default(),
271271
)
272272
.unwrap();

src/cosmic/eclipse.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ impl EclipseLocator {
5555
/// Creates a new typical eclipse locator.
5656
/// The light source is the Sun, and the shadow bodies are the Earth and the Moon.
5757
pub fn cislunar(almanac: Arc<Almanac>) -> Self {
58-
let eme2k = almanac.frame_from_uid(EARTH_J2000).unwrap();
59-
let moon_j2k = almanac.frame_from_uid(MOON_J2000).unwrap();
58+
let eme2k = almanac.frame_info(EARTH_J2000).unwrap();
59+
let moon_j2k = almanac.frame_info(MOON_J2000).unwrap();
6060
Self {
61-
light_source: almanac.frame_from_uid(SUN_J2000).unwrap(),
61+
light_source: almanac.frame_info(SUN_J2000).unwrap(),
6262
shadow_bodies: vec![eme2k, moon_j2k],
6363
}
6464
}

src/cosmic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ where
6161
/// Returns strictly the state vector without any STM, if set.
6262
fn to_state_vector(&self) -> OVector<f64, Self::Size> {
6363
OVector::<f64, Self::Size>::from_iterator(
64-
self.to_vector().iter().copied().take(Self::Size::USIZE),
64+
self.to_vector().iter().copied().take(Self::Size::DIM),
6565
)
6666
}
6767

src/cosmic/orbitdual.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use anise::astro::orbit::ECC_EPSILON;
2020
use anise::astro::PhysicsResult;
2121
use anise::prelude::{Frame, Orbit};
22+
use log::{debug, error, warn};
2223
use snafu::ResultExt;
2324

2425
use super::AstroError;

0 commit comments

Comments
 (0)