Struct nyx_space::dynamics::spacecraft::SpacecraftDynamics [−][src]
pub struct SpacecraftDynamics<'a> { pub orbital_dyn: Arc<OrbitalDynamics<'a>>, pub force_models: Vec<Arc<dyn ForceModel + 'a>>, pub ctrl: Option<Arc<dyn ThrustControl + 'a>>, pub decrement_mass: bool, }
Fields
orbital_dyn: Arc<OrbitalDynamics<'a>>
force_models: Vec<Arc<dyn ForceModel + 'a>>
ctrl: Option<Arc<dyn ThrustControl + 'a>>
decrement_mass: bool
Implementations
pub fn with_ctrl(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
ctrl: Arc<dyn ThrustControl + 'a>
) -> Arc<Self>
[src]
pub fn with_ctrl(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
ctrl: Arc<dyn ThrustControl + 'a>
) -> Arc<Self>
[src]Initialize a Spacecraft with a set of orbital dynamics and a propulsion subsystem. By default, the mass of the vehicle will be decremented as propellant is consummed.
pub fn with_ctrl_no_decr(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
ctrl: Arc<dyn ThrustControl + 'a>
) -> Arc<Self>
[src]
pub fn with_ctrl_no_decr(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
ctrl: Arc<dyn ThrustControl + 'a>
) -> Arc<Self>
[src]Initialize a Spacecraft with a set of orbital dynamics and a propulsion subsystem. Will not decrement the fuel mass as propellant is consummed.
Initialize a Spacecraft with a set of orbital dynamics and with SRP enabled.
Initialize a Spacecraft with a set of orbital dynamics and with SRP enabled.
pub fn from_model(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
force_model: Arc<dyn ForceModel + 'a>
) -> Arc<Self>
[src]
pub fn from_model(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
force_model: Arc<dyn ForceModel + 'a>
) -> Arc<Self>
[src]Initialize new spacecraft dynamics with the provided orbital mechanics and with the provided force model.
pub fn from_models(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
force_models: Vec<Arc<dyn ForceModel + 'a>>
) -> Arc<Self>
[src]
pub fn from_models(
orbital_dyn: Arc<OrbitalDynamics<'a>>,
force_models: Vec<Arc<dyn ForceModel + 'a>>
) -> Arc<Self>
[src]Initialize new spacecraft dynamics with a vector of force models.
Add a model to the currently defined spacecraft dynamics
Clone these dynamics and add a model to the currently defined orbital dynamics
A shortcut to spacecraft.ctrl if the control is defined
Trait Implementations
type HyperdualSize = U7
type HyperdualSize = U7
The state of the associated hyperdual state, almost always StateType + U1
type StateType = Spacecraft
Optionally performs some final changes after each successful integration of the equations of motion. For example, this can be used to update the GNC mode. Read more
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. Read more
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. Read more
fn eom_grad(
&self,
delta_t_s: f64,
state_vec: &VectorN<f64, <Self::StateType as State>::Size>,
state_ctx: &Self::StateType
) -> Result<(VectorN<f64, <Self::StateType as State>::Size>, MatrixN<f64, <Self::StateType as State>::Size>), NyxError> where
DefaultAllocator: Allocator<f64, <Self::StateType as State>::Size> + Allocator<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size> + Allocator<f64, Self::HyperdualSize> + Allocator<Hyperdual<f64, Self::HyperdualSize>, <Self::StateType as State>::Size>,
Owned<f64, Self::HyperdualSize>: Copy,
[src]
fn eom_grad(
&self,
delta_t_s: f64,
state_vec: &VectorN<f64, <Self::StateType as State>::Size>,
state_ctx: &Self::StateType
) -> Result<(VectorN<f64, <Self::StateType as State>::Size>, MatrixN<f64, <Self::StateType as State>::Size>), NyxError> where
DefaultAllocator: Allocator<f64, <Self::StateType as State>::Size> + Allocator<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size> + Allocator<f64, Self::HyperdualSize> + Allocator<Hyperdual<f64, Self::HyperdualSize>, <Self::StateType as State>::Size>,
Owned<f64, Self::HyperdualSize>: Copy,
[src]Computes both the state and the gradient of the dynamics. This function is pre-implemented.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SpacecraftDynamics<'a>
impl<'a> Send for SpacecraftDynamics<'a>
impl<'a> Sync for SpacecraftDynamics<'a>
impl<'a> Unpin for SpacecraftDynamics<'a>
impl<'a> !UnwindSafe for SpacecraftDynamics<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V