pub struct FixBuilder { /* private fields */ }Expand description
A VesselState under construction, built up one reading at a time.
Readings arrive as separate calls to its setters regardless of source – a Signal K delta, a parsed NMEA 0183 sentence, a replayed passage – and this type only tracks whether enough have arrived for a complete state. It has no knowledge of the source protocol.
Implementations§
Source§impl FixBuilder
impl FixBuilder
Sourcepub fn set_position(&mut self, position: Position)
pub fn set_position(&mut self, position: Position)
Records a position. Only a position update marks a fix as fresh; course and speed updates alone must not reset the age of a stalled position.
Sourcepub fn set_course_over_ground(&mut self, deg: f64)
pub fn set_course_over_ground(&mut self, deg: f64)
Records course over ground, degrees true.
Sourcepub fn set_speed_over_ground(&mut self, kn: f64)
pub fn set_speed_over_ground(&mut self, kn: f64)
Records speed over ground, knots.
Sourcepub fn set_heading(&mut self, deg: f64)
pub fn set_heading(&mut self, deg: f64)
Records heading, degrees true. Never required – see
VesselState::heading_deg.
Sourcepub fn complete(self) -> Option<VesselState>
pub fn complete(self) -> Option<VesselState>
A complete state, if enough has arrived to build one.
Heading may be missing – a vessel without a compass has no heading line. Position, course and speed are required; there is no meaningful default for any of them.
Trait Implementations§
Source§impl Clone for FixBuilder
impl Clone for FixBuilder
Source§fn clone(&self) -> FixBuilder
fn clone(&self) -> FixBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more