#[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 ==.impl Copy for LocationFix
impl StructuralPartialEq for LocationFix
Auto Trait Implementations§
impl Freeze for LocationFix
impl RefUnwindSafe for LocationFix
impl Send for LocationFix
impl Sync for LocationFix
impl Unpin for LocationFix
impl UnsafeUnpin for LocationFix
impl UnwindSafe for LocationFix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more