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) -> Result<Self, RocheError>
pub fn potential( &self, earth: &Vec3, p: &Vec3, lam: f64, ) -> Result<f64, RocheError>
pub fn gradient( &self, earth: &Vec3, p: &Vec3, lam: f64, ) -> Result<(f64, f64), RocheError>
pub fn potential_grad( &self, earth: &Vec3, p: &Vec3, lam: f64, ) -> Result<(f64, f64, f64), RocheError>
pub fn ref_sphere(&self, ffac: f64) -> Result<(f64, f64), RocheError>
pub fn fblink( &self, ffac: f64, acc: f64, earth: &Vec3, p: &Vec3, ) -> Result<bool, RocheError>
pub fn face( &self, direction: Vec3, rref: f64, pref: f64, acc: f64, ) -> Result<(Vec3, Vec3, f64, f64), RocheError>
pub fn ingress_egress( &self, ffac: f64, iangle: f64, delta: f64, r: &Vec3, ingress: &mut f64, egress: &mut f64, ) -> Result<bool, RocheError>
pub fn star_eclipse( &self, r: f64, ffac: f64, iangle: f64, posn: &Vec3, delta: f64, roche: bool, star: Star, eclipses: &mut Etype, ) -> Result<(), RocheError>
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, ) -> Result<bool, RocheError>
pub fn x_l1(&self) -> Result<f64, RocheError>
pub fn x_l1_asyncronous(&self) -> Result<f64, RocheError>
pub fn x_l2(&self) -> Result<f64, RocheError>
pub fn x_l3(&self) -> Result<f64, RocheError>
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