Skip to main content

StatePropagator

Struct StatePropagator 

Source
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: CartesianState

Initial ECI Cartesian state (its epoch_tdb_seconds is the start epoch).

§force_model: ForceModelKind

Force model used to compute the acceleration.

§integrator: IntegratorKind

Integrator that advances the state.

§options: IntegratorOptions

Step-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

Source

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

Source

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.

Source

pub fn with_options(self, options: IntegratorOptions) -> StatePropagator

Replace the integrator options (builder-style).

Source

pub fn with_drag(self, drag: DragParameters) -> StatePropagator

Enable atmospheric drag (builder-style).

Source

pub fn with_space_weather(self, source: SpaceWeatherSource) -> StatePropagator

Use a per-epoch space-weather source for the drag perturbation.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

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

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

Source§

fn to_subset(&self) -> Option<SS>

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.