pub struct StatePropagator {
pub initial: CartesianState,
pub force_model: ForceModelKind,
pub integrator: IntegratorKind,
pub options: IntegratorOptions,
pub drag: Option<DragParameters>,
pub space_weather: Option<SpaceWeatherSource>,
}Expand description
A propagatable object built from a raw initial state.
Construct it with StatePropagator::new (or by filling the public fields),
then call StatePropagator::propagate_to for a single end epoch or
StatePropagator::ephemeris to sample the trajectory at a sequence of
epochs.
Fields§
§initial: CartesianStateInitial ECI Cartesian state (its epoch_tdb_seconds is the start epoch).
force_model: ForceModelKindForce model used to compute the acceleration.
integrator: IntegratorKindIntegrator that advances the state.
options: IntegratorOptionsStep-size / tolerance controls passed to the integrator.
drag: Option<DragParameters>Optional atmospheric drag perturbation layered on the gravity model.
space_weather: Option<SpaceWeatherSource>Optional per-epoch space-weather source for atmospheric drag.
Implementations§
Source§impl StatePropagator
impl StatePropagator
Sourcepub fn propagate_covariance(
&self,
initial: LabeledCovariance6,
epochs_tdb_seconds: &[f64],
options: &CovariancePropagationOptions,
) -> Result<CovarianceEphemeris, PropagationError>
pub fn propagate_covariance( &self, initial: LabeledCovariance6, epochs_tdb_seconds: &[f64], options: &CovariancePropagationOptions, ) -> Result<CovarianceEphemeris, PropagationError>
Propagate the initial state and covariance to each requested epoch.
A RTN-labeled input is first rotated to inertial axes at the initial state. Epochs must be monotonic from the initial epoch, with repeated epochs allowed. The output covariance is expressed in the requested frame at each node.
Source§impl StatePropagator
impl StatePropagator
Sourcepub fn new(
epoch_tdb_seconds: f64,
position_km: [f64; 3],
velocity_km_s: [f64; 3],
force_model: ForceModelKind,
integrator: IntegratorKind,
) -> StatePropagator
pub fn new( epoch_tdb_seconds: f64, position_km: [f64; 3], velocity_km_s: [f64; 3], force_model: ForceModelKind, integrator: IntegratorKind, ) -> StatePropagator
Build a propagator from a raw epoch (TDB seconds), ECI position (km), and
ECI velocity (km/s), with the given force model and integrator and the
default IntegratorOptions.
Sourcepub fn with_options(self, options: IntegratorOptions) -> StatePropagator
pub fn with_options(self, options: IntegratorOptions) -> StatePropagator
Replace the integrator options (builder-style).
Sourcepub fn with_drag(self, drag: DragParameters) -> StatePropagator
pub fn with_drag(self, drag: DragParameters) -> StatePropagator
Enable atmospheric drag (builder-style).
Sourcepub fn with_space_weather(self, source: SpaceWeatherSource) -> StatePropagator
pub fn with_space_weather(self, source: SpaceWeatherSource) -> StatePropagator
Use a per-epoch space-weather source for the drag perturbation.
Sourcepub fn propagate_to(
&self,
t_end_tdb_seconds: f64,
) -> Result<PropagationResult, PropagationError>
pub fn propagate_to( &self, t_end_tdb_seconds: f64, ) -> Result<PropagationResult, PropagationError>
Propagate from the initial epoch to t_end_tdb_seconds (an absolute TDB
epoch), returning the underlying integrator’s full
PropagationResult. Bit-for-bit identical to building the force model,
OrbitalDynamics, integrator, and options by hand.
Sourcepub fn propagate_to_with_context(
&self,
t_end_tdb_seconds: f64,
ctx: &PropagationContext,
) -> Result<PropagationResult, PropagationError>
pub fn propagate_to_with_context( &self, t_end_tdb_seconds: f64, ctx: &PropagationContext, ) -> Result<PropagationResult, PropagationError>
Propagate to t_end_tdb_seconds with an explicit propagation context.
This is the opt-in path for force models that need shared per-evaluation
services such as a body-fixed frame provider. Passing
PropagationContext::default is equivalent to Self::propagate_to.
Sourcepub fn propagate_state_with_covariance(
&self,
covariance0: Covariance6,
span_seconds: f64,
) -> Result<(CartesianState, Covariance6), PropagationError>
pub fn propagate_state_with_covariance( &self, covariance0: Covariance6, span_seconds: f64, ) -> Result<(CartesianState, Covariance6), PropagationError>
Propagate the initial state and a 6x6 state covariance over a relative span in seconds.
This is the single-segment, no-process-noise convenience wrapper over
Self::propagate_covariance.
Sourcepub fn state_transition_matrix_for_span(
&self,
span_seconds: f64,
) -> Result<[[f64; 6]; 6], PropagationError>
pub fn state_transition_matrix_for_span( &self, span_seconds: f64, ) -> Result<[[f64; 6]; 6], PropagationError>
Build the finite-difference state-transition matrix over a relative propagation span in seconds.
Columns perturb the initial state in [r_x, r_y, r_z, v_x, v_y, v_z]
order. Each plus/minus leg is propagated through Self::propagate_to’s
same force-model and integrator assembly path.
Sourcepub fn state_transition_matrix_to(
&self,
t_end_tdb_seconds: f64,
) -> Result<[[f64; 6]; 6], PropagationError>
pub fn state_transition_matrix_to( &self, t_end_tdb_seconds: f64, ) -> Result<[[f64; 6]; 6], PropagationError>
Build the finite-difference state-transition matrix to an absolute TDB epoch in seconds.
The zero-span STM is exactly identity and does not call the propagator. Non-zero spans propagate twelve perturbed initial states with central differences and the existing numerical propagator.
Sourcepub fn state_transition_matrix_to_with_context(
&self,
t_end_tdb_seconds: f64,
ctx: &PropagationContext,
) -> Result<[[f64; 6]; 6], PropagationError>
pub fn state_transition_matrix_to_with_context( &self, t_end_tdb_seconds: f64, ctx: &PropagationContext, ) -> Result<[[f64; 6]; 6], PropagationError>
Build the finite-difference state-transition matrix with an explicit propagation context.
Passing PropagationContext::default is equivalent to
Self::state_transition_matrix_to.
Sourcepub fn ephemeris(
&self,
epochs_tdb_seconds: &[f64],
) -> Result<Vec<CartesianState>, PropagationError>
pub fn ephemeris( &self, epochs_tdb_seconds: &[f64], ) -> Result<Vec<CartesianState>, PropagationError>
Sample the trajectory at a sequence of absolute TDB epochs (seconds), returning the Cartesian state at each. The epochs must be monotonic in the propagation direction; the satellite is stepped from one requested epoch to the next (sequential segments), so the cost is linear in the number of epochs. An epoch equal to the current epoch returns the current state without re-integrating.
The force model is built once and reused across every segment.
Sourcepub fn ephemeris_with_context(
&self,
epochs_tdb_seconds: &[f64],
ctx: &PropagationContext,
) -> Result<Vec<CartesianState>, PropagationError>
pub fn ephemeris_with_context( &self, epochs_tdb_seconds: &[f64], ctx: &PropagationContext, ) -> Result<Vec<CartesianState>, PropagationError>
Sample the trajectory with an explicit propagation context.
Passing PropagationContext::default is equivalent to
Self::ephemeris.
Auto Trait Implementations§
impl Freeze for StatePropagator
impl RefUnwindSafe for StatePropagator
impl Send for StatePropagator
impl Sync for StatePropagator
impl Unpin for StatePropagator
impl UnsafeUnpin for StatePropagator
impl UnwindSafe for StatePropagator
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> 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.