pub struct OrbitalDynamics<'a> {
    pub accel_models: Vec<Arc<dyn AccelModel + Sync + 'a>>,
}
Expand description

OrbitalDynamics provides the equations of motion for any celestial dynamic, without state transition matrix computation.

Fields§

§accel_models: Vec<Arc<dyn AccelModel + Sync + 'a>>

Implementations§

source§

impl<'a> OrbitalDynamics<'a>

source

pub fn point_masses(bodies: &[Bodies], cosm: Arc<Cosm>) -> Self

Initialize point mass dynamics given the EXB IDs and a Cosm

source

pub fn two_body() -> Self

Initializes a OrbitalDynamics which does not simulate the gravity pull of other celestial objects but the primary one.

source

pub fn new(accel_models: Vec<Arc<dyn AccelModel + Sync + 'a>>) -> Self

Initialize orbital dynamics with a list of acceleration models

source

pub fn from_model(accel_model: Arc<dyn AccelModel + Sync + 'a>) -> Self

Initialize new orbital mechanics with the provided model. Note: Orbital dynamics always include two body dynamics, these cannot be turned off.

source

pub fn add_model(&mut self, accel_model: Arc<dyn AccelModel + Sync + 'a>)

Add a model to the currently defined orbital dynamics

source

pub fn with_model(self, accel_model: Arc<dyn AccelModel + Sync + 'a>) -> Self

Clone these dynamics and add a model to the currently defined orbital dynamics

Trait Implementations§

source§

impl<'a> Clone for OrbitalDynamics<'a>

source§

fn clone(&self) -> OrbitalDynamics<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Display for OrbitalDynamics<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Dynamics for OrbitalDynamics<'a>

§

type HyperdualSize = Const<7>

The state of the associated hyperdual state, almost always StateType + U1
§

type StateType = Orbit

source§

fn eom( &self, delta_t_s: f64, state: &OVector<f64, Const<42>>, ctx: &Orbit ) -> Result<OVector<f64, Const<42>>, NyxError>

Defines the equations of motion for these dynamics, or a combination of provided dynamics. The time delta_t is in seconds PAST the context epoch. The state vector is the state which changes for every intermediate step of the integration. The state context is the state of what is being propagated, it should allow rebuilding a new state context from the provided state vector.
source§

fn dual_eom( &self, _delta_t_s: f64, osc: &Orbit ) -> Result<(Vector6<f64>, Matrix6<f64>), NyxError>

Defines the equations of motion for Dual numbers for these dynamics. All dynamics need to allow for automatic differentiation. However, if differentiation is not supported, then the dynamics should prevent initialization with a context which has an STM defined.
source§

fn finally( &self, next_state: Self::StateType ) -> Result<Self::StateType, NyxError>

Optionally performs some final changes after each successful integration of the equations of motion. For example, this can be used to update the Guidance mode. NOTE: This function is also called just prior to very first integration step in order to update the initial state if needed.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for OrbitalDynamics<'a>

§

impl<'a> Send for OrbitalDynamics<'a>

§

impl<'a> Sync for OrbitalDynamics<'a>

§

impl<'a> Unpin for OrbitalDynamics<'a>

§

impl<'a> !UnwindSafe for OrbitalDynamics<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Printing<T> for Twhere T: Display,

§

fn to_str(self) -> String

Method to serialize. Decorates Vecs with square brackets and tuples with round ones. Implementation code is in printing.rs.
§

fn to_plainstr(self) -> String

Method to serialize in minimal form (space separated, no brackets) Implementation code is in printing.rs.
§

fn rd(self) -> String

Printable in red
§

fn gr(self) -> String

Printable in green
§

fn bl(self) -> String

Printable in blue
§

fn yl(self) -> String

Printable in yellow
§

fn mg(self) -> String

Printable in magenta
§

fn cy(self) -> String

Printable in cyan
§

fn wvec(self, f: &mut File) -> Result<(), Error>

Method to write vector(s) to file f (space separated, without brackets). Passes up io errors
§

fn pvec(self)

Method to print vector(s) to stdout (space separated,without brackets).
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

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

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V