Struct location_history::Location [] [src]

pub struct Location {
    pub timestamp: NaiveDateTime,
    pub latitude: f64,
    pub longitude: f64,
    pub accuracy: i32,
    pub altitude: Option<i32>,
}

Location sample parsed from LocationHistory.json

Fields

timestamp this location was sampled at, converted from milliseconds

latitude, converted from lat E7

longitude, converted from long E7

accuracy of location sample in meters

altitude in meters, if available

Methods

impl Location
[src]

[src]

calculate the haversine distance between this and another location

[src]

calculate the speed in km/h from this location to another location

Trait Implementations

impl Copy for Location
[src]

impl Clone for Location
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Location
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Location

impl Sync for Location