pub struct Event {
pub parameter: StateParameter,
pub desired_value: f64,
pub epoch_precision: Unit,
pub value_precision: f64,
pub in_frame: Option<(Frame, Arc<Cosm>)>,
}
Expand description
Defines a state parameter event finder
Fields
parameter: StateParameter
The state parameter
desired_value: f64
The desired self.desired_value, must be in the same units as the state parameter
epoch_precision: Unit
The time precision after which the solver will report that it cannot find any more precise
value_precision: f64
The precision on the desired value
in_frame: Option<(Frame, Arc<Cosm>)>
An optional frame in which to search this – it IS recommended to convert the whole trajectory instead of searching in a given frame!
Implementations
sourceimpl Event
impl Event
sourcepub fn new(parameter: StateParameter, desired_value: f64) -> Self
pub fn new(parameter: StateParameter, desired_value: f64) -> Self
Match a specific event for the parameter to hit the specified value. By default, the time precision is 1 millisecond and the value precision is 1e-3 of whatever unit is the default for that parameter. For example, a radius event will seek the requested value at the meter level, and an angle event will seek it at the thousands of a degree.
sourcepub fn within_tolerance(
parameter: StateParameter,
desired_value: f64,
value_precision: f64
) -> Self
pub fn within_tolerance(
parameter: StateParameter,
desired_value: f64,
value_precision: f64
) -> Self
Match a specific event for the parameter to hit the specified value with the provided tolerance on the value
Trait Implementations
sourceimpl EventEvaluator<BaseSpacecraft<GuidanceMode>> for Event
impl EventEvaluator<BaseSpacecraft<GuidanceMode>> for Event
fn eval(&self, state: &Spacecraft) -> f64
fn epoch_precision(&self) -> Duration
fn value_precision(&self) -> f64
fn eval_crossing(&self, prev_state: &S, next_state: &S) -> bool
sourceimpl EventEvaluator<Orbit> for Event
impl EventEvaluator<Orbit> for Event
fn epoch_precision(&self) -> Duration
fn value_precision(&self) -> f64
fn eval(&self, state: &Orbit) -> f64
fn eval_crossing(&self, prev_state: &S, next_state: &S) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Printing<T> for T where
T: Display,
impl<T> Printing<T> for T where
T: Display,
fn to_str(self) -> String
fn to_str(self) -> String
Method to serialize generic items, slices, and slices of Vecs.
Adds square brackets around Vecs (prettier lists).
Implementation code is in printing.rs
. Read more
fn to_plainstr(self) -> String
fn to_plainstr(self) -> String
Method to serialize generic items, slices, and slices of Vecs.
Implementation code is in printing.rs
. Read more
fn wvec(self, f: &mut File) -> Result<(), Error>
fn wvec(self, f: &mut File) -> Result<(), Error>
Method to write vector(s) to file f (space separated, without brackets). Passes up io errors Read more
fn pvec(self)
fn pvec(self)
Method to print vector(s) to stdout (space separated,without brackets).
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if 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
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.