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
Fix3D
3D GPS fix, with speed and climb data.
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. |
Fix2D
2D GPS fix, with speed data.
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> |
LatLonOnly
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
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> |
NoFix
No fix.
Fields of NoFix
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. |
Nothing
Possibly no useful data whatsoever.
Fields of Nothing
device: Option<String> | Name of originating device. |
time: Option<DateTime<Utc>> | Timestamp. |
mode: Option<u8> | Fix type: 0 = unknown, 1 = no fix, 2 = 2D fix, 3 = 3D fix. |
Dustbin
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
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
impl Debug for TpvResponse
[src]
impl Debug for TpvResponse
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for TpvResponse
[src]
impl Default for TpvResponse
fn default() -> TpvResponse
[src]
fn default() -> TpvResponse
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for TpvResponse
impl Send for TpvResponse
impl Sync for TpvResponse
impl Sync for TpvResponse