pub struct Cartesian { /* private fields */ }Expand description
Cartesian state vector with position and velocity in meters and m/s.
Implementations§
Source§impl Cartesian
impl Cartesian
Sourcepub const fn new(
x: Distance,
y: Distance,
z: Distance,
vx: Velocity,
vy: Velocity,
vz: Velocity,
) -> Self
pub const fn new( x: Distance, y: Distance, z: Distance, vx: Velocity, vy: Velocity, vz: Velocity, ) -> Self
Creates a new Cartesian state from individual position and velocity components.
Sourcepub const fn from_vecs(pos: DVec3, vel: DVec3) -> Self
pub const fn from_vecs(pos: DVec3, vel: DVec3) -> Self
Creates a new Cartesian state from position and velocity vectors in meters and m/s.
Sourcepub const fn from_array([x, y, z, vx, vy, vz]: [f64; 6]) -> Self
pub const fn from_array([x, y, z, vx, vy, vz]: [f64; 6]) -> Self
Creates a new Cartesian state from a [x, y, z, vx, vy, vz] array in meters and m/s.
Sourcepub const fn builder() -> CartesianBuilder
pub const fn builder() -> CartesianBuilder
Returns a new CartesianBuilder.
Sourcepub fn set_position(&mut self, position: DVec3)
pub fn set_position(&mut self, position: DVec3)
Sets the position vector in meters.
Sourcepub fn set_velocity(&mut self, velocity: DVec3)
pub fn set_velocity(&mut self, velocity: DVec3)
Sets the velocity vector in m/s.
Source§impl Cartesian
impl Cartesian
Sourcepub fn eccentricity_vector(&self, grav_param: GravitationalParameter) -> DVec3
pub fn eccentricity_vector(&self, grav_param: GravitationalParameter) -> DVec3
Computes the eccentricity vector from the Cartesian state.
Sourcepub fn to_keplerian(&self, grav_param: GravitationalParameter) -> Keplerian
pub fn to_keplerian(&self, grav_param: GravitationalParameter) -> Keplerian
Converts the Cartesian state to Keplerian orbital elements.
Trait Implementations§
Source§impl AddAssign for Cartesian
impl AddAssign for Cartesian
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<f64> for Cartesian
impl DivAssign<f64> for Cartesian
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl MulAssign<f64> for Cartesian
impl MulAssign<f64> for Cartesian
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl SubAssign for Cartesian
impl SubAssign for Cartesian
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for Cartesian
impl StructuralPartialEq for Cartesian
Auto Trait Implementations§
impl Freeze for Cartesian
impl RefUnwindSafe for Cartesian
impl Send for Cartesian
impl Sync for Cartesian
impl Unpin for Cartesian
impl UnsafeUnpin for Cartesian
impl UnwindSafe for Cartesian
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