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§
source§impl 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§
source§impl 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
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§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Printing<T> for Twhere
T: Display,
impl<T> Printing<T> for Twhere T: Display,
§fn to_str(self) -> String
fn to_str(self) -> String
printing.rs
. §fn to_plainstr(self) -> String
fn to_plainstr(self) -> String
printing.rs
.§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.