pub struct Fix {
pub quality: FixQuality,
pub latitude_e7: Option<i32>,
pub longitude_e7: Option<i32>,
pub altitude_m: Option<i32>,
pub hdop_centi: Option<u16>,
pub sats_used: u8,
pub sats_in_view: Option<u8>,
pub time: Option<DateTime>,
pub time_from_fix: bool,
}Expand description
Everything one cycle of sentences said, in integers.
Coordinates are in units of 1e-7 degrees — about 11 mm, and exact, because they were parsed from the receiver’s decimal digits without ever passing through a float.
Fields§
§quality: FixQualityThe dimension of the solution.
latitude_e7: Option<i32>Latitude in 1e-7 degrees, positive north. None without a fix.
longitude_e7: Option<i32>Longitude in 1e-7 degrees, positive east. None without a fix.
altitude_m: Option<i32>Altitude above mean sea level in meters, with a three-dimensional solution.
hdop_centi: Option<u16>Horizontal dilution of precision, in hundredths.
sats_used: u8Satellites contributing to the solution.
sats_in_view: Option<u8>Satellites in view, summed across constellations. None when the
receiver reported no GSV since the last cycle.
time: Option<DateTime>The UTC instant the receiver reported, if it reported one.
Present without a position more often than one might expect: a receiver with a running real-time clock emits the time in every RMC while it is still searching for satellites.
time_from_fix: boolWhether time accompanied a valid position.
The distinction matters to a caller deciding how much to trust the instant: a time that came with a fix was disciplined by the satellites this second, and one that did not came from whatever the receiver has been keeping on its own.
Implementations§
Trait Implementations§
impl Copy for Fix
impl Eq for Fix
impl StructuralPartialEq for Fix
Auto Trait Implementations§
impl Freeze for Fix
impl RefUnwindSafe for Fix
impl Send for Fix
impl Sync for Fix
impl Unpin for Fix
impl UnwindSafe for Fix
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)