pub struct RocheContext {
pub q: f64,
pub star: Star,
pub spin: f64,
pub x_l1: f64,
}Expand description
RocheContext is a basic struct packaging the mass ratio, q=M2/M1, the star (i.e. the Primary or Secondary), the spin of that star, and the x-coordinate of the L1 point together with the functions that accept these values as inputs. x_l1 is calculated on initialisation with RocheContext::new(q, star, spin) and saves it being recalculated over and over in loops.
Fields§
§q: f64§star: Star§spin: f64§x_l1: f64Implementations§
Source§impl RocheContext
impl RocheContext
pub fn new(q: f64, star: Star, spin: f64) -> Self
pub fn potential(&self, earth: &Vec3, p: &Vec3, lam: f64) -> f64
pub fn gradient(&self, earth: &Vec3, p: &Vec3, lam: f64) -> (f64, f64)
pub fn potential_grad( &self, earth: &Vec3, p: &Vec3, lam: f64, ) -> (f64, f64, f64)
pub fn ref_sphere(&self, ffac: f64) -> (f64, f64)
pub fn fblink( &self, ffac: f64, acc: f64, earth: &Vec3, p: &Vec3, ) -> Result<bool, &'static str>
pub fn face( &self, direction: Vec3, rref: f64, pref: f64, acc: f64, ) -> (Vec3, Vec3, f64, f64)
pub fn ingress_egress( &self, ffac: f64, iangle: f64, delta: f64, r: &Vec3, ingress: &mut f64, egress: &mut f64, ) -> bool
pub fn pot_min( &self, cosi: f64, sini: f64, p: &Vec3, phi1: f64, phi2: f64, lam1: f64, lam2: f64, rref: f64, pref: f64, acc: f64, phi: &mut f64, lam: &mut f64, ) -> bool
pub fn x_l1(&self) -> f64
pub fn x_l1_asyncronous(&self) -> f64
pub fn x_l2(&self) -> f64
pub fn x_l3(&self) -> f64
Auto Trait Implementations§
impl Freeze for RocheContext
impl RefUnwindSafe for RocheContext
impl Send for RocheContext
impl Sync for RocheContext
impl Unpin for RocheContext
impl UnsafeUnpin for RocheContext
impl UnwindSafe for RocheContext
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