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,
) -> Cartesian
pub const fn new( x: Distance, y: Distance, z: Distance, vx: Velocity, vy: Velocity, vz: Velocity, ) -> Cartesian
Creates a new Cartesian state from individual position and velocity components.
Sourcepub const fn from_vecs(pos: DVec3, vel: DVec3) -> Cartesian
pub const fn from_vecs(pos: DVec3, vel: DVec3) -> Cartesian
Creates a new Cartesian state from position and velocity vectors in meters and m/s.
Sourcepub const fn from_array(_: [f64; 6]) -> Cartesian
pub const fn from_array(_: [f64; 6]) -> Cartesian
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: Cartesian)
fn add_assign(&mut self, rhs: Cartesian)
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: Cartesian)
fn sub_assign(&mut self, rhs: Cartesian)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.