[−][src]Trait nyx_space::dynamics::Dynamics
The Dynamics
trait handles and stores any equation of motion and the state is integrated.
Its design is such that several of the provided dynamics can be combined fairly easily. However,
when combining the dynamics (e.g. integrating both the attitude of a spaceraft and its orbital
parameters), it is up to the implementor to handle time and state organization correctly.
For time management, I highly recommend using hifitime
which is thoroughly validated.
Associated Types
type StateSize: DimName
Defines the state size for these dynamics. It must be imported from nalgebra
.
type StateType: Copy
Defines the type which will be published on the propagator channel
Required methods
fn time(&self) -> f64
Returns the time of the current state
fn state_vector(&self) -> VectorN<f64, Self::StateSize> where
DefaultAllocator: Allocator<f64, Self::StateSize>,
DefaultAllocator: Allocator<f64, Self::StateSize>,
Returns the current state of the dynamics as a vector so it can be integrated.
fn eom(
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize> where
DefaultAllocator: Allocator<f64, Self::StateSize>,
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize> where
DefaultAllocator: Allocator<f64, Self::StateSize>,
Defines the equations of motion for these dynamics, or a combination of provided dynamics.
fn set_state(&mut self, new_t: f64, new_state: &VectorN<f64, Self::StateSize>) where
DefaultAllocator: Allocator<f64, Self::StateSize>,
DefaultAllocator: Allocator<f64, Self::StateSize>,
Updates the internal state of the dynamics.
fn state(&self) -> Self::StateType
Returns the state of the dynamics
Implementors
impl Dynamics for AngularMom
[src]
type StateSize = U3
type StateType = Vector3<f64>
fn time(&self) -> f64
[src]
fn state_vector(&self) -> VectorN<f64, Self::StateSize>
[src]
Returns the angular velocity ω of the system, not its momentum.
fn state(&self) -> Vector3<f64>
[src]
fn set_state(
&mut self,
new_t: f64,
new_angular_velocity: &VectorN<f64, Self::StateSize>
)
[src]
&mut self,
new_t: f64,
new_angular_velocity: &VectorN<f64, Self::StateSize>
)
Set the angular velocity ω of the system and the time.
fn eom(
&self,
_t: f64,
omega: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
[src]
&self,
_t: f64,
omega: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
Computes the instantaneous equations of motion of the angular velocity of a tensor (i.e. the angular acceleration). [I]̲̇ω = -[̃ω][I]̲ω + ̲L
Source: Schaub & Junkins, 3th ed., eq. 4.32.
impl<'a> Dynamics for CelestialDynamics<'a>
[src]
type StateSize = U6
type StateType = State
fn time(&self) -> f64
[src]
Returns the relative time to the propagator. Use prop.dynamics.state.dt for absolute time
fn state_vector(&self) -> VectorN<f64, Self::StateSize>
[src]
fn set_state(&mut self, new_t: f64, new_state: &VectorN<f64, Self::StateSize>)
[src]
fn state(&self) -> State
[src]
fn eom(
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
[src]
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
impl<'a> Dynamics for CelestialDynamicsStm<'a>
[src]
type StateSize = U42
type StateType = (State, Matrix6<f64>)
fn time(&self) -> f64
[src]
Returns the relative time to the propagator. Use prop.dynamics.state.dt for absolute time
fn state_vector(&self) -> VectorN<f64, Self::StateSize>
[src]
fn state(&self) -> Self::StateType
[src]
Returns the celestial state and the state transition matrix
fn set_state(&mut self, new_t: f64, new_state: &VectorN<f64, Self::StateSize>)
[src]
fn eom(
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
[src]
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
impl<'a, D: DeltaVctrl> Dynamics for MissionArc<'a, D>
[src]
type StateSize = U6
type StateType = State
fn time(&self) -> f64
[src]
Returns the relative time
fn state(&self) -> Self::StateType
[src]
State of the mission arc is always the celestial state
fn state_vector(&self) -> VectorN<f64, Self::StateSize>
[src]
Mission arc state is a vector of six zeros followed by the fuel mass
fn set_state(&mut self, new_t: f64, new_state: &VectorN<f64, Self::StateSize>)
[src]
fn eom(
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
[src]
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
impl<'a, T: ThrustControl> Dynamics for Spacecraft<'a, T>
[src]
type StateSize = U7
type StateType = SpacecraftState
fn time(&self) -> f64
[src]
fn state(&self) -> Self::StateType
[src]
fn state_vector(&self) -> VectorN<f64, Self::StateSize>
[src]
fn set_state(&mut self, new_t: f64, new_state: &VectorN<f64, Self::StateSize>)
[src]
fn eom(
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>
[src]
&self,
t: f64,
state: &VectorN<f64, Self::StateSize>
) -> VectorN<f64, Self::StateSize>