Struct nyx_space::dynamics::spacecraft::Spacecraft[][src]

pub struct Spacecraft<'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

impl<'a> Spacecraft<'a>[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]

Initialize a Spacecraft with a set of orbital dynamics and a propulsion subsystem. Will not decrement the fuel mass as propellant is consummed.

pub fn new(orbital_dyn: Arc<OrbitalDynamics<'a>>) -> Arc<Self>[src]

Initialize a Spacecraft with a set of orbital dynamics and with SRP enabled.

pub fn new_raw(orbital_dyn: Arc<OrbitalDynamics<'a>>) -> Self[src]

Initialize a Spacecraft with a set of orbital dynamics and with SRP enabled.

pub fn with_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 with_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.

pub fn add_model(&mut self, force_model: Arc<dyn ForceModel + 'a>)[src]

pub fn ctrl_achieved(&self, state: &SpacecraftState) -> Result<bool, NyxError>[src]

A shortcut to spacecraft.ctrl if the control is defined

Trait Implementations

impl<'a> Clone for Spacecraft<'a>[src]

impl<'a> Dynamics for Spacecraft<'a>[src]

type HyperdualSize = U7

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

type StateType = SpacecraftState

Auto Trait Implementations

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

impl<'a> Send for Spacecraft<'a>

impl<'a> Sync for Spacecraft<'a>

impl<'a> Unpin for Spacecraft<'a>

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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