Struct nyx_space::propagators::PropOpts
source · pub struct PropOpts<E: ErrorCtrl> {
pub init_step: Duration,
pub min_step: Duration,
pub max_step: Duration,
pub tolerance: f64,
pub attempts: u8,
pub fixed_step: bool,
pub _errctrl: E,
}
Expand description
PropOpts stores the integrator options, including the minimum and maximum step sizes, and the max error size.
Note that different step sizes and max errors are only used for adaptive
methods. To use a fixed step integrator, initialize the options using with_fixed_step
, and
use whichever adaptive step integrator is desired. For example, initializing an RK45 with
fixed step options will lead to an RK4 being used instead of an RK45.
Fields§
§init_step: Duration
§min_step: Duration
§max_step: Duration
§tolerance: f64
§attempts: u8
§fixed_step: bool
§_errctrl: E
Implementations§
source§impl<E: ErrorCtrl> PropOpts<E>
impl<E: ErrorCtrl> PropOpts<E>
sourcepub fn with_adaptive_step(
min_step: Duration,
max_step: Duration,
tolerance: f64,
errctrl: E
) -> Self
pub fn with_adaptive_step( min_step: Duration, max_step: Duration, tolerance: f64, errctrl: E ) -> Self
with_adaptive_step
initializes an PropOpts
such that the integrator is used with an
adaptive step size. The number of attempts is currently fixed to 50 (as in GMAT).
pub fn with_adaptive_step_s( min_step: f64, max_step: f64, tolerance: f64, errctrl: E ) -> Self
sourcepub fn set_max_step(&mut self, max_step: Duration)
pub fn set_max_step(&mut self, max_step: Duration)
Set the maximum step size and sets the initial step to that value if currently greater
sourcepub fn set_min_step(&mut self, min_step: Duration)
pub fn set_min_step(&mut self, min_step: Duration)
Set the minimum step size and sets the initial step to that value if currently smaller
source§impl PropOpts<RSSCartesianStep>
impl PropOpts<RSSCartesianStep>
sourcepub fn with_fixed_step(step: Duration) -> Self
pub fn with_fixed_step(step: Duration) -> Self
with_fixed_step
initializes an PropOpts
such that the integrator is used with a fixed
step size.
pub fn with_fixed_step_s(step: f64) -> Self
sourcepub fn with_tolerance(tolerance: f64) -> Self
pub fn with_tolerance(tolerance: f64) -> Self
Returns the default options with a specific tolerance.
sourcepub fn with_max_step(max_step: Duration) -> Self
pub fn with_max_step(max_step: Duration) -> Self
Creates a propagator with the provided max step, and sets the initial step to that value as well.
Trait Implementations§
source§impl Default for PropOpts<RSSCartesianStep>
impl Default for PropOpts<RSSCartesianStep>
source§fn default() -> PropOpts<RSSCartesianStep>
fn default() -> PropOpts<RSSCartesianStep>
default
returns the same default options as GMAT.
impl<E: Copy + ErrorCtrl> Copy for PropOpts<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for PropOpts<E>where E: RefUnwindSafe,
impl<E> Send for PropOpts<E>
impl<E> Sync for PropOpts<E>
impl<E> Unpin for PropOpts<E>where E: Unpin,
impl<E> UnwindSafe for PropOpts<E>where E: UnwindSafe,
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.