Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to anise 0.4.3 #362

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/01_orbit_prop/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ fn main() -> Result<(), Box<dyn Error>> {
crc32: Some(0xF446F027), // Specifying the CRC32 avoids redownloading it if it's cached.
};
// And let's download it if we don't have it yet.
jgm3_meta.process()?;
jgm3_meta.process(true)?;

// Build the spherical harmonics.
// The harmonics must be computed in the body fixed frame.
Expand Down Expand Up @@ -237,6 +237,8 @@ fn main() -> Result<(), Box<dyn Error>> {
let aer = almanac.azimuth_elevation_range_sez(
state.orbit,
boulder_station.to_orbit(this_epoch, &almanac)?,
None,
None,
)?;
azimuth_deg.push(aer.azimuth_deg);
elevation_deg.push(aer.elevation_deg);
Expand Down
4 changes: 2 additions & 2 deletions examples/02_jwst_covar_monte_carlo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ fn main() -> Result<(), Box<dyn Error>> {
uri: "https://naif.jpl.nasa.gov/pub/naif/JWST/kernels/spk/jwst_rec.bsp".to_string(),
crc32: None,
};
latest_jwst_ephem.process()?;
latest_jwst_ephem.process(true)?;

// Load this ephem in the general Almanac we're using for this analysis.
let almanac = Arc::new(
MetaAlmanac::latest()
.map_err(Box::new)?
.load_from_metafile(latest_jwst_ephem)?,
.load_from_metafile(latest_jwst_ephem, true)?,
);

// By loading this ephemeris file in the ANISE GUI or ANISE CLI, we can find the NAIF ID of the JWST
Expand Down
2 changes: 1 addition & 1 deletion examples/03_geo_analysis/drift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn main() -> Result<(), Box<dyn Error>> {
crc32: Some(0xF446F027), // Specifying the CRC32 avoids redownloading it if it's cached.
};
// And let's download it if we don't have it yet.
jgm3_meta.process()?;
jgm3_meta.process(true)?;

// Build the spherical harmonics.
// The harmonics must be computed in the body fixed frame.
Expand Down
10 changes: 3 additions & 7 deletions examples/03_geo_analysis/raise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ use anise::{
};
use hifitime::{Epoch, TimeUnits, Unit};
use nyx::{
cosmic::{
eclipse::{EclipseLocator, EclipseState},
GuidanceMode, MetaAlmanac, Orbit, SrpConfig,
},
cosmic::{eclipse::EclipseLocator, GuidanceMode, MetaAlmanac, Orbit, SrpConfig},
dynamics::{
guidance::{GuidanceLaw, Ruggiero, Thruster},
Harmonics, OrbitalDynamics, SolarPressure, SpacecraftDynamics,
Expand Down Expand Up @@ -75,8 +72,7 @@ fn main() -> Result<(), Box<dyn Error>> {
];

// Ensure that we only thrust if we have more than 20% illumination.
let ruggiero_ctrl =
Ruggiero::from_max_eclipse(objectives, sc, EclipseState::Penumbra(0.2)).unwrap();
let ruggiero_ctrl = Ruggiero::from_max_eclipse(objectives, sc, 0.2).unwrap();
println!("{ruggiero_ctrl}");

// Define the high fidelity dynamics
Expand All @@ -94,7 +90,7 @@ fn main() -> Result<(), Box<dyn Error>> {
crc32: Some(0xF446F027), // Specifying the CRC32 avoids redownloading it if it's cached.
};
// And let's download it if we don't have it yet.
jgm3_meta.process()?;
jgm3_meta.process(true)?;

// Build the spherical harmonics.
// The harmonics must be computed in the body fixed frame.
Expand Down
9 changes: 3 additions & 6 deletions examples/03_geo_analysis/stationkeeping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ use anise::{
};
use hifitime::{Epoch, TimeUnits, Unit};
use nyx::{
cosmic::{
eclipse::{EclipseLocator, EclipseState},
GuidanceMode, MetaAlmanac, Orbit, SrpConfig,
},
cosmic::{eclipse::EclipseLocator, GuidanceMode, MetaAlmanac, Orbit, SrpConfig},
dynamics::{
guidance::{Ruggiero, Thruster},
Harmonics, OrbitalDynamics, SolarPressure, SpacecraftDynamics,
Expand Down Expand Up @@ -63,7 +60,7 @@ fn main() -> Result<(), Box<dyn Error>> {
Objective::within_tolerance(StateParameter::Inclination, 0.05, 1e-2),
];

let ruggiero_ctrl = Ruggiero::from_max_eclipse(objectives, sc, EclipseState::Penumbra(0.2))?;
let ruggiero_ctrl = Ruggiero::from_max_eclipse(objectives, sc, 0.2)?;
println!("{ruggiero_ctrl}");

let mut orbital_dyn = OrbitalDynamics::point_masses(vec![MOON, SUN]);
Expand All @@ -72,7 +69,7 @@ fn main() -> Result<(), Box<dyn Error>> {
uri: "http://public-data.nyxspace.com/nyx/models/JGM3.cof.gz".to_string(),
crc32: Some(0xF446F027), // Specifying the CRC32 avoids redownloading it if it's cached.
};
jgm3_meta.process()?;
jgm3_meta.process(true)?;

let harmonics = Harmonics::from_stor(
almanac.frame_from_uid(IAU_EARTH_FRAME)?,
Expand Down
4 changes: 2 additions & 2 deletions examples/04_lro_od/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn main() -> Result<(), Box<dyn Error>> {
// Load this ephem in the general Almanac we're using for this analysis.
let mut almanac = MetaAlmanac::new(meta.to_string_lossy().to_string())
.map_err(Box::new)?
.process()
.process(true)
.map_err(Box::new)?;

let mut moon_pc = almanac.planetary_data.get_by_id(MOON)?;
Expand Down Expand Up @@ -120,7 +120,7 @@ fn main() -> Result<(), Box<dyn Error>> {
crc32: Some(0x6bcacda8), // Specifying the CRC32 avoids redownloading it if it's cached.
};
// And let's download it if we don't have it yet.
jggrx_meta.process()?;
jggrx_meta.process(true)?;

// Build the spherical harmonics.
// The harmonics must be computed in the body fixed frame.
Expand Down
Loading
Loading