pub struct HohmannConfig {
pub central_mass: f64,
pub spacecraft_mass: f64,
pub r1: f64,
pub r2: f64,
pub phase: usize,
}Expand description
Hohmann transfer configuration.
Fields§
§central_mass: f64Central body mass (kg).
spacecraft_mass: f64Spacecraft mass (kg).
r1: f64Initial orbit radius (m).
r2: f64Target orbit radius (m).
phase: usizeCurrent phase of transfer (0 = initial, 1 = first burn, 2 = transfer, 3 = second burn).
Implementations§
Source§impl HohmannConfig
impl HohmannConfig
Sourcepub fn earth_to_mars() -> Self
pub fn earth_to_mars() -> Self
Earth-to-Mars transfer.
Sourcepub fn leo_to_geo() -> Self
pub fn leo_to_geo() -> Self
LEO to GEO transfer.
Sourcepub fn total_delta_v(&self) -> f64
pub fn total_delta_v(&self) -> f64
Calculate total delta-v.
Sourcepub fn transfer_time(&self) -> f64
pub fn transfer_time(&self) -> f64
Calculate transfer time (seconds).
Sourcepub fn build_initial(&self, softening: f64) -> NBodyState
pub fn build_initial(&self, softening: f64) -> NBodyState
Build initial state (spacecraft at r1 with circular velocity).
Sourcepub fn build_transfer(&self, softening: f64) -> NBodyState
pub fn build_transfer(&self, softening: f64) -> NBodyState
Build state after first burn (on transfer orbit).
Trait Implementations§
Source§impl Clone for HohmannConfig
impl Clone for HohmannConfig
Source§fn clone(&self) -> HohmannConfig
fn clone(&self) -> HohmannConfig
Returns a duplicate 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 Debug for HohmannConfig
impl Debug for HohmannConfig
Source§impl Default for HohmannConfig
impl Default for HohmannConfig
Source§impl<'de> Deserialize<'de> for HohmannConfig
impl<'de> Deserialize<'de> for HohmannConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HohmannConfig
impl RefUnwindSafe for HohmannConfig
impl Send for HohmannConfig
impl Sync for HohmannConfig
impl Unpin for HohmannConfig
impl UnsafeUnpin for HohmannConfig
impl UnwindSafe for HohmannConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more