pub struct StatePriors { /* private fields */ }Expand description
Initial 1σ priors where the fix provides none.
A fix usually gives horizontal accuracy, rarely course accuracy, never speed accuracy, and nothing about current. The defaults are deliberately loose: an estimator recovers from a loose prior within a few observations, never from a tight wrong one.
Start from StatePriors::standard and adjust with with_*; each rejects
non-positive sigmas, so no component starts as exactly known.
Implementations§
Source§impl StatePriors
impl StatePriors
Sourcepub const fn standard() -> Self
pub const fn standard() -> Self
Merchant vessel with standard GNSS, gyro and log: 10 m; heading 3°, or 104° (uniform over the circle) if unknown; speed 1 kn, or 10 kn if unknown; current 1 kn.
Sourcepub fn with_position(self, sigma: Distance) -> Result<Self>
pub fn with_position(self, sigma: Distance) -> Result<Self>
Sets the horizontal position sigma used when the fix gives no accuracy.
§Errors
KernelError::OutOfRange unless positive.
Sourcepub fn with_heading(self, known: Angle, unknown: Angle) -> Result<Self>
pub fn with_heading(self, known: Angle, unknown: Angle) -> Result<Self>
Sets the heading sigmas: known for a heading without sigma or taken
from COG; unknown when neither is available.
§Errors
KernelError::OutOfRange unless both positive.
Sourcepub fn with_speed(self, known: Speed, unknown: Speed) -> Result<Self>
pub fn with_speed(self, known: Speed, unknown: Speed) -> Result<Self>
Sets the speed-through-water sigmas: known when taken from SOG;
unknown when the fix has no speed.
§Errors
KernelError::OutOfRange unless both positive.
Sourcepub fn with_current(self, sigma: Speed) -> Result<Self>
pub fn with_current(self, sigma: Speed) -> Result<Self>
Sets the sigma of each current component (not directly observed).
§Errors
KernelError::OutOfRange unless positive.
Sourcepub const fn heading_unknown(&self) -> Angle
pub const fn heading_unknown(&self) -> Angle
Heading, when neither heading nor course is available.
Sourcepub const fn speed_unknown(&self) -> Speed
pub const fn speed_unknown(&self) -> Speed
Speed through the water, when the fix has no speed.