#[repr(C)]pub struct LocationFix {
pub latitude_deg: f64,
pub longitude_deg: f64,
pub accuracy_m: f32,
pub altitude_m: f32,
pub altitude_accuracy_m: f32,
pub heading_deg: f32,
pub speed_mps: f32,
pub timestamp_ms: u64,
}Expand description
One GPS / network-located fix. Mirrors the W3C
GeolocationPosition
shape so the future web backend lands without API churn.
accuracy_m is the 1-sigma radius in metres. altitude_m /
altitude_accuracy_m / heading_deg / speed_mps are reported as
f32::NAN when the platform doesn’t supply them — iOS / Android
always supply lat/lon but the other fields depend on hardware.
Fields§
§latitude_deg: f64Latitude in WGS-84 degrees (positive = north, negative = south).
longitude_deg: f64Longitude in WGS-84 degrees (positive = east, negative = west).
accuracy_m: f321-sigma horizontal accuracy radius in metres.
altitude_m: f32Altitude above the WGS-84 ellipsoid in metres. NaN if not
reported (the platform couldn’t measure it).
altitude_accuracy_m: f321-sigma altitude accuracy in metres. NaN if altitude_m is
NaN or the platform doesn’t report it.
heading_deg: f32Bearing in degrees clockwise from true north, 0..360. NaN
if the device is stationary or the platform doesn’t report it.
speed_mps: f32Ground speed in metres per second. NaN if not reported.
timestamp_ms: u64Monotonic timestamp in milliseconds since program start. Lets callers detect stale fixes without depending on wall-clock time.
Implementations§
Trait Implementations§
Source§impl Clone for LocationFix
impl Clone for LocationFix
Source§fn clone(&self) -> LocationFix
fn clone(&self) -> LocationFix
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocationFix
impl Debug for LocationFix
Source§impl PartialEq for LocationFix
impl PartialEq for LocationFix
Source§fn eq(&self, other: &LocationFix) -> bool
fn eq(&self, other: &LocationFix) -> bool
self and other values to be equal, and is used by ==.