pub struct Altitude { /* private fields */ }Expand description
An altitude, with where it came from, which sets how it is smoothed and how far it must climb or fall before ascent and descent count it.
use fit_encoder::Altitude;
let summit = Altitude::barometric_meters(312.4);Implementations§
Source§impl Altitude
impl Altitude
Sourcepub fn barometric_meters(meters: f64) -> Self
pub fn barometric_meters(meters: f64) -> Self
From a barometric altimeter: averaged over five records, a change counts once it passes 2 m.
Sourcepub fn gnss_meters(meters: f64) -> Self
pub fn gnss_meters(meters: f64) -> Self
From satellite positioning: averaged over five records, a change counts once it passes 10 m.
Sourcepub fn smoothed_meters(meters: f64) -> Self
pub fn smoothed_meters(meters: f64) -> Self
Already smoothed by the caller: taken as it is, every change counts.
Sourcepub fn meters_with_threshold(meters: f64, threshold: f64) -> Self
pub fn meters_with_threshold(meters: f64, threshold: f64) -> Self
From 500 m below sea level to 12,606.8 m above it once rounded to a fifth of a metre:
averaged over five records, a change counts once it passes threshold metres, at least
a fifth of one.
Trait Implementations§
impl Copy for Altitude
impl Eq for Altitude
impl StructuralPartialEq for Altitude
Auto Trait Implementations§
impl Forget for Altitude
impl Freeze for Altitude
impl Move for Altitude
impl RefUnwindSafe for Altitude
impl Send for Altitude
impl Sync for Altitude
impl Unpin for Altitude
impl UnsafeUnpin for Altitude
impl UnwindSafe for Altitude
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
Mutably borrows from an owned value. Read more