pub enum Speed {
Knots(u16),
Kmh(f64),
Mph(u16),
}Expand description
A ground-speed measurement with explicit units.
APRS uses multiple unit conventions depending on context:
- Knots — Mic-E and course/speed extension on wire
Km/h—SmartBeaconingparameters- Mph — US weather station display convention
This enum keeps each unit distinct and provides lossless conversions so callers never accidentally mix them.
Variants§
Knots(u16)
Nautical miles per hour.
Kmh(f64)
Kilometres per hour (decimal to allow SmartBeaconing thresholds).
Mph(u16)
Statute miles per hour.
Implementations§
Trait Implementations§
impl Copy for Speed
impl StructuralPartialEq for Speed
Auto Trait Implementations§
impl Freeze for Speed
impl RefUnwindSafe for Speed
impl Send for Speed
impl Sync for Speed
impl Unpin for Speed
impl UnwindSafe for Speed
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