pub struct Scenario<O: Origin, R: ReferenceFrame> { /* private fields */ }Expand description
A scenario declaring the analysis origin, reference frame, time interval, and the assets (ground stations and spacecraft) involved.
The type parameters O and R specify the “native” origin body and
reference frame. For dynamic dispatch (e.g. via Python), use DynScenario.
Implementations§
Source§impl<O: Origin + Copy + Send + Sync, R: ReferenceFrame + Copy + Send + Sync> Scenario<O, R>
impl<O: Origin + Copy + Send + Sync, R: ReferenceFrame + Copy + Send + Sync> Scenario<O, R>
Sourcepub fn new(
start_time: Time<Tai>,
end_time: Time<Tai>,
origin: O,
frame: R,
) -> Self
pub fn new( start_time: Time<Tai>, end_time: Time<Tai>, origin: O, frame: R, ) -> Self
Creates a new scenario from start/end times, origin, and frame.
Sourcepub fn with_interval(interval: TimeInterval<Tai>, origin: O, frame: R) -> Self
pub fn with_interval(interval: TimeInterval<Tai>, origin: O, frame: R) -> Self
Creates a new scenario from a time interval, origin, and frame.
Sourcepub fn with_spacecraft(self, spacecraft: &[Spacecraft]) -> Self
pub fn with_spacecraft(self, spacecraft: &[Spacecraft]) -> Self
Sets the spacecraft for this scenario.
Sourcepub fn with_ground_stations(self, ground_stations: &[GroundStation]) -> Self
pub fn with_ground_stations(self, ground_stations: &[GroundStation]) -> Self
Sets the ground stations for this scenario.
Sourcepub fn interval(&self) -> &TimeInterval<Tai>
pub fn interval(&self) -> &TimeInterval<Tai>
Returns the scenario time interval.
Sourcepub fn with_constellation(
self,
constellation: DynConstellation,
) -> Result<Self, ConstellationConvertError>
pub fn with_constellation( self, constellation: DynConstellation, ) -> Result<Self, ConstellationConvertError>
Add a constellation to the scenario, converting each satellite into a
Spacecraft using the constellation’s selected propagator.
Sourcepub fn constellations(&self) -> &[DynConstellation] ⓘ
pub fn constellations(&self) -> &[DynConstellation] ⓘ
Returns the constellations in this scenario.
Sourcepub fn ground_stations(&self) -> &[GroundStation]
pub fn ground_stations(&self) -> &[GroundStation]
Returns the ground stations in this scenario.
Sourcepub fn spacecraft(&self) -> &[Spacecraft]
pub fn spacecraft(&self) -> &[Spacecraft]
Returns the spacecraft in this scenario.
Sourcepub fn propagate<P>(
&self,
provider: &P,
) -> Result<Ensemble<AssetId, Tai, O, R>, ScenarioPropagateError>where
R: Into<DynFrame>,
P: TryRotation<DynFrame, R, DynTimeScale> + Send + Sync,
P::Error: Display,
pub fn propagate<P>(
&self,
provider: &P,
) -> Result<Ensemble<AssetId, Tai, O, R>, ScenarioPropagateError>where
R: Into<DynFrame>,
P: TryRotation<DynFrame, R, DynTimeScale> + Send + Sync,
P::Error: Display,
Propagate all spacecraft over the scenario interval, transforming
trajectories to the scenario’s frame using the provided rotation
provider.
Internally, each spacecraft’s OrbitSource produces a DynTrajectory
which is then rotated into the concrete frame R via the mixed
TryRotation<DynFrame, R, T> impls, and finally re-tagged to
Trajectory<Tai, O, R>.
Sourcepub fn filter_by_constellations(
&self,
constellations: &[ConstellationId],
) -> Self
pub fn filter_by_constellations( &self, constellations: &[ConstellationId], ) -> Self
Returns a new scenario containing only spacecraft belonging to the given constellations.
Sourcepub fn filter_by_networks(&self, networks: &[NetworkId]) -> Self
pub fn filter_by_networks(&self, networks: &[NetworkId]) -> Self
Returns a new scenario containing only ground stations belonging to the given networks.
Trait Implementations§
Auto Trait Implementations§
impl<O, R> Freeze for Scenario<O, R>
impl<O, R> RefUnwindSafe for Scenario<O, R>where
O: RefUnwindSafe,
R: RefUnwindSafe,
impl<O, R> Send for Scenario<O, R>
impl<O, R> Sync for Scenario<O, R>
impl<O, R> Unpin for Scenario<O, R>
impl<O, R> UnsafeUnpin for Scenario<O, R>where
O: UnsafeUnpin,
R: UnsafeUnpin,
impl<O, R> UnwindSafe for Scenario<O, R>where
O: UnwindSafe,
R: UnwindSafe,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.