Struct nav_types::NVector

source ·
pub struct NVector<N: RealFieldCopy> { /* private fields */ }
Expand description

N-Vector position

The N-Vector represents unique points on the earth’s surface. The advantage of N-Vectors is that they have no inconsistencies around the poles compared to WGS84 Latitude, Longitude format. See: nvector for detailed information.

Implementations§

source§

impl<N: RealFieldCopy> NVector<N>

source

pub fn new(vec: Vector3<N>, altitude: N) -> NVector<N>

Create a new NVector

source§

impl<N: RealFieldCopy> NVector<N>

source

pub fn vector(&self) -> Vector3<N>

Get the vector component of this position

source

pub fn altitude(&self) -> N

Get the altitude of this position

Trait Implementations§

source§

impl<N, T> Add<T> for NVector<N>where N: RealFieldCopy, T: Into<ENU<N>>,

§

type Output = NVector<N>

The resulting type after applying the + operator.
source§

fn add(self, right: T) -> Self

Performs the + operation. Read more
source§

impl<N, T> AddAssign<T> for NVector<N>where N: RealFieldCopy + AddAssign, T: Into<ENU<N>>,

source§

fn add_assign(&mut self, right: T)

Performs the += operation. Read more
source§

impl<N: Clone + RealFieldCopy> Clone for NVector<N>

source§

fn clone(&self) -> NVector<N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<N: Debug + RealFieldCopy> Debug for NVector<N>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<N: RealFieldCopy> From<ECEF<N>> for NVector<N>

source§

fn from(ecef: ECEF<N>) -> NVector<N>

Converts to this type from the input type.
source§

impl<N: RealFieldCopy> From<NVector<N>> for ECEF<N>

source§

fn from(f: NVector<N>) -> ECEF<N>

Converts to this type from the input type.
source§

impl<N: RealFieldCopy> From<NVector<N>> for WGS84<N>

source§

fn from(f: NVector<N>) -> WGS84<N>

Converts to this type from the input type.
source§

impl<N: RealFieldCopy> From<WGS84<N>> for NVector<N>

source§

fn from(f: WGS84<N>) -> NVector<N>

Converts to this type from the input type.
source§

impl<N: PartialEq + RealFieldCopy> PartialEq<NVector<N>> for NVector<N>

source§

fn eq(&self, other: &NVector<N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<N: RealFieldCopy> Sub<NVector<N>> for NVector<N>

§

type Output = ENU<N>

The resulting type after applying the - operator.
source§

fn sub(self, right: NVector<N>) -> ENU<N>

Performs the - operation. Read more
source§

impl<N, T> Sub<T> for NVector<N>where N: RealFieldCopy, T: Into<ENU<N>>,

§

type Output = NVector<N>

The resulting type after applying the - operator.
source§

fn sub(self, right: T) -> NVector<N>

Performs the - operation. Read more
source§

impl<N, T> SubAssign<T> for NVector<N>where N: RealFieldCopy + SubAssign, T: Into<ENU<N>>,

source§

fn sub_assign(&mut self, right: T)

Performs the -= operation. Read more
source§

impl<N: Copy + RealFieldCopy> Copy for NVector<N>

source§

impl<N: RealFieldCopy> StructuralPartialEq for NVector<N>

Auto Trait Implementations§

§

impl<N> RefUnwindSafe for NVector<N>where N: RefUnwindSafe,

§

impl<N> Send for NVector<N>

§

impl<N> Sync for NVector<N>

§

impl<N> Unpin for NVector<N>where N: Unpin,

§

impl<N> UnwindSafe for NVector<N>where N: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, Right> ClosedAdd<Right> for Twhere T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedSub<Right> for Twhere T: Sub<Right, Output = T> + SubAssign<Right>,

source§

impl<T> Scalar for Twhere T: 'static + Clone + PartialEq<T> + Debug,