Enum unbounded_gpsd::types::TpvResponse [−][src]
pub enum TpvResponse { Fix3D {}, 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 {Show fields
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>,}, NoFix { device: Option<String>, time: DateTime<Utc>, mode: u8, }, Nothing { device: Option<String>, time: Option<DateTime<Utc>>, mode: Option<u8>, }, Dustbin {Show fields
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>,}, }Show fields
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>,
Expand description
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.
Show fields
Fields of Fix3D
device: Option<String>
Name of originating device.
time: DateTime<Utc>
Timestamp.
mode: u8
Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.
time_err: f64
Estimated timestamp error (seconds, 95% confidence).
lat: f64
Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.
lat_err: Option<f64>
Latitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.
lon: f64
Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.
lon_err: Option<f64>
Longitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.
alt: f64
Altitude in meters. Present if mode is 3.
alt_err: Option<f64>
Estimated vertical error in meters, 95% confidence. Present if mode is 3 and DOPs can be calculated from the satellite view.
track: Option<f64>
Course over ground, degrees from true north.
track_err: Option<f64>
Direction error estimate in degrees, 95% confidence.
speed: f64
Speed over ground, meters per second.
speed_err: Option<f64>
Speed error estinmate in meters/sec, 95% confidence.
climb: f64
Climb (positive) or sink (negative) rate, meters per second.
climb_err: Option<f64>
Climb/sink error estimate in meters/sec, 95% confidence.
2D GPS fix, with speed data.
Show fields
Fields of Fix2D
device: Option<String>
Name of originating device.
time: DateTime<Utc>
Timestamp.
mode: u8
Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.
time_err: f64
Estimated timestamp error (seconds, 95% confidence).
lat: f64
Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.
lat_err: Option<f64>
lon: f64
Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.
lon_err: Option<f64>
track: Option<f64>
Course over ground, degrees from true north.
track_err: Option<f64>
speed: f64
Speed over ground, meters per second.
speed_err: Option<f64>
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!
Show fields
Fields of LatLonOnly
device: Option<String>
Name of originating device.
time: DateTime<Utc>
Timestamp.
mode: u8
Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix.
time_err: f64
Estimated timestamp error (seconds, 95% confidence).
lat: f64
Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.
lat_err: Option<f64>
lon: f64
Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.
lon_err: Option<f64>
alt: Option<f64>
Altitude in meters. Present if mode is 3.
alt_err: Option<f64>
track: Option<f64>
Course over ground, degrees from true north.
track_err: Option<f64>
speed: Option<f64>
Speed over ground, meters per second.
speed_err: Option<f64>
climb: Option<f64>
Climb (positive) or sink (negative) rate, meters per second.
climb_err: Option<f64>
No fix.
Show fields
Possibly no useful data whatsoever.
Show fields
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!
Show fields
Fields of 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>
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for TpvResponse
impl Send for TpvResponse
impl Sync for TpvResponse
impl Unpin for TpvResponse
impl UnwindSafe for TpvResponse