pub enum VectorExpr {
Fixed {
x: f64,
y: f64,
z: f64,
},
Radius(StateSpec),
Velocity(StateSpec),
OrbitalMomentum(StateSpec),
EccentricityVector(StateSpec),
CrossProduct {
a: Box<Self>,
b: Box<Self>,
},
Unit(Box<Self>),
Add {
a: Box<Self>,
b: Box<Self>,
},
Negate(Box<Self>),
VecProjection {
a: Box<Self>,
b: Box<Self>,
},
Project {
v: Box<Self>,
frame: Box<OrthogonalFrame>,
plane: Option<Plane>,
},
Rotate {
v: Box<Self>,
dcm: Box<DcmExpr>,
},
}analysis only.Expand description
VectorExpr defines a vector expression, which can either be computed from a state, or from a fixed definition.
§API note
This VectorExpr is different from the Python class because of a limitation in the support for recursive types in PyO3.
Variants§
Fixed
Radius(StateSpec)
Radius/position vector of this state specification
Velocity(StateSpec)
Velocity vector of this state specification
OrbitalMomentum(StateSpec)
Orbital moment (H) vector of this state specification
EccentricityVector(StateSpec)
Eccentricity vector of this state specification
CrossProduct
Cross product between two vector expression
Unit(Box<Self>)
Unit vector of this vector expression, returns zero vector if norm less than 1e-12
Add
Adds two vectors together
Negate(Box<Self>)
Negate a vector
VecProjection
Vector projection of a onto b
Project
Multiplies the DCM of thr frame with this vector, thereby rotating it into the provided orthogonal frame, optionally projecting onto the plan, optionally projecting onto the plane
Rotate
Allows rotating a given VectorExpr by the provided DCM Expression, returning another VectorExpr
Implementations§
Source§impl VectorExpr
impl VectorExpr
Trait Implementations§
Source§impl Clone for VectorExpr
impl Clone for VectorExpr
Source§fn clone(&self) -> VectorExpr
fn clone(&self) -> VectorExpr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VectorExpr
impl Debug for VectorExpr
Source§impl<'de> Deserialize<'de> for VectorExpr
impl<'de> Deserialize<'de> for VectorExpr
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>,
Source§impl Display for VectorExpr
impl Display for VectorExpr
Source§impl From<PyVectorExpr> for VectorExpr
Available on crate feature python only.
impl From<PyVectorExpr> for VectorExpr
python only.Source§fn from(value: PyVectorExpr) -> Self
fn from(value: PyVectorExpr) -> Self
Source§impl PartialEq for VectorExpr
impl PartialEq for VectorExpr
Source§impl Serialize for VectorExpr
impl Serialize for VectorExpr
Source§impl TryFrom<VectorExpr> for PyVectorExpr
Available on crate feature python only.
impl TryFrom<VectorExpr> for PyVectorExpr
python only.impl StructuralPartialEq for VectorExpr
Auto Trait Implementations§
impl Freeze for VectorExpr
impl RefUnwindSafe for VectorExpr
impl Send for VectorExpr
impl Sync for VectorExpr
impl Unpin for VectorExpr
impl UnsafeUnpin for VectorExpr
impl UnwindSafe for VectorExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
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>
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>
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.