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

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.

Returns the first state in this ephemeris

Returns the last state in this ephemeris

Creates an iterator through the trajectory by the provided step size

Creates an iterator through the trajectory by the provided step size between the provided bounds

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.

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.

Exports this trajectory to the provided filename in CSV format with the provided headers and the provided step

Allows converting the source trajectory into the (almost) equivalent trajectory in another frame This is super slow.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

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

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.