Struct Event
pub struct Event {
pub scalar: ScalarExpr,
pub condition: Condition,
pub epoch_precision: Duration,
pub ab_corr: Option<Aberration>,
}Expand description
Defines a state parameter event finder from the desired value of the scalar expression to compute, precision on timing and value, and the aberration.
:type scalar: ScalarExpr :type condition: Condition :type epoch_precision: Duration :type ab_corr: Aberration, optional
Fields§
§scalar: ScalarExprScalar expression to evaluate
condition: ConditionCondition that defines the bounded values of the event.
epoch_precision: DurationThe duration precision used in the adaptive step scanner, and to consider an Event to have converged. Typically use 100 ms.
ab_corr: Option<Aberration>Implementations§
§impl Event
impl Event
pub fn new(scalar: ScalarExpr, condition: Condition) -> Event
pub fn new(scalar: ScalarExpr, condition: Condition) -> Event
Builds a new event where the epoch precision is set to its default of 10 milliseconds
pub fn total_eclipse(eclipsing_frame: Frame) -> Event
pub fn total_eclipse(eclipsing_frame: Frame) -> Event
Total eclipse event finder: returns events where the eclipsing percentage is greater than 99%.
pub fn eclipse(eclipsing_frame: Frame) -> Event
pub fn eclipse(eclipsing_frame: Frame) -> Event
Eclipse event finder, including penumbras: returns events where the eclipsing percentage is greater than 1%.
pub fn penumbra(eclipsing_frame: Frame) -> Event
pub fn penumbra(eclipsing_frame: Frame) -> Event
Penumbral eclipse event finder: returns events where the eclipsing percentage is greater than 1% and less than 99%.
pub fn visible_from_location_id(
location_id: i32,
obstructing_body: Option<Frame>,
) -> Event
pub fn visible_from_location_id( location_id: i32, obstructing_body: Option<Frame>, ) -> Event
Report events where the object is above the terrain (or horizon if terrain is not set) when seen from the provided location ID.
pub fn from_s_expr(expr: &str) -> Result<Event, Error>
pub fn from_s_expr(expr: &str) -> Result<Event, Error>
Load this Event from an S-Expression / LISP syntax
§impl Event
impl Event
pub fn eval(
&self,
orbit: CartesianState,
almanac: &Almanac,
) -> Result<f64, AnalysisError>
pub fn eval( &self, orbit: CartesianState, almanac: &Almanac, ) -> Result<f64, AnalysisError>
Compute the event finding function of this event provided an Orbit and Almanac. If we’re “in the event”, the evaluation will be greater or equal to zero.
:type orbit: Orbit :type almanac: Almanac :rtype: float
pub fn eval_string(
&self,
orbit: CartesianState,
almanac: &Almanac,
) -> Result<String, AnalysisError>
pub fn eval_string( &self, orbit: CartesianState, almanac: &Almanac, ) -> Result<String, AnalysisError>
Pretty print the evaluation of this event for the provided Orbit and Almanac
:type orbit: Orbit :type almanac: Almanac :rtype: str
Trait Implementations§
§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for Event
impl Serialize for Event
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§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.