pub struct Simulator { /* private fields */ }Expand description
Moves a vessel over the ground, producing a state to render before a real position source is available.
A pure function of elapsed time rather than wall-clock time, so the same call sequence produces the same track on every run, and a session can be replayed faster than real time.
Implementations§
Source§impl Simulator
impl Simulator
Sourcepub fn new() -> Self
pub fn new() -> Self
A vessel under way in the Gulf of Trieste, where this project’s charts have coverage.
Sourcepub fn tick(&mut self, dt: Duration) -> VesselState
pub fn tick(&mut self, dt: Duration) -> VesselState
Advances the vessel by dt and returns the new state.
Sourcepub fn state(&self) -> VesselState
pub fn state(&self) -> VesselState
The current state without advancing it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Simulator
impl RefUnwindSafe for Simulator
impl Send for Simulator
impl Sync for Simulator
impl Unpin for Simulator
impl UnsafeUnpin for Simulator
impl UnwindSafe for Simulator
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