Struct nyx_space::dynamics::orbital::OrbitalDynamics
source · 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>
impl<'a> OrbitalDynamics<'a>
sourcepub fn point_masses(bodies: &[Bodies], cosm: Arc<Cosm>) -> Self
pub fn point_masses(bodies: &[Bodies], cosm: Arc<Cosm>) -> Self
Initialize point mass dynamics given the EXB IDs and a Cosm
sourcepub fn two_body() -> Self
pub fn two_body() -> Self
Initializes a OrbitalDynamics which does not simulate the gravity pull of other celestial objects but the primary one.
sourcepub fn new(accel_models: Vec<Arc<dyn AccelModel + Sync + 'a>>) -> Self
pub fn new(accel_models: Vec<Arc<dyn AccelModel + Sync + 'a>>) -> Self
Initialize orbital dynamics with a list of acceleration models
sourcepub fn from_model(accel_model: Arc<dyn AccelModel + Sync + 'a>) -> Self
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.
sourcepub fn add_model(&mut self, accel_model: Arc<dyn AccelModel + Sync + 'a>)
pub fn add_model(&mut self, accel_model: Arc<dyn AccelModel + Sync + 'a>)
Add a model to the currently defined orbital dynamics
sourcepub fn with_model(self, accel_model: Arc<dyn AccelModel + Sync + 'a>) -> Self
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>
impl<'a> Clone for OrbitalDynamics<'a>
source§fn clone(&self) -> OrbitalDynamics<'a>
fn clone(&self) -> OrbitalDynamics<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Display for OrbitalDynamics<'a>
impl<'a> Display for OrbitalDynamics<'a>
source§impl<'a> Dynamics for OrbitalDynamics<'a>
impl<'a> Dynamics for OrbitalDynamics<'a>
§type HyperdualSize = Const<7>
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>
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>
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>
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§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Printing<T> for Twhere
T: Display,
impl<T> Printing<T> for Twhere T: Display,
§fn to_str(self) -> String
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
fn to_plainstr(self) -> String
Method to serialize in minimal form (space separated, no brackets)
Implementation code is in
printing.rs
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
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
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.