Struct nyx_space::io::gravity::HarmonicsMem
source · pub struct HarmonicsMem { /* private fields */ }
Expand description
HarmonicsMem
loads the requested gravity potential files and stores them in memory (in a HashMap).
WARNING: This memory backend may require a lot of RAM (e.g. EMG2008 2190x2190 requires nearly 400 MB of RAM).
Implementations§
source§impl HarmonicsMem
impl HarmonicsMem
sourcepub fn from_j2(j2: f64) -> HarmonicsMem
pub fn from_j2(j2: f64) -> HarmonicsMem
Initialize HarmonicsMem
with a custom J2 value
sourcepub fn j2_jgm3() -> HarmonicsMem
pub fn j2_jgm3() -> HarmonicsMem
Initialize HarmonicsMem
as an EARTH J2 only using the JGM3 model (available in GMAT)
Use the embedded Earth parameter. If others are needed, load from from_shadr
or from_egm
.
WARNING: This is an EARTH gravity model, and should not be used around any other body.
sourcepub fn j2_jgm2() -> HarmonicsMem
pub fn j2_jgm2() -> HarmonicsMem
Initialize HarmonicsMem
as an EARTH J2 only using the JGM2 model (available in GMAT)
Use the embedded Earth parameter. If others are needed, load from from_shadr
or from_egm
.
WARNING: This is an EARTH gravity model, and should not be used around any other body.
sourcepub fn j2_egm2008() -> HarmonicsMem
pub fn j2_egm2008() -> HarmonicsMem
Initialize HarmonicsMem
as J2 only using the EGM2008 model (from the GRACE mission, best model as of 2018)
WARNING: This is an EARTH gravity model, and should not be used around any other body.
sourcepub fn from_shadr(
filepath: &str,
degree: usize,
order: usize,
gunzipped: bool
) -> Result<HarmonicsMem, NyxError>
pub fn from_shadr( filepath: &str, degree: usize, order: usize, gunzipped: bool ) -> Result<HarmonicsMem, NyxError>
Initialize HarmonicsMem
from the file path (must be a gunzipped file)
Gravity models provided by nyx
:
- EMG2008 to 2190 for Earth (tide free)
- Moon to 1500 (from SHADR file)
- Mars to 120 (from SHADR file)
- Venus to 150 (from SHADR file)
pub fn from_egm( filepath: &str, degree: usize, order: usize, gunzipped: bool ) -> Result<HarmonicsMem, NyxError>
pub fn from_cof( filepath: &str, degree: usize, order: usize, gunzipped: bool ) -> Result<HarmonicsMem, NyxError>
Trait Implementations§
source§impl Clone for HarmonicsMem
impl Clone for HarmonicsMem
source§fn clone(&self) -> HarmonicsMem
fn clone(&self) -> HarmonicsMem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl GravityPotentialStor for HarmonicsMem
impl GravityPotentialStor for HarmonicsMem
source§fn max_order_m(&self) -> usize
fn max_order_m(&self) -> usize
source§fn max_degree_n(&self) -> usize
fn max_degree_n(&self) -> usize
Auto Trait Implementations§
impl RefUnwindSafe for HarmonicsMem
impl Send for HarmonicsMem
impl Sync for HarmonicsMem
impl Unpin for HarmonicsMem
impl UnwindSafe for HarmonicsMem
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.