Struct gpx::Waypoint [] [src]

pub struct Waypoint {
    pub elevation: Option<f64>,
    pub time: Option<DateTime<Utc>>,
    pub name: Option<String>,
    pub comment: Option<String>,
    pub description: Option<String>,
    pub source: Option<String>,
    pub links: Vec<Link>,
    pub symbol: Option<String>,
    pub _type: Option<String>,
    pub fix: Option<Fix>,
    pub sat: Option<u64>,
    pub hdop: Option<f64>,
    pub vdop: Option<f64>,
    pub pdop: Option<f64>,
    pub age: Option<f64>,
    pub dgpsid: Option<u16>,
    // some fields omitted
}

Waypoint represents a waypoint, point of interest, or named feature on a map.

Fields

Elevation (in meters) of the point.

Creation/modification timestamp for element. Date and time in are in Univeral Coordinated Time (UTC), not local time! Conforms to ISO 8601 specification for date/time representation. Fractional seconds are allowed for millisecond timing in tracklogs.

The GPS name of the waypoint. This field will be transferred to and from the GPS. GPX does not place restrictions on the length of this field or the characters contained in it. It is up to the receiving application to validate the field before sending it to the GPS.

GPS waypoint comment. Sent to GPS as comment.

A text description of the element. Holds additional information about the element intended for the user, not the GPS.

Source of data. Included to give user some idea of reliability and accuracy of data. "Garmin eTrex", "USGS quad Boston North", e.g.

Links to additional information about the waypoint.

Text of GPS symbol name. For interchange with other programs, use the exact spelling of the symbol as displayed on the GPS. If the GPS abbreviates words, spell them out.

Type (classification) of the waypoint.

Type of GPS fix. none means GPS had no fix. To signify "the fix info is unknown", leave out fix entirely. Value comes from the list {'none'|'2d'|'3d'|'dgps'|'pps'}, where pps means that the military signal was used.

Number of satellites used to calculate the GPX fix.

Horizontal dilution of precision.

Vertical dilution of precision.

Positional dilution of precision.

Number of seconds since last DGPS update, from the element.

ID of DGPS station used in differential correction, in the range [0, 1023].

Methods

impl Waypoint
[src]

[src]

Gives the geographical point of the waypoint.

extern crate geo;
extern crate gpx;

use gpx::Waypoint;
use geo::Point;

fn main() {
    // Kind of useless, but it shows the point.
    let wpt = Waypoint::new(Point::new(-121.97, 37.24));
    let point = wpt.point();

    println!("waypoint latitude: {}, longitude: {}", point.lat(), point.lng());
}

[src]

Creates a new Waypoint from a given geographical point.

extern crate geo;
extern crate gpx;

use gpx::Waypoint;
use geo::Point;

fn main() {
    let point = Point::new(-121.97, 37.24);

    let mut wpt = Waypoint::new(point);
    wpt.elevation = Some(553.21);
}

Trait Implementations

impl Clone for Waypoint
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Waypoint
[src]

[src]

Formats the value using the given formatter.

impl ToGeo<f64> for Waypoint
[src]

[src]