Struct google_geocoding::Coordinates[][src]

pub struct Coordinates(_);

WGS-84 coordinates that support serializing and deserializing

Methods

impl Coordinates
[src]

Map a function over the wrapped value, consuming it in the process.

Map a function over the wrapped value without consuming it.

Methods from Deref<Target = WGS84<f64>>

Get latitude of position, in degrees

Get longitude of position, in degrees

Distance between two WGS84 positions

This function uses the haversin formula to calculate the distance between two positions. For more control convert to ECEF and calculate the difference.

Examples

use nav_types::WGS84;

let oslo = WGS84::new(59.95, 10.75, 0.0);
let stockholm = WGS84::new(59.329444, 18.068611, 0.0);

println!("Great circle distance between Oslo and Stockholm: {:?}",
    oslo.distance(&stockholm));

Get altitude of position

Get latitude in radians

Get longitude in radians

Trait Implementations

impl Clone for Coordinates
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Coordinates
[src]

impl Debug for Coordinates
[src]

Formats the value using the given formatter. Read more

impl Deref for Coordinates
[src]

The resulting type after dereferencing.

Dereferences the value.

impl Borrow<WGS84<f64>> for Coordinates
[src]

Immutably borrows from an owned value. Read more

impl AsRef<WGS84<f64>> for Coordinates
[src]

Performs the conversion.

impl<'de> Deserialize<'de> for Coordinates
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Coordinates
[src]

Serialize this value into the given Serde serializer. Read more

impl Display for Coordinates
[src]

Formats the value using the given formatter. Read more

impl From<WGS84<f64>> for Coordinates
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Coordinates

impl Sync for Coordinates