nyx_space::md

Struct Event

Source
pub struct Event {
    pub parameter: StateParameter,
    pub desired_value: f64,
    pub epoch_precision: Unit,
    pub value_precision: f64,
    pub obs_frame: Option<Frame>,
}
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

§obs_frame: Option<Frame>

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

Source

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.

Source

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

Source

pub fn specific( parameter: StateParameter, desired_value: f64, value_precision: f64, epoch_precision: Unit, ) -> Self

Match a specific event for the parameter to hit the specified value with the provided tolerance on the value and time

Source

pub fn periapsis() -> Self

Match the periapasis i.e. True Anomaly == 0

Source

pub fn apoapsis() -> Self

Match the apoapasis i.e. True Anomaly == 180

Source

pub fn in_frame( parameter: StateParameter, desired_value: f64, target_frame: Frame, ) -> Self

Match a specific event in another frame, using the default epoch precision and value.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Event

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EventEvaluator<Spacecraft> for Event

Source§

fn eval( &self, state: &Spacecraft, almanac: Arc<Almanac>, ) -> Result<f64, EventError>

Evaluation of the event, must return a value corresponding to whether the state is before or after the event
Source§

fn epoch_precision(&self) -> Duration

Source§

fn value_precision(&self) -> f64

Source§

fn eval_string( &self, state: &Spacecraft, _almanac: Arc<Almanac>, ) -> Result<String, EventError>

Returns a string representation of the event evaluation for the given state
Source§

fn eval_crossing( &self, prev_state: &S, next_state: &S, almanac: Arc<Almanac>, ) -> Result<bool, EventError>

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T