Struct tacview::record::Coords

source ·
pub struct Coords {
    pub longitude: Option<f64>,
    pub latitude: Option<f64>,
    pub altitude: Option<f64>,
    pub u: Option<f64>,
    pub v: Option<f64>,
    pub roll: Option<f64>,
    pub pitch: Option<f64>,
    pub yaw: Option<f64>,
    pub heading: Option<f64>,
}

Fields§

§longitude: Option<f64>

Unit: deg

§latitude: Option<f64>

Unit: deg

§altitude: Option<f64>

Unit: m

§u: Option<f64>

Native x coordinate from a flat world.

§v: Option<f64>

Native y coordinate from a flat world.

§roll: Option<f64>

Positive when rolling the aircraft to the right.

§pitch: Option<f64>

Positive when taking off.

§yaw: Option<f64>

Clockwise relative to true north.

§heading: Option<f64>

Yaw relative to true north of the flat world.

Implementations§

source§

impl Coords

source

pub fn update( &mut self, other: &Coords, reference_latitude: f64, reference_longitude: f64 )

source

pub fn position(self, lat: f64, lon: f64, alt: f64) -> Self

source

pub fn uv(self, u: f64, v: f64) -> Self

source

pub fn orientation(self, yaw: f64, pitch: f64, roll: f64) -> Self

source

pub fn heading(self, v: f64) -> Self

Trait Implementations§

source§

impl Clone for Coords

source§

fn clone(&self) -> Coords

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 Debug for Coords

source§

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

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

impl Default for Coords

source§

fn default() -> Coords

Returns the “default value” for a type. Read more
source§

impl Display for Coords

source§

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

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

impl FromStr for Coords

§

type Err = ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq<Coords> for Coords

source§

fn eq(&self, other: &Coords) -> 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 StructuralPartialEq for Coords

Auto Trait Implementations§

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> 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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
const: unstable · 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.
const: unstable · source§

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

Performs the conversion.