Enum unbounded_gpsd::types::TpvResponse[][src]

pub enum TpvResponse {
    Fix3D {
        device: Option<String>,
        time: DateTime<Utc>,
        mode: u8,
        time_err: f64,
        lat: f64,
        lat_err: Option<f64>,
        lon: f64,
        lon_err: Option<f64>,
        alt: f64,
        alt_err: Option<f64>,
        track: Option<f64>,
        track_err: Option<f64>,
        speed: f64,
        speed_err: Option<f64>,
        climb: f64,
        climb_err: Option<f64>,
    },
    Fix2D {
        device: Option<String>,
        time: DateTime<Utc>,
        mode: u8,
        time_err: f64,
        lat: f64,
        lat_err: Option<f64>,
        lon: f64,
        lon_err: Option<f64>,
        track: Option<f64>,
        track_err: Option<f64>,
        speed: f64,
        speed_err: Option<f64>,
    },
    LatLonOnly {
        device: Option<String>,
        time: DateTime<Utc>,
        mode: u8,
        time_err: f64,
        lat: f64,
        lat_err: Option<f64>,
        lon: f64,
        lon_err: Option<f64>,
        alt: Option<f64>,
        alt_err: Option<f64>,
        track: Option<f64>,
        track_err: Option<f64>,
        speed: Option<f64>,
        speed_err: Option<f64>,
        climb: Option<f64>,
        climb_err: Option<f64>,
    },
    NoFix {
        device: Option<String>,
        time: DateTime<Utc>,
        mode: u8,
    },
    Nothing {
        device: Option<String>,
        time: Option<DateTime<Utc>>,
        mode: Option<u8>,
    },
    Dustbin {
        device: Option<String>,
        time: Option<DateTime<Utc>>,
        mode: Option<u8>,
        time_err: Option<f64>,
        lat: Option<f64>,
        lat_err: Option<f64>,
        lon: Option<f64>,
        lon_err: Option<f64>,
        alt: Option<f64>,
        alt_err: Option<f64>,
        track: Option<f64>,
        track_err: Option<f64>,
        speed: Option<f64>,
        speed_err: Option<f64>,
        climb: Option<f64>,
        climb_err: Option<f64>,
    },
}

A time-position-velocity (TPV) report.

The API here splits the TPV object that GPSD sends into various variants, in a bid to classify common responses so that you don't have to do this yourself. See the variant documentation for details.

Basically, the aim here is to reduce the amount of Option unwrapping you have to do, as gpsd specifies that all these fields are optional.

The field documentation is exactly the same across variants; it may be omitted for brevity.

Variants

3D GPS fix, with speed and climb data.

Fields of Fix3D

Name of originating device.

Timestamp.

Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.

Estimated timestamp error (seconds, 95% confidence).

Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.

Latitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.

Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.

Longitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.

Altitude in meters. Present if mode is 3.

Estimated vertical error in meters, 95% confidence. Present if mode is 3 and DOPs can be calculated from the satellite view.

Course over ground, degrees from true north.

Direction error estimate in degrees, 95% confidence.

Speed over ground, meters per second.

Speed error estinmate in meters/sec, 95% confidence.

Climb (positive) or sink (negative) rate, meters per second.

Climb/sink error estimate in meters/sec, 95% confidence.

2D GPS fix, with speed data.

Fields of Fix2D

Name of originating device.

Timestamp.

Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.

Estimated timestamp error (seconds, 95% confidence).

Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.

Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.

Course over ground, degrees from true north.

Speed over ground, meters per second.

Fix with lat/lon, and an unknown smattering of fields. You'll get this variant if a fix is obtained (lat/lon available), but GPSD otherwise sent data that doesn't exactly fit into any of the categories above.

If you are getting this variant, we'd greatly appreciate it if you filed an issue, so we can see what sort of strange data your GPSD is sending!

Fields of LatLonOnly

Name of originating device.

Timestamp.

Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.

Estimated timestamp error (seconds, 95% confidence).

Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.

Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.

Altitude in meters. Present if mode is 3.

Course over ground, degrees from true north.

Speed over ground, meters per second.

Climb (positive) or sink (negative) rate, meters per second.

No fix.

Fields of NoFix

Name of originating device.

Timestamp.

Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.

Possibly no useful data whatsoever.

Fields of Nothing

Name of originating device.

Timestamp.

Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.

Something else! You'll get this variant if GPSD sent data that doesn't exactly fit into any of the categories above.

If you are getting this variant, we'd greatly appreciate it if you filed an issue, so we can see what sort of strange data your GPSD is sending!

Fields of Dustbin

Trait Implementations

impl Debug for TpvResponse
[src]

Formats the value using the given formatter. Read more

impl Default for TpvResponse
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for TpvResponse

impl Sync for TpvResponse