pub struct LagrangeConfig {
pub primary_mass: f64,
pub secondary_mass: f64,
pub separation: f64,
pub point: LagrangePoint,
pub perturbation: (f64, f64, f64),
}Expand description
Lagrange point configuration.
Fields§
§primary_mass: f64Primary body mass (kg).
secondary_mass: f64Secondary body mass (kg).
separation: f64Distance between primary and secondary (m).
point: LagrangePointSelected Lagrange point.
perturbation: (f64, f64, f64)Initial perturbation from Lagrange point (m).
Implementations§
Source§impl LagrangeConfig
impl LagrangeConfig
Sourcepub fn sun_earth_l2() -> Self
pub fn sun_earth_l2() -> Self
Sun-Earth L2 (like JWST).
Sourcepub fn sun_earth_l4() -> Self
pub fn sun_earth_l4() -> Self
Sun-Earth L4 (Trojan point).
Sourcepub fn mass_ratio(&self) -> f64
pub fn mass_ratio(&self) -> f64
Calculate mass ratio μ = m2 / (m1 + m2).
Sourcepub fn lagrange_position(&self) -> (f64, f64, f64)
pub fn lagrange_position(&self) -> (f64, f64, f64)
Calculate approximate Lagrange point position (in rotating frame).
Sourcepub fn build(&self, softening: f64) -> NBodyState
pub fn build(&self, softening: f64) -> NBodyState
Build state with test particle near Lagrange point.
Trait Implementations§
Source§impl Clone for LagrangeConfig
impl Clone for LagrangeConfig
Source§fn clone(&self) -> LagrangeConfig
fn clone(&self) -> LagrangeConfig
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 LagrangeConfig
impl Debug for LagrangeConfig
Source§impl Default for LagrangeConfig
impl Default for LagrangeConfig
Source§impl<'de> Deserialize<'de> for LagrangeConfig
impl<'de> Deserialize<'de> for LagrangeConfig
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 LagrangeConfig
impl RefUnwindSafe for LagrangeConfig
impl Send for LagrangeConfig
impl Sync for LagrangeConfig
impl Unpin for LagrangeConfig
impl UnsafeUnpin for LagrangeConfig
impl UnwindSafe for LagrangeConfig
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