Skip to main content

CompassModel

Trait CompassModel 

Source
pub trait CompassModel {
    // Required method
    fn deviation(&self, course: CompassCourse) -> Result<Deviation>;
}
Expand description

Ship’s magnetism as compass deviation.

Swung table, Smith coefficients or calibrated fluxgate. Deviation is a function of the compass course (what is read on the card), not the magnetic course; the inverse is a solve performed by the algorithms.

Required Methods§

Source

fn deviation(&self, course: CompassCourse) -> Result<Deviation>

Deviation on course.

§Errors

Any error the model raises: table too sparse, course not covered.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§