[−][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
.
Required methods
fn time(&self) -> f64
Returns the time of the current state
fn state(&self) -> VectorN<f64, Self::StateSize> where
DefaultAllocator: Allocator<f64, Self::StateSize>,
DefaultAllocator: Allocator<f64, Self::StateSize>,
Returns the current state of the dynamics 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.
Implementors
impl Dynamics for AngularMom
[src]
type StateSize = U3
fn time(&self) -> f64
[src]
fn state(&self) -> VectorN<f64, Self::StateSize>
[src]
Returns the angular velocity ω of the system, not its momentum.
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
fn time(&self) -> f64
[src]
Returns the relative time to the propagator. Use prop.dynamics.state.dt for absolute time
fn state(&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>
impl<'a> Dynamics for CelestialDynamicsStm<'a>
[src]
type StateSize = U42
fn time(&self) -> f64
[src]
Returns the relative time to the propagator. Use prop.dynamics.state.dt for absolute time
fn state(&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>