pub struct TrackError {
pub cross_track_nm: f64,
pub along_track_nm: f64,
}Expand description
Where a vessel sits relative to the leg from -> to.
Fields§
§cross_track_nm: f64Perpendicular distance off the leg, nautical miles, positive when the vessel is to starboard of the track.
The sign is the one a helm display needs inverted: positive here means “steer to port to get back”. NMEA’s XTE sentence instead carries a magnitude plus an L/R letter naming the direction to steer, so an adapter emitting XTE must flip this, not copy it.
along_track_nm: f64Distance from from measured along the leg, nautical miles.
Negative when the vessel has not yet reached from (it lies behind
the start of the leg), and greater than the leg length once past
to. Both cases are normal and are how leg advance is detected.
Implementations§
Source§impl TrackError
impl TrackError
Sourcepub fn remaining_nm(&self, leg_length_nm: f64) -> f64
pub fn remaining_nm(&self, leg_length_nm: f64) -> f64
Distance still to run along the leg, negative once past to.
Trait Implementations§
Source§impl Clone for TrackError
impl Clone for TrackError
Source§fn clone(&self) -> TrackError
fn clone(&self) -> TrackError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TrackError
Source§impl Debug for TrackError
impl Debug for TrackError
Source§impl PartialEq for TrackError
impl PartialEq for TrackError
Source§fn eq(&self, other: &TrackError) -> bool
fn eq(&self, other: &TrackError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrackError
Auto Trait Implementations§
impl Freeze for TrackError
impl RefUnwindSafe for TrackError
impl Send for TrackError
impl Sync for TrackError
impl Unpin for TrackError
impl UnsafeUnpin for TrackError
impl UnwindSafe for TrackError
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