Struct nyx_space::md::trajectory::Traj [−][src]
pub struct Traj<S: State> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>, { pub segments: BTreeMap<i32, Segment<S>>, pub timeout_ms: u64, // some fields omitted }
Expand description
Store a trajectory of any State.
Fields
segments: BTreeMap<i32, Segment<S>>
Segments are organized as a binary tree map whose index is the number of seconds since the start of this ephemeris rounded down
timeout_ms: u64
Timeout is used to stop listening to new state (default is 50ms, should work well in release and debug mode).
Implementations
impl<S: State> Traj<S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>,
[src]
impl<S: State> Traj<S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>,
[src]Creates a new trajectory with the provided starting state (used as a template) and a receiving channel. The trajectories are always generated on a separate thread.
Creates a new trajectory but specifies the number of items per segment
Evaluate the trajectory at this specific epoch.
pub fn every(&self, step: Duration) -> TrajIterator<'_, S>ⓘNotable traits for TrajIterator<'_, S>
impl<S: State> Iterator for TrajIterator<'_, S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>, type Item = S;
[src]
pub fn every(&self, step: Duration) -> TrajIterator<'_, S>ⓘNotable traits for TrajIterator<'_, S>
impl<S: State> Iterator for TrajIterator<'_, S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>, type Item = S;
[src]Creates an iterator through the trajectory by the provided step size
pub fn every_between(
&self,
step: Duration,
start: Epoch,
end: Epoch
) -> TrajIterator<'_, S>ⓘNotable traits for TrajIterator<'_, S>
impl<S: State> Iterator for TrajIterator<'_, S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>, type Item = S;
[src]
pub fn every_between(
&self,
step: Duration,
start: Epoch,
end: Epoch
) -> TrajIterator<'_, S>ⓘNotable traits for TrajIterator<'_, S>
impl<S: State> Iterator for TrajIterator<'_, S> where
DefaultAllocator: Allocator<f64, S::PropVecSize> + Allocator<f64, S::Size>, type Item = S;
[src]Creates an iterator through the trajectory by the provided step size between the provided bounds
pub fn find_bracketed<E>(
&self,
start: Epoch,
end: Epoch,
event: &E
) -> Result<S, NyxError> where
E: EventEvaluator<S>,
[src]
pub fn find_bracketed<E>(
&self,
start: Epoch,
end: Epoch,
event: &E
) -> Result<S, NyxError> where
E: EventEvaluator<S>,
[src]Find the exact state where the request event happens. The event function is expected to be monotone in the provided interval.
Find (usually) all of the states where the event happens. WARNING: The initial search step is 1% of the duration of the trajectory duration! For example, if the trajectory is 100 days long, then we split the trajectory into 100 chunks of 1 day and see whether the event is in there. If the event happens twice or more times within 1% of the trajectory duration, only the one of such events will be found.
pub fn find_minmax<E>(
&self,
event: &E,
precision: TimeUnit
) -> Result<(S, S), NyxError> where
E: EventEvaluator<S>,
[src]
pub fn find_minmax<E>(
&self,
event: &E,
precision: TimeUnit
) -> Result<(S, S), NyxError> where
E: EventEvaluator<S>,
[src]Find the minimum and maximum of the provided event through the trajectory
Allows converting the source trajectory into the (almost) equivalent trajectory in another frame This is super slow.
Exports this trajectory to the provided filename in CSV format with the default headers and the provided step
Exports this trajectory to the provided filename in CSV format with the default headers and the provided step
Exports this trajectory to the provided filename in CSV format with the default headers, one state per minute
Exports this trajectory to the provided filename in CSV format with the default headers, one state per minute
Exports this trajectory to the provided filename in CSV format with only the epoch, the geodetic latitude, longitude, and height at one state per minute. Must provide a body fixed frame to correctly compute the latitude and longitude.
Trait Implementations
Auto Trait Implementations
impl<S> RefUnwindSafe for Traj<S> where
S: RefUnwindSafe,
impl<S> UnwindSafe for Traj<S> where
S: RefUnwindSafe + UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V